Package org.hl7.fhir.r4.utils
Class StructureMapUtilities
- java.lang.Object
-
- org.hl7.fhir.r4.utils.StructureMapUtilities
-
public class StructureMapUtilities extends Object
Services in this class: string render(map) - take a structure and convert it to text map parse(text) - take a text representation and parse it getTargetType(map) - return the definition for the type to create to hand in transform(appInfo, source, map, target) - transform from source to target following the map analyse(appInfo, map) - generate profiles and other analysis artifacts for the targets of the transform map generateMapFromMappings(StructureDefinition) - build a mapping from a structure definition with logical mappings- Author:
- Grahame Grieve
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceStructureMapUtilities.ITransformerServicesclassStructureMapUtilities.PropertyWithTypeclassStructureMapUtilities.ResolvedGroupclassStructureMapUtilities.StringPairclassStructureMapUtilities.StructureMapAnalysisclassStructureMapUtilities.TargetWriterclassStructureMapUtilities.TransformContextclassStructureMapUtilities.VariableclassStructureMapUtilities.VariableForProfilingstatic classStructureMapUtilities.VariableModeclassStructureMapUtilities.VariablesclassStructureMapUtilities.VariablesForProfiling
-
Field Summary
Fields Modifier and Type Field Description static StringMAP_EXPRESSIONstatic StringMAP_SEARCH_EXPRESSIONstatic StringMAP_WHERE_CHECKstatic StringMAP_WHERE_EXPRESSIONstatic StringMAP_WHERE_LOG
-
Constructor Summary
Constructors Constructor Description StructureMapUtilities(IWorkerContext worker)StructureMapUtilities(IWorkerContext worker, StructureMapUtilities.ITransformerServices services)StructureMapUtilities(IWorkerContext worker, StructureMapUtilities.ITransformerServices services, ProfileUtilities.ProfileKnowledgeProvider pkp)
-
Method Summary
-
-
-
Field Detail
-
MAP_WHERE_CHECK
public static final String MAP_WHERE_CHECK
- See Also:
- Constant Field Values
-
MAP_WHERE_LOG
public static final String MAP_WHERE_LOG
- See Also:
- Constant Field Values
-
MAP_WHERE_EXPRESSION
public static final String MAP_WHERE_EXPRESSION
- See Also:
- Constant Field Values
-
MAP_SEARCH_EXPRESSION
public static final String MAP_SEARCH_EXPRESSION
- See Also:
- Constant Field Values
-
MAP_EXPRESSION
public static final String MAP_EXPRESSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StructureMapUtilities
public StructureMapUtilities(IWorkerContext worker, StructureMapUtilities.ITransformerServices services, ProfileUtilities.ProfileKnowledgeProvider pkp)
-
StructureMapUtilities
public StructureMapUtilities(IWorkerContext worker, StructureMapUtilities.ITransformerServices services)
-
StructureMapUtilities
public StructureMapUtilities(IWorkerContext worker)
-
-
Method Detail
-
render
public static String render(StructureMap map)
-
groupToString
public static String groupToString(StructureMap.StructureMapGroupComponent g)
-
ruleToString
public static String ruleToString(StructureMap.StructureMapGroupRuleComponent r)
-
sourceToString
public static String sourceToString(StructureMap.StructureMapGroupRuleSourceComponent r)
-
targetToString
public static String targetToString(StructureMap.StructureMapGroupRuleTargetComponent rt)
-
paramToString
public static String paramToString(StructureMap.StructureMapGroupRuleTargetParameterComponent rtp)
-
parse
public StructureMap parse(String text, String srcName) throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getTargetType
public StructureDefinition getTargetType(StructureMap map) throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getChildrenByName
protected void getChildrenByName(Base item, String name, List<Base> result) throws org.hl7.fhir.exceptions.FHIRException
Given an item, return all the children that conform to the pattern described in name Possible patterns: - a simple name (which may be the base of a name with [] e.g. value[x]) - a name with a type replacement e.g. valueCodeableConcept - * which means all children - ** which means all descendents- Parameters:
item-name-result-- Throws:
org.hl7.fhir.exceptions.FHIRException
-
transform
public void transform(Object appInfo, Base source, StructureMap map, Base target) throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
translate
public Base translate(StructureMapUtilities.TransformContext context, StructureMap map, Base source, String conceptMapUrl, String fieldToReturn) throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
analyse
public StructureMapUtilities.StructureMapAnalysis analyse(Object appInfo, StructureMap map) throws org.hl7.fhir.exceptions.FHIRException
Given a structure map, return a set of analyses on it. Returned: - a list or profiles for what it will create. First profile is the target - a table with a summary (in xhtml) for easy human undertanding of the mapping- Parameters:
appInfo-map-- Returns:
- Throws:
Exceptionorg.hl7.fhir.exceptions.FHIRException
-
generateMapFromMappings
public StructureMap generateMapFromMappings(StructureDefinition sd) throws IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRException
-
getTerminologyServiceOptions
public org.hl7.fhir.utilities.TerminologyServiceOptions getTerminologyServiceOptions()
-
setTerminologyServiceOptions
public void setTerminologyServiceOptions(org.hl7.fhir.utilities.TerminologyServiceOptions terminologyServiceOptions)
-
-