structor
structor copied to clipboard
Right order to importing Questionniare+ValueSet?
I'm having difficulty getting structor to recognise my answer valuesets -
- I upload the questionnaire (can't upload valueset before this)
- Then the ValueSet
- Hit validate and observe that it does not know the choice answers
https://user-images.githubusercontent.com/110988/144203612-18827ed6-1f79-439b-afa4-6d6bff1ae356.mov
What's the best approach here?
Unfortunately, neither structor, nor the form filler used for preview have support for referencing external ValueSets through the answerValueSet property. When using ValueSets, it is assumed that these are included in the Questionnaire as contained resources in the "contained" property (and referenced with a #, see the JSON example below).
You can see how this works if you change the ValueSet used in the first question to the one you uploaded:
If you hit validate again, there should not be any errors. When you look at the JSON, you can see that the ValueSet is contained in the Questionnaire:
{
"resourceType": "Questionnaire",
"id": "SACQComorbidities",
"name": "SACQComorbidities",
"status": "draft",
"publisher": "ICHOM",
"url": "https://connect.ichom.org/fhir/Questionnaire/SACQComorbidities",
"contained": [
{
"resourceType": "ValueSet",
"status": "active",
"name": "SACQPatientComorbidityHistory",
"id": "SACQ-patient-comorbidity-history",
"title": "SACQ Patient's comorbidity history",
"description": "Patient's documented history of comorbidities",
"version": "0.0.1",
"url": "https://connect.ichom.org/fhir/ValueSet/SACQ-patient-comorbidity-history",
"compose": {
"include": [
{
"system": "http://connect.ichom.org/fhir/CodeSystem/sacq-patient-comorbidity-history",
"concept": [
{
"code": "no-other-diseases"
},
{
"code": "cancer-within-5yrs"
},
{
"code": "other-medical-problems"
}
]
},
{
"system": "http://snomed.info/sct",
"concept": [
{
"code": "56265001",
"display": "Heart disease (For example, angina, heart attack, or heart failure)"
},
{
"code": "38341003",
"display": "High blood pressure"
},
{
"code": "19829001",
"display": "Lung disease (For example, asthma, chronic bronchitis, or emphysema)"
},
{
"code": "73211009",
"display": "Diabetes"
},
{
"code": "429040005",
"display": "Ulcer"
},
{
"code": "90708001",
"display": "Kidney disease"
},
{
"code": "235856003",
"display": "Liver disease"
},
{
"code": "271737000",
"display": "Anemia"
},
{
"code": "35489007",
"display": "Depression"
},
{
"code": "396275006",
"display": "Osteoarthritis"
},
{
"code": "161891005",
"display": "Back pain"
},
{
"code": "69896004",
"display": "Rheumatoid arthritis"
}
]
}
]
}
}
],
"item": [
{
"linkId": "ComorbiditiesSACQ",
"type": "choice",
"text": "Have you been told by a doctor that you have any of the following?",
"answerValueSet": "#SACQ-patient-comorbidity-history",
"required": true,
"repeats": true
},
{
"linkId": "ComorbiditiesSACQ_HeartDiseaseFU1",
"type": "boolean",
"text": "Do you receive treatment for heart disease (For example, angina, heart failure, or heart attack)?",
"enableWhen": [
{
"question": "ComorbiditiesSACQ",
"operator": "=",
"answerCoding": {
"code": "56265001",
"system": "http://snomed.info/sct"
}
}
]
},
...
}
Gotcha. That did fix the validation issues, but none of the following questions that are tagged with enableWhen
are showing up when a particular option is selected?
Are you referring to that the enableWhen items are not shown when the questionnaire is previewed? I suspect the form filler component used in the preview still have the limitation that it expects ValueSets to have only one include.
enableWhen items are not shown when the questionnaire is previewed?
Indeed.