From 7c21b80c87f00eb50c81dda5cbf58537ea226ca8 Mon Sep 17 00:00:00 2001 From: Pranshu Aggarwal <70687348+Pranshu1902@users.noreply.github.com> Date: Wed, 20 Dec 2023 13:58:42 +0530 Subject: [PATCH 1/2] Disable critical care submit if onle basic editor is filled (#6860) Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> --- .../Recording/CriticalCare__Recording.res | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Components/CriticalCareRecording/Recording/CriticalCare__Recording.res b/src/Components/CriticalCareRecording/Recording/CriticalCare__Recording.res index 0316430dcd3..b0ff4fd04cc 100644 --- a/src/Components/CriticalCareRecording/Recording/CriticalCare__Recording.res +++ b/src/Components/CriticalCareRecording/Recording/CriticalCare__Recording.res @@ -237,7 +237,9 @@ let make = (~id, ~facilityId, ~patientId, ~consultationId, ~dailyRound) => { From b4a7fbdc3ce37ba1d69727a0ae6e654e7c7f6026 Mon Sep 17 00:00:00 2001 From: Ashesh <3626859+Ashesh3@users.noreply.github.com> Date: Wed, 20 Dec 2023 19:49:15 +0530 Subject: [PATCH 2/2] Add Telemedicine as a rounds type option (#6831) * Add Telemedicine round type * Refactor DailyRoundsList and DailyRounds to handle TELEMEDICINE rounds type * merge conflict fixes --- .../DailyRounds/DefaultLogUpdateCard.tsx | 4 ++++ .../Consultations/DailyRoundsList.tsx | 9 +++++---- src/Components/Patient/DailyRounds.tsx | 20 ++++++++++++------- src/Components/Patient/models.tsx | 7 ++++++- src/Locale/en/Consultation.json | 3 ++- 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx b/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx index ff738f4acb6..a0a4f2280cf 100644 --- a/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx +++ b/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx @@ -53,6 +53,10 @@ const DefaultLogUpdateCard = ({ round, ...props }: Props) => { attributeValue={getName(round.last_edited_by)} /> )} + { const [isLoading, setIsLoading] = useState(false); const [facilityName, setFacilityName] = useState(""); const [patientName, setPatientName] = useState(""); + const [consultationSuggestion, setConsultationSuggestion] = useState(""); const [prevReviewInterval, setPreviousReviewInterval] = useState(-1); const [prevAction, setPreviousAction] = useState("NO_ACTION"); const [hasPreviousLog, setHasPreviousLog] = useState(false); @@ -137,6 +138,7 @@ export const DailyRounds = (props: any) => { if (res.data) { setPatientName(res.data.name); setFacilityName(res.data.facility_object.name); + setConsultationSuggestion(res.data.last_consultation?.suggestion); setPreviousReviewInterval( Number(res.data.last_consultation.review_interval) ); @@ -250,7 +252,6 @@ export const DailyRounds = (props: any) => { invalidForm = true; } return; - default: return; } @@ -292,7 +293,7 @@ export const DailyRounds = (props: any) => { action: prevAction, review_interval: Number(prevReviewInterval), }; - if (state.form.rounds_type === "NORMAL") { + if (["NORMAL", "TELEMEDICINE"].includes(state.form.rounds_type)) { data = { ...data, bp: @@ -334,7 +335,7 @@ export const DailyRounds = (props: any) => { Notification.Success({ msg: "Consultation Updates details updated successfully", }); - if (state.form.rounds_type === "NORMAL") { + if (["NORMAL", "TELEMEDICINE"].includes(state.form.rounds_type)) { navigate( `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}` ); @@ -347,7 +348,7 @@ export const DailyRounds = (props: any) => { Notification.Success({ msg: "Consultation Updates details created successfully", }); - if (state.form.rounds_type === "NORMAL") { + if (["NORMAL", "TELEMEDICINE"].includes(state.form.rounds_type)) { if (data.clone_last) { navigate( `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily-rounds/${res.data.external_id}/update` @@ -450,8 +451,13 @@ export const DailyRounds = (props: any) => { className="w-full" label="Round Type" options={[ - { id: "NORMAL", text: "Normal" }, - { id: "VENTILATOR", text: "Critical Care" }, + ...[ + { id: "NORMAL", text: "Normal" }, + { id: "VENTILATOR", text: "Critical Care" }, + ], + ...(consultationSuggestion == "DC" + ? [{ id: "TELEMEDICINE", text: "Telemedicine" }] + : []), ]} optionLabel={(option) => option.text} optionValue={(option) => option.id} @@ -529,7 +535,7 @@ export const DailyRounds = (props: any) => { }} /> - {state.form.rounds_type === "NORMAL" && ( + {["NORMAL", "TELEMEDICINE"].includes(state.form.rounds_type) && ( <>

Vitals

diff --git a/src/Components/Patient/models.tsx b/src/Components/Patient/models.tsx index 3a856a04765..e1ce5d53050 100644 --- a/src/Components/Patient/models.tsx +++ b/src/Components/Patient/models.tsx @@ -269,7 +269,12 @@ export interface DailyRoundsOutput { quantity: number; } -export const DailyRoundTypes = ["NORMAL", "VENTILATOR", "AUTOMATED"] as const; +export const DailyRoundTypes = [ + "NORMAL", + "VENTILATOR", + "AUTOMATED", + "TELEMEDICINE", +] as const; export interface DailyRoundsModel { ventilator_spo2?: number; diff --git a/src/Locale/en/Consultation.json b/src/Locale/en/Consultation.json index 54b587eb81e..c633f7aaab3 100644 --- a/src/Locale/en/Consultation.json +++ b/src/Locale/en/Consultation.json @@ -15,5 +15,6 @@ "generated_summary_caution": "This is a computer generated summary using the information captured in the CARE system.", "NORMAL": "Normal", "VENTILATOR": "Critical Care", - "AUTOMATED": "Automated" + "AUTOMATED": "Automated", + "TELEMEDICINE": "Telemedicine" }