The mapping files give purpose to our FHIR Mapper: with them, we’re able to $transform data from one format to another. These transformation rules can be represented in two formats:
These two formats are isomorphic and can be converted between each other.
The FHIR Mapper operates on a StructureMap resource, so let’s convert the mapping file to a StructureMap resource and upload to our Vonk.
POST http(s)://<vonk-endpoint>/$convertwith the body as your mapping file and the
Content-Typeheader set to
text/fhir-mapping;charset=utf-8to convert your mapping file to a StructureMap. The operation parses your mapping file to check it is valid. You will receive an OperationOutcome if an syntax error is encountered, including a hint on how to fix it.
1.1. In our example,
POST http://localhost:4080/$convertwith our sample map as the body.
POST http(s)://<vonk-endpoint>/StructureMapwith the resulting
PUTto a unique ID. Make sure you don’t make duplicates of the StructureMap on the server - so always use
PUTto update the existing one afterwards. Note down logical ID of your map.
2.1. In our example, add
"id": "tutorial",to the StructureMap received in step 1 and upload it to
tutorialis the logical ID we’re working with.
With the structure map and the logical model uploaded to Vonk, you are now ready to run your transformations (Running transformations).