Class RestFHIRTerminologyProvider
- java.lang.Object
-
- org.linuxforhealth.fhir.cql.engine.rest.terminology.RestFHIRTerminologyProvider
-
- All Implemented Interfaces:
org.opencds.cqf.cql.engine.terminology.TerminologyProvider
public class RestFHIRTerminologyProvider extends java.lang.Object implements org.opencds.cqf.cql.engine.terminology.TerminologyProviderThis is an implementation of a terminology provider for the CQL Engine that uses the IBM FHIR Server REST Client to access the terminology system.
-
-
Constructor Summary
Constructors Constructor Description RestFHIRTerminologyProvider(FHIRClient fhirClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<org.opencds.cqf.cql.engine.runtime.Code>expand(org.opencds.cqf.cql.engine.terminology.ValueSetInfo valueSet)booleanin(org.opencds.cqf.cql.engine.runtime.Code code, org.opencds.cqf.cql.engine.terminology.ValueSetInfo valueSet)org.opencds.cqf.cql.engine.runtime.Codelookup(org.opencds.cqf.cql.engine.runtime.Code code, org.opencds.cqf.cql.engine.terminology.CodeSystemInfo codeSystem)voidresolveByUrl(org.opencds.cqf.cql.engine.terminology.ValueSetInfo valueSet)Lookup a ValueSet that corresponds to the provided CQL ValueSetInfo.
-
-
-
Constructor Detail
-
RestFHIRTerminologyProvider
public RestFHIRTerminologyProvider(FHIRClient fhirClient)
-
-
Method Detail
-
in
public boolean in(org.opencds.cqf.cql.engine.runtime.Code code, org.opencds.cqf.cql.engine.terminology.ValueSetInfo valueSet)- Specified by:
inin interfaceorg.opencds.cqf.cql.engine.terminology.TerminologyProvider
-
expand
public java.lang.Iterable<org.opencds.cqf.cql.engine.runtime.Code> expand(org.opencds.cqf.cql.engine.terminology.ValueSetInfo valueSet)
- Specified by:
expandin interfaceorg.opencds.cqf.cql.engine.terminology.TerminologyProvider
-
lookup
public org.opencds.cqf.cql.engine.runtime.Code lookup(org.opencds.cqf.cql.engine.runtime.Code code, org.opencds.cqf.cql.engine.terminology.CodeSystemInfo codeSystem)- Specified by:
lookupin interfaceorg.opencds.cqf.cql.engine.terminology.TerminologyProvider
-
resolveByUrl
public void resolveByUrl(org.opencds.cqf.cql.engine.terminology.ValueSetInfo valueSet)
Lookup a ValueSet that corresponds to the provided CQL ValueSetInfo. Only the ValueSetInfo.id property is supported at this time. Use of the ValueSetInfo.version or ValueSetInfo.codesystems properties will cause an UnsupportedOperationException. This method uses a search strategy that first treats the ValueSetInfo.id as a URL, then attempts urn:oid or urn:uuid resolution, then finally attempts plain ID-based resolution if nothing has been found and the value appears to be a FHIR ID.- Parameters:
valueSet- CQL ValueSetInfo with ID property populated- Throws:
java.lang.UnsupportedOperationException- if the ValueSetInfo.codesystem property is specified.java.lang.IllegalArgumentException- if zero or more than one ValueSet were resolved for the specified ValueSetInfo.id property.
-
-