Presentation is loading. Please wait.

Presentation is loading. Please wait.

LexEVS 5.0 Value Domain and Pick List November, 2009.

Similar presentations


Presentation on theme: "LexEVS 5.0 Value Domain and Pick List November, 2009."— Presentation transcript:

1 LexEVS 5.0 Value Domain and Pick List November, 2009

2 Overview: Provide the user with an overview of Value Domain Definition and Pick List Definition of the LexGrid model. Talks about Value Domain and Pick List Services that are available in LexEVS API. Session Details: Value Domain and Pick List Course Outline

3 Session Details: Value Domain and Pick List Course Objectives When you complete this course, you will be able to: Understand and define the core structure of Value Domain and Pick List Definitions of the LexGrid Model. Define all the Value Domain and Pick List services in LexEVS API.

4 Session Details: LexGrid 2009 Model Lesson Syllabus Lesson 1: Value Domain Definition Lesson 2: Pick List Definition Lesson 3: Value Domain API Lesson 4: Pick List API

5 Lesson 1: Value Domain Definition When you complete this lesson, you will be able to: Understand and define Value Domain Definition of the LexGrid Model.

6 Lesson 1: Value Domain Definition What Is It? The Value Domain Definition of the LexGrid Model is the proposed mechanism for describing the contents of Value Domain.

7 Lesson 1: Value Domain Definition Value Domain Definition Model Value Domain Definition Model Diagram showing value domain definition of the LexGrid model.

8 Lesson 1: Value Domain Definition Value Domain Definition Model valueDomains : Collection of Value Domain Definitions mappings : A list of all of the local identifiers and defining URI's that are used in the associated resource changedEntry : A top level versionable entry Properties : A collection of properties valueDomainDefinition : A definition of a given value domain

9 Lesson 1: Value Domain Definition Value Domain Definition Class source : The local identifiers of the source(s) of this value domain definition. Must match a local id of a supportedSource in the corresponding mappings section. representsReamsOrContext : 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.

10 Lesson 1: Value Domain Definition DefinitionEntry Class valueDomainDefinition can have 0 or more definitionEntry. ruleOrder : Relative order in which this entry should be applied Operator : Defines how this entry is to be applied to the value domain 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 from the value domain. (logical NAND) AND : Only include the entity codes that are both in the value domain and the definition entry. (logical AND)

11 Lesson 1: Value Domain Definition DefinitionEntry Reference Each definitionEntry can reference one of the following : codingSchemeReference : 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. valueDomainReference : 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. entityReference : A reference to an entityCode and/or one or more entityCodes that have a relationship to the specified entity code

12 Lesson 1: Value Domain Definition DefinitionEntry entityReference entityReference : 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. 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.

13 Lesson 1: Value Domain Definition DefinitionEntry entityReference entityReference 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.

14 Lesson 1: Value Domain Definition Value Domain Definition Model Diagram showing value domain definition of the LexGrid model.

15 Lesson 1: Value Domain Definition Possible Forms Code system – all concept codes in the referencing code system Value Domain – all concept codes defined in the referencing Value Domain Code system/concept code – individual code Code system/concept code + relationship + additional rules (leaf only, targetToSource,...) Combination of any of the above with or/and/difference operators

16 Lesson 1: Value Domain Definition Value Domain Resolution A value domain definition has to be made against a specific version of a code system. But it doesnt 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.

17 Lesson 1: Value Domain Definition Example 1 Value Domain Definition to include all the concept codes in Code System Automobiles Domestic Auto Maker [005] Automobile[A0001] General Motors [GM] hasSubtype Code System : Automobiles Result : Ford Motor Company [Ford]Jaguar [Jaguar] Chevrolet [Chevy] Oldsmobile [73]Truck [T0001] Car [C0001] Tires [Tires] uses hasSubtype valueDomainDefinition valueDomainURI : urn:VDexample1 valueDomainName : All Automobiles defaultCodingScheme : Automobiles definitionEntry ruleOrder : 1 Operator : OR codingSchemeReference codingSchemeURI : Automobiles Domestic Auto Maker [005] Automobile[A0001] Ford Motor Company [Ford] General Motors [GM] Jaguar [Jaguar] Chevrolet [Chevy] Oldsmobile [73]Truck [T0001] Car [C0001] Tires [Tires] hasSubtype uses Domestic Auto Maker [005] Automobile[A0001] hasSubtype Code System : Automobiles

