diff --git a/src/Components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect.tsx b/src/Components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect.tsx index 8018c6480ed..657451e4538 100644 --- a/src/Components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect.tsx +++ b/src/Components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect.tsx @@ -48,12 +48,18 @@ const PrincipalDiagnosisSelect = (props: Props) => { }} errorClassName="hidden" /> - {diagnosis && ( - -

This encounter will be categorised under:

-

{diagnosis.chapter}

-
- )} + {diagnosis && + (diagnosis.chapter ? ( + +

This encounter will be categorised under:

+

{diagnosis.chapter}

+
+ ) : ( + + This encounter will not be categorised under any chapter as the + diagnosis does not fall under a chapter. + + ))} ); diff --git a/src/Components/Diagnosis/types.ts b/src/Components/Diagnosis/types.ts index 006bb2feb6c..694e7a482d6 100644 --- a/src/Components/Diagnosis/types.ts +++ b/src/Components/Diagnosis/types.ts @@ -3,7 +3,7 @@ import { PerformedByModel } from "../HCX/misc"; export type ICD11DiagnosisModel = { id: string; label: string; - chapter: string; + chapter?: string; }; export const ActiveConditionVerificationStatuses = [