Reference a value set by ID
Last Post 28 May 2015 12:29 PM by jbowie. 1 Replies.
Author Messages
JimGJSilviaUser is Offline
New Member
New Member
Posts:2


--
28 May 2015 11:36 AM
    Using the API, what is the method to reference a value set by ID? Can I use the API to find out all the value sets that a given concept (ref by code) is a member of?
    jbowieUser is Offline
    Basic Member
    Basic Member
    Posts:110


    --
    28 May 2015 12:29 PM
    Most of the APIs to manage Subsets can be found in the SubsetQuery class. To get the Subset object for a subset id, use SubsetQuery.fetch(id). This will return an instance of the Subset object. Many basic attributes of the Subset have getter methods on the Subset object, such as the Subset expression. Some more complex attributes have dedicated methods in SubsetQuery. The Subset's concepts, for example, can be found from SubsetQuery.fetchConcepts(id, ...).

    To find all the Subsets for which a Concept is a member, use SubsetQuery.fetchConceptSubsets(conId, nsId). If you only have the Concept's Code, you will first have to look up the Concept to get its internal id.

    For additional information on Subsets, see Chapter 10 - DTS Subsets in the DTS API Programming Tutorial accessible from the DTS API Javadoc.


    ---