Sign inSign up

aehrc/smart-forms-populate

By aehrc

•Updated about 2 years ago

An ExpressJS Typescript reference implementation of the FHIR SDC $populate operation.

Image
0

2.0K

aehrc/smart-forms-populate repository overview

⁠SDC $populate ExpressJS service

An ExpressJS⁠ Typescript reference implementation of the $populate⁠ operation from the HL7 FHIR Structured Data Capture Specification⁠. It builds on @aehrc/sdc-populate⁠, nicely packaging it into an ExpressJS app that can be deployed as a microservice.

⁠Docker Usage

Run docker run -p 3001:3001 aehrc/smart-forms-populate.

You can supply your docker run command environment variables. i.e.

docker run -p 3001:3001 -e EHR_SERVER_URL=https://proxy.smartforms.io/fhir aehrc/smart-forms-populate

docker run -p 3001:3001 -e TERMINOLOGY_SERVER_URL=https://tx.ontoserver.csiro.au/fhir aehrc/smart-forms-populate

⁠Optional environment variables

EHR_SERVER_URL

EHR_SERVER_AUTH_TOKEN

TERMINOLOGY_SERVER_URL

TERMINOLOGY_SERVER_AUTH_TOKEN

If EHR_SERVER_URL is left empty, the service will use the request endpoint as the EHR server URL (recommended). i.e. Deploying this service on http://localhost:3001/fhir⁠ will result in calls to fetch resources on the http://localhost:3001/fhir⁠ FHIR API during execution of the $populate operation.

By default, sdc-populate uses https://r4.ontoserver.csiro.au/fhir⁠ as the terminology server under the hood. If you want to use a different terminology server, you can set the TERMINOLOGY_SERVER_URL and TERMINOLOGY_SERVER_AUTH_TOKEN environment variables.

⁠Sample implementation

A sample implementation of this service is available at https://smartforms.csiro.au/api/fhir/Questionnaire/$populate⁠. https://smartforms.csiro.au/api/fhir⁠ only stores Questionnaire definitions and does not contain any clinical data. Therefore when using this sample implementation, contextual information for pre-population should be provided as actual FHIR resources, not references.

This service also allows you to specify a query parameter debug=true which returns a base64-encoded FHIRPath context object (useful for debugging!) as the contextResult-custom output parameter.

Note: The $populate service on https://smartforms.csiro.au/api/fhir⁠ only performs processing - it does not persist any data.

Tag summary

Content type

Image

Digest

sha256:d24afeabc…

Size

84.8 MB

Last updated

about 2 years ago

docker pull aehrc/smart-forms-populate