How to save scores in FHIR?


How can I save scores calculated from QuestionnaireResponses like PHQ-9 (PHQ-9 (Patient Health Questionnaire-9) - MDCalc) and DASS-21 (

For example, after I have completed the PHQ-9 questionnaire, the system calculates three pieces of information:

  • The score within a scale (for example, 21 points)
  • A descriptive text of the score (for example, Severe Depression)
  • A sentence that describes some suggestions to the patient

Can this information be saved in the RiskAssessment resource? It makes sense?

I think about saving as follows:

  • method.coding [0] .code = “phq-9”
  • basis [0] .reference = “QuestionnaireResponse /id”
  • prediction [0] .outcome.text = “Severe Depression”
  • prediction [0] .rationale = “descriptive text about the result…”

However, I don’t know how to save the score itself. The probability field is only of the percentage type. I can keep it as an extension, but I don’t know if I should.

Am I doing something wrong? Is there a better way? For example, save this type of information in another resource?

I know that there is a possibility to save this information in the questionnaire itself, but that way there will not be a structured place for several different types of scores.

Thanks a lot for the help!

1 Like

Typically you’d use an Observation. You’d have Observation.method, Observation.derivedFrom, Observation.valueCodeableConcept.coding.code, Observation.valueCodeableConcept.coding.display and Observation.valueCodeableConcept.text.

Is there a way to save the calculated fields from the questionnaireResponse to an Observation without a second REST API call?

something like a hook, or an extension to the questionnaire maybe?

Not generally. In theory, a server could auto-perform extraction when the QuestionnaireResponse is received and store the resulting resource(s) without being asked to do so, but there’s zero expectation that this would happen as a general behavior (and in some cases, it would definitely be an inappropriate thing to happen).

1 Like

So some orchestration should be injected before saving the response.

Typically the orchestration would trigger after the response was stored. Whether it would trigger automatically or would require a subsequent call might vary.

1 Like