Skip to main content

$populate

Deployed service: https://smartforms.csiro.au/api/fhir/Questionnaire/$populate

FHIR Operation definition: http://hl7.org/fhir/uv/sdc/OperationDefinition/Questionnaire-populate

Github: https://github.com/aehrc/smart-forms/tree/main/services/populate-express

Dockerhub: https://hub.docker.com/r/aehrc/smart-forms-populate

Usage

A Questionnaire resource can be populated using a POST request to a URL such as:

https://smartforms.csiro.au/api/fhir/Questionnaire/$populate (type-level)

Parameters

NameCardinalityTypeDocumentation
questionnaire1..1QuestionnaireThe Questionnaire is provided directly as part of the request.
subject1..1ReferenceThe resource that is to be the QuestionnaireResponse.subject. The QuestionnaireResponse instance will reference the provided subject.
context0..*Resources containing information to be used to help populate the QuestionnaireResponse. These will typically be FHIR resources.
context.name0..*stringThe name of the launchContext or root Questionnaire variable the passed content should be used as for population purposes. The name SHALL correspond to a launchContext or variable declared at the root of the Questionnaire.
context.content0..*ResourceThe actual resource (or resources) to use as the value of the launchContext or variable.

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.

Debugging

You can add the debug=true query parameter to return an additional contextResult-custom output parameter in the response.

https://smartforms.csiro.au/api/fhir/Questionnaire/$populate?debug=true

Try it out

Run In Postman