Skip to content

Commit

Permalink
update for fix to rendering code, and add test case for open-choice i…
Browse files Browse the repository at this point in the history
…n R4 questionnaires
  • Loading branch information
Grahame Grieve committed Oct 14, 2024
1 parent 1534517 commit bbe1067
Show file tree
Hide file tree
Showing 3 changed files with 224 additions and 0 deletions.
39 changes: 39 additions & 0 deletions r5/narrative/output/ex-med-disp.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,45 @@ <h3>Performers</h3>
<p>
<b>dosageInstruction</b>
</p>
<p>
<b>sequence</b>
: 1
</p>
<p>
<b>text</b>
: Instil one drop in each eye twice daily
</p>
<p>
<b>timing</b>
: 2 per 1 days
</p>
<p>
<b>route</b>
: <span title="Codes:{http://snomed.info/sct 54485002}">Ophthalmic route (qualifier value)</span>
</p>
<p>
<b>method</b>
: <span title="Codes:{http://snomed.info/sct 421538008}">Instill - dosing instruction imperative (qualifier value)</span>
</p>
<h3>DoseAndRates</h3>
<table class="grid">
<tr>
<td style="display: none">-</td>
<td>
<b>Type</b>
</td>
<td>
<b>Dose[x]</b>
</td>
</tr>
<tr>
<td style="display: none">*</td>
<td>
<span title="Codes:{http://terminology.hl7.org/CodeSystem/dose-rate-type ordered}">Ordered</span>
</td>
<td>1 OPDROP</td>
</tr>
</table>
</blockquote>
<hr/>
<blockquote>
Expand Down
101 changes: 101 additions & 0 deletions validator/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -49841,6 +49841,107 @@
}
}
},
{
"name": "q_val_fail",
"file": "q_val_fail.json",
"documentation": "see https://chat.fhir.org/#narrow/stream/179255-questionnaire/topic/R4.20-.20Struggling.20to.20validate.20a.20Questionnaire.20with.20open-choice",
"version": "4.0",
"java": {
"outcome": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "warning",
"code": "invalid",
"details": {
"text": "Coding has no system. A code with no system has no defined meaning, and it cannot be validated. A system should be provided"
},
"diagnostics": "[14,22]",
"expression": [
"QuestionnaireResponse.contained[0]/*Questionnaire/ed364266b937bb3bd73082b1*/.item[0].extension[0].value.ofType(CodeableConcept).coding[0]"
]
},
{
"severity": "warning",
"code": "code-invalid",
"details": {
"text": "None of the codings provided are in the value set 'Questionnaire Item UI Control Codes' (http://hl7.org/fhir/ValueSet/questionnaire-item-control|4.0.1), and a coding should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable) (codes = null#editableDropdown)"
},
"diagnostics": "[14,22]",
"expression": [
"QuestionnaireResponse.contained[0]/*Questionnaire/ed364266b937bb3bd73082b1*/.item[0].extension[0].value.ofType(CodeableConcept)"
]
},
{
"severity": "warning",
"code": "code-invalid",
"details": {
"text": "A code with no system has no defined meaning, and it cannot be validated. A system should be provided"
},
"diagnostics": "[45,19]",
"expression": [
"QuestionnaireResponse.contained[0]/*Questionnaire/ed364266b937bb3bd73082b1*/.item[0].code[0]"
]
},
{
"severity": "warning",
"code": "code-invalid",
"details": {
"text": "A code with no system has no defined meaning, and it cannot be validated. A system should be provided"
},
"diagnostics": "[26,22]",
"expression": [
"QuestionnaireResponse.contained[0]/*Questionnaire/ed364266b937bb3bd73082b1*/.item[0].answerOption[0].value.ofType(Coding)"
]
},
{
"severity": "warning",
"code": "code-invalid",
"details": {
"text": "A code with no system has no defined meaning, and it cannot be validated. A system should be provided"
},
"diagnostics": "[32,22]",
"expression": [
"QuestionnaireResponse.contained[0]/*Questionnaire/ed364266b937bb3bd73082b1*/.item[0].answerOption[1].value.ofType(Coding)"
]
},
{
"severity": "warning",
"code": "code-invalid",
"details": {
"text": "A code with no system has no defined meaning, and it cannot be validated. A system should be provided"
},
"diagnostics": "[38,22]",
"expression": [
"QuestionnaireResponse.contained[0]/*Questionnaire/ed364266b937bb3bd73082b1*/.item[0].answerOption[2].value.ofType(Coding)"
]
},
{
"severity": "warning",
"code": "invariant",
"details": {
"text": "Constraint failed: que-0: 'Name should be usable as an identifier for the module by machine processing applications such as code generation'"
},
"diagnostics": "[7,7]",
"expression": [
"QuestionnaireResponse.contained[0]/*Questionnaire/ed364266b937bb3bd73082b1*/"
]
},
{
"severity": "warning",
"code": "structure",
"details": {
"text": "The string value 'Blood' matches an entry in the list of valid Codings, so this is probably an error"
},
"diagnostics": "[66,36]",
"expression": [
"QuestionnaireResponse.item[0].answer[0]"
]
}
]
}
}
},
{
"name": "zzz",
"file": "zzz.json",
Expand Down
84 changes: 84 additions & 0 deletions validator/q_val_fail.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"id":"9bb747d7-2666-47f2-9c79-20bc05198448",
"meta":{
"versionId":"5"
},
"contained":[
{
"id":"ed364266b937bb3bd73082b1",
"item":[
{
"extension":[
{
"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept":{
"coding":[
{
"code":"editableDropdown"
}
]
}
}
],
"id":"specimen-source",
"answerOption":[
{
"valueCoding":{
"code":"U",
"display":"Urine"
}
},
{
"valueCoding":{
"code":"B",
"display":"Blood"
}
},
{
"valueCoding":{
"code":"S",
"display":"Saliva"
}
}
],
"code":[
{
"code":"specimen-source"
}
],
"linkId":"specimen-source",
"text":"Source of specimen",
"type":"open-choice"
}
],
"name":"Test Open Choice question",
"status":"active",
"subjectType":[
"Patient"
],
"resourceType":"Questionnaire"
}
],
"item":[
{
"answer":[
{
"valueString":"Blood"
}
],
"linkId":"specimen-source",
"text":"Source of specimen"
}
],
"questionnaire":"#ed364266b937bb3bd73082b1",
"status":"in-progress",
"subject":{
"display":"Test Patient",
"identifier":{
"value":"4"
},
"reference":"Patient/4",
"type":"Patient"
},
"resourceType":"QuestionnaireResponse"
}

0 comments on commit bbe1067

Please sign in to comment.