Stream: implementers
Topic: QuestionnnaireREsponse
Radhakrishnan (May 06 2021 at 01:21):
We are having a questionnaire survey and which has 10 questions based on the selection positive or negative case to be saved in the questonnaire response. Which extn can we use for the same. { // note
// from Element: extension
"extension" : [ // sliced by value:url in the specified orderOpen
],
"url" : "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-note", // R!
"valueAnnotation" : { Positive} //Value of extension
}
Lloyd McKenzie (May 06 2021 at 01:29):
I'm not quite understand what you're trying to do. Are you wanting to fill out 10 questions and have it calculate the answer to an 11th question (determining positive or negative) or do you have an initial question (positive or negative) that then drives the behavior of the subsequent 10 questions?
Radhakrishnan (May 06 2021 at 01:38):
BAsed on the user selection if the user selected more than 5 recorded as positive case or negative case.
Radhakrishnan (May 06 2021 at 01:47):
The first case the based on selection count positive or negative will be calculated and stored.
Lloyd McKenzie (May 06 2021 at 02:11):
Your determination of positive or negative would also be a question, however you would mark it as read-only and set it up to calculate based on the answer to the others. The Structured Data Capture IG provides some guidance on how to do that.
Radhakrishnan (May 06 2021 at 02:12):
The Quesionnaire response has boolean answers and based number of yes positive or negative case will be decided and need to store the same in the fhir
Lloyd McKenzie (May 06 2021 at 02:12):
Handling QuestionnaireResponses is on the list of things to do for Argonaut vendors, so I suspect most systems that don't support it will support it 'soon'. In the interim, your only other choice would be to use Observation.
Radhakrishnan (May 06 2021 at 02:38):
Thanks a lot lloyd I wanted to know how to record the questions and answers in observation resource any example to check. Thanks for your help.
Lloyd McKenzie (May 06 2021 at 15:04):
What country are you implementing in?
booma radhakrishnan (May 26 2021 at 13:23):
I am implementing with in US
Lloyd McKenzie (May 26 2021 at 13:53):
Take a look at US Core - it has specific examples for smoking, lab and vital signs. https://build.fhir.org/ig/HL7/US-Core/profiles-and-extensions.html
Krishnan (May 31 2021 at 10:39):
I am using EPIC EHR to post questionnaire response with transaction type bundle
https://epic.rajamanir.repl.co
The click on the login url redirects to launch.html and redirects to app.html with username: fhircamila and password : epicepic1 and getting 403 forbidden error the JSON payload i am using is https://epic.rajamanir.repl.co/questionaireRespomse.json
Request URL: https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4/QuestionnaireResponse?patient=erXuFYUfucBZaryVksYEcMg3
Request Method: POST
Status Code: 403 Forbidden
Remote Address: 199.204.56.200:443
Referrer Policy: strict-origin-when-cross-origin
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: origin, authorization, accept, content-type, x-requested-with, Epic-User-ID, Epic-User-IDType, Epic-Client-ID, soapaction, Epic-MyChartUser-ID, Epic-MyChartUser-IDType
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS
Access-Control-Allow-Origin: *
Cache-Control: no-cache,no-store
Content-Length: 0
Date: Mon, 31 May 2021 10:05:02 GMT
Expires: -1
Pragma: no-cache
ServerMetrics: {"BlockReads":0,"BlockWrites":2,"BlocksAllocated":0,"DBTime":2,"ECFNetworkTime":0,"ECFRequestCount":0,"ECFRequestTime":2,"GREF":248,"JournalEntries":7,"LocksFailed":0,"LocksGranted":3,"MCommands":2823,"MemoryDifference":0,"WorkflowEventBlockReads":0,"WorkflowEventDBTime":2,"WorkflowEventECFNetworkTime":0,"WorkflowEventECFRequestCount":0,"WorkflowEventGREF":248}
Set-Cookie: EpicPersistenceCookie=!s9tLiGZ/JO5bowbkywGuayYXr7azRcO3QlmT0FUoZ5JkcNevOBavb0hTyLpDhvRLnK2bm1eecabab/U=; path=/; Httponly; Secure
WWW-Authenticate: Bearer error="insufficient_scope", error_description="The access token provided is valid, but is not authorized for this service"
Accept: application/json+fhir
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ1cm46b2lkOmZoaXIiLCJjbGllbnRfaWQiOiJkMmIxN2VmMS1kZTAwLTQ4NTYtODUzOS0wMTBmYjQzYzk5OWYiLCJlcGljLmVjaSI6InVybjplcGljOk9wZW4uRXBpYy1jdXJyZW50IiwiZXBpYy5tZXRhZGF0YSI6IjdQb09TNWIyeGFJbEVfLWt5R09wV0ZzODFpbnJqaEZaazdpRVpFUFl5Z1RITnRkenhoZm52OEV4Vjc5Ymo5MDZyZW5LUWlBc2J4VGE1akVwd2V1YWVrWFBDSTdGUnRhdXpyMDUzcHE2QUYtcXZSVWkzdHNfMzd6VXN5M3ExTU80IiwiZXBpYy50b2tlbnR5cGUiOiJhY2Nlc3MiLCJleHAiOjE2MjI0NTkxMDIsImlhdCI6MTYyMjQ1NTUwMiwiaXNzIjoidXJuOm9pZDpmaGlyIiwianRpIjoiYmQ3OWJmNTctOGVmMy00OTQ0LWI4NDMtOTgwNDUzYzNmN2JjIiwibmJmIjoxNjIyNDU1NTAyLCJzdWIiOiJlYjRHaWE3RnlpanRQbVhrcnRqUnBQdzMifQ.M2tnBCyt-lpvTDJXR_-vsIpPOha7gOf3BfNZHmT_v82UnsImWs7Qa5Op61LYdUKuaLFNumlt-uqAvBIlc_08B7G07ALLLcrMsrlWKe35Prp_2RVJUihrJIKb9ELJUmPSpVKTvRuH-ZkIOnQg4X7OWq5xn12V86d6tO1nP15Aj7buQENjVM3ymOoMWobRjfLJYz6j7qaetypvh7-6hCB87hXinNxLXmBZOXxXNancYQQdw4Qeu45dg-lpsJLhtYH-Oa9s-cKV9KNADHr5OH33HgtQzh4qUja1sNTmRIR_-eVO2hxinQI0_Yz-qcDP5p7ceuK2XFM3E-7bF9Vyi8anpA
Connection: keep-alive
Content-Length: 0
Host: fhir.epic.com
Origin: https://epic.rajamanir.repl.co
Referer: https://epic.rajamanir.repl.co/
sec-ch-ua: "Google Chrome";v="89", "Chromium";v="89", ";Not A Brand";v="99"
sec-ch-ua-mobile: ?0
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
patient: erXuFYUfucBZaryVksYEcMg3
Yokesh M (May 31 2021 at 13:03):
I have six questionnaire response like below how can I store and post those questionnaire in to fhir and that can be supported by both epic and cerner.
{
resource: {
resourceType: "QuestionnaireResponse",
item: [{
linkId: "1",
item: [{
linkId: "1.1",
text: "How are you ?",
type: 'boolean',
answer: [{
valueString: ""
}]
}]
},
{
linkId: "2",
item: [{
linkId: "2.1",
type: 'boolean',
text: "Did you have problems any problems?",
answer: [{
valueString: ""
}]
}]
},
{
linkId: "3",
item: [{
linkId: "3.1",
type: 'boolean',
text: "Have you taken food?",
answer: [{
valueString: ""
}]
}]
},
{
linkId: "4",
item: [{
linkId: "4.1",
type: 'boolean',
text: "Have you have any symptoms related to malaria?",
answer: [{
valueString: ""
}]
}]
},
{
linkId: "5",
item: [{
linkId: "5.1",
type: 'boolean',
text: "How many people are there in your family?",
answer: [{
valueString: ""
}]
}]
},
{
linkId: "6",
item: [{
linkId: "6.1",
type: 'boolean',
text: "Have you meet the doctor?",
answer: [{
valueString: ""
}]
}]
},
]
}
Yunwei Wang (May 31 2021 at 15:27):
@Yokesh M You can contact specific vendor to find out if their system support client generated QuestionnaireResponse.
Lloyd McKenzie (May 31 2021 at 23:12):
Note that your JSON is not well formed and 'type' is not a valid element on QuestionnaireResponse. Having empty string is also invalid. Before worrying about getting an EHR system to accept it, first make sure the instance is valid against the base spec.
booma radhakrishnan (Jun 01 2021 at 02:47):
Thanks a lot, I am trying to post the bundle with with EPIC EHR
'scope': 'Patient.Read, Patient.Search,Observation.Read,Observation.Search,QuestionnaireResponse.Create(Appointment and Series),QuestionnaireResponse.Read(Appointment and Series)',
{
"resourceType" : "Bundle",
"type": "transaction",
"entry" : [{
"resource": {
"resourceType": "Patient"
},
"request": {
"method": "PUT",
"url": "Patient/86185"
}
},
{
"resource": {
"resourceType": "QuestionnaireResponse",
"item": [{
"linkId" : "1",
"item": [{
"linkId": "1.1",
"text": "Q1",
"answer": [{
"valueString": "Yes"
}]
}]
}
}
Failed to load resource: the server responded with a status of 401 (Unauthorized)
Unable to post the data to EHR with QuestionnaireReponse either Observation. isanyting i am missing.
Lloyd McKenzie (Jun 01 2021 at 02:49):
You're trying to update an existing QuestionnaireResponse?
booma radhakrishnan (Jun 01 2021 at 03:48):
I am creating a new post and i feel the bundle is wrong. Pasting the whole bundle.
{
"resourceType" : "Bundle",
"type": "transaction",
"entry" : [{
"resource": {
"resourceType": "Patient"
},
"request": {
"method": "PUT",
"url": "Patient/86185"
}
},
{
"resource": {
"resourceType": "QuestionnaireResponse",
"item": [{
"linkId" : "1",
"item": [{
"linkId": "1.1",
"text": "Q1",
"answer": [{
"valueString": "Yes"
}]
}]
},
{
"linkId": "2",
"item": [{
"linkId": "2.1",
"text": "Q2?",
"answer": [{
"valueString": "Yes"
}]
}]
},
{
"linkId": "3",
"item": [{
"linkId": "3.1",
"text": "Q3?",
"answer": [{
"valueString": "Yes"
}]
}]
},
{
"linkId": "4",
"item": [{
"linkId": "4.1",
"text": "Q4?",
"answer": [{
"valueString": "Yes"
}]
}]
},
{
"linkId": "5",
"item": [{
"linkId": "5.1",
"text": "Q5?",
"answer": [{
"valueString": "Yes"
}]
}]
},
{
"linkId": "6",
"item": [{
"linkId": "6.1",
"text": "Q6",
"answer": [{
"valueString": "Yes"
}]
}]
}
]
},
"request": {
"method" : "POST",
'url': 'Patient/2e27c71e-30c8-4ceb-8c1c-5641e066c0a4'
}
}
]
}
Lloyd McKenzie (Jun 01 2021 at 14:03):
You're updating the Patient resource but don't have any content for the resource - you have to actually have a patient resource. Only having resource type isn't sufficient.
booma radhakrishnan (Jun 08 2021 at 00:45):
Hi Llyod,
Can we use this for FHIR version R4
Lloyd McKenzie (Jun 08 2021 at 02:46):
Can you use what?
Lloyd McKenzie (Jun 08 2021 at 02:48):
Empty resource - no. You can't send empty resources in any version of FHIR. Every resource requires at least one element other than the id. More importantly, the only data remaining will be what you send in the update. You have to send all data in an update, not only what you're changing. (If you want to only send changes, you need to use PATCH.)
booma radhakrishnan (Jun 08 2021 at 12:25):
The structure definition available under https://build.fhir.org/ig/HL7/sdc//StructureDefinition-sdc-questionnaireresponse.profile.json.html can be used in FHIR version R4
Lloyd McKenzie (Jun 08 2021 at 13:40):
That release of SDC is definitely based on FHIR R4, so yes.
Yokesh M (Jun 10 2021 at 11:31):
I have a list of 6 questionnaire response that have already supporting EPIC FHIR Server.With the same questionnarie response it needs to support cerner FHIR Server also. So how I can achieve this by cerner. Any Suggestion?
{
resource: {
resourceType: "QuestionnaireResponse",
authored: "2019-08-21T20:36:57.544Z",
subject: {
reference: "Patient/erXuFYUfucBZaryVksYEcMg3"
},
status: "completed",
item: [{
linkId: "1",
item: [{
linkId: "1.1",
text: "How age are you?",
type: 'boolean',
answer: [{
valueString: ""
}]
}]
},
{
linkId: "2",
item: [{
linkId: "2.1",
type: 'boolean',
text: "How age are you",
answer: [{
valueString: ""
}]
}]
},
{
linkId: "3",
item: [{
linkId: "3.1",
type: 'boolean',
text: "How age are you",
answer: [{
valueString: ""
}]
}]
},
{
linkId: "4",
item: [{
linkId: "4.1",
type: 'boolean',
text: "How age are you",
answer: [{
valueString: ""
}]
}]
},
{
linkId: "5",
item: [{
linkId: "5.1",
type: 'boolean',
text: "How age are you",
answer: [{
valueString: ""
}]
}]
},
{
linkId: "6",
item: [{
linkId: "6.1",
type: 'boolean',
text: "How age are you",
answer: [{
valueString: ""
}]
}]
},
]
}
Yokesh M (Jun 10 2021 at 13:20):
Please provide some information to convert the QuestionnarieResponse FHIR resource to the Observation FHIR resource
Lloyd McKenzie (Jun 10 2021 at 14:46):
For Cerner questions, best to ask on code.cerner.com or fhir.cerner.com. In terms of representing QuestionnaireResponses in Observation, take a look at the 'extraction' section of Structured Data Capture here. In general, the question will correspond to Observation.code and the answer will correspond to Observation.value. In limited cases, you might put questions and answers in Observation.component.
Yokesh M (Jun 11 2021 at 11:47):
@Lloyd McKenzie
I have created sample observation questionnaire response using observation resource. Is that approach is fine please provide your suggestion?
{
"resourceType": "Observation",
"status": "final",
"issued": "2019-08-21T20:36:57.544Z",
"subject": {
"reference": "Patient/erXuFYUfucBZaryVksYEcMg3"
},
"code": {
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "survey",
"display": "survey"
}]
},
{
"observation.component"
[{
"observation.code" : "Question 1"
"observation.value" : : [{
"valueString": "Yes"
}]
},
{
"observation.code" : "Question 2"
"observation.value" : : [{
"valueString": "Yes"
}]
}
]}
}
Yunwei Wang (Jun 11 2021 at 14:10):
@Yokesh M have you contact cerner?
Lloyd McKenzie (Jun 11 2021 at 14:36):
You should also run your instance through a validator. Your JSON isn't currently valid against the core spec. And, as mentioned previously, depending on the questions in your form, you might need a separate Observation for each question/answer pair.
mahmood barzan (Jun 14 2021 at 08:13):
Dear Lloyd
@Lloyd McKenzie
Is this to possible to help me, We are development a app for women's health.
We have some question about LMP, last menstrual period, we assume that mentioned case are observation, so we use from Observation Resource.
I want to know, Can I use from QuestionnaireResponse Resource for it?
Other question are such as, Are you Mother or Pregnant?
For this question, we use from observation.
I will be glad to know your opinion about it?
Regard Mahan
booma radhakrishnan (Jun 15 2021 at 12:05):
@Yunwei Wang Cerner does not support the SDC they suggested to use QuestionnaireREsponse but only sandbox and not in production.
Is Any Extension is available to use to hold the Question an Boolean answer as an object or Array. Kindly provide me if it is available.
Jessica Pettersson (Jun 16 2021 at 12:01):
Hi! If there is a need to invalidate a QuestionnaireResponse from an external system, is there a good extension for expressing the invalidation reason? What about this one? https://simplifier.net/simplifier.core.r4.extensions/statusreason
We will represent invalidation with status, but want to give the reason for invalidation, which is a text.
Grahame Grieve (Jun 16 2021 at 12:43):
what does 'invalidate' mean?
Yunwei Wang (Jun 16 2021 at 17:19):
QuestionnaireResponse.status = enter-in-error ?
Lloyd McKenzie (Jun 25 2021 at 02:01):
Note to all - if you're asking a different question, best not to append to an existing topic but create a new one as it's easier to continue conversations.
@mahmood barzan QuestionnaireResponse can be used to capture pretty much anything - but it's not a preferred mechanism for exchange because receiving systems may not understand the data and it can't be queried for. Also, a lot of EHR systems don't yet support for QuestionnaireResponse. So your best bet is Observations unless you're truly dealing with a Questionnaire and know for certain that your recipient both supports and wants a QuestionnaireResponse.
@booma radhakrishnan Explain what data you're wanting to be an array of booleans?
booma radhakrishnan (Jun 25 2021 at 10:19):
@Lloyd McKenzie
I wanted to store preliminary evaluation of a patient with set of questions and save the data it into a patient record.
[
{
"question": "Question1",
"answer": "NO"
},
{
"question" : "Question2",
"answer": "Yes"
},
{
"question": "Question3",
"answer": "Yes"
},
{
"question": "Question4",
"answer": "Yes"
},
{
"question": "Question5",
"answer": "Yes"
},
{
"question": "Question6",
"answer": "Yes"
}
]
Lloyd McKenzie (Jun 25 2021 at 13:41):
Have you looked at the syntax that FHIR defines for QuestionnaireResponse? You will have an array, but the array will be of items will look like this:
"item": [{
"linkId": "1",
"text":"Question1",
"answer": [{
"valueBoolean": true
}]
},{
"linkId": "2",
"text":"Question2",
"answer": [{
"valueBoolean": false
}]
}]
Hemanth Gorur (Jul 14 2021 at 20:23):
Castlight integrated the Appointment availability data being shared by CVS, Rite-Aid and walgreens. Here is a demo of how the information will be presented on vaccines.gov https://vimeo.com/575047522/b7d63395d5 .
Last updated: Apr 12 2022 at 19:14 UTC