Package com.ibm.fhir.term.util
Class ValueSetSupport
- java.lang.Object
-
- com.ibm.fhir.term.util.ValueSetSupport
-
public final class ValueSetSupport extends Object
A utility class for expanding FHIR value sets
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.ibm.fhir.model.resource.ValueSetexpand(com.ibm.fhir.model.resource.ValueSet valueSet)Expand the given value set per the algorithm here: http://hl7.org/fhir/valueset.html#expansionstatic Map<String,Set<String>>getCodeSetMap(com.ibm.fhir.model.resource.ValueSet valueSet)static List<com.ibm.fhir.model.resource.ValueSet.Expansion.Contains>getContains(com.ibm.fhir.model.resource.ValueSet.Expansion expansion)Get a list containingValueSet.Expansion.Containsinstances where all structural hierarchies have been flattened.static com.ibm.fhir.model.resource.ValueSetgetValueSet(String url)Get the value set associated with the given url from the FHIR registry.static booleanisExpandable(com.ibm.fhir.model.resource.ValueSet valueSet)static booleanisExpanded(com.ibm.fhir.model.resource.ValueSet valueSet)static booleanvalidateCode(com.ibm.fhir.model.resource.ValueSet valueSet, com.ibm.fhir.model.type.Code code)static booleanvalidateCode(com.ibm.fhir.model.resource.ValueSet valueSet, com.ibm.fhir.model.type.Coding coding)
-
-
-
Method Detail
-
expand
public static com.ibm.fhir.model.resource.ValueSet expand(com.ibm.fhir.model.resource.ValueSet valueSet)
Expand the given value set per the algorithm here: http://hl7.org/fhir/valueset.html#expansion- Parameters:
valueSet- the value set to be expanded- Returns:
- the expanded value set, or the original value set if already expanded or unable to expand
-
getContains
public static List<com.ibm.fhir.model.resource.ValueSet.Expansion.Contains> getContains(com.ibm.fhir.model.resource.ValueSet.Expansion expansion)
Get a list containingValueSet.Expansion.Containsinstances where all structural hierarchies have been flattened.- Parameters:
expansion- the expansion containing the list of Contains instances to flatten- Returns:
- flattened list of Contains instances for the given expansion
-
getValueSet
public static com.ibm.fhir.model.resource.ValueSet getValueSet(String url)
Get the value set associated with the given url from the FHIR registry.- Parameters:
url- the url of the value set- Returns:
- the value set associated with the given input parameter, or null if no such value set exists
-
isExpandable
public static boolean isExpandable(com.ibm.fhir.model.resource.ValueSet valueSet)
-
isExpanded
public static boolean isExpanded(com.ibm.fhir.model.resource.ValueSet valueSet)
-
validateCode
public static boolean validateCode(com.ibm.fhir.model.resource.ValueSet valueSet, com.ibm.fhir.model.type.Code code)
-
validateCode
public static boolean validateCode(com.ibm.fhir.model.resource.ValueSet valueSet, com.ibm.fhir.model.type.Coding coding)
-
-