Class 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.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 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 valueSetInfo)
        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

        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 resolved
        java.lang.UnsupportedOperationException - if the ValueSetInfo.codesystem property is specified.