diff --git a/src/Components/Facility/ConsultationForm.tsx b/src/Components/Facility/ConsultationForm.tsx index 1d498ea3d14..e1b2970a446 100644 --- a/src/Components/Facility/ConsultationForm.tsx +++ b/src/Components/Facility/ConsultationForm.tsx @@ -407,9 +407,7 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => { cause_of_death: data?.discharge_notes || "", death_datetime: data?.death_datetime || "", death_confirmed_doctor: data?.death_confirmed_doctor || "", - InvestigationAdvice: Array.isArray(data.investigation) - ? data.investigation - : [], + InvestigationAdvice: data.investigation ?? [], diagnoses: data.diagnoses?.sort( (a: ConsultationDiagnosis, b: ConsultationDiagnosis) => ConditionVerificationStatuses.indexOf(a.verification_status) - diff --git a/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx b/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx index cc6f467b186..b153cca45ea 100644 --- a/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx +++ b/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx @@ -70,7 +70,7 @@ const LogUpdateCardAttribute = ({
- {t(attributeValue)} + {t(attributeValue as string)}
); diff --git a/src/Components/Facility/models.tsx b/src/Components/Facility/models.tsx index 3f060240ee7..25ad8d23b50 100644 --- a/src/Components/Facility/models.tsx +++ b/src/Components/Facility/models.tsx @@ -11,7 +11,6 @@ import { RouteToFacility } from "../Common/RouteToFacilitySelect"; import { InvestigationType } from "../Common/prescription-builder/InvestigationBuilder"; import { ProcedureType } from "../Common/prescription-builder/ProcedureBuilder"; import { ConsultationDiagnosis, CreateDiagnosis } from "../Diagnosis/types"; -import { NormalPrescription, PRNPrescription } from "../Medicine/models"; import { AssignedToObjectModel, DailyRoundsModel, @@ -132,8 +131,6 @@ export interface ConsultationModel { created_date?: string; discharge_date?: string; new_discharge_reason?: (typeof DISCHARGE_REASONS)[number]["id"]; - discharge_prescription?: NormalPrescription; - discharge_prn_prescription?: PRNPrescription; discharge_notes?: string; examination_details?: string; history_of_present_illness?: string; diff --git a/src/Components/Patient/DailyRoundListDetails.tsx b/src/Components/Patient/DailyRoundListDetails.tsx index fbf001427dd..eb7eda62064 100644 --- a/src/Components/Patient/DailyRoundListDetails.tsx +++ b/src/Components/Patient/DailyRoundListDetails.tsx @@ -16,13 +16,9 @@ export const DailyRoundListDetails = (props: any) => { const { loading: isLoading } = useQuery(routes.getDailyReport, { pathParams: { consultationId, id }, - onResponse: ({ res, data }) => { - if (res && data) { - const tdata: DailyRoundsModel = { - ...data, - medication_given: data.medication_given ?? [], - }; - setDailyRoundListDetails(tdata); + onResponse: ({ data }) => { + if (data) { + setDailyRoundListDetails(data); } }, }); diff --git a/src/Components/Patient/models.tsx b/src/Components/Patient/models.tsx index 5387e457e9e..ef0b6902cbf 100644 --- a/src/Components/Patient/models.tsx +++ b/src/Components/Patient/models.tsx @@ -320,7 +320,6 @@ export interface DailyRoundsModel { physical_examination_info?: string; other_details?: string; consultation?: number; - medication_given?: Array; action?: string; review_interval?: number; id?: string;