basic question about implementing

510 views
Skip to first unread message

Fatemeh Ahmadzadeh

unread,
May 17, 2018, 3:43:34 AM5/17/18
to Cerner FHIR Developers
Hi group .
I start to study smart on fhir and have question about it.
  1. I study the smart on fhir in http://engineering.cerner.com/smart-on-fhir-tutorial but I dont undrestand how to run the app Smart Health It Sandbox(beacause is directed to https://dev.smarthealthit.org/ instead of https://sandbox.smarthealthit.org
  2. after request authorization and get param iss and launch , we need to access token retrieval . how do it?
  3. I want to implement EHR which FHIR standard is impllemented FHIRbase ,and then implement SMART framework defines API for access FHIR resource. is the way good for implementing EHR?
  4. is it possible to create patient ,and  other resource for this patient? how can I get patient ID?
lauch.png

Kol Kheang (Cerner)

unread,
May 17, 2018, 5:17:25 PM5/17/18
to Cerner FHIR Developers
Hello Fatemeh,

Please see below for answers to your questions.

1. Smart Health IT Sandbox updated their site but we haven't updated the tutorial yet.  You can follow the steps listed here: https://github.com/cerner/smart-on-fhir-tutorial/issues/48 for now.
2. The fhir-client.js library does all this behind the scene.  You can get the access token by looking at smart.tokenResponse object in https://github.com/cerner/smart-on-fhir-tutorial/blob/gh-pages/example-smart-app/src/js/example-smart-app.js#L11.  The patient id and encounter id, user id are also returned in the token response.
3. I have not used FHIRbase before, so I cannot give a recommendation.  Are you building an app using Cerner's implementation of FHIR APIs?  Or do you want to create your own implementation of FHIR resources?  If it's the latter, then this is not the right forum.
4. Yes, it's possible to create patient and other resources using Cerner's implementation of FHIR.  Please take a look at our documentation at https://fhir.cerner.com/millennium/dstu2/.  The patient create API should return the location of the newly recreated patient, which should have the patient id.  More info at https://fhir.cerner.com/millennium/dstu2/individuals/patient/#create.

fatemeh ahmadzadeh

unread,
May 19, 2018, 4:29:50 AM5/19/18
to cerner-fhir...@googlegroups.com
Hi Dear  Kol Kheang 
  1. Thanks a lot  for recommneded link ,that is solved.
  2. I have problem with fhir-client.js. I study http://engineering.cerner.com/smart-on-fhir-tutorial but in Smart Launch URI ,and Redirected URI  is localhost (git clone smart-on-fhir-tutorial ), then launch.html has error (Fhir is not defined ) ,and index.html has error Uncaught ReferenceError: extractData is not defined.
  3. I am intersted to building EHR with Cerners implementation of FHIR APIS but the my framework is django-python and have problems parameter settings in client.FHIRClient(settings=settings) , please help me 

set = {
                'app_id': '017a1d7f-2037-438e-bc66-edbaad9dd0ed',
                'api_base': 'https://sb-fhir-stu3.smarthealthit.org/smartstu3/open',

                'client_id': '04e7f652-d3b0-48ab-8a2b-4b10910660ac',
                'scope':  'patient/Patient.read patient/Observation.read launch online_access openid profile',
                'redirect_uri':'http://localhost:8009/index/',
                'patient_id':'a778fb03-8f1a-450d-a2e6-3c0436981910'

                 }
            smart = client.FHIRClient(settings=set)

smart.ready return false





--
You received this message because you are subscribed to the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerner-fhir-developers+unsub...@googlegroups.com.
To post to this group, send email to cerner-fhir-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cerner-fhir-developers/bcf41993-2692-4f0b-b9ff-98dc10393a9b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

app.png

Kol Kheang (Cerner)

unread,
May 22, 2018, 5:24:23 PM5/22/18
to Cerner FHIR Developers
Hello Fatemeh,

2. If you'd like to follow the smart-on-fhir-tutorial exactly, you'd need to clone the project to your GitHub account.  Then you can update the existing app in code Console to have the launch and redirect URI associated with your app in your GitHub Pages.  Reference: http://engineering.cerner.com/smart-on-fhir-tutorial/#registration.

If you'd like to use http://localhost:8009 on your computer, then you'd clone the project to your machine and host the app (in https://github.com/cerner/smart-on-fhir-tutorial/tree/gh-pages/example-smart-app) using an http server (example: https://www.npmjs.com/package/http-server) on your machine.

Regardless of which step above, you must login to code Console and click on "Begin Testing" button to begin the app launch.  This step is needed so that the app will go through the login process and obtain auth and token so that you'll not get the error mentioned.


3. Are you using this library https://github.com/smart-on-fhir/client-py? I haven't used that library so I don't think I can provide much help.  You can post in https://groups.google.com/forum/#!forum/smart-on-fhir for any question specific to this library.

From glancing over the config, if you're working with Cerner's implementation of FHIR, the api_base would be https://fhir-open.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/ for open endpoint and https://fhir-ehr.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/ for closed endpoint.  More info @ https://fhir.cerner.com/millennium/dstu2/#open-sandbox.


Regards,
Kol

fatemeh ahmadzadeh

unread,
May 23, 2018, 1:14:58 AM5/23/18
to cerner-fhir...@googlegroups.com
Dear Kol.
Thanks alot . the responce is very useful and solving  problems

--
You received this message because you are subscribed to the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerner-fhir-developers+unsub...@googlegroups.com.
To post to this group, send email to cerner-fhir-developers@googlegroups.com.

akshith reddy kandakatla

unread,
May 23, 2018, 4:24:38 PM5/23/18
to Cerner FHIR Developers
Hi Fatemeh, sorry for hijacking your post. But I found it really helpful & is the same one that I face

Hi Kol Kheang,

1. I followed step 1.(from your reply) & was able to launch & the app from the sandbox. However, the data is being displayed only in the header & footer after launch. See attached screen shot.
2. How do I get a client_id for smart sandbox. Is it the same as the client_id from cerner?
ehr launch.JPG

Kol Kheang (Cerner)

unread,
May 23, 2018, 6:20:18 PM5/23/18
to Cerner FHIR Developers
Hello,

1. Make sure that your launch page is requesting the necessary scopes that your app needs.  I was able to use the tutorial app and get the response back.  See this page: https://github.com/cerner/smart-on-fhir-tutorial/blob/gh-pages/example-smart-app/launch-smart-sandbox.html#L22-L24

2. The SMART Health IT Sandbox Site doesn't validate the client id.  So it can be anything!  This is a blurb from their site:
"The app's client_id is not validated on the SMART test server, so any text string will work. Use the error dropdown above to simulate the server response to an invalid client_id."


Thanks,
Kol

Kol Kheang (Cerner)

unread,
May 23, 2018, 8:39:20 PM5/23/18
to Cerner FHIR Developers
Hello again akshith reddy,

Another user is having the same issue.  I looked further into the issue and I found out the real reason.  Please follow this post: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/cerner-fhir-developers/TlHROX8reUc/_sdIAEUXCgAJ

Sorry for the trouble caused.

Regards,
Kol

Reply all
Reply to author
Forward
0 new messages