Class StructureMapUtilities
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 loigcal mappings
- Author:
- Grahame Grieve
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStructureMapUtilities
(IWorkerContext worker) StructureMapUtilities
(IWorkerContext worker, ITransformerServices services) StructureMapUtilities
(IWorkerContext worker, ITransformerServices services, ProfileKnowledgeProvider pkp) -
Method Summary
Modifier and TypeMethodDescriptionanalyse
(Object appInfo, StructureMap map) Given a structure map, return a set of analyses on it.protected void
getChildrenByName
(Base item, String name, List<Base> result) Given an item, return all the children that conform to the pattern described in namegetGroupForUrl
(StructureMap map, String url, StructureMap.StructureMapInputMode mode) getMapsForUrl
(List<StructureMap> maps, String url, StructureMap.StructureMapInputMode mode) getMapsForUrlPrefix
(List<StructureMap> maps, String url, StructureMap.StructureMapInputMode mode) org.hl7.fhir.utilities.validation.ValidationOptions
static String
boolean
isDebug()
boolean
static String
static String
render
(StructureMap map) static String
void
setDebug
(boolean debug) void
setExceptionsForChecks
(boolean exceptionsForChecks) void
setTerminologyServiceOptions
(org.hl7.fhir.utilities.validation.ValidationOptions terminologyServiceOptions) static String
static String
void
transform
(Object appInfo, Base source, StructureMap map, Base target) translate
(TransformContext context, StructureMap map, Base source, String conceptMapUrl, String fieldToReturn)
-
Field Details
-
MAP_WHERE_CHECK
- See Also:
-
MAP_WHERE_LOG
- See Also:
-
MAP_WHERE_EXPRESSION
- See Also:
-
MAP_SEARCH_EXPRESSION
- See Also:
-
MAP_EXPRESSION
- See Also:
-
AUTO_VAR_NAME
- See Also:
-
DEF_GROUP_NAME
- See Also:
-
-
Constructor Details
-
StructureMapUtilities
public StructureMapUtilities(IWorkerContext worker, ITransformerServices services, ProfileKnowledgeProvider pkp) -
StructureMapUtilities
-
StructureMapUtilities
-
-
Method Details
-
render
-
groupToString
-
ruleToString
-
sourceToString
-
targetToString
-
paramToString
-
getServices
-
getWorker
-
parse
- 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 namePossible 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(TransformContext context, StructureMap map, Base source, String conceptMapUrl, String fieldToReturn) throws org.hl7.fhir.exceptions.FHIRException - Throws:
org.hl7.fhir.exceptions.FHIRException
-
analyse
public 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:
Exception
org.hl7.fhir.exceptions.FHIRException
-
generateMapFromMappings
public StructureMap generateMapFromMappings(StructureDefinition sd) throws IOException, org.hl7.fhir.exceptions.FHIRException - Throws:
IOException
org.hl7.fhir.exceptions.FHIRException
-
getTerminologyServiceOptions
-
setTerminologyServiceOptions
public void setTerminologyServiceOptions(org.hl7.fhir.utilities.validation.ValidationOptions terminologyServiceOptions) -
isExceptionsForChecks
-
setExceptionsForChecks
-
getMapsForUrl
public List<StructureMap> getMapsForUrl(List<StructureMap> maps, String url, StructureMap.StructureMapInputMode mode) -
getMapsForUrlPrefix
public List<StructureMap> getMapsForUrlPrefix(List<StructureMap> maps, String url, StructureMap.StructureMapInputMode mode) -
getGroupForUrl
public ResolvedGroup getGroupForUrl(StructureMap map, String url, StructureMap.StructureMapInputMode mode) -
getInputType
-
isDebug
-
setDebug
-