SMART on FHIR launch questions

Hi. I have openEMR v7.0.1(1) (inside XAMPP for Windows 8.1.6) and all is working well, including being able to use Swagger.
I have two questions related to SMART on FHIR launch:
– the Swagger launch seems like a whole lotta steps. I’m wondering if it is possible to just click the launch button on a patient’s dashboard, and then get taken straight to a section of the Swagger page where I can make a FHIR call (such as fhir/ I imagine I could embed the client id and secret in the launch file (index.html) and specify the desired scopes in that file as well. That would get rid of one intermediary screen. I am then taken to an authorization page where I have to log into openEMR as either a user or patient. I was already logged into openEMR when I launched Swagger, so why do I need to log in again? Do I need to have some sort of SSO in use to avoid this Swagger authorization? I am then taken to a “Grant this application access to do the following” page where I just click “Authorize”. Then another page “Available authorizations” where I just click “Close”. And then I am finally able to interact with Swagger’s FHIR calls. Suggestions on ways to simplify this?
– I would like to demonstrate that a 3rd party SMART on FHIR app works with openEMR. I’ve tried a few of the free ones on the SMART on FHIR app gallery, but none seemed to work with the oemr launch/authorization process. Are you aware of one that does work with oemr, at least for demonstration purposes?
Thanks for your thoughts

For a SMART app to show up on the patient dashboard you need to register with the launch/patient permissions. With the latest code changes in the github master you will even be able to bypass the authentication and scope authorization screens if you turn off the in-ehr authorization flow for your SMART app registration.

I imagine you’d find this helpful for swagger or with some of the sample apps on the SMART on FHIR app gallery. Make sure you only use apps running on FHIR R4 from the gallery. I do believe we have a hard requirement of passing the api:fhir scope in right now. I would like to remove that scope in future versions of OpenEMR and have it be the default for better interoperability.

Ok, I got the bilirubin SMART app to launch from openEMR. It is not showing any data, since none of my patients have bilirubin observations. Trying to define that test in openEMR so the SMART app will fetch and show it. Not finding a lot of documentation yet for doing that, other than the video.
I also, though, am not getting any data to be returned in swagger other than patient demographics. Was hoping to be able to fetch medications, allergies, conditions, and vitals in swagger (pulled from a patient that has these defined), but so far, I’m getting a 200 response but “total” : “0”.

We had a similar issue but not sure your problem is same as ours.
We also got “0” entries in getting observation and other fields that you have mentioned in your message using FHIR call in OpenEMR. We added observation and other fields in “Health Trends” screen and that fixed the problem. But again, you may have encountered a different problem than us!!
-ViSolve OpenEMR FHIR Team

Thanks. Where is the Health Trends screen in openEMR?

Currently there are three main mapped observation categories that are supported in our OpenEMR FHIR implementation. Vital signs, Social History, and lab result observations. You can see the mapped services here:

Vital signs can be added in the encounters screen, social history is available by opening a patient’s chart and going to the history tab. Lab results are a more complicated setup but can be put in via the procedure order process using a manual lab setup through the OpenEMR compendium.

The growth charts app says its only available for DSTU3 but I’ve gotten it to work against OpenEMR and grabbed vitals if you are looking for a sample app. GitHub - smart-on-fhir/growth-chart-app.

I haven’t looked at this in over a year, but here is a nother sample app that does the g9 CCDA export.

Ok, I figured it out. :slight_smile:
I’m just a dummy
My patient of interest has ID 327, and PID 322 and PUBPID 322
I queried the fhir/patient resource for _Id 327 and 322 and neither workd
I queried for identifier 322 and that worked
I then queried the observation resource and entered 322 as the value of “patient” (which has description: “The uuid for the patient”, and got nothing back.
I then went back and looked at the json returned by the fhir/patient query and see

"entry": [
      "resource": {
        "id": "9711b5ff-70fa-42b7-a6e1-a91ccf07b8ba",

So, the uuid for my patient is the value of id in this json segment
When I use this value in the observation query, as the value of “patient”, I get lots of data returned
(social history and vitals data). Now to set up some labs to fetch . . .
Thanks. Hopes this helps someone else not make the same mistake

1 Like