-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert item elements starting with _ to fce and to fhir
- Loading branch information
Showing
6 changed files
with
213 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
sdc-qrf/src/converter/__tests__/resources/questionnaire_fce/cqf-examples.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"subjectType": [ | ||
"Encounter", | ||
"Patient" | ||
], | ||
"meta": { | ||
"profile": [ | ||
"https://beda.software/beda-emr-questionnaire" | ||
], | ||
"lastUpdated": "2024-11-18T13:35:34.455065Z", | ||
"createdAt": "2024-11-15T17:04:52.598486Z", | ||
"versionId": "11968" | ||
}, | ||
"name": "CQF Examples", | ||
"item": [ | ||
{ | ||
"text": "Click on this checkbox to see result", | ||
"type": "boolean", | ||
"linkId": "input-1" | ||
}, | ||
{ | ||
"text": "This is default input label", | ||
"type": "string", | ||
"_text": { | ||
"cqfExpression": { | ||
"language": "text/fhirpath", | ||
"expression": "iif(%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = true, 'Now the input label changed', null)" | ||
} | ||
}, | ||
"linkId": "input-2" | ||
}, | ||
{ | ||
"item": [ | ||
{ | ||
"text": "This input is disabled if the checkbox is unchecked", | ||
"type": "string", | ||
"linkId": "input-5", | ||
"readOnly": true, | ||
"_readOnly": { | ||
"cqfExpression": { | ||
"language": "text/fhirpath", | ||
"expression": "%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = false" | ||
} | ||
} | ||
}, | ||
{ | ||
"text": "This input is required if the checkbox is checked", | ||
"type": "string", | ||
"linkId": "input-6", | ||
"required": false, | ||
"_required": { | ||
"cqfExpression": { | ||
"language": "text/fhirpath", | ||
"expression": "%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = true" | ||
} | ||
} | ||
} | ||
], | ||
"text": "This is default group label", | ||
"type": "group", | ||
"_text": { | ||
"cqfExpression": { | ||
"language": "text/fhirpath", | ||
"expression": "iif(%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = true, 'Now the group label changed', null)" | ||
} | ||
}, | ||
"linkId": "input-3" | ||
} | ||
], | ||
"resourceType": "Questionnaire", | ||
"title": "CQF Examples", | ||
"status": "active", | ||
"id": "cqf-examples", | ||
"url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/cqf-examples" | ||
} |
100 changes: 100 additions & 0 deletions
100
sdc-qrf/src/converter/__tests__/resources/questionnaire_fhir/cqf-examples.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{ | ||
"subjectType": [ | ||
"Encounter", | ||
"Patient" | ||
], | ||
"meta": { | ||
"profile": [ | ||
"https://beda.software/beda-emr-questionnaire" | ||
], | ||
"lastUpdated": "2024-11-18T13:35:34.455065Z", | ||
"versionId": "11968", | ||
"extension": [ | ||
{ | ||
"url": "ex:createdAt", | ||
"valueInstant": "2024-11-15T17:04:52.598486Z" | ||
} | ||
] | ||
}, | ||
"name": "CQF Examples", | ||
"item": [ | ||
{ | ||
"text": "Click on this checkbox to see result", | ||
"type": "boolean", | ||
"linkId": "input-1" | ||
}, | ||
{ | ||
"text": "This is default input label", | ||
"type": "string", | ||
"_text": { | ||
"extension": [ | ||
{ | ||
"url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", | ||
"valueExpression": { | ||
"language": "text/fhirpath", | ||
"expression": "iif(%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = true, 'Now the input label changed', null)" | ||
} | ||
} | ||
] | ||
}, | ||
"linkId": "input-2" | ||
}, | ||
{ | ||
"item": [ | ||
{ | ||
"text": "This input is disabled if the checkbox is unchecked", | ||
"type": "string", | ||
"linkId": "input-5", | ||
"readOnly": true, | ||
"_readOnly": { | ||
"extension": [ | ||
{ | ||
"url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", | ||
"valueExpression": { | ||
"language": "text/fhirpath", | ||
"expression": "%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = false" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"text": "This input is required if the checkbox is checked", | ||
"type": "string", | ||
"linkId": "input-6", | ||
"required": false, | ||
"_required": { | ||
"extension": [ | ||
{ | ||
"url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", | ||
"valueExpression": { | ||
"language": "text/fhirpath", | ||
"expression": "%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = true" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"text": "This is default group label", | ||
"type": "group", | ||
"_text": { | ||
"extension": [ | ||
{ | ||
"url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", | ||
"valueExpression": { | ||
"language": "text/fhirpath", | ||
"expression": "iif(%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = true, 'Now the group label changed', null)" | ||
} | ||
} | ||
] | ||
}, | ||
"linkId": "input-3" | ||
} | ||
], | ||
"resourceType": "Questionnaire", | ||
"title": "CQF Examples", | ||
"status": "active", | ||
"id": "cqf-examples", | ||
"url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/cqf-examples" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters