Class 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.TerminologyProvider
    This is an implementation of a terminology provider for the CQL Engine that uses the IBM FHIR Server REST Client to access the terminology system.
    • 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)  
      boolean in​(org.opencds.cqf.cql.engine.runtime.Code code, org.opencds.cqf.cql.engine.terminology.ValueSetInfo valueSet)  
      org.opencds.cqf.cql.engine.runtime.Code lookup​(org.opencds.cqf.cql.engine.runtime.Code code, org.opencds.cqf.cql.engine.terminology.CodeSystemInfo codeSystem)  
      void resolveByUrl​(org.opencds.cqf.cql.engine.terminology.ValueSetInfo valueSet)
      Lookup a ValueSet that corresponds to the provided CQL ValueSetInfo.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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:
        in in interface org.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:
        expand in interface org.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 interface org.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.