Upload and Use Questionnaires
This tutorial will walk through how to create a Questionnaire and generate a QuestionnaireResponse using the Medplum console app. The Questionnaire
and QuestionnaireResponse
resources are very common in implementations and are used to drive patient-facing and provider-facing experiences.
Upload Questionnaire
First, download your questionnaire from questionnaire-bundle.json, this is a very simple Questionnaire that asks for the Patient's weight in pounds.
You'll notice that in this example Questionnaire.subjectType is Patient.
Upload questionnaire-bundle.json on the Batch Upload tool on the Medplum app and wait until you see confirmation of success.
View Questionnaire
Second, navigate to the Questionnaires on your Medplum App and click on the Questionnaire you just uploaded.
Familiarize yourself with the Questionnaire tool - you can see a Preview
, add items to the questionnaire through the Builder
and more.
Try Questionnaire
To fill out the Questionnaire, navigate to the Patient on your Medplum app and click on any Patient. You'll see an Apps
tab on the Patient which is were all Questionnaires where subjectType
is Patient
.
Click on the link and fill out the Questionnaire.
Questionnaires are general purpose and can have a subjectType that is any resource. Common workflows include adding Encounter
or DiagnosticReport
as a subjectType
for a Questionnaire.
View QuestionnaireResponse
Once you have filled out your Questionnaire, a QuestionnaireResponse will be generated, which we recommend looking at on the QuestionnaireResponse of your Medplum app.
The QuestionnaireResponse resource is often the basis for automation, and contains a structured representation of the answers to the questionnaire, as well as the author and which questionnaire generated it.
Next Steps
Questionnaires are very powerful when embedded in custom applications and paired with Bots. The Medplum App is a good example of use of a Questionnaire in an application and related commits can be useful for context.
There are bots in the medplum-demo-bot repository that show examples of how to create common FHIR resources like Observation
or Condition
from QuestionnaireResponse resources.