NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The LexEVS Value Domain and Pick List service will provide ability to load Value Domain and Pick List Definitions into LexGrid repository and provides ability to apply user restrictions and dynamically resolve the definitions during run time. Both Value Domain and Pick List service are integrated part of LexEVS core API.

Scope

The LexEVS Value Domain and Pick List service will provide programmatic access to load Value Domain and Pick List Definitions using the domain objects that are available via the LexGrid logical model.

The LexEVS Value Domain and Pick List service will provide ability to apply certain user restrictions (ex: pickListId, valueDomain URI etc) and dynamically resolve the Value Domain and Pick List definitions during the run time.

Architecture

The LexEVS Value Domain and Pick List Service meant to expose the API particularly for the Value Domain and Pick List elements of the LexGrid Logical Model. For more information on LexGrid model see http://informatics.mayo.edu/

LexGrid Value Domain model

Here is a UML representation of Value Domain with in within LexGrid 200901 model :Image Removed.

!value_domain_VDModel.jpg,alt="UML representation of Value Domain wihtin LexGrid 200901 model"!

Value Domain Definition

A definition of a given value domain. A value domain can be a simple description with no associated value domain entries, or it can consist of one or more definitionEntries that resolve to an enumerated list of entityCodes when applied to one or more codingScheme versions.

...

Source: The local identifiers of the source(s) of this property. Must match a local id of a supportedSource in the corresponding mappings section.
representsRealmOrContext: The local identifiers of the context(s) in which this value domain applies. Must match a local id of a supportedContext in the corresponding mappings section.
valueDomainURI: The URI of this value domain.
valueDomainName: The name of this domain, if any.
defaultCodingScheme: Local name of the primary coding scheme from which the domain is drawn. defaultCodingScheme must match a local id of a supportedCodingScheme in the mappings section.

Value Domain Definition Entry

A reference to an entry code, a coding scheme or another value domain along with the instructions about how the reference is applied. Definition entrys are applied in entryOrder, with each successive entry either adding to or subtracting from the final set of entity codes.

...

ruleOrder: The unique identifier of the definition entry within the definition as well as the relative order in which this entry should be applied
operator: How this entry is to be applied to the value domain

Coding Scheme Reference

A reference to all of the entity codes in a given coding scheme.

...

codingScheme: The local identifier of the coding scheme that the entity codes are drawn from . codingSchemeName must match a local id of a supportedCodingScheme in the mappings section.

Value Domain References

A reference to the set of codes defined in another value domain.

...

valueDomainURI: The URI of the value domain to apply the operator to. This value domain may be contained within the local service or may need to be resolved externally.

Entity Reference

A reference to an entityCode and/or one or more entityCodes that have a relationship to the specified entity code.

...

entityCode: The entity code being referenced.
entityCodeNamespace: Local identifier of the namespace of the entityCode. entityCodeNamespace must match a local id of a supportedNamespace in the corresponding mappings section. If omitted, the URI of the defaultCodingScheme will be used as the URI of the entity code.
leafOnly: If true and referenceAssociation is supplied and referenceAssociation is defined as transitive, include all entity codes that are "leaves" in transitive closure of referenceAssociation as applied to entity code. Default: false
referenceAssociation: The local identifier of an association that appears in the native relations collection in the default coding scheme. This association is used to describe a set of entity codes. If absent, only the entityCode itself is included in this definition.
targetToSource: If true and referenceAssociation is supplied, navigate from entityCode as the association target to the corresponding sources. If transitiveClosure is true and the referenceAssociation is transitive, include all the ancestors in the list rather than just the direct "parents" (sources).
transitiveClosure: If true and referenceAssociation is supplied and referenceAssociation is defined as transitive, include all entity codes that belong to transitive closure of referenceAssociation as applied to entity code. Default: false

Definition Operator

The description of how a given definition entry is applied.

...

OR: Add the set of entityCodes described by the currentEntity to the value domain. (logical OR)
SUBTRACT: Subtract (remove) the set of entityCodes described by the currentEntity to the value domain. (logical NAND)
AND: Only include the entity codes that are both in the value domain and the definition entry. (logical AND)

