Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
FikriMilano committed Aug 2, 2023
1 parent 9686da8 commit d2d53a2
Showing 1 changed file with 134 additions and 0 deletions.
134 changes: 134 additions & 0 deletions demo/src/main/assets/dynamic-answer-expression.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"resourceType": "Questionnaire",
"id": "client-registration-sample",
"language": "en",
"status": "active",
"date": "2020-11-18T07:24:47.111Z",
"subjectType": [
"Patient"
],
"extension": [
{
"url": "http:https://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
"extension": [
{
"url": "name",
"valueCoding": {
"system": "http:https://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
"code": "giga-chada",
"display": "Giga Chad"
}
},
{
"url": "type",
"valueCode": "Patient"
}
]
},
{
"url": "http:https://hl7.org/fhir/StructureDefinition/variable",
"valueExpression": {
"name": "selected-answer",
"language": "text/fhirpath",
"expression": "%resource.descendants().where(linkId='1').answer.value"
}
},
{
"url": "http:https://hl7.org/fhir/StructureDefinition/variable",
"valueExpression": {
"name": "city",
"language": "text/fhirpath",
"expression": "iif(%selected-answer.exists(), %selected-answer.code, 'NOTHING')"
}
}
],
"item": [
{
"extension": [
{
"url": "http:https://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http:https://hl7.org/fhir/questionnaire-item-control",
"code": "drop-down",
"display": "Drop down"
}
],
"text": "Drop down"
}
}
],
"linkId": "1",
"text": "Select City",
"type": "choice",
"required": true,
"answerOption": [
{
"valueCoding": {
"code": "JAKARTA",
"display": "JAKARTA"
}
},
{
"valueCoding": {
"code": "NAIROBI",
"display": "NAIROBI"
}
}
]
},
{
"extension": [
{
"url": "http:https://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http:https://hl7.org/fhir/questionnaire-item-control",
"code": "drop-down",
"display": "Drop down"
}
],
"text": "Drop down"
}
},
{
"url": "http:https://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-answerExpression",
"valueExpression": {
"expression": "Patient?name={{%giga-chad.name.given}}",
"language": "application/x-fhir-query"
}
},
{
"url": "http:https://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-choiceColumn",
"extension": [
{
"url": "path",
"valueString": "id"
},
{
"url": "forDisplay",
"valueBoolean": true
}
]
}
],
"linkId": "2",
"text": "Find Patient From: X City",
"_text": {
"extension": [
{
"url": "http:https://hl7.org/fhir/StructureDefinition/cqf-expression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "'Find Patient From: ' + %city + ' City'"
}
}
]
},
"type": "reference",
"required": true
}
]
}

0 comments on commit d2d53a2

Please sign in to comment.