diff --git a/package.json b/package.json index 8987bc96..3587e19e 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/resources/seeds/Questionnaire/cqf-examples.yaml b/resources/seeds/Questionnaire/cqf-examples.yaml new file mode 100644 index 00000000..a6fb7f5a --- /dev/null +++ b/resources/seeds/Questionnaire/cqf-examples.yaml @@ -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 diff --git a/yarn.lock b/yarn.lock index 228a89b3..f5432ce8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"