18 Lesson 1: Value Domain Definition Example 2 Value Domain Definition to include all the concept codes except General Motors and its children in Code System Automobiles Domestic Auto Maker [005] Automobile[A0001] Ford Motor Company [Ford] General Motors [GM] Jaguar [Jaguar] Chevrolet [Chevy] Oldsmobile [73]Truck [T0001] Car [C0001] Tires [Tires] hasSubtype uses hasSubtype Code System : Automobiles valueDomainDefinition valueDomainURI : urn:VDexample2 valueDomainName : All Automobiles BUT GM defaultCodingScheme : Automobiles definitionEntry ruleOrder : 1 Operator : OR codingSchemeReference codingSchemeURI : Automobiles Domestic Auto Maker [005] Automobile[A0001] Ford Motor Company [Ford]Jaguar [Jaguar] Truck [T0001] Car [C0001] Tires [Tires] hasSubtype uses hasSubtype Result : definitionEntry ruleOrder : 2 Operator : SUBTRACT entityReference entityCode : GM referenceAssociation : hasSybtype transitiveClosure : true

19 Lesson 1: Value Domain Definition Review 1 To complete the Value Domain Definition stated below to get only the leaf concepts (i.e codes : Jaguar, Chevy and 73) of Domestic Auto Maker using just one definitionEntry : What should be that start conceptCode ? Should the trasitiveClosure be True or false ? Should the leafOnly be True or false Domestic Auto Maker [005] Automobile[A0001] Ford Motor Company [Ford] General Motors [GM] Jaguar [Jaguar] Chevrolet [Chevy] Oldsmobile [73]Truck [T0001] Car [C0001] Tires [Tires] hasSubtype uses hasSubtype Code System : Automobiles valueDomainDefinition valueDomainURI : urn:VDquestion1 valueDomainName : Leaf of domestic auto maker defaultCodingScheme : Automobiles definitionEntry ruleOrder : 1 Operator : OR entityReference entityCode : referenceAssociation : hasSybtype transitiveClosure : leafOnly :

20 Lesson 1: Value Domain Definition Answer 1 To complete the Value Domain Definition stated below to get only the leaf concepts (i.e codes : Jaguar, Chevy and 73) of Domestic Auto Maker using just one definitionEntry : What should be the start entityCode ? 005 Should the trasitiveClosure be True or false ? True Should the leafOnly be True or false ? Domestic Auto Maker [005] Automobile[A0001] Ford Motor Company [Ford] General Motors [GM] Jaguar [Jaguar] Chevrolet [Chevy] Oldsmobile [73]Truck [T0001] Car [C0001] Tires [Tires] hasSubtype uses hasSubtype Code System : Automobiles valueDomainDefinition valueDomainURI : urn:VDquestion1 valueDomainName : Leaf of domestic auto maker defaultCodingScheme : Automobiles definitionEntry ruleOrder : 1 Operator : OR entityReference entityCode : 005 referenceAssociation : hasSybtype transitiveClosure : true leafOnly : true

