Skip to content

Commit 325f11c

Browse files
authored
build: release v6.259.0 (#8819)
* Merge pull request #8818 from opengovsg/fix/myinfo-child-vacfulfilled-incorrect fix: myinfo child not reflecting correct vaccination status * chore: bump version to v6.259.0
2 parents 8637568 + 1ee5a2f commit 325f11c

File tree

8 files changed

+51
-23
lines changed

8 files changed

+51
-23
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7+
#### [v6.259.0](https://github.com/opengovsg/FormSG/compare/v6.258.0...v6.259.0)
8+
9+
- fix: myinfo child not reflecting correct vaccination status [`#8818`](https://github.com/opengovsg/FormSG/pull/8818)
10+
- build: merge release v6.258.0 to develop [`#8817`](https://github.com/opengovsg/FormSG/pull/8817)
11+
- build: release v6.258.0 [`#8816`](https://github.com/opengovsg/FormSG/pull/8816)
12+
713
#### [v6.258.0](https://github.com/opengovsg/FormSG/compare/v6.257.0...v6.258.0)
814

15+
> 15 October 2025
16+
917
- feat: override workflow duplication with admin email if viewer [`#8814`](https://github.com/opengovsg/FormSG/pull/8814)
1018
- build: merge release v6.257.0 to develop [`#8813`](https://github.com/opengovsg/FormSG/pull/8813)
1119
- build: release v6.257.0 [`#8812`](https://github.com/opengovsg/FormSG/pull/8812)
20+
- chore: bump version to v6.258.0 [`cc2f692`](https://github.com/opengovsg/FormSG/commit/cc2f692e892eece2c4eeda77db6b115934bc503b)
1221

1322
#### [v6.257.0](https://github.com/opengovsg/FormSG/compare/v6.256.0...v6.257.0)
1423

frontend/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "form-frontend",
3-
"version": "6.258.0",
3+
"version": "6.259.0",
44
"homepage": ".",
55
"type": "module",
66
"private": true,

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "FormSG",
33
"description": "Form Manager for Government",
4-
"version": "6.258.0",
4+
"version": "6.259.0",
55
"homepage": "https://form.gov.sg",
66
"authors": [
77
"FormSG <[email protected]>"

shared/constants/field/myinfo/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ export const types: MyInfoFieldBlock[] = [
487487
description: 'Vaccination status',
488488
fieldType: BasicField.Dropdown,
489489
fieldOptions: Object.values(MyInfoChildVaxxStatus),
490-
previewValue: MyInfoChildVaxxStatus.ONEM3D,
490+
previewValue: MyInfoChildVaxxStatus.ONEM3D_FULFILLED,
491491
// TODO: Get title translations
492492
},
493493
{

shared/types/field/childrenCompoundField.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export interface ChildrenCompoundFieldBase extends MyInfoableFieldBase {
1111

1212
export enum MyInfoChildVaxxStatus {
1313
// Vaccinatinon requirement code 1M3D in the MyInfo API code tables
14-
ONEM3D = 'MINIMUM VACCINATION REQUIREMENT FOR PRESCHOOL ADMISSION FULFILLED',
14+
ONEM3D_FULFILLED = 'MINIMUM VACCINATION REQUIREMENT FOR PRESCHOOL ADMISSION FULFILLED',
15+
ONEM3D_NOT_FULFILLED = 'MINIMUM VACCINATION REQUIREMENT FOR PRESCHOOL ADMISSION NOT FULFILLED',
1516
Unknown = 'UNKNOWN',
1617
}

src/app/modules/myinfo/myinfo.adapter.ts

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -202,32 +202,50 @@ export const internalAttrListToScopes = (
202202
return scopes
203203
}
204204

205+
/**
206+
* This is derived from the MyInfo API v4.
207+
* @see https://public.cloud.myinfo.gov.sg/myinfo/api/myinfo-kyc-v4.0.html#childrenbirthrecords
208+
*/
209+
interface MyInfoChildVaccinationRequirement {
210+
requirement: { code: string; desc: string }
211+
fulfilled: { value: boolean }
212+
}
213+
205214
/**
206215
* Converts whatever preschool vaccination data
207216
* we get directly from MyInfo to out internal representation.
208217
*
209-
* NOTE: As of the time of writing this, there is only one possible
210-
* vaccination status code. So the array input doesn't matter
211-
* and we can just output a single enum. However, if this changes
212-
* in the future, we need to support multiple vaccination statuses.
218+
* NOTE (Support for only one vaccination requirement code): As of the time of writing this,
219+
* there is only one possible vaccination requirement status code (which is 1M3D).
220+
* So the array input doesn't matter and we can just output a single enum.
221+
* However, if this changes in the future, we need to support multiple vaccination statuses.
222+
*
223+
* NOTE (Missing data is treated as not fulfilled):
224+
* All children should have the vaccination requirement 1M3D.
225+
* The official National Immunisation Registry (NIR), synced with MyInfo, must be used to mark the 1M3D requirement as fulfilled.
226+
* Hence, if the vaccination requirement is not present in MyInfo, we enforce the not fulfilled status by default.
227+
* This is instead of unknown returned previously before this PR change, which allowed the respondent to edit the value.
213228
*
214229
* @param vaccinationRequirement The preschool child records vaccination requirements.
215-
* @returns Vaccination status of the child. Unknown status should be treated as missing data.
230+
* @returns Vaccination status of the child. Missing data should be treated as not fulfilled for the reason noted below.
216231
*/
217232
const requirementToVaccinationEnum = (
218-
vaccinationRequirement:
219-
| undefined
220-
| {
221-
requirement: { code: string; desc: string }
222-
fulfilled: { value: boolean }
223-
}[],
233+
vaccinationRequirement: undefined | MyInfoChildVaccinationRequirement[],
224234
): MyInfoChildVaxxStatus => {
225235
if (vaccinationRequirement === undefined || !vaccinationRequirement.length) {
226-
return MyInfoChildVaxxStatus.Unknown
236+
return MyInfoChildVaxxStatus.ONEM3D_NOT_FULFILLED
237+
}
238+
const oneM3DVaccinationRequirement = vaccinationRequirement.find(
239+
(req) => req?.requirement?.code === '1M3D',
240+
)
241+
if (!oneM3DVaccinationRequirement) {
242+
return MyInfoChildVaxxStatus.ONEM3D_NOT_FULFILLED
227243
}
228-
return vaccinationRequirement.some((req) => req?.requirement?.code === '1M3D')
229-
? MyInfoChildVaxxStatus.ONEM3D
230-
: MyInfoChildVaxxStatus.Unknown
244+
245+
const isOneM3DFulfilled = oneM3DVaccinationRequirement.fulfilled.value
246+
return isOneM3DFulfilled
247+
? MyInfoChildVaxxStatus.ONEM3D_FULFILLED
248+
: MyInfoChildVaxxStatus.ONEM3D_NOT_FULFILLED
231249
}
232250

233251
const MyInfoChildAttributesSorted = Object.values(MyInfoChildAttributes).sort()

0 commit comments

Comments
 (0)