Stream: questionnaire
Topic: workflow-researchStudy extension
Diane (Jul 01 2021 at 00:25):
In my post on Grouping Questionnaire Responses, the syntax of the workflow-researchStudy extension was discussed and appeared to be correct.
Since then, I have tried multiple times to use that syntax provided by creating a Questionnaire Response with this workflow extension, but I am having issues. I am testing on the R4 public UHN HAPI server at http://hapi.fhir.org/
The extension that I am trying is:
"extension":
[{
"url": "http://hl7.org/fhir/StructureDefinition/workflow-researchStudy",
"value": {
"reference": "http://hapi.fhir.org/baseR4/ResearchStudy/2126240",
"display": "2126240"
}
}]
Each time, I get apparent success (201 created), but when I look at the Questionnaire Response (eg. 2379536), the extension is not there.
So, I tried this:
"extension":
[{
"url": "http://hl7.org/fhir/StructureDefinition/workflow-researchStudy",
"valueUrl": "http://hapi.fhir.org/baseR4/ResearchStudy/2126240"
}]
which seems better in that the Questionnaire Response (eg. 2379538) has the extension. But, I don't think it is correct, because when I try to validate the Questionnaire Response, I get the error:
"severity": "error",
"code": "processing",
"diagnostics": "The Extension 'http://hl7.org/fhir/StructureDefinition/workflow-researchStudy' definition allows for the types [Reference] but found type url"
What am I doing wrong? Why is my extension disappearing?
Lloyd McKenzie (Jul 01 2021 at 02:57):
The first is correct. @James Agnew ?
Diane (Jul 19 2021 at 16:21):
I am still having no success with workflow-researchStudy extension.
The syntax that Lloyd says is correct is:
"extension":
[{
"url": "http://hl7.org/fhir/StructureDefinition/workflow-researchStudy",
"value": {
"reference": "http://hapi.fhir.org/baseR4/ResearchStudy/2126240",
"display": "2126240"
}
}]
Each time, I get apparent success (201 created) in the HAPI server (either our organization's HAPI server or the HAPI test server, but when I look at the Questionnaire Response (eg. 2379536), the workflow-researchStudy extension is not there.
This other syntax allows the extension to be created in the Questionnaire Response:
"extension" : {
"url" : "http://hl7.org/fhir/StructureDefinition/workflow-researchStudy",
"valueUrl" : "http://hapi.fhir.org/baseR4/ResearchStudy/2126240"
}
but then the Questionnaire Response won't validate.
Lloyd McKenzie (Jul 19 2021 at 16:22):
It should be "valueReference", not "value"
Diane (Jul 19 2021 at 22:37):
Thank you. This syntax has fixed everything. In case anyone else needs the workflow-researchStudy extension, this is the correct syntax:
[
{
"url" : "http://hl7.org/fhir/StructureDefinition/workflow-researchStudy",
"valueReference" : {
"reference" : "http://hapi.fhir.org/baseR4/ResearchStudy/2126240",
"display" : "2126240"
}
}
]
Last updated: Apr 12 2022 at 19:14 UTC