21 Lesson 1: Value Domain Definition Review 2 Using the previous reviews Value Domain Definition (VDQuestion1), complete the Value Domain Definition stated below to exclude entity code Jaguar : What should be that start entityCode ? Should the trasitiveClosure be True or false ? Should the leafOnly be True or false ? What should be the the Operator (OR, ADD or SUBTRACT) Domestic Auto Maker [005] Automobile[A0001] Ford Motor Company [Ford] General Motors [GM] Jaguar [Jaguar] Chevrolet [Chevy] Oldsmobile [73]Truck [T0001] Car [C0001] Tires [Tires] hasSubtype uses hasSubtype Code System : Automobiles valueDomainDefinition valueDomainURI : urn:VDquestion2 valueDomainName : Leaf auto maker MINUS Jaguar defaultCodingScheme : Automobiles definitionEntry ruleOrder : 1 Operator : OR valueDomainReference valueDomainURI : VDQuestion1 definitionEntry ruleOrder : 2 Operator : entityReference entityCode : referenceAssociation : hasSybtype transitiveClosure : leafOnly :

22 Lesson 1: Value Domain Definition Answer 2 Using the previous reviews Value Domain Definition (VDQuestion1), complete the Value Domain Definition stated below to exclude entity code Jaguar : What should be that start entityCode ? Jaguar Should the trasitiveClosure be True or false ? false Should the leafOnly be True or false ? false What should be the the Operator (OR, ADD or SUBTRACT) ? Domestic Auto Maker [005] Automobile[A0001] Ford Motor Company [Ford] General Motors [GM] Jaguar [Jaguar] Chevrolet [Chevy] Oldsmobile [73]Truck [T0001] Car [C0001] Tires [Tires] hasSubtype uses hasSubtype Code System : Automobiles valueDomainDefinition valueDomainURI : urn:VDquestion2 valueDomainName : Leaf auto maker MINUS Jaguar defaultCodingScheme : Automobiles definitionEntry ruleOrder : 1 Operator : OR valueDomainReference valueDomainURI : VDQuestion1 definitionEntry ruleOrder : 2 Operator : SUBTRACT entityReference entityCode : Jaguar referenceAssociation : hasSybtype transitiveClosure : false leafOnly : false

23 Lesson 1: Value Domain Definition Questions?

24 Lesson 2: Pick List Definition When you complete this lesson, you will be able to: Understand and define Pick List Definition of the LexGrid Model.

25 Lesson 2: Pick List Definition What Is It? The Pick List Definition of the LexGrid Model is the proposed mechanism for describing the contents of Pick List.

26 Lesson 2: Pick List Definition Pick List Definition Model Pick List Definition Model

27 Lesson 2: Pick List Definition Pick List Definition Model pickListDefinition is versionable. pickLists : Collection of Pick List Definitions mappings : A list of all of the local identifiers and defining URI's that are used in the associated resource changedEntry : A top level versionable entry properties : A collection of properties pickListDefinition : A definition of a given Pick list

28 Lesson 2: Pick List Definition pickListDefinition class 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. defaultPickContext : The local identifiers of the context used in the definition of the pick list 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.

29 Lesson 2: Pick List Definition pickListDefinition class defaultLanguage : The local identifier of the language that is used to generate the text of this pick list if not otherwise specified. 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 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

30 Lesson 2: Pick List Definition pickListEntryNode class Each pickListDefinition can have 0 or more pickListEntryNode. pickListEntryNode is versionable. pickListEntryNode can contain properties. pickListEntryId : Unique identifier of this node within the list

31 Lesson 2: Pick List Definition pickListEntryNode class Each pickListEntryNode can either have pickListEntryExclusion or pickListEntry

32 Lesson 2: Pick List Definition pickListEntryExclusion class 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.

33 Lesson 2: Pick List Definition pickListEntry class 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 entryOrder : Relative order of this entry in the list entityCode : Entity code associated with this entry entityCodeNamespace : Local identifier of the namespace of the entity code if different than the pickListDefinition defaultEntityCodeNamespace

34 Lesson 2: Pick List Definition pickListEntry class 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 is present 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.

35 Lesson 2: Pick List Definition Pick List Definition Model Pick List Definition Model

36 Lesson 2: Pick List Definition Possible Forms Value Domain – all concept codes in the value domain completeDomain = true Code system/concept code – individual code (inclusion and exclusion) And/or combination of both

