This guide walks you through the process of migrating a SMART on FHIR app from HL7 FHIR DSTU1 to DSTU2. |
To migrate a JavaScript app which is currently working with an HSPC DSTU implementation:
The (DSTU2) fhir-client.js has changed in the way you search and retrieve results for FHIR Resource.
$.when(smart.patient.api.search({type: "Observation", query: {code: 'http://loinc.org|58941-6'}, count: 50})) .done(function(obsSearchResult){ var observations = []; if (obsSearchResult.data.entry) { obsSearchResult.data.entry.forEach(function(obs){ observations.push(obs.resource); }); } ... }); |
The latest version of the FHIR DSTU2 specification can be found at: http://www.hl7.org/fhir/index.html. The changes most likely to impact an existing app would be any changes to a specific FHIR Resource that an app is using. Refer to http://www.hl7.org/fhir/resourcelist.html for FHIR Resource changes. If your app loads its own data into the sandbox using FHIR transactions, the transaction specification has several changes. Refer to http://www.hl7.org/fhir/http.html#transaction for transaction changes.
The structure of the Conformance Statement's automated discovery of OAuth2 endpoints has changed. If you are using the latest (DSTU2) fhir-client.js, the client will handle this and you will not need to modify your app further. Refer to: http://fhir-docs.smarthealthit.org/argonaut-dev/authorization/conformance-statement/
The launch sequence has changed. If you are using the latest (DSTU2) fhir-client.js, the client will handle this and you will not need to modify your app further. Refer to: http://docs.smarthealthit.org/authorization/