Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/aehrc/smart-forms
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 18, 2024
2 parents a623e10 + 2d1db7d commit 5cfa88c
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 18 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ This log documents significant changes for the [@aehrc/smart-forms-renderer](htt

Changelog only includes changes from version 0.36.0 onwards.

## [0.44.2] - 2024-10-18
### Fixed
- Fixed an issue where inputs in checkbox open-choice's open label field does not update the QuestionnaireResponse.

## [0.44.1] - 2024-10-14
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion apps/smart-forms-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"@aehrc/sdc-assemble": "^1.3.1",
"@aehrc/sdc-populate": "^2.3.1",
"@aehrc/smart-forms-renderer": "^0.44.1",
"@aehrc/smart-forms-renderer": "^0.44.2",
"@emotion/react": "^11.13.0",
"@emotion/styled": "^11.13.0",
"@fontsource/material-icons": "^5.0.18",
Expand Down
26 changes: 16 additions & 10 deletions documentation/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"typecheck": "tsc"
},
"dependencies": {
"@aehrc/smart-forms-renderer": "^0.44.1",
"@aehrc/smart-forms-renderer": "^0.44.2",
"@docusaurus/core": "^3.4.0",
"@docusaurus/preset-classic": "^3.4.0",
"@docusaurus/theme-live-codeblock": "^3.4.0",
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/smart-forms-renderer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aehrc/smart-forms-renderer",
"version": "0.44.1",
"version": "0.44.2",
"description": "FHIR Structured Data Captured (SDC) rendering engine for Smart Forms",
"main": "lib/index.js",
"scripts": {
Expand Down
15 changes: 13 additions & 2 deletions packages/smart-forms-renderer/src/utils/openChoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,21 @@ export function updateOpenLabelAnswer(
}

// New open label answer is different from old open label answer, update it
oldOpenLabelAnswer.valueString = changedOpenLabelValue;
const updatedAnswers = oldQrItem.answer?.map((answer) => {
const { valueString } = answer;
if (valueString === oldOpenLabelAnswer.valueString) {
return {
...answer,
valueString: changedOpenLabelValue // Update the valueString
};
}

return answer; // Keep the other answers unchanged
});

return {
...oldQrItem,
answer: oldQrItem.answer
answer: updatedAnswers
};
}

Expand Down

0 comments on commit 5cfa88c

Please sign in to comment.