Class RegistryTermServiceProvider

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Set<com.ibm.fhir.model.resource.CodeSystem.Concept> closure​(com.ibm.fhir.model.resource.CodeSystem codeSystem, com.ibm.fhir.model.type.Code code)
      Get a set containing CodeSystem.Concept instances where all structural hierarchies have been flattened.
      com.ibm.fhir.model.resource.CodeSystem.Concept getConcept​(com.ibm.fhir.model.resource.CodeSystem codeSystem, com.ibm.fhir.model.type.Code code)
      Get the concept in the provided code system with the specified code.
      Set<com.ibm.fhir.model.resource.CodeSystem.Concept> getConcepts​(com.ibm.fhir.model.resource.CodeSystem codeSystem)
      Get a set containing CodeSystem.Concept instances where all structural hierarchies have been flattened.
      <R> Set<R> getConcepts​(com.ibm.fhir.model.resource.CodeSystem codeSystem, Function<com.ibm.fhir.model.resource.CodeSystem.Concept,​? extends R> function)
      Get a set containing FHIRTermServiceProvider instances mapped from concepts where all structural hierarchies have been flattened.
      Set<com.ibm.fhir.model.resource.CodeSystem.Concept> getConcepts​(com.ibm.fhir.model.resource.CodeSystem codeSystem, List<com.ibm.fhir.model.resource.ValueSet.Compose.Include.Filter> filters)
      Get a set containing CodeSystem.Concept instances where all structural hierarchies have been flattened and filtered by the given set of value set include filters.
      <R> Set<R> getConcepts​(com.ibm.fhir.model.resource.CodeSystem codeSystem, List<com.ibm.fhir.model.resource.ValueSet.Compose.Include.Filter> filters, Function<com.ibm.fhir.model.resource.CodeSystem.Concept,​? extends R> function)
      Get a set containing FHIRTermServiceProvider instances mapped from concepts where all structural hierarchies have been flattened and filtered by the given set of value set include filters.
      boolean hasConcept​(com.ibm.fhir.model.resource.CodeSystem codeSystem, com.ibm.fhir.model.type.Code code)
      Indicates whether the given code system contains a concept with the specified code.
      boolean isSupported​(com.ibm.fhir.model.resource.CodeSystem codeSystem)
      Indicates whether the given code system is supported.
      boolean subsumes​(com.ibm.fhir.model.resource.CodeSystem codeSystem, com.ibm.fhir.model.type.Code codeA, com.ibm.fhir.model.type.Code codeB)
      Indicates whether the concept for CodeA subsumes the concept for codeB in the passed CodeSystem.
    • Constructor Detail

      • RegistryTermServiceProvider

        public RegistryTermServiceProvider()
    • Method Detail

      • closure

        public Set<com.ibm.fhir.model.resource.CodeSystem.Concept> closure​(com.ibm.fhir.model.resource.CodeSystem codeSystem,
                                                                           com.ibm.fhir.model.type.Code code)
        Description copied from interface: FHIRTermServiceProvider
        Get a set containing CodeSystem.Concept instances where all structural hierarchies have been flattened.
        Specified by:
        closure in interface FHIRTermServiceProvider
        Parameters:
        codeSystem - the code system
        code - the root of the hierarchy containing the Concept instances to be flattened
        Returns:
        flattened set of Concept instances for the given tree
      • getConcept

        public com.ibm.fhir.model.resource.CodeSystem.Concept getConcept​(com.ibm.fhir.model.resource.CodeSystem codeSystem,
                                                                         com.ibm.fhir.model.type.Code code)
        Description copied from interface: FHIRTermServiceProvider
        Get the concept in the provided code system with the specified code. Consumers should not expect the returned Concept to contain child concepts, even where such concepts exist in the underlying CodeSystem.
        Specified by:
        getConcept in interface FHIRTermServiceProvider
        Parameters:
        codeSystem - the code system
        code - the code
        Returns:
        the code system concept with the specified code, or null if no such concept exists
      • getConcepts

        public Set<com.ibm.fhir.model.resource.CodeSystem.Concept> getConcepts​(com.ibm.fhir.model.resource.CodeSystem codeSystem)
        Description copied from interface: FHIRTermServiceProvider
        Get a set containing CodeSystem.Concept instances where all structural hierarchies have been flattened.
        Specified by:
        getConcepts in interface FHIRTermServiceProvider
        Parameters:
        codeSystem - the code system containing the set of Concept instances to be flattened
        Returns:
        flattened set of Concept instances for the given code system
      • getConcepts

        public <R> Set<R> getConcepts​(com.ibm.fhir.model.resource.CodeSystem codeSystem,
                                      Function<com.ibm.fhir.model.resource.CodeSystem.Concept,​? extends R> function)
        Description copied from interface: FHIRTermServiceProvider
        Get a set containing FHIRTermServiceProvider instances mapped from concepts where all structural hierarchies have been flattened.
        Specified by:
        getConcepts in interface FHIRTermServiceProvider
        Type Parameters:
        R - the element type of the result set
        Parameters:
        codeSystem - the code system containing the set of Concept instances to be flattened
        function - the function to apply to each element of the result set
        Returns:
        flattened set of FHIRTermServiceProvider instances mapped from concepts for the given code system
      • getConcepts

        public Set<com.ibm.fhir.model.resource.CodeSystem.Concept> getConcepts​(com.ibm.fhir.model.resource.CodeSystem codeSystem,
                                                                               List<com.ibm.fhir.model.resource.ValueSet.Compose.Include.Filter> filters)
        Description copied from interface: FHIRTermServiceProvider
        Get a set containing CodeSystem.Concept instances where all structural hierarchies have been flattened and filtered by the given set of value set include filters.
        Specified by:
        getConcepts in interface FHIRTermServiceProvider
        Parameters:
        codeSystem - the code system containing the set of Concept instances to be flattened / filtered
        filters - the value set include filters
        Returns:
        flattened / filtered set of Concept instances for the given code system
      • getConcepts

        public <R> Set<R> getConcepts​(com.ibm.fhir.model.resource.CodeSystem codeSystem,
                                      List<com.ibm.fhir.model.resource.ValueSet.Compose.Include.Filter> filters,
                                      Function<com.ibm.fhir.model.resource.CodeSystem.Concept,​? extends R> function)
        Description copied from interface: FHIRTermServiceProvider
        Get a set containing FHIRTermServiceProvider instances mapped from concepts where all structural hierarchies have been flattened and filtered by the given set of value set include filters.
        Specified by:
        getConcepts in interface FHIRTermServiceProvider
        Type Parameters:
        R - the element type of the result set
        Parameters:
        codeSystem - the code system containing the set of Concept instances to be flattened / filtered
        filters - the value set include filters
        function - the function to apply to each element of the result set
        Returns:
        flattened / filtered set of FHIRTermServiceProvider instances mapped from concepts for the given code system
      • hasConcept

        public boolean hasConcept​(com.ibm.fhir.model.resource.CodeSystem codeSystem,
                                  com.ibm.fhir.model.type.Code code)
        Description copied from interface: FHIRTermServiceProvider
        Indicates whether the given code system contains a concept with the specified code.
        Specified by:
        hasConcept in interface FHIRTermServiceProvider
        Parameters:
        codeSystem - the code system
        code - the code
        Returns:
        true if the given code system contains a concept with the specified code, false otherwise
      • isSupported

        public boolean isSupported​(com.ibm.fhir.model.resource.CodeSystem codeSystem)
        Description copied from interface: FHIRTermServiceProvider
        Indicates whether the given code system is supported.
        Specified by:
        isSupported in interface FHIRTermServiceProvider
        Parameters:
        codeSystem - the code system
        Returns:
        true if the given code system is supported, false otherwise
      • subsumes

        public boolean subsumes​(com.ibm.fhir.model.resource.CodeSystem codeSystem,
                                com.ibm.fhir.model.type.Code codeA,
                                com.ibm.fhir.model.type.Code codeB)
        Description copied from interface: FHIRTermServiceProvider
        Indicates whether the concept for CodeA subsumes the concept for codeB in the passed CodeSystem.
        Specified by:
        subsumes in interface FHIRTermServiceProvider
        Parameters:
        codeSystem - the code system
        codeA - the root of the hierarchy to search
        codeB - the code to match
        Returns:
        true if the code system concept for codeB exists in the tree rooted by the concept for CodeA, false otherwise