Package com.ibm.fhir.term.spi
Class AbstractTermServiceProvider
- java.lang.Object
-
- com.ibm.fhir.term.spi.AbstractTermServiceProvider
-
- All Implemented Interfaces:
FHIRTermServiceProvider
- Direct Known Subclasses:
GraphTermServiceProvider,RegistryTermServiceProvider,RemoteTermServiceProvider
public abstract class AbstractTermServiceProvider extends Object implements FHIRTermServiceProvider
-
-
Constructor Summary
Constructors Constructor Description AbstractTermServiceProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcheckArgument(CodeSystem codeSystem)protected voidcheckArguments(CodeSystem codeSystem, Code code)protected voidcheckArguments(CodeSystem codeSystem, Code codeA, Code codeB)protected <R> voidcheckArguments(CodeSystem codeSystem, Function<CodeSystem.Concept,? extends R> function)protected voidcheckArguments(CodeSystem codeSystem, List<ValueSet.Compose.Include.Filter> filters)protected <R> voidcheckArguments(CodeSystem codeSystem, List<ValueSet.Compose.Include.Filter> filters, Function<CodeSystem.Concept,? extends R> function)abstract Set<CodeSystem.Concept>closure(CodeSystem codeSystem, Code code)Get a set containingCodeSystem.Conceptinstances where all structural hierarchies have been flattened.abstract CodeSystem.ConceptgetConcept(CodeSystem codeSystem, Code code)Get the concept in the provided code system with the specified code.abstract Set<CodeSystem.Concept>getConcepts(CodeSystem codeSystem)Get a set containingCodeSystem.Conceptinstances where all structural hierarchies have been flattened.abstract Set<CodeSystem.Concept>getConcepts(CodeSystem codeSystem, List<ValueSet.Compose.Include.Filter> filters)Get a set containingCodeSystem.Conceptinstances where all structural hierarchies have been flattened and filtered by the given set of value set include filters.abstract booleanhasConcept(CodeSystem codeSystem, Code code)Indicates whether the given code system contains a concept with the specified code.abstract booleanisSupported(CodeSystem codeSystem)Indicates whether the given code system is supported.abstract booleansubsumes(CodeSystem codeSystem, Code codeA, Code codeB)Indicates whether the concept forCodeAsubsumes the concept forcodeBin the passed CodeSystem.-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.fhir.term.spi.FHIRTermServiceProvider
closure, getConcepts, getConcepts, hasConcepts
-
-
-
-
Method Detail
-
closure
public abstract Set<CodeSystem.Concept> closure(CodeSystem codeSystem, Code code)
Description copied from interface:FHIRTermServiceProviderGet a set containingCodeSystem.Conceptinstances where all structural hierarchies have been flattened.- Specified by:
closurein interfaceFHIRTermServiceProvider- Parameters:
codeSystem- the code systemcode- the root of the hierarchy containing the Concept instances to be flattened- Returns:
- flattened set of Concept instances for the given tree
-
getConcept
public abstract CodeSystem.Concept getConcept(CodeSystem codeSystem, Code code)
Description copied from interface:FHIRTermServiceProviderGet 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:
getConceptin interfaceFHIRTermServiceProvider- Parameters:
codeSystem- the code systemcode- the code- Returns:
- the code system concept with the specified code, or null if no such concept exists
-
getConcepts
public abstract Set<CodeSystem.Concept> getConcepts(CodeSystem codeSystem)
Description copied from interface:FHIRTermServiceProviderGet a set containingCodeSystem.Conceptinstances where all structural hierarchies have been flattened.- Specified by:
getConceptsin interfaceFHIRTermServiceProvider- 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 abstract Set<CodeSystem.Concept> getConcepts(CodeSystem codeSystem, List<ValueSet.Compose.Include.Filter> filters)
Description copied from interface:FHIRTermServiceProviderGet a set containingCodeSystem.Conceptinstances where all structural hierarchies have been flattened and filtered by the given set of value set include filters.- Specified by:
getConceptsin interfaceFHIRTermServiceProvider- Parameters:
codeSystem- the code system containing the set of Concept instances to be flattened / filteredfilters- the value set include filters- Returns:
- flattened / filtered set of Concept instances for the given code system
-
hasConcept
public abstract boolean hasConcept(CodeSystem codeSystem, Code code)
Description copied from interface:FHIRTermServiceProviderIndicates whether the given code system contains a concept with the specified code.- Specified by:
hasConceptin interfaceFHIRTermServiceProvider- Parameters:
codeSystem- the code systemcode- the code- Returns:
- true if the given code system contains a concept with the specified code, false otherwise
-
isSupported
public abstract boolean isSupported(CodeSystem codeSystem)
Description copied from interface:FHIRTermServiceProviderIndicates whether the given code system is supported.- Specified by:
isSupportedin interfaceFHIRTermServiceProvider- Parameters:
codeSystem- the code system- Returns:
- true if the given code system is supported, false otherwise
-
subsumes
public abstract boolean subsumes(CodeSystem codeSystem, Code codeA, Code codeB)
Description copied from interface:FHIRTermServiceProviderIndicates whether the concept forCodeAsubsumes the concept forcodeBin the passed CodeSystem.- Specified by:
subsumesin interfaceFHIRTermServiceProvider- Parameters:
codeSystem- the code systemcodeA- the root of the hierarchy to searchcodeB- the code to match- Returns:
- true if the code system concept for
codeBexists in the tree rooted by the concept forCodeA, false otherwise
-
checkArgument
protected void checkArgument(CodeSystem codeSystem)
-
checkArguments
protected void checkArguments(CodeSystem codeSystem, Code code)
-
checkArguments
protected void checkArguments(CodeSystem codeSystem, Code codeA, Code codeB)
-
checkArguments
protected <R> void checkArguments(CodeSystem codeSystem, Function<CodeSystem.Concept,? extends R> function)
-
checkArguments
protected void checkArguments(CodeSystem codeSystem, List<ValueSet.Compose.Include.Filter> filters)
-
checkArguments
protected <R> void checkArguments(CodeSystem codeSystem, List<ValueSet.Compose.Include.Filter> filters, Function<CodeSystem.Concept,? extends R> function)
-
-