diff --git a/packages/esm-patient-registration-app/src/patient-registration/patient-registration-hooks.ts b/packages/esm-patient-registration-app/src/patient-registration/patient-registration-hooks.ts index cc49db0a7..0a736730a 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/patient-registration-hooks.ts +++ b/packages/esm-patient-registration-app/src/patient-registration/patient-registration-hooks.ts @@ -408,9 +408,15 @@ function useConcepts() { }, ]; - const martialStatus: Array = config.fieldDefinitions - .find((fieldDefinition) => fieldDefinition.id === 'maritalStatus') - .customConceptAnswers.map((concept) => ({ uuid: concept.uuid, display: concept.label })); + const maritalStatusCustomConceptAnswers = + config.fieldDefinitions.find((fieldDefinition) => fieldDefinition.id === 'maritalStatus')?.customConceptAnswers ?? + []; + + const martialStatus: Array = + maritalStatusCustomConceptAnswers.map((concept) => ({ + uuid: concept?.uuid, + display: concept?.label, + })) ?? []; return { martialStatus, education, occupation, educationLoad }; }