Skip to content

Commit

Permalink
show uncategorised text for diagnosis without chapters (ohcnetwork#7991)
Browse files Browse the repository at this point in the history
* show uncategorised text for diagnosis without chapters

* fix uncategorised text shown if no principal diagnosis selected

* minor code improvement
  • Loading branch information
rithviknishad authored Jun 7, 2024
1 parent bb2ef69 commit d9e8747
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Diagnosis/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PerformedByModel } from "../HCX/misc";
export type ICD11DiagnosisModel = {
id: string;
label: string;
chapter: string;
chapter?: string;
};

export const ActiveConditionVerificationStatuses = [
Expand Down

0 comments on commit d9e8747

Please sign in to comment.