Open sohrabhejazi opened 5 years ago
Yes, it should be possible. The simplest way would be to:
npm start
will start small http server and then the app will be available at http://127.0.0.1:9000/patientId
option. The value should be the ID of the patient (on your FHIR server) that you want to launch with.fhirServiceUrl
parameter like so: http://127.0.0.1:9000/launch.html?fhirServiceUrl=http://my.fhir.server@vlad-ignatov hi that works fine as long as you testing hapi fhir servers but if your fhir server requires Oauth Porcess i can get a token and patient data using POSTMAN, my next step is that i want to plugin my FHIR Server to test Growth Chart App but for that i need to get access token first within your app.?
Hi @usmanbahadur,
That was just an example of how to work-around SMART/Oauth. If you have an Oauth server, then you can register a client there and use the client_id
in the launch.html file and launch as usual.
hi @vlad-ignatov so i have done the following this autheitcates the app against fhir server but how do we actually search a patient?
It is a responsibility of the server to offer you a patient selection UI if you have stated that you need it using the launch/patient
scope. You can also bypass that by adding a patientId
option to the authorize
call in your launch.html, but that will "fix" your app to always use that patient.
hi @vlad-ignatov
i have tried by providing static patientId when launching as stand alone patient app, the error is patient not found.
Does that patient exist on the server you are launching against?
BTW, the scope looks weird. Try "patient/*.read launch/patient"
.
@vlad-ignatov the patient exist in server, Azure FHIR Server does not like "patientId : smart-77777703" so i had to convert patient id var launchContext = {patient: patientId}; var launchContextString = encodeURIComponent(btoa(JSON.stringify(launchContext)));
https://github.com/microsoft/fhir-server-samples/blob/master/src/FhirDashboardJS/js/PatientModule.js
Hello, I'm trying to connect to our FHIR server as well. Did you finish using the growth chart app with your own FHIR server ? I could use any help or samples to get started in this. Please let me know.
@hexicalsystems Use the following in launch.html file of the project, you would need client_id, patientid etc from your fhir service provider, a redirect_uri is also very important this is where you will see the patient data pulled out of your fhir service. BW FHIR.oauth2.authorize({ "scope": "patient$*.read", "iss": "https://name-of-your-fhir-server.com", "patientId": "patient-id-that-exist-in-your-fhir-server", "client_id": "id-given-by-your-server", "redirect_url": "uri-where-you-want-to-redirect-this-app" )}
Hi,
I created an FHIR server and I want to connect to this server through your app and use my own data. Is it possible? If yes, could you please guide me and tell me how?
LG Sohrab