# OHH Questionnaire - Open Health Hub FHIR Implementation Guide v0.1.0

* [**Table of Contents**](toc.md)
* [**Artifacts Summary**](artifacts.md)
* **OHH Questionnaire**

## Resource Profile: OHH Questionnaire 

| | |
| :--- | :--- |
| *Official URL*:https://api.openhealthhub.com/OpenHealthhub/fhir/4/StructureDefinition/ohh-questionnaire | *Version*:0.1.0 |
| Active as of 2025-12-03 | *Computable Name*:OhhQuestionnaire |

 
Questionnaire profile for Open Health Hub Questionnaire resources 

### Scope and Usage 

Patients and healthcare professionals can interact with healthcare professionals through questionnaires in our form filler. A Questionnaire can either be selected from the Library or custom-made in our Form Designer. Our Form Designer allows the user to specify custom codings for questions. These codings can be used to map data in this resource to existing data. The unfilled-out questionnaire is made available in FHIR format through this end-point.

Questionnaires [are versioned](CapabilityStatement-ohh-capability-statement.md#handling-versioned-resources). If you get the questionnaire by id you get the latest version which is used in one of your plan definitions. You can also request a specific version. It is possible that patients answered an old version of the questionnaire in the past. Therefore, references to the questionnaire (for example in the questionnaire response) are always to a specific version.

Generally, the Questionnaire item components retrieved through this endpoint correspond to questions created in the Form Designer. An exception to this is the readonly text items that are generated for the formulas defined in the Form Designer. These are made so that even if a result slide is not defined (where the formula is mentioned as a sub item), the formula will still be in the questionnaire.

Questionnaires contain a list of item elements which represent the specific questions in the questionnaire.

**Usages:**

* Refer to this Profile: [Encrypted Questionnaire Response Profile](StructureDefinition-encrypted-questionnaire-response.md) and [Related Questionnaire](StructureDefinition-related-questionnaire.md)
* Examples for this Profile: [OHH_Questionnaire_Caregiver](Questionnaire-57953eb8-2455-4f96-a9dd-c86f31f28c9c.md) and [ExampleQuestionnaire](Questionnaire-cf1aa9a1-051d-4c0d-bb63-71a95276a71c.md)
* CapabilityStatements using this Profile: [OHH FHIR API](CapabilityStatement-ohh-capability-statement.md)

You can also check for [usages in the FHIR IG Statistics](https://packages2.fhir.org/xig/ohh-fhir|current/StructureDefinition/ohh-questionnaire)

### Formal Views of Profile Content

 [Description of Profiles, Differentials, Snapshots and how the different presentations work](http://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#structure-definitions). 

 

Other representations of profile: [CSV](StructureDefinition-ohh-questionnaire.csv), [Excel](StructureDefinition-ohh-questionnaire.xlsx), [Schematron](StructureDefinition-ohh-questionnaire.sch) 

### Notes:

#### Formula

We use formulas to calculate results based on previous inputs. Formulas are stored as variables in the questionnaire. To show the result of a formula to the user we have the `result` type question.

Formulas mostly follow [mathjs](https://mathjs.org/docs/expressions/syntax.html) syntax. There is exactly one exception to this, which is the variables. To clarify which QuestionnaireItem result is used in a formula, the variables used in the formulas will be replaced by the linkId, surrounded by $, of the QuestionnaireItem result that should replace the variable. This linkId may be specified by using the Export label field in the Designer and does not necessarily follow mathjs’s syntax.



## Resource Content

```json
{
  "resourceType" : "StructureDefinition",
  "id" : "ohh-questionnaire",
  "url" : "https://api.openhealthhub.com/OpenHealthhub/fhir/4/StructureDefinition/ohh-questionnaire",
  "version" : "0.1.0",
  "name" : "OhhQuestionnaire",
  "title" : "Ohh Questionnaire Profile",
  "status" : "active",
  "date" : "2025-12-03T12:00:57+00:00",
  "publisher" : "Open Health Hub",
  "contact" : [
    {
      "name" : "Open Health Hub",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://www.openhealthhub.com"
        },
        {
          "system" : "email",
          "value" : "support@openhealthhub.com"
        }
      ]
    }
  ],
  "description" : "Questionnaire profile for Open Health Hub Questionnaire resources",
  "fhirVersion" : "4.0.1",
  "mapping" : [
    {
      "identity" : "workflow",
      "uri" : "http://hl7.org/fhir/workflow",
      "name" : "Workflow Pattern"
    },
    {
      "identity" : "rim",
      "uri" : "http://hl7.org/v3",
      "name" : "RIM Mapping"
    },
    {
      "identity" : "w5",
      "uri" : "http://hl7.org/fhir/fivews",
      "name" : "FiveWs Pattern Mapping"
    },
    {
      "identity" : "objimpl",
      "uri" : "http://hl7.org/fhir/object-implementation",
      "name" : "Object Implementation Information"
    },
    {
      "identity" : "v2",
      "uri" : "http://hl7.org/v2",
      "name" : "HL7 v2 Mapping"
    }
  ],
  "kind" : "resource",
  "abstract" : false,
  "type" : "Questionnaire",
  "baseDefinition" : "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire",
  "derivation" : "constraint",
  "differential" : {
    "element" : [
      {
        "id" : "Questionnaire",
        "path" : "Questionnaire"
      },
      {
        "id" : "Questionnaire.id",
        "path" : "Questionnaire.id",
        "min" : 1,
        "mustSupport" : true
      },
      {
        "id" : "Questionnaire.language",
        "path" : "Questionnaire.language",
        "min" : 1,
        "mustSupport" : true
      },
      {
        "id" : "Questionnaire.extension",
        "path" : "Questionnaire.extension",
        "min" : 1
      },
      {
        "id" : "Questionnaire.extension:performerType",
        "path" : "Questionnaire.extension",
        "sliceName" : "performerType",
        "constraint" : [
          {
            "key" : "sdc-questionnaire-performerTypePattern",
            "severity" : "error",
            "human" : "PerformerType must be either Patient or Practitioner",
            "expression" : "(value as code).matches('^(Patient|Practitioner)$')",
            "source" : "https://api.openhealthhub.com/OpenHealthhub/fhir/4/StructureDefinition/ohh-questionnaire"
          }
        ]
      },
      {
        "id" : "Questionnaire.extension:entryMode",
        "path" : "Questionnaire.extension",
        "sliceName" : "entryMode",
        "min" : 1,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-entryMode"
            ]
          }
        ],
        "mustSupport" : true
      },
      {
        "id" : "Questionnaire.extension:entryMode.extension",
        "path" : "Questionnaire.extension.extension",
        "max" : "0"
      },
      {
        "id" : "Questionnaire.extension:entryMode.value[x]",
        "path" : "Questionnaire.extension.value[x]",
        "patternCode" : "prior-edit"
      },
      {
        "id" : "Questionnaire.name",
        "path" : "Questionnaire.name",
        "min" : 1
      },
      {
        "id" : "Questionnaire.title",
        "path" : "Questionnaire.title",
        "min" : 1
      },
      {
        "id" : "Questionnaire.status",
        "path" : "Questionnaire.status",
        "patternCode" : "active"
      },
      {
        "id" : "Questionnaire.description",
        "path" : "Questionnaire.description",
        "min" : 1
      },
      {
        "id" : "Questionnaire.item",
        "path" : "Questionnaire.item",
        "constraint" : [
          {
            "key" : "slider-choiceOrientation",
            "severity" : "error",
            "human" : "The questionnaire-choiceOrientation extension must be present in slider questions.",
            "expression" : "extension.where(url = 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl').exists().not() or (extension.where(url = 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl').first().value as CodeableConcept).coding.first().code != 'slider' or extension.where(url ='http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation').exists()",
            "source" : "https://api.openhealthhub.com/OpenHealthhub/fhir/4/StructureDefinition/ohh-questionnaire"
          }
        ]
      },
      {
        "id" : "Questionnaire.item.extension:itemControl",
        "path" : "Questionnaire.item.extension",
        "sliceName" : "itemControl",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl"
            ]
          }
        ]
      },
      {
        "id" : "Questionnaire.item.extension:itemControl.value[x]",
        "path" : "Questionnaire.item.extension.value[x]",
        "binding" : {
          "strength" : "extensible",
          "valueSet" : "https://api.openhealthhub.com/OpenHealthhub/fhir/4/ValueSet/ohh-questionnaire-item-control-value-set"
        }
      }
    ]
  }
}

```