37 Lesson 2: Pick List Definition Pick List Resolution A Pick List 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.

38 Lesson 2: Pick List Definition Example 1 Pick List Definition to include all the preferred designations from valueDomainURI : urn:VDexample1 (Value Domain Definition urn:VDexample1 includes all the concept codes in code system Automobiles) : pickListDefinition pickListId : PLexample1 representsValueDomain : urn:VDexample1 completeDomain : true

39 Lesson 2: Pick List Definition Example 2 Pick List Definition to include all the preferred designations from valueDomainURI : urn:VDexample1 (Value Domain Definition urn:VDexample1 includes all the concept codes in code system Automobiles) but exclude code Tires: pickListDefinition pickListId : PLexample2 representsValueDomain : urn:VDexample1 completeDomain : true pickListEntryNode pickListEntryId : PLE1 pickListEntryExclusion entityCode : Tires entityCodeNamespace : Automobiles

40 Lesson 2: Pick List Definition Review 1 To complete the below Pick List Definition to include all the preferred designations from valueDomainURI : urn:VDexample2 (Value Domain Definition urn:VDexample1 includes all the concept codes in code system Automobiles except GM and its children) and include pick text Car from code C0001 text and code system Automobiles : Should the completeDomain be True or False ? How to include new pick text to the definition ? pickListDefinition pickListId : PLquestion1 representsValueDomain : urn:VDexample2 completeDomain :

41 Lesson 2: Pick List Definition Answer 1 To complete the below Pick List Definition to include all the preferred designations from valueDomainURI : urn:VDexample2 (Value Domain Definition urn:VDexample1 includes all the concept codes in code system Automobiles except GM and its children) and include pick text Car from code C0001 and code system Automobiles : Should the completeDomain be True or False ? True How to include new pick text to the definition ? Add pickListEntry to the definition pickListDefinition pickListId : PLquestion1 representsValueDomain : urn:VDexample2 completeDomain : true pickListEntryNode pickListEntryId : PLE1 pickListEntry pickText : Car entityCode : C0001 entityCodeNamespace : Automobiles

42 Lesson 2: Pick List Definition Questions?

43 Lesson 3: Value Domain API When you complete this lesson, you will be able to: Understand the Value Domain Services available in LexEVS API.

44 Lesson 3: Value Domain API What is it ? Value Domain API will provide ability to load Value Domain Definitions into LexGrid repository. Provides ability to apply user restrictions. Dynamically resolve the definitions during run time. Value Domain API is available as an extension to LexEVS 5.0 release.

45 Here are the classes that implements Value Domain in LexEVS API : 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. Lesson 3: Value Domain API Classes implementing Value Domain API Class NameDescription VDSServicesClass to handle list of Value Domain Definitions Object to and fro database VDServicesClass to handle individual Value Domain Definition objects to and fro database. VDEntryServicesClass to handle Value Domain Entry objects to and fro database. LexEVSValueDomainServicesPrimary interface for LexEVS Value Domain API LexEVSValueDomainServicesImplImplementation of LexEVSValueDomainServices which is primary interface for LexEVS Value Domain API. LoadValueDomainImports the value Domain Definitions in the source file, provided in LexGrid canonical format, to the LexBIG repository. ResolvedValueDomainCodedNodeSetContains coding scheme version reference list that was used to resolve the value domain and the coded node set. ResolvedValueDomainDefinitionA 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.

