From 25f8f0dd08336ec45a19f13befd38f1f66b82a91 Mon Sep 17 00:00:00 2001 From: Vineet Sharma Date: Wed, 12 Jul 2023 01:16:57 +0530 Subject: [PATCH] Review changes --- .../src/patient-registration/field/dob/dob.component.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/dob/dob.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/dob/dob.component.tsx index 35fa05418..838d4bb62 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/dob/dob.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/dob/dob.component.tsx @@ -27,8 +27,7 @@ export const DobField: React.FC = () => { fieldConfigurations: { dateOfBirth }, } = useConfig(); const allowEstimatedBirthDate = dateOfBirth?.allowEstimatedDateOfBirth; - const [dobUnknown] = useField('birthdateEstimated'); - const dobKnown = !dobUnknown.value; + const [field: {value: dobUnknown}] = useField('birthdateEstimated'); const [birthdate, birthdateMeta] = useField('birthdate'); const [yearsEstimated, yearsEstimateMeta] = useField('yearsEstimated'); const [monthsEstimated, monthsEstimateMeta] = useField('monthsEstimated'); @@ -76,12 +75,12 @@ export const DobField: React.FC = () => { return (

{t('birthFieldLabelText', 'Birth')}

- {(allowEstimatedBirthDate || !dobKnown) && ( + {(allowEstimatedBirthDate || dobUnknown) && (
{t('dobToggleLabelText', 'Date of Birth Known?')}
- +