OpenFn / instant-demo

A demo of OpenFn Microservice, OpenHIM and HAPI FHIR using Instant OpenHIE.
2 stars 0 forks source link

Demo OpenHIE workflow on Lightning #3

Closed aleksa-krolls closed 1 year ago

aleksa-krolls commented 1 year ago

Background

In 2021, OpenFn configured a demo Instant OpenHIE workflow using OpenFn/microservice that connected with Instant OpenHIE. Read more about it on this repo's README and on Docs: https://docs.openfn.org/documentation/instant-openhie

Now, we want to configure a similar workflow, but to demonstrate Lightning

Request

Please advise if this should go on this repository, if we should transfer it to another.

Deliver a new demo workflow on Lightning (instead of microservice). See this workflow configured on the Lightning project openhie-2023.

Screen Shot 2023-04-25 at 8 47 44 AM

expression

We will need 3 new jobs:

  1. convert_to_fhir.js (this job will probably look like this and will serve to map the CommCare payload to FHIR format: https://github.com/OpenFn/instant-demo/blob/main/expressions/commcare-to-openhim.js)
  2. send_to_fhir_server.js (to send the converted FHIR payload to the HAPI FHIR server to validate the new format)
  3. create_tei_in_dhis2.js (to create a TrackedEntityInstance in DHIS2; your job will look something like this DHIS2 job, but replace with mappings from the CommCare payload)
Screen Shot 2023-04-25 at 8 47 46 AM

state

  1. For the initial state, use this demo CommCare submission: https://github.com/OpenFn/instant-demo/blob/main/fixtures/commcare_sample.json

  2. For FHIR credentials, use the FHIR demo server: https://hapi.fhir.org/

  3. For DHIS2, use DHIS2 play instance: https://play.dhis2.org/

Output

If this workflow runs successfully, we expect a (1) successful response validating the payload sent to the HAPI FHIR server, and (2) new TrackedEntityInstance created in DHIS2.

aleksa-krolls commented 1 year ago

@mtuchi this is the spec for the OpenHIE demo. Please review and discuss with @taylordowns2000 today in standup. Afterwards, please let me know if I can assist and/or if a call would be helpful to discuss. FYI, for additional background reading on HAPI FHIR - check this out: https://hapifhir.io/#:~:text=HAPI%20FHIR%20is%20a%20complete,friendly%20Apache%20Software%20License%202.0.