LexGrid Pick List Model

Here is a UML representation of Pick List with in within LexGrid 200901 model:Image Removed

!value_domain_PLModel.jpg,alt="UML representation of Pick List within LexGrid 200901 model"!

Pick List Definition

An ordered list of entity codes and corresponding presentations drawn from a value domain.

...

Source: The local identifiers of the source(s) of this pick list definition. Must match a local id of a supportedSource in the corresponding mappings section.
pickListId: An identifier that uniquely names this list within the context of the collection.
representsValueDomain: The URI of the value domain definition that is represented by this pick list
defaultEntityCodeNamespace: Local name of the namespace to which the entry codes in this list belong. defaultEntityCodeNamespace must match a local id of a supportedNamespace in the mappings section.
defaultLanguage: The local identifier of the language that is used to generate the text of this pick list if not otherwise specified. Note that this language does NOT necessarily have any coorelation with the language of a pickListEntry itself or the language of the target user. defaultLanguage must match a local id of a supportedLanguage in the mappings section.
defaultSortOrder: The local identifier of a sort order that is used as the default in the definition of the pick list
defaultPickContext: The local identifiers of the context used in the definition of the pick list.
completeDomain: True means that this pick list should represent all of the entries in the domain. Any active entity codes that aren't in the specific pick list entries are added to the end, using the designations identified by the defaultLanguage, defaultSortOrder and defaultPickContext. Default: false

Pick List Entry Node

An inclusion (pickListEntry) or exclusion (pickListEntryExclusion) in a pick list definition

...

pickListEntryId: Unique identifier of this node within the list.

Pick List Entry

An entity code and corresponding textual representation.

...

pickText: The text that represents this node in the pick list. Some business rules may require that this string match a presentation associated with the entityCode
pickContext: The local identifiers of the context(s) in which this entry applies. pickContext must match a local id of a supportedContext in the mappings section
entryOrder: Relative order of this entry in the list. pickListEntries without a supplied order follow the all entries with an order, and the order is not defined.
entityCode: Entity code associated with this entry.
entityCodeNamespace: Local identifier of the namespace of the entity code if different than the pickListDefinition defaultEntityCodeNamespace. entityCodeNamespace must match a local id of a supportedNamespace in the mappings section.
propertyId: The property identifier associated with the entityCode and entityCodeNamespace that the pickText was derived from. If absent, the pick text can be anything. Some terminologies may have business rules requiring this attribute to be present.
isDefault: True means that this is the default entry for the supplied language and context.
matchIfNoContext: True means that this entry can be used if no contexts are supplied, even though pickContext ispresent.
Language: The local name of the language to be used when the application/user supplies a selection language matches. If absent, this matches all languages. language must match a local id od of a supportedLanguage in the mappings section.

Pick List Entry Exclusion

An entity code that is explicitly excluded from a pick list.

...

entityCode: Entity code associated with this entry.
entityCodeNamespace: Local identifier of the namespace of the entity code if different than the pickListDefinition defaultEntityCodeNamespace. entityCodeNamespace must match a local id of a supportedNamespace in the mappings section.

Value Domain Definitions Possible Forms

  • Code system/concept code + relationship + additional rules (leaf only, immediate children, etc)
  • Code system - all concept codes in the system
  • Code system/concept code - individual code
  • Combination of any of the above with OR/AND/SUBTRACT operators

Value Domain Resolution

  • A value domain definition has to be made against a specific version of a code system. But it doesn't have to be resolved against the same version.
  • Even a simple list (a,b,c,d) needs to be resolved as, at some future date, "c" might be retired.
  • Resolution does not create static artifact.

Pick List Definitions Possible Forms

  • Value Domain - all concept codes in the value domain
  • Code system/concept code - individual code (inclusion and exclusion)

Pick List Resolution

  • A picklist definition has to be made against a specific value domain.
  • Even a simple list (a,b,c,d) needs to be resolved as, at some future date, "c" might be retired.
  • Resolution does not create static artifact.