46 Lesson 3: Value Domain API Load Services There are three methods that could be used to load Value Domain Definitions : loadValueDomain(ValueDomainDefinition vddef, String systemReleaseURI) - Loads supplied valueDomainDefinition object loadValueDomain(InputStream inputStream, boolean failOnAllErrors) - Loads valueDomainDefinitions found in inputStream loadValueDomain(String xmlFileLocation, boolean failOnAllErrors) - Loads valueDomainDefinitions found in input xml file loadValueDomain(String xmlFileLocation, boolean failOnAllErrors) Description:Loads valueDomainDefinitions found in input xml file Input:java.lang.String boolean Output:none Exception:LBException Implementat ion Details: Implementation: Step 1: Call this method on the associated LexEVS Value Domain Service instance to load all Value Domain Definitions found in an XML file that is in LexGrid format. Sample Call: Step 1 : Using existing LexBIGInstance, get the generic extension LexEVSValueDomainServices org.lexgrid.extension.valuedomain.LexEVSValueDomainServices vds = lbs.getGenericExtension( LexEVSValueDomainServices ); Step 2 : Call load method by passing the inputfile location and boolean flag whether to stop on load errors. : vds.loadvalueDomain(inputXMLFile, true);

47 Lesson 3: Value Domain API Query Services isConceptInDomain(String entityCode, URI valueDomainURI) - Determine if the supplied entity code is a valid result for the supplied value domain and, if it is, return the particular codingSchemeVersion that was used isConceptInDomain(String entityCode, URI entityCodeNamespace, CodingSchemeVersionOrTag csvt, URI valueDomainURI) - Similar to previous method, this method determine if the supplied entity code and entity namespace is a valid result for the supplied value domain when resolved against supplied Coding Scheme Version or Tag isConceptInDomain(String entityCode, URI entityCodeNamespace, CodingSchemeVersionOrTag csvt, URI valueDomainURI) Description:Similar to previous method, this method determine if the supplied entity code and entity namespace is a valid result for the supplied value domain when resolved against supplied Coding Scheme Version or Tag. Input:java.lang.String, java.net.URI, org.LexGrid.LexBIG.DataModel.Core. CodingSchemeVersionOrTag java.net.URI Output:org.LexGrid.LexBIG.DataModel.Core. AbsoluteCodingSchemeVersionReference Exception:org.LexGrid.LexBIG.Exceptions.LBException Implementat ion Details: Implementation: Step 1: Call this method on the associated LexEVS Value Domain Service instance to determine if the supplied entity code and its entity namespace is a valid in the supplied Value Domain URI when resolved against supplied Coding Scheme Version or Tag. If it is, return Coding Scheme URI and the Version that was used to resolve, other wise, returns null. Sample Call: Step 1 : Using existing LexBIGInstance, get the generic extension LexEVSValueDomainServices org.lexgrid.extension.valuedomain.LexEVSValueDomainServices vds = lbs.getGenericExtension(LexEVSValueDomainServices); Step 2 :Call isConceptInDomain method: AbsoluteCodingSchemeVersionReference acsvr = vds.isConceptInDomain( conceptA, conceptAEntityNamespace, codingSchemeVersion, valueDomainURI );

48 Lesson 3: Value Domain API Query Services resolveValueDomain(URI valueDomainURI, AbsoluteCodingSchemeVersionReferenceList csVersionList) - Resolve a value domain using the supplied set of coding scheme versions 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 resolveValueDomain(URI valueDomainURI, AbsoluteCodingSchemeVersionReferenceList csVersionList) Description:Resolve a value domain using the supplied set of coding scheme versions. Input:java.net.URI, org.LexGrid.LexBIG.DataModel.Core. AbsoluteCodingSchemeVersionReferenceList Output:org.lexgrid.extension.valuedomain.dto.ResolvedValueDomainDefinition Exception:org.LexGrid.LexBIG.Exceptions.LBException Implementation Details: Implementation: Step 1: Call this method on the associated LexEVS Value Domain Service instance to resolve supplied value domain against list of Coding Scheme versions if supplied. If Coding Scheme Versions list is not supplied, API will resolve against any version of the loaded Coding Scheme that is referenced by the Value Domain. Returns, object ResolvedValueDomainDefinition which contains AbsoluteCodingSchemeVersionReferenceList which tells which all Coding Scheme and the versions were used for this resolve, plus the ResolvedConceptReferencesIterator, which is an iterator for all the valid concepts that belongs to the Value Domain and Value Domain Definition itself. Sample Call: Step 1 : Using existing LexBIGInstance, get the generic extension LexEVSValueDomainServices org.lexgrid.extension.valuedomain.LexEVSValueDomainServices vds = lbs.getGenericExtension(LexEVSValueDomainServices); Step 2 :Create AbsoluteCodingSchemeVersionReferenceList: AbsoluteCodingSchemeVersionReferenceList csvList = new AbsoluteCodingSchemeVersionReferenceList(); csvList.addAbsoluteCodingSchemeVersionReference(Constructors. createAbsoluteCodingSchemeVersionReference("Automobiles", "2.0")); csvList.addAbsoluteCodingSchemeVersionReference(Constructors. createAbsoluteCodingSchemeVersionReference("AutomobilesParts", "2.0")); Step 3 :Call resolveValueDomain method: ResolvedValueDomainDefinition rvdDef = vds.resolveValueDomain ( valueDomainURI,csvList);

