Namespaces
ovok.questionnaires and ovok.questionnaireResponses
Pre-fill questionnaires, submit responses and extract observations.
- Stable unknown
- Release candidate since 0.4.49-rc.4
- Development since 0.4.49-dev.517+4645a0a
ovok.questionnaires runs questionnaire operations on the FHIR server. ovok.questionnaireResponses saves and processes the answers. Patient apps call both for the signed-in user.
Pre-fill a questionnaire
populate runs $populate on a stored Questionnaire.
const filled = await ovok.questionnaires.populate('questionnaire-id');- Pass a
Parametersresource as the second argument to give the server context. Without it, an empty one is sent. - It resolves to the
Parametersthe server returns.
Submit a response
const bundle = await ovok.questionnaireResponses.submit(response);submitsaves one QuestionnaireResponse in a transaction and resolves to the response bundle.- To save derived Observations with it, use
submitWithObservations(response, observations). It is one transaction, so the response is never saved without its observations.
Extract observations
const extracted = await ovok.questionnaireResponses.extract(responseId);- It runs
$extracton a stored response and resolves toParameters. - A response that is not stored yet cannot be extracted: submit it first.
Reference
- questionnaires API reference: every method and type.
- ovok.patient to read a patient's questionnaires and responses.
Last updated on