Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues/8607/review missed #9259

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
21 changes: 20 additions & 1 deletion src/components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ export const PatientManager = () => {
)}
</>
)}
{patient.review_time &&
{/* {patient.review_time &&
!patient.last_consultation?.discharge_date &&
Number(patient.last_consultation?.review_interval) > 0 &&
dayjs().isAfter(patient.review_time) && (
Expand All @@ -638,7 +638,26 @@ export const PatientManager = () => {
startIcon="l-clock"
text="Review Missed"
/>
)} */}
{patient.review_time &&
!patient.last_consultation?.discharge_date &&
Number(patient.last_consultation?.review_interval) > 0 && (
<Chip
size="small"
variant={
dayjs().isAfter(patient.review_time)
? "danger"
: "alert"
}
startIcon="l-clock"
text={
dayjs().isAfter(patient.review_time)
? `Review Missed ${Math.abs(dayjs().diff(dayjs(patient.review_time), "days"))} days ago`
: `Review Due in ${Math.abs(dayjs(patient.review_time).diff(dayjs(), "days"))} days`
}
/>
)}

{patient.last_consultation?.is_readmission && (
<Chip
size="small"
Expand Down