49 Lesson 3: Value Domain API Query Services getValueDomainEntitiesForTerm(String term, URI valueDomainURI, String matchAlgorithm) - Resolves the value domain supplied and restricts to the term and matchAlgorithm supplied ResolvedValueDomainCodedNodeSet : Contains the codingScheme URI and Version that was used to resolve and the CodedNodeSet. Note : the CodedNodeSet is unresolved getValueDomainEntitiesForTerm(String term, URI valueDomainURI, String matchAlgorithm) Description:Resolves the value domain supplied and restricts to the term and matchAlgorithm supplied. Return object ResolvedValueDomainCodedNodeSet contains the codingScheme URI and Version that was used to resolve and the CodedNodeSet. Note : the CodedNodeSet is unresolved Input:java.lang.String, java.net.URI, java.lang.String Output:org.lexgrid.extension.valuedomain.dto.ResolvedValueDomainCodedNodeSet 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 resolved Value Domain Entries as CodedNodeSet that is restricted to supplied term and the match algorithm. Returned CodedNodeSet is not resolved. Sample Call: Step 1 : Using existing LexBIGInstance, get the generic extension LexEVSValueDomainServices org.lexgrid.extension.valuedomain.LexEVSValueDomainServices vds = lbs.getGenericExtension(LexEVSValueDomainServices); Step 2 :Call getValueDomainEntriesForTerm method: ResolvedValueDomainCodedNodeSet vdvns = vds.getValueDomainEntriesForTerm("General Motors", new URI("AUTO:AllDomesticANDGM"), MatchAlgorithms.exactMatch.name());

50 Lesson 3: Value Domain API Query Services isSubDomain(URI childValueDomainURI, URI parentValueDomainURI) - Check whether childValueDomainURI is a child of parentValueDomainURI getValueDomainDefinition(URI valueDomainURI) - Returns value domain definition for supplied value domain URI listValueDomains(String valueDomainName) - Return the URI's for the value domain definition(s) for the supplied domain name getAllValueDomainsWithNoNames() - Return the URI's of all unnamed value domain definition(s) getCodingSchemesInValueDomain(URI valueDomainURI) - Returns list of coding scheme summary that is referenced by the supplied value domain isDomain(String entityCode, String codingSchemeName, CodingSchemeVersionOrTag csvt) - Determine if the supplied entity code is of type valueDomain in supplied coding scheme and, if it is, return the true, otherwise return false

51 Lesson 3: Value Domain API Remove Services removeValueDomain(URI valueDomainURI) - Removes supplied value domain definition from the system removeAllValueDomains() - Removes all value domain definitions from the system

52 Lesson 3: Value Domain API Review 1 True or False : Using Value Domain API you can : Load Value Domain Definition ? Resolve Value Domain Definition ? Author Value Domain Definition ? Version Value Domain Definition ? Delete Value Domain Definition ?

