Namespaces

Questionnaire responses

ovok.questionnaire_responses submits a user's answers, optionally with the Observations

  • Stable unknown
  • Release candidate since 0.1.0-rc.3
  • Development since 0.1.0-dev.21+c43ebba

ovok.questionnaire_responses submits a user's answers, optionally with the Observations they produce, and extracts resources from stored responses.

Submit answers

submit creates the QuestionnaireResponse in a FHIR transaction.

from ovok_sdk import Ovok

ovok = Ovok("https://api.sandbox.ovok.com", "your-tenant")
ovok.auth.login(profile_type="Patient", email="patient@example.com", password="password")

ovok.questionnaire_responses.submit({
    "resourceType": "QuestionnaireResponse",
    "questionnaire": "Questionnaire/questionnaire-id",
    "status": "completed",
    "subject": {"reference": "Patient/patient-id"},
    "item": [{"linkId": "pain", "answer": [{"valueInteger": 3}]}],
})

Submit answers with Observations

submit_with_observations saves the response and its Observations in one transaction: either all are stored or none. Give the response a urn:uuid: id to reference it from the Observations' derivedFrom.

ovok.questionnaire_responses.submit_with_observations(response, [observation])

Extract resources

extract runs FHIR $extract on a stored response.

ovok.questionnaire_responses.extract("response-id")

API reference

See ovok_sdk.resources.questionnaires for every method, parameter and error.

Last updated on

On this page