FHIR Questionnaire support

Revision as of 11:26, 12 June 2020 by Mdegraauw (talk | contribs) (Created page with "=Intro= FHIR Questionnaires are the format to define the various questionnaires used in healthcare to capture data from patients or professionals. Questionnaires are more free...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Intro

FHIR Questionnaires are the format to define the various questionnaires used in healthcare to capture data from patients or professionals. Questionnaires are more free-format than FHIR resources, but still constrained. A Questionnaire is basically a nested tree of typed questions, i.e. a question can be a boolean, or a choice of answer options, or free text etc.

ART-DECOR datasets are, basically, a nested tree of typed items. Datasets cover a healthcare domain, ART-DECOR transactions a particular use case. The data types supported by ART-DECOR are similar to those in Questionnaires.

ART-DECOR now supports serializing any transaction as a Questionnaire, in JSON and XML format, and HTML rendering using the open source LHCForms library (other options are planned). Of course this does not make sense for all transactions, but it can serve as an instant prototyping tool, and allows using ART-DECOR as a fine FHIR Questionnaire Management Tool.

DECOR to Questionnaire translation

Serialization

Both XML:

        <item>
            <extension url="http://hl7.org/fhir/StructureDefinition/questionnaire-unit">
                <valueCoding>
                    <display value="kg"/>
                </valueCoding>
            </extension>
            <linkId value="2.16.840.1.113883.3.1937.99.62.3.2.3--2011-01-28T00:00:00"/>
            <code>
                <system value="2.16.840.1.113883.6.96"/>
                <code value="27113001"/>
                <display value="Body weight"/>
            </code>
            <text value="Gewicht"/>
            <type value="quantity"/>
            <required value="true"/>
            <repeats value="false"/>
        </item>

and JSON are supported:

"item": [
    {
        "extension": [
            {
                "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit",
                "valueCoding": {"display": "kg"}
            }
        ],
        "linkId": "2.16.840.1.113883.3.1937.99.62.3.2.3--2011-01-28T00:00:00",
        "code": [
            {
                "system": "2.16.840.1.113883.6.1",
                "code": "29463-7",
                "display": "Body weight"
            },
            {
                "system": "2.16.840.1.113883.6.96",
                "code": "27113001",
                "display": "Body weight"
            }
        ],
        "text": "Weight",
        "type": "quantity",
        "required": true,
        "repeats": false
    },


</syntaxhighlight>

DECOR type FHIR Questionnaire type
group group
boolean boolean
date date
decimal decimal
quantity quantity
string string
text string
code (referring to valueSet) choice
code (referring to complete codeSystem) string
count integer
datetime dateTime
quantity quantity
duration decimal
identifier string
ordinal choice

- a "loading" indicator while the form loads - DECOR facets @default, @fixed, @maxLength translate to Questionnaire properties (and work in LHCForms!)

 - but: facet @default on code does not work, Questionnaires expects a Coding, and DECOR @default is just a string, so cannot do that

- some bugfixes - added a hook for other renderers than LHCForms, this: https://decor.nictiz.nl/decor/services/RetrieveQuestionnaire?id=2.16.840.1.113883.3.1937.99.62.3.4.2&effectiveDate=2012-09-05T16:59:35&language=nl-NL&ui=nl-NL&format=html&render=xxx now yields an error render=lhcforms or empty does the LHCForms