FHIR Chat · Screening App - Questionnaire · Gravity sdoh-cc

Stream: Gravity sdoh-cc

Topic: Screening App - Questionnaire


view this post on Zulip Abbie Watson (May 11 2020 at 15:14):

Hello, sharing the screening app that I'm putting together this week. I was able to upload the HungerVitalSigns questionnaire over the weekend.

Gravity-Questionnaire-HungerVitals.png

System online at the following link:
http://gravity.meteorapp.com/questionnaires

With the following FHIR endpoints.

GET http://gravity.meteorapp.com/baseR4/metadata
PUT http://gravity.meteorapp.com/baseR4/Communication/:id
PUT http://gravity.meteorapp.com/baseR4/Questionnaire/:id

I'm still working on the config file, and will streamline the sidebar links and default page and a few other things in the next day or two.

view this post on Zulip Lisa Nelson (May 11 2020 at 17:51):

@Abigail Watson

I tried to GET your Questionnaire using this command in Postman:
http://gravity.meteorapp.com/baseR4/Questionnaire/123

I only see:
{
"resourceType": "Questionnaire",
"status": "final",
"id": "123"
}

Something doesn't seem right.

When I Get the Hunger Vital Sings Questionnaire that the MaxMD system is making, I see this:
{
"resourceType": "Questionnaire",
"id": "17d3c570-28de-4aa3-a135-e35d0932a4ec",
"meta": {
"versionId": "6",
"lastUpdated": "2020-04-17T14:10:18.000-05:00",
"profile": [
"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire|2.7"
]
},
"extension": [
{
"url": "http://hl7.org/fhir/us/sdc/StructureDefinition/sdc-questionnaire-endpoint",
"valueString": "https://ehr-sandbox.directmdemail.com:8443/fhir/baseR4"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/variable",
"valueExpression": {
"name": "worriedAnsCode",
"language": "text/fhirpath",
"expression": "%resource.item.where(linkId='/88122-7').answer.value.code"
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/variable",
"valueExpression": {
"name": "ranOutAnsCode",
"language": "text/fhirpath",
"expression": "%resource.item.where(linkId='/88123-5').answer.value.code"
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/variable",
"valueExpression": {
"name": "riskCodes",
"language": "text/fhirpath",
"expression": "'LA28397-0'.combine('LA6729-3')"
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/variable",
"valueExpression": {
"name": "riskStatus",
"language": "text/fhirpath",
"expression": "%riskCodes contains %worriedAnsCode or %riskCodes contains %ranOutAnsCode"
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/variable",
"valueExpression": {
"name": "answeredEitherQ",
"language": "text/fhirpath",
"expression": "%worriedAnsCode.exists() or %ranOutAnsCode.exists()"
}
}
],
"identifier": [
{
"system": "http://www.maxmddirect.com/hl7/fhir/grv-locali-screenings",
"value": "local-ehr-65d310b8-6235-4f47-8d45"
}
],
"name": "Food Insecurity",
"title": "Food Insecurity (Hunger Vital Sign)",
"status": "active",
"subjectType": [
"Patient"
],
"date": "2019-12-03T16:09:54.445Z",
"effectivePeriod": {
"start": "2019-12-12T11:52:01-05:00",
"end": "2019-12-22T18:49:14-05:00"
},
"item": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "drop-down",
"display": "Drop down"
}
],
"text": "Drop down"
}
}
],
"linkId": "/88122-7",
"code": [
{
"code": "88122-7",
"display": "Within the past 12Mo we worried whether our food would run out before we got money to buy more"
}
],
"text": "Within the past 12Mo we worried whether our food would run out before we got money to buy more",
"type": "choice",
"required": false,
"answerOption": [
{
"valueCoding": {
"code": "LA28397-0",
"display": "Often true"
}
},
{
"valueCoding": {
"code": "LA6729-3",
"display": "Sometimes true"
}
},
{
"valueCoding": {
"code": "LA28398-8",
"display": "Never true"
}
},
{
"valueCoding": {
"code": "LA15775-2",
"display": "Don't know/refused"
}
}
]
},
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "drop-down",
"display": "Drop down"
}
],
"text": "Drop down"
}
}
],
"linkId": "/88123-5",
"code": [
{
"code": "88123-5",
"display": "Within the past 12Mo the food we bought just didn't last and we didn't have money to get more"
}
],
"text": "Within the past 12Mo the food we bought just didn't last and we didn't have money to get more",
"type": "choice",
"required": false,
"answerOption": [
{
"valueCoding": {
"code": "LA28397-0",
"display": "Often true"
}
},
{
"valueCoding": {
"code": "LA6729-3",
"display": "Sometimes true"
}
},
{
"valueCoding": {
"code": "LA28398-8",
"display": "Never true"
}
},
{
"valueCoding": {
"code": "LA15775-2",
"display": "Don't know/refused"
}
}
]
},
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-observationLinkPeriod",
"valueBoolean": true
},
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "drop-down",
"display": "Drop down"
}
],
"text": "Drop down"
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/variable",
"valueExpression": {
"name": "thisItem",
"language": "text/fhirpath",
"expression": "%questionnaire.item.where(linkId = '/88124-3')"
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/variable",
"valueExpression": {
"name": "atRiskCoding",
"language": "text/fhirpath",
"expression": "%thisItem.answerOption.valueCoding.where(code='LA19952-3')"
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/variable",
"valueExpression": {
"name": "noRiskCoding",
"language": "text/fhirpath",
"expression": "%thisItem.answerOption.valueCoding.where(code='LA19983-8')"
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-calculatedExpression",
"valueExpression": {
"description": "risk determination",
"language": "text/fhirpath",
"expression": "iif(%answeredEitherQ, iif(%riskStatus, %atRiskCoding, %noRiskCoding), {})"
}
}
],
"linkId": "/88124-3",
"code": [
{
"code": "88124-3",
"display": "Food insecurity risk"
}
],
"text": "Food insecurity risk",
"type": "choice",
"required": false,
"readOnly": true,
"answerOption": [
{
"valueCoding": {
"code": "LA19952-3",
"display": "At risk"
}
},
{
"valueCoding": {
"code": "LA19983-8",
"display": "No risk"
}
}
],
"item": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "help",
"display": "Help-Button"
}
],
"text": "Help-Button"
}
}
],
"linkId": "/88124-3-help",
"text": "An answer of \"often true\" or \"sometimes true\" to either or both of the Hunger Vital Sign™ questions identifies a patient as at risk for food insecurity (FI).",
"type": "display"
}
]
}
]
}

