Stream: javascript
Topic: parse resource
David Hay (Apr 15 2019 at 22:51):
Is there an example of using fhir.js to parse a resource from JSON into a JS object (eg if it were returned from a FHIR server after a query)? Especially one that has extensions, and most especially extensions on datatypes...
nicola (RIO/SS) (Apr 16 2019 at 08:57):
fhir.js uses native JSON.parse and nothing else :) - https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
David Hay (Apr 16 2019 at 21:39):
OK - so it's up to the client to manage the details of things like extensions - just wanted to be sure I wasn't missing anything...
nicola (RIO/SS) (Apr 17 2019 at 10:39):
patient.extension.filter((e) => { return e.url == '????' ;} )[0]
:)
Last updated: Apr 12 2022 at 19:14 UTC