Giter Club home page Giter Club logo

Comments (10)

vlad-ignatov avatar vlad-ignatov commented on August 23, 2024

Yes, it should be possible. The simplest way would be to:

  1. Host the PGC app somewhere. For example npm start will start small http server and then the app will be available at http://127.0.0.1:9000/
  2. In the launch.html file at https://github.com/smart-on-fhir/growth-chart-app/blob/master/launch.html#L10-L11 add a patientId option. The value should be the ID of the patient (on your FHIR server) that you want to launch with.
  3. Then load your launch.html file and pass a fhirServiceUrl parameter like so: http://127.0.0.1:9000/launch.html?fhirServiceUrl=http://my.fhir.server

from growth-chart-app.

usmanbahadur avatar usmanbahadur commented on August 23, 2024

@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.?

from growth-chart-app.

vlad-ignatov avatar vlad-ignatov commented on August 23, 2024

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.

from growth-chart-app.

usmanbahadur avatar usmanbahadur commented on August 23, 2024

hi @vlad-ignatov
so i have done the following this autheitcates the app against fhir server but how do we actually search a patient?
image

from growth-chart-app.

vlad-ignatov avatar vlad-ignatov commented on August 23, 2024

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.

from growth-chart-app.

usmanbahadur avatar usmanbahadur commented on August 23, 2024

hi @vlad-ignatov

i have tried by providing static patientId when launching as stand alone patient app, the error is patient not found.
image

image

image

from growth-chart-app.

vlad-ignatov avatar vlad-ignatov commented on August 23, 2024

Does that patient exist on the server you are launching against?

BTW, the scope looks weird. Try "patient/*.read launch/patient".

from growth-chart-app.

usmanbahadur avatar usmanbahadur commented on August 23, 2024

@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

from growth-chart-app.

hexicalsystems avatar hexicalsystems commented on August 23, 2024

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.

from growth-chart-app.

usmanbahadur avatar usmanbahadur commented on August 23, 2024

@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"
)}

from growth-chart-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.