Stream: smart
Topic: Question using smart-oh-fhir client.js
Yunwei Wang (Mar 20 2019 at 16:59):
After POST a new resource to the server, I need to check the response header for resource ID. How could I do that witch smart-on-fhir client.js?
Lloyd McKenzie (Mar 20 2019 at 17:43):
@Abigail Watson ?
Abbie Watson (Mar 20 2019 at 20:32):
Well... we don't actually use fhir.js
or smart-on-fhir/client.js
so I'm maybe not the best person to ask (right now). We rolled our own client because we had need for multi-token OAuth support (among other things).
That being said, we've been careful to make our implementation modular, so we can swap out the underlying interop library. Our implementation uses a somewhat esoteric package management system and hand-rolled schemas that are difficult to maintain, so I've been keeping an eye out for something on NPM that uses the published JsonSchemas.
Currently I'm tracking three javascript client libraries besides our own... fhir/fhir.js
, smart-on-fhir/client.js
, and vermonster/fhir-kit-client
. And, as you can see from the utilities page of our SDK, we've begun the process of bringing them into the Clinical Meteor project. I've also created a pull request to track the evaluation and integration of these libraries into our the open-source Meteor on FHIR project. (Actually, now that I'm looking at NPM, there may be two or three new ones I need to look into also.
Best I can say right now is that I'm hoping to get reference implementations of all three client libraries by the Montreal Working Group. Or maybe it will wind up on the list of things to be done _at_ the Working Group.
Abbie Watson (Mar 20 2019 at 20:33):
That being said, this is something we could certainly work on at the Chicago FHIR Users Group. Happy to do a code trace of the smart-on-fhir/client.js
library with you, Yunwei.
Yunwei Wang (Mar 20 2019 at 20:43):
I have figured out. While doing POST, smart-on-fhir/client.js returns error though the error.data.status is 201. So I can get header from error.error.getResponseHeader(). Interesting.
Last updated: Apr 12 2022 at 19:14 UTC