Import resources into clinFHIR Scenario Builder

Just a short note to let you know that I’ve added the ability to import resources directly into the clinFHIR Scenario Builder (people have asked about this for a while). There are 3 formats currently supported:

  • A single Json resource
  • A Json bundle
  • An XML bundle

(Note that a single XML resource is not yet supported – just place it in a bundle if this is a problem right now)

To access this, load the scenario builder and click the ‘Import resource’ link in the middle of the navbar. You’ll get a dialog into which you can paste the text of the resource or bundle you want to import. You’ll get an error if you paste something invalid, but otherwise the resource/s should be imported into the Scenario Builder.

Note that the Xml import uses the currently selected Conformance server to perform the conversion from Xml to Json (suggested by Bob Milius) by POSTing the bundle to the Bundle endpoint as XML, and then reading it back as Json. I’ve tested using HAPI STU-3, but the other servers should work provided that they support the Bundle endpoint, and both Json & XML. This also means that the bundle must have a ‘type‘ value of collection.

You can include an id on your resource/s if you wish (but NOT on the bundle) – but if you do it’s your responsibility to ensure that it will be unique in the scenario you are building.

For bundles, the best strategy seems to be to include an entry.fullUrl with a uuid for each resource, and use that as the target of the references from other resources. The uuid will remain as the id for the resource in the Scenario Builder, and the references between resources should persist into the scenario. (This may cause some issues when saving the scenario to the Data Server – I need to look into that).


About David Hay
I'm an independent contractor working with a number of Organizations in the health IT space. I'm an HL7 Fellow, Chair Emeritus of HL7 New Zealand and a co-chair of the FHIR Management Group. I have a keen interest in health IT, especially health interoperability with HL7 and the FHIR standard. I'm the author of a FHIR training and design tool - clinFHIR - which is sponsored by InterSystems Ltd.

One Response to Import resources into clinFHIR Scenario Builder

  1. Pingback: A complex scenario… | Hay on FHIR

Leave a Reply

%d bloggers like this: