diff --git a/src/form/v2/birth/forms/pages/child.ts b/src/form/v2/birth/forms/pages/child.ts index 0567bd89ee..0d9e4a970f 100644 --- a/src/form/v2/birth/forms/pages/child.ts +++ b/src/form/v2/birth/forms/pages/child.ts @@ -391,6 +391,27 @@ export const child = defineFormPage({ streetAddressForm: defaultStreetAddressConfiguration } }, + { + id: 'child.birthLocationId', + type: FieldType.ALPHA_HIDDEN, + required: false, + label: { + defaultMessage: 'Health Institution', + description: 'This is the label for the field', + id: 'event.birth.action.declare.form.section.child.field.birthLocation.label' + }, + parent: [ + field('child.placeOfBirth'), + field('child.birthLocation'), + field('child.birthLocation.privateHome'), + field('child.birthLocation.other') + ], + value: [ + field('child.birthLocation'), + field('child.birthLocation.privateHome').get('administrativeArea'), + field('child.birthLocation.other').get('administrativeArea') + ] + }, { id: 'child.divider2', type: FieldType.DIVIDER, diff --git a/src/form/v2/birth/index.ts b/src/form/v2/birth/index.ts index 43baa6191a..20419b4ab8 100644 --- a/src/form/v2/birth/index.ts +++ b/src/form/v2/birth/index.ts @@ -43,6 +43,7 @@ export const birthEvent = defineConfig({ id: 'event.birth.label' }, dateOfEvent: field('child.dob'), + placeOfEvent: field('child.birthLocationId'), title: { defaultMessage: '{child.name.firstname} {child.name.surname}', description: 'This is the title of the summary', diff --git a/src/form/v2/death/forms/pages/eventDetails.ts b/src/form/v2/death/forms/pages/eventDetails.ts index 784b48e9dc..393c02f0a5 100644 --- a/src/form/v2/death/forms/pages/eventDetails.ts +++ b/src/form/v2/death/forms/pages/eventDetails.ts @@ -364,6 +364,27 @@ export const eventDetails = defineFormPage({ configuration: { streetAddressForm: defaultStreetAddressConfiguration } + }, + { + id: 'eventDetails.deathLocationId', + type: FieldType.ALPHA_HIDDEN, + required: false, + label: { + defaultMessage: 'Health Institution', + description: 'This is the label for the field', + id: 'event.birth.action.declare.form.section.child.field.birthLocation.label' + }, + parent: [ + field('eventDetails.placeOfDeath'), + field('eventDetails.deathLocation'), + field('eventDetails.deathLocationOther'), + field('deceased.address') + ], + value: [ + field('eventDetails.deathLocation'), + field('eventDetails.deathLocationOther').get('administrativeArea'), + field('deceased.address').get('administrativeArea') + ] } ] }) diff --git a/src/form/v2/death/index.ts b/src/form/v2/death/index.ts index 7c4309c101..32fe8d1c3e 100644 --- a/src/form/v2/death/index.ts +++ b/src/form/v2/death/index.ts @@ -38,6 +38,7 @@ export const deathEvent = defineConfig({ id: 'event.death.label' }, dateOfEvent: field('eventDetails.date'), + placeOfEvent: field('eventDetails.deathLocationId'), title: { defaultMessage: '{deceased.name.firstname} {deceased.name.surname}', description: 'This is the title of the summary',