Background
The AQL MATCHES statement may perform a request to a terminology server for performing some operation over a value set or code system (here used as a synonym of terminology). Several operations may be possible, being the most common ones: the expansion of a ValueSet, checking that a concept belongs to a value set or code system, testing if one concept subsumes another one, or the translation of concepts across different terminologies.
...
Examples of value sets and code system URIs | ||
---|---|---|
Code system or value set to be considered in the operation parameter | URI | |
Parameters URIs (value sets with assigned id) | http://terminology.hl7.org/ValueSet/v3-FamilyMemberhttp://hl7.org/fhir/ValueSet/procedure-not-performed-reason | |
https://vsacterminology.nlmhl7.nih.govorg/valueset/2.16.840.1.113762.1.4.1010.2httpsValueSet/v3-FamilyMember | ||
http://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1114.7hl7.org/fhir/ValueSet/procedure-not-performed-reason | ||
https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.10471010.172 | ||
https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1047.314 | ||
http://snomed.info/sct/32506021000036107/version/20200331?fhir_vs=refset/1200161000168100 (implicit VS defined for Australian Refset for Vaccination Reason) | ||
http://snomed.info/sct/32506021000036107/version/20171130?fhir_vs (implicit VS for all SNOMED-CT ids in the edition and version specified) | ||
http://snomed.info/sct/32506021000036107/version/20171130?fhir_vs=isa/372862008 (implicit VS defined by subsumption)1114.7 | ||
https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1047.17 | ||
https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1047.314 | ||
http://snomed.info/sct/32506021000036107/version/2017113020200331?fhir_vs=eclrefset/<<3728620081200161000168100 (implicit VS defined by Expression Constraint Language) | Parameters URIs (value sets are full code systemsfor Australian Refset for Vaccination Reason) | |
http://snomed.info/scthttp://www.omim.org | ||
http://www.nlm.nih.gov/research/umls/rxnorm32506021000036107/version/20171130?fhir_vs (implicit VS for all SNOMED-CT ids in the edition and version specified) | ||
http://loinc.orgsnomed.info/sct/32506021000036107/version/20171130?fhir_vs=isa/372862008 (implicit VS defined by subsumption) | ||
http://fhir.de/CodeSystem/dimdi/icd-10-gmsnomed.info/sct/32506021000036107/version/20171130?fhir_vs=ecl/<<372862008 (implicit VS defined by Expression Constraint Language) | ||
Parameters URIs (value sets are full code systems) | http://snomed.info/sct/900000000000207008 (international edition) | |
http://snomed.info/sct/32506021000036107/version/20171130 (Australian edition with version published on 2017-11-30) |
Operation section
The operation section specifies the action to perform over the specified value set or code system. It is not restricted to any particular structure provided that different terminology servers may use different ways of specifying the operation and its parameters. Query implementers should be careful so the specified operation can be properly dereferenced by the implementation of the driver:
Expand a value set: retrieve all the codes contained in a value set as an explicit set.
Validate a code in a value set: check if a given code belongs to a value set. Recall that the value set may comprise all the codes in a code system (terminology).
Look-up a code: retrieve all the information concerning one particular code. Examples are retrieving the preferred form to display, synonyms, etc.
Translate a code: translate (find an equivalent) code from one Value Set to another one based on a predefined mapping available in the external terminology service. Translation precision may not be limited to full equivalence and different kinds of mappings may be possible (wider meaning, equivalent, narrower meaning, etc).
Subsumption testing: determine if a particular terminology concept is a subtype (is-a) of another one. For example, test in SNOMED-CT if Myasthenia Gravis | 91637004 is a subtype of autoimmune disease | 85828009 (i.e. test if 85828009 subsumes 91637004).
Operation type | Example in the TERMINOLOGY operation parameter | /ValueSet/education-levels/$expand (the part /ValueSet/education-levels/ is not needed since it is already specified as part of the ValueSet URI parameter) |
---|---|
/ValueSet/v3-RoleClassPartitive/$expand (the part /ValueSet/v3-RoleClassPartitive/ is not needed since it is already specified as part of the ValueSet URI parameter) | |
/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=refset/142321000036106&count=10&filter=met (should this case allow to leave ValueSet URI param unpopulated?? we could force to replicate or we could allow to set “implicit“, but also explicit VS can be specified like this so in Value Set could be optional and if it is left empty and is not as operation param then an error would be returned) | |
/ValueSet/$validate-codewww.omim.org | |
http://snomed.info/sct/900000000000207008 (international edition) | |
http://snomed.info/sct/32506021000036107/version/20171130 (Australian edition with version published on 2017-11-30) |
Operation section
The operation section specifies the action to perform over the specified value set or code system. It is not restricted to any particular structure provided that different terminology servers may use different ways of specifying the operation and its parameters. Query implementers should be careful so the specified operation can be properly dereferenced by the implementation of the driver:
Expand a value set: retrieve all the codes contained in a value set as an explicit set.
Validate a code in a value set: check if a given code belongs to a value set. Recall that the value set may comprise all the codes in a code system (terminology).
Look-up a code: retrieve all the information concerning one particular code. Examples are retrieving the preferred form to display, synonyms, etc.
Translate a code: translate (find an equivalent) code from one Value Set to another one based on a predefined mapping available in the external terminology service. Translation precision may not be limited to full equivalence and different kinds of mappings may be possible (wider meaning, equivalent, narrower meaning, etc).
Subsumption testing: determine if a particular terminology concept is a subtype (is-a) of another one. For example, test in SNOMED-CT if Myasthenia Gravis | 91637004 is a subtype of autoimmune disease | 85828009 (i.e. test if 85828009 subsumes 91637004).
Operation type | Example in operation parameter |
---|---|
Expand | ?url=http://snomed.info/sct?fhir_vs=refset/142321000036106&count=10&filter=met |
Validate | ?code=A&url=http://terminology.hl7.org/ValueSet/v2-0323&system=http://terminology.hl7.org/CodeSystem/v2-0323&url=http://terminology.hl7.org/ValueSet/v2-0323/$validate-code |
?code=A&system=http://terminology.hl7.org/CodeSystem/v2-0323(note FHIR requires the system parameter, but that is up to the operation parameters and does not influence our specification) | |
/ValueSet/v2-0323/$validate-code?code=D&system=http://terminology.hl7.org/CodeSystem/v2-0323&display=Delete(the display param is FHIR dependent and optional. Again, the operation may contain parameters that should be interpreted by the driver but that do not affect the specification)&url=http://terminology.hl7.org/ValueSet/v2-0323 | |
Translate | /ConceptMap/snomed-icd-map/$translate?code=10138007&system=http://snomed.info/sct&target=http://icd10.who.org |
| |
?system=http://hl7.org/fhir/composition-status&code=preliminary&source=http://hl7.org/fhir/ValueSet/composition-status&target=http://terminology.hl7.org/ValueSet/v3-ActStatus | |
| |
| |
Subsumes | /CodeSystem/$subsumes?system=http://hl7.org/fhir/sid/icd-10-en&codeA=A20&codeB=A20.1 |
/CodeSystem/$subsumes?system=http://hl7.org/fhir/sid/icd-10-en&codeA=B81&codeB=B81.4 | |
/CodeSystem/$subsumes?system=http://snomed.info/sct&codeA=235856003&codeB=3738000 | |
Look-up | /CodeSystem/$lookup?system=http://loinc.org&code=1963-8&property=code&property=display&property=designations |
/CodeSystem/$lookup?system=http://highmed.org/germanLabCodes2&code=489&_format=json?system=http://highmed.org/germanLabCodes2&code=489&_format=json | |
/CodeSystem/$lookup8&property=code&property=display&property=designations | |
?system=http://hl7highmed.org/fhir/sid/icd-10-engermanLabCodes2&code=D70.0489&_format=json | |
?system=http://hl7.org/fhir/sid/icd-10-en&code=D70.0&_format=json |
...
*Should the grammar restrict the ValueSet section to URI or allow any String so OIDs can fit in the ValueSet specification?
*Which driver format should we use?specification of Concept Maps for translations
Examples
Examples for Validation and Example
...
{{url}}/ValueSet/$validate-code?system=http://loinc.org&code=45276-3&url=http:/loinc.org/vsac/BloodCulture&display=Bacteria identified in Blood by Anaerobe culture 25 degree C incubation
openEHR:
TERMINOLOGY(´http'validate-code', ‘http:/loinc/hl7.org/vsac/BloodCulture´, ´ValueSetfhir/4.0',’ValueSet/$validate-code?system=http://loinc.org&code=45276-3&url=http:/loinc.org/vsac/BloodCulture&display=Bacteria identified in Blood by Anaerobe culture 25 degree C incubation´,´org.hl7.fhir´)incubation'):BOOLEAN
...
EXAMPLE 2
FHIR:
{{url}}/ValueSet/$validate-code?system=http://snomed.info/sct&code=30346009&url=http://vsac.highmed.org/vsac/episodes&display=Evaluation and management of established outpatient in office or other outpatient facility
openEHR:
TERMINOLOGY( ´‘validate-code', ‘http://vsac.highmedhl7.org/vsac/episodes´, ´ValueSetfhir/4.0', ’ValueSet/$validate-code?system=http://snomed.info/sct&code=30346009&url=http://vsac.highmed.org/vsac/episodes&display=Evaluation´,´org.hl7.fhir´)'):BOOLEAN
...
EXAMPLE 3
FHIR:
{{url}}/ValueSet/$validate-code?system=http://snomed.info/sct&code=122298005&url=http://snomed.info/sct?fhir_vs&display=Astrovirus RNA assay
openEHR:
TERMINOLOGY(´‘validate-code', ‘http://snomedhl7.info/sct?fhir_vs´,´ValueSetorg/fhir/4.0', ‘ ValueSet/$validate-code?system=http://snomed.info/sct&code=122298005&url=http://snomed.info/sct?fhir_vs&display=Astrovirus RNA assay´ ,´org.hl7.fhir´)assay'):BOOLEAN
...
EXAMPLE 4
FHIR:
{{url}}/ValueSet/$validate-code?system=http://icd10.who.org&url=http://vsac.nlm.nih.gov/malignantneoplasms&code=C15.8&display=foo
openEHR:
TERMINOLOGY(´http‘validate-code', ‘http://vsac.nlm.nih.gov/malignantneoplasms´, ´ValueSethl7.org/fhir/4.0', ‘ValueSet/$validate-code?system=http://icd10.who.org&url=http://vsac.nlm.nih.gov/malignantneoplasms&code=C15.8&display=foo´,´org.hl7.fhir´)foo’):BOOLEAN
...
EXAMPLE 5
FHIR:
{{url}}/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=isa/50697003
...