LexEVS Value Domain and Pick List Service Class Diagram

Common Services Class Diagram

These are the classes that are used commonly across Value Domain and Pick List implementation.

Class Name

Description

VDEntryTypeServices

Class to handle Entry Type objects to and fro database .

VDEntryStateServices

Class to handle Entry State objects to and fro database.

VDPropertyServices

Class to handle Property objects to and fro database.

VDMappingServices

Class to handle supported Mappings objects to and fro database.

VDServiceHelper

Helper class containing methods that are commonly used.

VDBaseSQLServices

Class to handle SQL Services.

VDBaseService

Base service class to handle all Value Domain and Pick List related objects to and fro database.

Image Removed!value_domain_CommonClassDiagram.jpg.alt\"value domain CommonClassDiagram"!

Value Domain Class Diagram

Classes that implements implement LexEVS Value Domain API

Class Name

Description

VDSServices

Class to handle list of Value Domain Definitions Object to and fro database

VDServices

Class to handle individual Value Domain Definition objects to and fro database.

VDEntryServices

Class to handle Value Domain Entry objects to and fro database.

LexEVSValueDomainServices

Primary interface for LexEVS Value Domain API

LexEVSValueDomainServicesImpl

Implementation of LexEVSValueDomainServices which is primary interface for LexEVS Value Domain API.

LoadValueDomain

Imports the value Domain Definitions in the source file, provided in LexGrid canonical format, to the LexBIG repository.

ResolvedValueDomainCodedNodeSet

Contains coding scheme version reference list that was used to resolve the value domain and the coded node set.

ResolvedValueDomainDefinition

A resolved Value Domain definition containing the coding scheme version reference list that was used to resolve the value domain and an iterator for resolved concepts.

Image Removed!value_domain_VDClassDiagram.jpg,alt="value domain VDClassDiagram"!

Pick List Class Diagram

Classes that implements LexEVS Pick List API

Class Name

Description

PickListsServices

Class to handle list of Pick List Definitions.

PickListServices

Class to handle individual Pick List Definition objects to and fro database.

PLEntryServices

Class to handle Pick List Entry objects to and fro database.

LexEVSPickListServices

Primary interface for LexEVS Pick List API.

LexEVSPickListServicesImpl

Implementation of LexEVSPickListServices which is primary interface for LexEVS Pick List API.

LoadPickList

Imports the Pick List Definitions in the source file, provided in LexGrid canonical format, to the LexBIG repository.

ResolvedPickListEntyList

Class to hold list of resolved pick list entries.

ResolvedPickListEntry

Bean for resolved pick list entries.

LexBIG Services Class Diagram

An interface to LexEVS Value Domain and Pick List Services could be obtained using an instance of LexBigService.

Method Name

Description

getValueDomainService()

Returns an interface to LexEVS Value Domain API

getPickListService()

Returns an interface to LexEVS Pick List API.

Image Removed!value_domain_LexBIGServiceClassDiagram.jpg,alt="value domain LexBIGServiceClassDiagram"!

Main Service API

LexBIG API

An interface to LexEVS Value Domain and Pick List Services could be obtained using an instance of LexBigService.

...

 

listValueDomains(String valueDomainName)

Description:

Return the URI's for the value domain definition(s) for the supplied domain name. If the name is null, returns everything. If the name is not null, returns the value domain(s) that have the assigned name.
Note: plural because there is no guarantee of valueDomain uniqueness. If the name is the empty string "", returns all unnamed valueDomains.

Input:

java.lang.String

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="778d32b6ce6e5048-dbce9f18-44264f04-a844b12a-1db65b9b1ca2fd1e499c8106"><ac:plain-text-body><![CDATA[

Output:

java.net.URI[]

]]></ac:plain-text-body></ac:structured-macro>

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to get the list of Value Domain URI that matches the supplied name.
 