53 Lesson 3: Value Domain API Answer 1 True or False : Using Value Domain API you can : Load Value Domain Definition ? True Resolve Value Domain Definition ? True Author Value Domain Definition ? False Version Value Domain Definition ? False Delete Value Domain Definition ? True Value Domain Definition model does support versioning, but it has not been implemented in LexEVS 5.0 release.

54 Lesson 3: Value Domain API Review 2 True or False : Is the CodedNodeSet resolved in the ResolvedValueDomainCodedNodeSet ?

55 Lesson 3: Value Domain API Answer 2 True or False : Is the CodedNodeSet resolved in the ResolvedValueDomainCodedNodeSet ? False ResolvedValueDmainCodedNodeSet contains the codingScheme URI and Version that was used to resolve Value Domain and the unresolved CodedNodeSet.

56 Lesson 3: Value Domain API Review 3 True or False : Resolved Value Domain Data are persisted ?

57 Lesson 3: Value Domain API Answer 3 True or False : Resolved Value Domain Data are persisted ? False Value Domain Definition is resolved dynamically at the runtime and the resulted data are never saved.

58 Lesson 3: Value Domain API Questions?

59 Lesson 4: Pick List API When you complete this lesson, you will be able to: Understand the Pick List Services available in LexEVS API.

60 Lesson 4: Pick List API What is it ? Pick List API will provide ability to load Pick List Definitions into LexGrid repository. Provides ability to apply user restrictions. Dynamically resolve the definitions during run time. Pick List API is available as an extension to LexEVS 5.0 release.

61 Lesson 4: Pick List API Classes implementing Pick List API Here are the classes that implements Pick List in LexEVS API : Class NameDescription PickListsServicesClass to handle list of Pick List Definitions. PickListServicesClass to handle individual Pick List Definition objects to and fro database. PLEntryServicesClass to handle Pick List Entry objects to and fro database. LexEVSPickListServicesPrimary interface for LexEVS Pick List API. LexEVSPickListServicesImplImplementation of LexEVSPickListServices which is primary interface for LexEVS Pick List API. LoadPickListImports the Pick List Definitions in the source file, provided in LexGrid canonical format, to the LexBIG repository. ResolvedPickListEntyListClass to hold list of resolved pick list entries. ResolvedPickListEntry Bean for resolved pick list entries.

62 Lesson 4: Pick List API Load Services There are three methods that could be used to load Pick List Definitions : loadPickList(PickListDefinition pldef, String systemReleaseURI) - Loads supplied Pick List Definition object loadPickList(InputStream inputStream, boolean failOnAllErrors) - Loads Pick List Definitions found in inputStream loadPickList (String xmlFileLocation, boolean failOnAllErrors) - Loads Pick List Definitions found in input xml file loadPickList (String xmlFileLocation, boolean failOnAllErrors) Description:Loads Pick List Definitions found in input xml file Input:java.lang.String boolean Output:none Exception:Exception Implementation Details: Implementation: Step 1: Call this method on the associated LexEVS Pick List Service instance to load all Pick List Definitions found in an XML file that is in LexGrid format. Sample Call: Step 1 : Using LexBIGService instance, get the LexEVSPickListServices interface org.lexgrid.extension.valuedomain.LexEVSPickListServices pls = lbs.getGenericExtension( LexEVSPickListServices ); Step 2 :Call load method by passing the inputfile location and boolean flag whether to stop on load errors. : pls.loadPickList(inputXMLFile, true);

