Stream: smart
Topic: fhirclient: $everything operation?
Chris Moesel (Apr 05 2018 at 12:34):
I'm having trouble finding any documentation on how to invoke the Patient/$everything operator (or any operator, really) using the SMART-on-FHIR client. I've also looked at the fhir.js client it's based on. I expect it's really easy and I'm just missing it, or it's not supported. Anyone know?
Abbie Watson (Apr 13 2020 at 05:46):
Yeah, I've been struggling with this over the weekend as well. Maybe if we ask nicely, @Josh Mandel might be able to give us a nudge in the right direction.
Josh Mandel (Apr 13 2020 at 13:17):
@Vladimir Ignatov would be the one with inside here on the SMART library, or @nicola (RIO/SS) on FHIR.js
Josh Mandel (Apr 13 2020 at 13:18):
If this isn't supportive, it would clearly be a worthwhile addition! (has not been a focus in the SMART library because it's not part of the requirements for certification, but that's no reason to omit the functionality, especially because it is supported by a number of servers.)
Vladimir Ignatov (Apr 13 2020 at 13:46):
Perhaps this is confusing because there is no dedicated method for it. It is just a simple request though. Here is a working example with fhirclient
:
const client = new FHIR.client("https://r3.smarthealthit.org"); client.request("Patient/2e27c71e-30c8-4ceb-8c1c-5641e066c0a4/$everything", { pageLimit: 0, flat: true });
The fhirclient library does not provide API for working with operators. You build any request yourself and use the client.request
function to execute it.
Abbie Watson (Apr 13 2020 at 14:58):
@Vladimir Ignatov - Oh, awesome to connect with you for a moment. I owe you a huge thank you, by the way. You did a CodeSandbox example of how to use SMART on FHIR with React Router that was simply awesome. Knocked it out of the park with that one.
Vladimir Ignatov (Apr 13 2020 at 15:39):
@Abigail Watson - Glad you liked it. It is probably worth saying that I did that mostly because that is what the React community would expect to see. However, for simple use-cases I sometimes prefer to store the client instance in a global variable (that is much cleaner and easy to reason about).
Last updated: Apr 12 2022 at 19:14 UTC