Sample Call:
Step 1 : Using LexBIGService instance, get the LexEVSValueDomainServices interface org.lexgrid.valuedomain.LexEVSValueDomainServices vds = lbs.getValueDomainService();
Step 2 :Call listValueDomains  method:
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7ca710c26c29b7be-1364f5b0-41744b97-87de81ab-775cfc31bf07b9da633926a5"><ac:plain-text-body><![CDATA[URI[] uris  =  vds.listValueDomains("someValueDomainName");

]]></ac:plain-text-body></ac:structured-macro>

...

 

getAllValueDomainsWithNoNames()

Description:

Return the URI's of all unnamed value domain definition(s).

Input:

none

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="d81f7059689752da-ff56987c-41754866-947bb20f-551431656c389a2418d78788"><ac:plain-text-body><![CDATA[

Output:

java.net.URI[]

]]></ac:plain-text-body></ac:structured-macro>

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Value Domain Service instance to get the list of Value Domain URI that have no names.
 
Sample Call:
Step 1 : Using LexBIGService instance, get the LexEVSValueDomainServices interface org.lexgrid.valuedomain.LexEVSValueDomainServices vds = lbs.getValueDomainService();
Step 2 :Call getAllValueDomainsWithNoNames  method:
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9546299aa5017ef9-cda3527d-42e84a74-a15bbc5a-c71323e632c68881769ab7c3"><ac:plain-text-body><![CDATA[URI[] uris  =  vds.getAllValueDomainsWithNoNames();

]]></ac:plain-text-body></ac:structured-macro>

...

 

getPickListDefinitionsForDomain(URI valueDomainURI)

Description:

Returns all the pickList definitions that represents supplied valueDomain URI.

Input:

java.net.URI

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="5de105007b525a64-3b6d6f82-45344a35-abdd8908-079254de57ff6345169176b7"><ac:plain-text-body><![CDATA[

Output:

org.LexGrid.emf.valueDomains.PickListDefinition[]

]]></ac:plain-text-body></ac:structured-macro>

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Pick List Service instance to get all the Pick List Definitions that are represented by supplied Value Domain URI.
 
Sample Call:
Step 1 : Using LexBIGService instance, get the LexEVSPickListServices interface org.lexgrid.valuedomain.LexEVSPickListServices pls = lbs.getPickListService();
Step 2 :Call getPickListDefinitionsForDomain method:
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="27082caa03593b1e-276df85f-4e1d47c3-b56bb009-0baa9320e352761b84897764"><ac:plain-text-body><![CDATA[PickListDefinition[] plDefs  =  pls.getPickListDefinitionsForDomain(valueDomainURI);

]]></ac:plain-text-body></ac:structured-macro>

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e174e6bbe28ab716-dcf2c3bc-4d7146a1-8e3e9b4c-60592c23e7a84735caab7023"><ac:plain-text-body><![CDATA[

 

resolvePickListForTerm(String pickListId, String term, String matchAlgorithm, String language, String[] context, boolean sortByText)

]]></ac:plain-text-body></ac:structured-macro>

Description:

Resolves pickList definition by applying  supplied arguments.

Input:

java.lang.String,
java.lang.String,
java.lang.String,
java.lang.String,
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="49d41686aaae1df0-6766d4a5-4d114e7d-811b9449-7ee8ae9db56f7bac408629fb"><ac:plain-text-body><![CDATA[java.lang.String[],
]]></ac:plain-text-body></ac:structured-macro>
boolean

Output:

org.lexgrid.valuedomain.dto.ResolvedPickListEntryList

Exception:

org.LexGrid.LexBIG.Exceptions.LBException

Implementation Details:

Implementation:
Step 1: Call this method on the associated LexEVS Pick List Service instance to get list of Pick List Entries that  matches the term supplied and meets other supplied restrictions.
 
Sample Call:
Step 1 : Using LexBIGService instance, get the LexEVSPickListServices interface org.lexgrid.valuedomain.LexEVSPickListServices pls = lbs.getPickListService();
Step 2 :Call resolvePickListForTerm  method:
ResolvedPickListEntryList pleList  =  pls.resolvePickListForTerm ("AUTO:DomesticAutoMakers","Jaguar", MatchAlgorithms.exactMatch.name(), "en", null, true);

...