view this post on Zulip Abbie Watson (May 13 2020 at 18:49):

So... I'm happy to report that the above response was the server actually working correctly. :) That Questionnaire/123 record was only a stub, and that was in fact all that was in it. I've just deployed an update, and am working a larger example through the system.

Here is the updated URL:

POST http://gravity.meteorapp.com/baseR4/Questionnaire/17d3c570-28de-4aa3-a135-e35d0932a4ec

With a Questionnaire in the body:

{
  "resourceType" : "Questionnaire",
  "id" : "17d3c570-28de-4aa3-a135-e35d0932a4ec",
  "meta" : {
    "versionId" : "1",
    "lastUpdated" : "2020-03-17T13:16:18.108+00:00",
    "source" : "#xd09g68tcUyhlqGZ",
    "profile" : [
      "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire|2.7"
    ]
  },
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: 17d3c570-28de-4aa3-a135-e35d0932a4ec</p><p><b>meta</b>: </p><p><b>url</b>: <b>http://hl7.maxmd.org/fhir/us/maxmd/Questionnaire/17d3c570-28de-4aa3-a135-e35d0932a4ec</b></p><p><b>identifier</b>: local-ehr-65d310b8-6235-4f47-8d45</p><p><b>version</b>: 0.0.3</p><p><b>name</b>: Food Insecurity (Hunger Vital Sign)</p><p><b>title</b>: Food Insecurity</p><p><b>status</b>: ACTIVE</p><p><b>subjectType</b>: Patient</p><p><b>date</b>: Dec 3, 2019, 4:09:54 PM</p><p><b>effectivePeriod</b>: Dec 12, 2019, 4:52:01 PM --&gt; Dec 22, 2019, 11:49:14 PM</p><blockquote><p><b>item</b></p><p><b>linkId</b>: /88122-7</p><p><b>code</b>: Within the past 12Mo we worried whether our food would run out before we got money to buy more (Details: [not stated] code 88122-7 = '88122-7', stated as 'Within the past 12Mo we worried whether our food would run out before we got money to buy more')</p><p><b>text</b>: Within the past 12Mo we worried whether our food would run out before we got money to buy more</p><p><b>type</b>: CHOICE</p><p><b>required</b>: false</p><blockquote><p><b>answerOption</b></p><p><b>value</b>: Often true (Details: [not stated] code LA28397-0 = 'LA28397-0', stated as 'Often true')</p></blockquote><blockquote><p><b>answerOption</b></p><p><b>value</b>: Sometimes true (Details: [not stated] code LA6729-3 = 'LA6729-3', stated as 'Sometimes true')</p></blockquote><blockquote><p><b>answerOption</b></p><p><b>value</b>: Never true (Details: [not stated] code LA28398-8 = 'LA28398-8', stated as 'Never true')</p></blockquote><blockquote><p><b>answerOption</b></p><p><b>value</b>: Don't know/refused (Details: [not stated] code LA15775-2 = 'LA15775-2', stated as 'Don't know/refused')</p></blockquote></blockquote><blockquote><p><b>item</b></p><p><b>linkId</b>: /88123-5</p><p><b>code</b>: Within the past 12Mo the food we bought just didn't last and we didn't have money to get more (Details: [not stated] code 88123-5 = '88123-5', stated as 'Within the past 12Mo the food we bought just didn't last and we didn't have money to get more')</p><p><b>text</b>: Within the past 12Mo the food we bought just didn't last and we didn't have money to get more</p><p><b>type</b>: CHOICE</p><p><b>required</b>: false</p><blockquote><p><b>answerOption</b></p><p><b>value</b>: Often true (Details: [not stated] code LA28397-0 = 'LA28397-0', stated as 'Often true')</p></blockquote><blockquote><p><b>answerOption</b></p><p><b>value</b>: Sometimes true (Details: [not stated] code LA6729-3 = 'LA6729-3', stated as 'Sometimes true')</p></blockquote><blockquote><p><b>answerOption</b></p><p><b>value</b>: Never true (Details: [not stated] code LA28398-8 = 'LA28398-8', stated as 'Never true')</p></blockquote><blockquote><p><b>answerOption</b></p><p><b>value</b>: Don't know/refused (Details: [not stated] code LA15775-2 = 'LA15775-2', stated as 'Don't know/refused')</p></blockquote></blockquote><blockquote><p><b>item</b></p></blockquote><p><b style=\"color: maroon\">Exception generating Narrative: unknown extension http://hl7.org/fhir/StructureDefinition/questionnaire-observationLinkPeriod</b></p></div>"
  },
  "extension" : [
    {
      "url" : "http://hl7.org/fhir/us/sdc/StructureDefinition/sdc-questionnaire-endpoint",
      "valueString" : "https://ehr-sandbox.directmdemail.com:8443/fhir/baseR4"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/variable",
      "valueExpression" : {
        "name" : "worriedAnsCode",
        "language" : "text/fhirpath",
        "expression" : "%resource.item.where(linkId='/88122-7').answer.value.code"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/variable",
      "valueExpression" : {
        "name" : "ranOutAnsCode",
        "language" : "text/fhirpath",
        "expression" : "%resource.item.where(linkId='/88123-5').answer.value.code"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/variable",
      "valueExpression" : {
        "name" : "riskCodes",
        "language" : "text/fhirpath",
        "expression" : "'LA28397-0'.combine('LA6729-3')"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/variable",
      "valueExpression" : {
        "name" : "riskStatus",
        "language" : "text/fhirpath",
        "expression" : "%riskCodes contains %worriedAnsCode or %riskCodes contains %ranOutAnsCode"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/variable",
      "valueExpression" : {
        "name" : "answeredEitherQ",
        "language" : "text/fhirpath",
        "expression" : "%worriedAnsCode.exists() or %ranOutAnsCode.exists()"
      }
    }
  ],
  "url" : "http://hl7.maxmd.org/fhir/us/maxmd/Questionnaire/17d3c570-28de-4aa3-a135-e35d0932a4ec",
  "identifier" : [
    {
      "system" : "http://www.maxmddirect.com/hl7/fhir/grv-locali-screenings",
      "value" : "local-ehr-65d310b8-6235-4f47-8d45"
    }
  ],
  "version" : "0.0.3",
  "name" : "Food Insecurity (Hunger Vital Sign)",
  "title" : "Food Insecurity",
  "status" : "active",
  "subjectType" : [
    "Patient"
  ],
  "date" : "2019-12-03T16:09:54+00:00",
  "effectivePeriod" : {
    "start" : "2019-12-12T16:52:01+00:00",
    "end" : "2019-12-22T23:49:14+00:00"
  },
  "item" : [
    {
      "extension" : [
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/questionnaire-item-control",
                "code" : "drop-down",
                "display" : "Drop down"
              }
            ],
            "text" : "Drop down"
          }
        }
      ],
      "linkId" : "/88122-7",
      "code" : [
        {
          "code" : "88122-7",
          "display" : "Within the past 12Mo we worried whether our food would run out before we got money to buy more"
        }
      ],
      "text" : "Within the past 12Mo we worried whether our food would run out before we got money to buy more",
      "type" : "choice",
      "required" : false,
      "answerOption" : [
        {
          "valueCoding" : {
            "code" : "LA28397-0",
            "display" : "Often true"
          }
        },
        {
          "valueCoding" : {
            "code" : "LA6729-3",
            "display" : "Sometimes true"
          }
        },
        {
          "valueCoding" : {
            "code" : "LA28398-8",
            "display" : "Never true"
          }
        },
        {
          "valueCoding" : {
            "code" : "LA15775-2",
            "display" : "Don't know/refused"
          }
        }
      ]
    },
    {
      "extension" : [
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/questionnaire-item-control",
                "code" : "drop-down",
                "display" : "Drop down"
              }
            ],
            "text" : "Drop down"
          }
        }
      ],
      "linkId" : "/88123-5",
      "code" : [
        {
          "code" : "88123-5",
          "display" : "Within the past 12Mo the food we bought just didn't last and we didn't have money to get more"
        }
      ],
      "text" : "Within the past 12Mo the food we bought just didn't last and we didn't have money to get more",
      "type" : "choice",
      "required" : false,
      "answerOption" : [
        {
          "valueCoding" : {
            "code" : "LA28397-0",
            "display" : "Often true"
          }
        },
        {
          "valueCoding" : {
            "code" : "LA6729-3",
            "display" : "Sometimes true"
          }
        },
        {
          "valueCoding" : {
            "code" : "LA28398-8",
            "display" : "Never true"
          }
        },
        {
          "valueCoding" : {
            "code" : "LA15775-2",
            "display" : "Don't know/refused"
          }
        }
      ]
    },
    {
      "extension" : [
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/questionnaire-observationLinkPeriod",
          "valueBoolean" : true
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/questionnaire-item-control",
                "code" : "drop-down",
                "display" : "Drop down"
              }
            ],
            "text" : "Drop down"
          }
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/variable",
          "valueExpression" : {
            "name" : "thisItem",
            "language" : "text/fhirpath",
            "expression" : "%questionnaire.item.where(linkId = '/88124-3')"
          }
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/variable",
          "valueExpression" : {
            "name" : "atR

view this post on Zulip Abbie Watson (May 13 2020 at 18:50):

And then fetch with the following:

GET http://gravity.meteorapp.com/baseR4/Questionnaire/17d3c570-28de-4aa3-a135-e35d0932a4ec

You can also check the user interface, and watch for the questionnaire to land.

http://gravity.meteorapp.com/questionnaires

Last updated: Apr 12 2022 at 19:14 UTC