Class ServerFHIRTerminologyProvider
- java.lang.Object
-
- com.ibm.fhir.cql.engine.server.terminology.ServerFHIRTerminologyProvider
-
- All Implemented Interfaces:
org.opencds.cqf.cql.engine.terminology.TerminologyProvider
public class ServerFHIRTerminologyProvider extends java.lang.Object implements org.opencds.cqf.cql.engine.terminology.TerminologyProvider
This is an implementation of a terminology provider for the CQL Engine that uses the IBM FHIR Server FHIRTermService API to access the terminology data.
-
-
Constructor Summary
Constructors Constructor Description ServerFHIRTerminologyProvider(FHIRResourceHelpers resourceHelper)
-
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 valueSetInfo)
boolean
in(org.opencds.cqf.cql.engine.runtime.Code code, org.opencds.cqf.cql.engine.terminology.ValueSetInfo valueSetInfo)
org.opencds.cqf.cql.engine.runtime.Code
lookup(org.opencds.cqf.cql.engine.runtime.Code code, org.opencds.cqf.cql.engine.terminology.CodeSystemInfo codeSystem)
protected ValueSet
resolveByUrl(org.opencds.cqf.cql.engine.terminology.ValueSetInfo valueSetInfo)
Lookup a ValueSet that corresponds to the provided CQL ValueSetInfo.
-
-
-
Constructor Detail
-
ServerFHIRTerminologyProvider
public ServerFHIRTerminologyProvider(FHIRResourceHelpers resourceHelper)
-
-
Method Detail
-
in
public boolean in(org.opencds.cqf.cql.engine.runtime.Code code, org.opencds.cqf.cql.engine.terminology.ValueSetInfo valueSetInfo)
- Specified by:
in
in 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 valueSetInfo)
- Specified by:
expand
in 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:
lookup
in interfaceorg.opencds.cqf.cql.engine.terminology.TerminologyProvider
-
resolveByUrl
protected ValueSet resolveByUrl(org.opencds.cqf.cql.engine.terminology.ValueSetInfo valueSetInfo)
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- Returns:
- resolved ValueSet resource
- Throws:
java.lang.IllegalArgumentException
- if the ValueSetInfo.id could not be resolvedjava.lang.UnsupportedOperationException
- if the ValueSetInfo.codesystem property is specified.
-
-