StructureMaps are a machine-readable specification for data transformation. They are used in converting data from one format to another. For the SMART Guidelines, StructureMaps are used to convert data between QuestionnaireResponses and FHIR target profile instances. This is done in 2 steps:
Extract a Questionnaire Response into a Logical Model instance
This gets the data in a simple form that only depends on the data specification, and not on the profiles that are used
Extract the Logical Model instance into the FHIR resource instances
This process is done by 3 StructureMaps:
The StructureMap from QuestionnaireResponse to logical model instance;
The StructureMap from logical model instance to Resource instance ;
A grouping map that combines the two maps above to enable a single transform operation.
Test Bundle that includes maps and all the dependencies
Activities:
If a form is used, the L3 author should provide the mappings for extraction.
The StructureMap shall be saved as input/resources/maps/<id>.fml where id is the id of the map - not necessarily the name.
These can come in the form of:
Observation extraction
Definition-based extraction
StructureMap extraction
Observation extraction
Definition-based extraction
If this approach is used, the mapping is done by filling in the .definition element with the resource that is the target of the extraction - Patient, Observation, Encounter, etc.
the data extraction map from Questionnaire to Logical Model instances
the data extraction map from Logical Model instances to FHIR resources
the combined data extraction map that includes the 2 maps above and can process the extraction from Questionnaire to FHIR Resources
Reusing StructureMaps:
StructureMaps may be reused. For example, modular questionnaires (like Patient demographic modules) - which would use common transformations.
Output Criteria / Definition of Done:
Mappings should create valid StructureMaps - including the necessary metadata.
the map should be correctly parsed and validated by the publisher
optional metadata should be added according to the spec
group names shall not contain spaces
All the dependencies of the StructureMap shall be in the IG dependencies - SDC, base profiles, logical models, etc.
* TO DO: Can we have and use a SGStructureMap profile where e.g. title is present etc.?
Change tracking
StructureMaps are normative artifacts. All artifacts should have a change history.
Tooling:
Tool
Usage
Doc
Matchbox
IG Publisher
Convert FML files to StructureMaps
Informative examples
Known issues and dependencies:
Matchbox doesn’t validate the metadata if it’s missing or if the StructureMap is not valid.