Skip to content

Commit

Permalink
Merge pull request #351 from beda-software/dynamic-text
Browse files Browse the repository at this point in the history
Add support for cqf-expression
  • Loading branch information
atuonufure authored Nov 4, 2024
2 parents 0217281 + e8709b6 commit 7dfd7c2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions contrib/aidbox-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14137,6 +14137,9 @@ export interface QuestionnaireItem {
/** NOTE: from extension http://hl7.org/fhir/StructureDefinition/questionnaire-constraint */
/** An invariant that must be satisfied before responses to the questionnaire can be considered "complete". */
constraint?: QuestionnaireItemConstraint[];
/** NOTE: from extension http://hl7.org/fhir/StructureDefinition/cqf-expression */
/** An expression that, when evaluated, provides the value for the element on which it appears. */
cqfExpression?: Expression;
/** ElementDefinition - details for the item */
definition?: uri;
/** all | any */
Expand Down
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.0",
"sdc-qrf": "^0.3.2",
"styled-components": "^6.1.11",
"yup": "^1.2.0"
},
Expand Down
4 changes: 4 additions & 0 deletions src/utils/converter/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export enum ExtensionIdentifier {
CalculatedExpression = 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression',
EnableWhenExpression = 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
AnswerExpression = 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-answerExpression',
CqfExpression = 'http://hl7.org/fhir/StructureDefinition/cqf-expression',

AdjustLastToRight = 'https://beda.software/fhir-emr-questionnaire/adjust-last-to-right',
SliderStart = 'https://beda.software/fhir-emr-questionnaire/slider-start',
Expand Down Expand Up @@ -216,6 +217,9 @@ export const extensionTransformers: ExtensionTransformer = {
},
},
},
[ExtensionIdentifier.CqfExpression]: {
path: { extension: 'valueExpression', questionnaire: 'cqfExpression' },
},

[ExtensionIdentifier.AdjustLastToRight]: {
path: { extension: 'valueBoolean', questionnaire: 'adjustLastToRight' },
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13428,10 +13428,10 @@ scroll-into-view-if-needed@^3.0.3:
dependencies:
compute-scroll-into-view "^3.0.2"

sdc-qrf@^0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/sdc-qrf/-/sdc-qrf-0.3.1.tgz#6cb1374a6fc913811d4efcdbba2c8c43567016d0"
integrity sha512-rxqhIzNutDoKH4SbhOsqV7PZ93c/NDlSBlUVeDEzq1Frb4Fgx8DK6b3jOJa8zu2C1KvlEpDp5OiViXpOLI4VlQ==
sdc-qrf@^0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/sdc-qrf/-/sdc-qrf-0.3.2.tgz#0fe1d03f415de007b7bddc374733f692eeace161"
integrity sha512-PdNN4VVBkxqLZBVZ+Waq10Tf7rPoxOiAKH+Po8lqVx4I3aZzQXE1GB9k9SHSxrlco7LXcdeZexPljTFy5YkuBQ==
dependencies:
classnames "^2.3.1"
fhirpath "^3.5.0"
Expand Down

0 comments on commit 7dfd7c2

Please sign in to comment.