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 = <T extends Option>(props: Props<T>) => { }} errorClassName="hidden" /> - {diagnosis && ( - <span className="mt-3 flex w-full flex-wrap justify-center gap-x-1 px-2 text-center text-gray-900"> - <p>This encounter will be categorised under:</p> - <p className="font-bold">{diagnosis.chapter}</p> - </span> - )} + {diagnosis && + (diagnosis.chapter ? ( + <span className="mt-3 flex w-full flex-wrap justify-center gap-x-1 px-2 text-center text-gray-900"> + <p>This encounter will be categorised under:</p> + <p className="font-bold">{diagnosis.chapter}</p> + </span> + ) : ( + <span className="mt-3 flex w-full flex-wrap justify-center gap-x-1 px-2 text-center italic text-gray-700"> + This encounter will not be categorised under any chapter as the + diagnosis does not fall under a chapter. + </span> + ))} </div> </div> ); 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 = [