Skip to content

Commit

Permalink
Update sdc-qrf and add example of usage cqf expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
vesnushka committed Nov 15, 2024
1 parent 256fdcd commit 30313b7
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"react-select": "^5.7.3",
"recharts": "^2.12.0",
"sass": "^1.63.6",
"sdc-qrf": "^0.3.4",
"sdc-qrf": "^0.3.5",
"styled-components": "^6.1.11",
"yup": "^1.2.0"
},
Expand Down
57 changes: 57 additions & 0 deletions resources/seeds/Questionnaire/cqf-examples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

name: CQF Examples
title: CQF Examples
subjectType:
- Encounter
- Patient
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
status: active
id: cqf-examples
meta:
profile:
- https://beda.software/beda-emr-questionnaire
url: >-
https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/cqf-examples
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12094,10 +12094,10 @@ scroll-into-view-if-needed@^3.0.3:
dependencies:
compute-scroll-into-view "^3.0.2"

sdc-qrf@^0.3.4:
version "0.3.4"
resolved "https://registry.yarnpkg.com/sdc-qrf/-/sdc-qrf-0.3.4.tgz#0e1a5fd262676b425887fb2a43e0a49cffbb6dfb"
integrity sha512-9gi7K/496/SmM4zTj4C0z4MR9a0cusxoqohkBan0gRDZ2sBrCMVWnQeJVGYk9ZBmSBaEpNjU8+aTM/T4d1tMJA==
sdc-qrf@^0.3.5:
version "0.3.5"
resolved "https://registry.yarnpkg.com/sdc-qrf/-/sdc-qrf-0.3.5.tgz#f1c6681aefe86c44d1f1a9cdcc8375257a8e5759"
integrity sha512-SNmM08NNvVUGsZyOqiH7bc+JqBnDhD5i4+GJYRhJM7oCzw+zGYqdPpCkKKjikj44EZQAFP+ADWVqsTp2BNRFrQ==
dependencies:
classnames "^2.3.1"
fhirpath "^3.5.0"
Expand Down

0 comments on commit 30313b7

Please sign in to comment.