63 Lesson 4: Pick List API Query Services getPickListDefinitionById(String pickListId) - Returns pickList definition for supplied pickListId getPickListDefinitionsForDomain(URI valueDomainURI) - Returns all the pickList definitions that represents supplied valueDomain URI getPickListValueDomain(String pickListId) - Returns an URI of the represented valueDomain of the pickList listPickListIds() - Returns a list of pickListIds that are available in the system listPickListIds() Description:Returns a list of pickListIds that are available in the system. Input:none Output:java.util.List 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 PickListIds that are loaded in the system. Sample Call: Step 1 : Using LexBIGService instance, get the LexEVSPickListServices interface using generic extension : org.lexgrid.extension.valuedomain.LexEVSPickListServices pls = lbs.getGenericExtension( LexEVSPickListServices ); Step 2 :Call listPickListIds method: List plList = pls.listPickListIds();

64 Lesson 4: Pick List API Query Services resolvePickList(String pickListId, boolean sortByText) - Resolves pickList definition for supplied pickListId resolvePickListForTerm(String pickListId, String term, String matchAlgorithm, String language, String[] context, boolean sortByText) - Resolves pickList definition by applying supplied arguments ResolvedPickListEntryList : Contains the list of resolved Pick List Entries. Also provides helpful features to add, remove, enumerate Pick List Entries. resolvePickListForTerm(String pickListId, String term, String matchAlgorithm, String language, String[] context, boolean sortByText) Description:Resolves pickList definition by applying supplied arguments. Input:java.lang.String, java.lang.String[], boolean Output:org.lexgrid.extension.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.getGenericExtension( LexEVSPickListServices ); Step 2 :Call resolvePickListForTerm method: ResolvedPickListEntryList pleList = pls.resolvePickListForTerm ( AUTO:DomesticAutoMakers, Jaguar, MatchAlgorithms.exactMatch.name(), en, null, true);

65 Lesson 4: Pick List API Remove Services removePickList(String pickListId) - Removes supplied Pick List Definition from the system removePickList(String pickListId) Description:Removes supplied Pick List Definition from the system. Input:java.lang.String Output:none Exception:org.LexGrid.LexBIG.Exceptions.LBException, org.LexGrid.managedobj.RemoveException Implementation Details: Implementation: Step 1: Call this method on the associated LexEVS Pick List Service instance to remove Pick List Definition from the system that matches the supplied pickListId. Sample Call: Step 1 : Using LexBIGService instance, get the LexEVSPickListServices interface org.lexgrid.valuedomain.LexEVSPickListServices pls = lbs.getGenericExtension( LexEVSPickListServices ); Step 2 :Call removePickList method: vds.removePickList ("AUTO:AllDomesticANDGM");

66 Lesson 4: Pick List API Review 1 True or False : Does the Pick List API provides authoring capability ?

67 Lesson 4: Pick List API Answer 1 True or False : Does the Pick List API provides authoring capability ? False Though PickListDefinition and PickListEntryNode are Versionable, LexEVS 5.0 release do not have support for authoring.

68 Lesson 4: Pick List API Review 2 True or False : Is Pick List API available in lbRuntime.jar in LexEVS 5.0 release ?

69 Lesson 4: Pick List API Answer 2 True or False : Is Pick List API available in lbRuntime.jar in LexEVS 5.0 release ? False Value Domain and Pick List API are available as an generic extension to LexEVS 5.0 release.

70 Lesson 4: Pick List API Review 3 True or False : Using Pick List API you can : Load Pick List Definition ? Resolve Pick List Definition ? Author Pick List Definition ? Version Pick List Definition ? Delete Pick List Definition ?

71 Lesson 4: Pick List API Answer 3 True or False : Using Pick List API you can : Load Pick List Definition ? True Resolve Pick List Definition ? True Author Pick List Definition ? False Version Pick List Definition ? False Delete Pick List Definition ? True Pick List Definition model does support versioning, but it has not been implemented in LexEVS 5.0 release.

72 Lesson 4: Pick List API Questions?

73 Demo NOTE : The GUI tool that will be used for demo is under development and is built on top of LexEVS 5.1 release. So this tool is not available in LexEVS 5.0 release.


Download ppt "LexEVS 5.0 Value Domain and Pick List November, 2009."

Similar presentations


Ads by Google