Skip to content

Commit

Permalink
Merge branch 'develop' into issues/6503/displayCNSon4k
Browse files Browse the repository at this point in the history
  • Loading branch information
i0am0arunava authored Nov 10, 2024
2 parents 0b3498a + 45ae794 commit e969002
Show file tree
Hide file tree
Showing 11 changed files with 573 additions and 127 deletions.
43 changes: 42 additions & 1 deletion public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,13 @@
"ORAL_ISSUE__NO_ISSUE": "No issues",
"ORAL_ISSUE__ODYNOPHAGIA": "Odynophagia",
"OXYGEN_MODALITY__HIGH_FLOW_NASAL_CANNULA": "High Flow Nasal Cannula",
"OXYGEN_MODALITY__HIGH_FLOW_NASAL_CANNULA_short": "HFNC",
"OXYGEN_MODALITY__NASAL_PRONGS": "Nasal Prongs",
"OXYGEN_MODALITY__NASAL_PRONGS_short": "NP",
"OXYGEN_MODALITY__NON_REBREATHING_MASK": "Non Rebreathing Mask",
"OXYGEN_MODALITY__NON_REBREATHING_MASK_short": "NRM",
"OXYGEN_MODALITY__SIMPLE_FACE_MASK": "Simple Face Mask",
"OXYGEN_MODALITY__SIMPLE_FACE_MASK_short": "SFM",
"PRESCRIPTION_FREQUENCY_BD": "Twice daily",
"PRESCRIPTION_FREQUENCY_HS": "Night only",
"PRESCRIPTION_FREQUENCY_OD": "Once daily",
Expand Down Expand Up @@ -206,12 +210,19 @@
"URINATION_FREQUENCY__NORMAL": "Normal",
"VENTILATOR": "Detailed Update",
"VENTILATOR_MODE__CMV": "Control Mechanical Ventilation (CMV)",
"VENTILATOR_MODE__CMV_short": "CMV",
"VENTILATOR_MODE__PCV": "Pressure Control Ventilation (PCV)",
"VENTILATOR_MODE__PCV_short": "PCV",
"VENTILATOR_MODE__PC_SIMV": "Pressure Controlled SIMV (PC-SIMV)",
"VENTILATOR_MODE__PC_SIMV_short": "PC-SIMV",
"VENTILATOR_MODE__PSV": "C-PAP / Pressure Support Ventilation (PSV)",
"VENTILATOR_MODE__PSV_short": "C-PAP/PSV",
"VENTILATOR_MODE__SIMV": "Synchronised Intermittent Mandatory Ventilation (SIMV)",
"VENTILATOR_MODE__SIMV_short": "SIMV",
"VENTILATOR_MODE__VCV": "Volume Control Ventilation (VCV)",
"VENTILATOR_MODE__VCV_short": "VCV",
"VENTILATOR_MODE__VC_SIMV": "Volume Controlled SIMV (VC-SIMV)",
"VENTILATOR_MODE__VC_SIMV_short": "VC-SIMV",
"View Facility": "View Facility",
"aadhaar_number": "Aadhaar Number",
"aadhaar_number_will_not_be_stored": "Aadhaar number will not be stored by CARE",
Expand Down Expand Up @@ -303,6 +314,7 @@
"are_you_still_watching": "Are you still watching?",
"are_you_sure_want_to_delete": "Are you sure you want to delete {{name}}?",
"are_you_sure_want_to_delete_this_record": "Are you sure want to delete this record?",
"ari": "ARI - Acute Respiratory illness",
"asset_class": "Asset Class",
"asset_location": "Asset Location",
"asset_name": "Asset Name",
Expand All @@ -313,6 +325,7 @@
"assigned_facility": "Facility assigned",
"assigned_to": "Assigned to",
"async_operation_warning": "This operation may take some time. Please check back later.",
"atypical_presentation_details": "Atypical presentation details",
"audio__allow_permission": "Please allow microphone permission in site settings",
"audio__allow_permission_button": "Click here to know how to allow",
"audio__allow_permission_helper": "You might have denied microphone access in the past.",
Expand Down Expand Up @@ -479,6 +492,8 @@
"contact_person_at_the_facility": "Contact person at the current facility",
"contact_person_number": "Contact person number",
"contact_phone": "Contact Person Number",
"contact_with_confirmed_carrier": "Contact with confirmed carrier",
"contact_with_suspected_carrier": "Contact with suspected carrier",
"contact_your_admin_to_add_skills": "Contact your admin to add skills",
"continue": "Continue",
"continue_watching": "Continue watching",
Expand Down Expand Up @@ -543,6 +558,7 @@
"diagnosis_at_discharge": "Diagnosis at Discharge",
"diastolic": "Diastolic",
"differential": "Differential",
"differential_diagnosis": "Differential diagnosis",
"discard": "Discard",
"discharge": "Discharge",
"discharge_from_care": "Discharge from CARE",
Expand All @@ -560,7 +576,9 @@
"district": "District",
"district_program_management_supporting_unit": "District Program Management Supporting Unit",
"doctor_s_medical_council_registration": "Doctor's Medical Council Registration",
"doctors_name": "Doctor's Name",
"domestic_healthcare_support": "Domestic healthcare support",
"domestic_international_travel": "Domestic/international Travel (within last 28 days)",
"done": "Done",
"dosage": "Dosage",
"down": "Down",
Expand Down Expand Up @@ -611,6 +629,7 @@
"encounter_suggestion__OP": "Out-patient visit",
"encounter_suggestion__R": "Consultation",
"encounter_suggestion_edit_disallowed": "Not allowed to switch to this option in edit consultation",
"end_datetime": "End Date/Time",
"enter_aadhaar_number": "Enter a 12-digit Aadhaar ID",
"enter_aadhaar_otp": "Enter OTP sent to the registered mobile with Aadhaar",
"enter_abha_address": "Enter ABHA Address",
Expand All @@ -627,6 +646,7 @@
"error_while_deleting_record": "Error while deleting record",
"escape": "Escape",
"estimated_contact_date": "Estimated contact date",
"etiology_identified": "Etiology identified",
"events": "Events",
"expand_sidebar": "Expand Sidebar",
"expected_burn_rate": "Expected Burn Rate",
Expand All @@ -640,6 +660,7 @@
"facility_search_placeholder": "Search by Facility / District Name",
"facility_type": "Facility Type",
"failed_to_link_abha_number": "Failed to link ABHA Number. Please try again later.",
"fast_track_testing_reason": "Fast track testing reason",
"features": "Features",
"feed_configurations": "Feed Configurations",
"feed_is_currently_not_live": "Feed is currently not live",
Expand Down Expand Up @@ -685,6 +706,7 @@
"goal": "Our goal is to continuously improve the quality and accessibility of public healthcare services using digital tools.",
"granted_on": "Granted On",
"has_domestic_healthcare_support": "Has domestic healthcare support?",
"has_sari": "Has SARI (Severe Acute Respiratory illness)?",
"health_facility__config_registration_error": "Health ID registration failed",
"health_facility__config_update_error": "Health Facility config update failed",
"health_facility__config_update_success": "Health Facility config updated successfully",
Expand Down Expand Up @@ -718,6 +740,7 @@
"hubs": "Hub Facilities",
"i_declare": "I hereby declare that:",
"icd11_as_recommended": "As per ICD-11 recommended by WHO",
"icmr_specimen_referral_form": "ICMR Specimen Referral Form",
"incomplete_patient_details_warning": "Patient details are incomplete. Please update the details before proceeding.",
"inconsistent_dosage_units_error": "Dosage units must be same",
"indian_mobile": "Indian Mobile",
Expand Down Expand Up @@ -752,15 +775,18 @@
"investigations_suggested": "Investigations Suggested",
"is": "Is",
"is_antenatal": "Is Antenatal",
"is_atypical_presentation": "Is Atypical presentation",
"is_declared_positive": "Whether declared positive",
"is_emergency": "Is emergency",
"is_emergency_case": "Is emergency case",
"is_it_upshift": "is it upshift",
"is_this_an_emergency": "Is this an emergency?",
"is_this_an_upshift": "Is this an upshift?",
"is_unusual_course": "Is unusual course",
"is_up_shift": "Is up shift",
"is_upshift_case": "Is upshift case",
"is_vaccinated": "Whether vaccinated",
"label": "Label",
"landline": "Indian landline",
"language_selection": "Language Selection",
"last_administered": "Last administered",
Expand Down Expand Up @@ -890,7 +916,7 @@
"notice_board": "Notice Board",
"notification_permission_denied": "Notification permission denied",
"notification_permission_granted": "Notification permission granted",
"number_of_aged_dependents_above_60": "Number Of Aged Dependents (Above 60)",
"number_of_aged_dependents": "Number of Aged Dependents (Above 60)",
"number_of_beds": "Number of beds",
"number_of_beds_out_of_range_error": "Number of beds cannot be greater than 100",
"number_of_chronic_diseased_dependents": "Number Of Chronic Diseased Dependents",
Expand Down Expand Up @@ -924,6 +950,7 @@
"password_reset_failure": "Password Reset Failed",
"password_reset_success": "Password Reset successfully",
"password_sent": "Password Reset Email Sent",
"patient": "Patient",
"patient_address": "Patient Address",
"patient_body": "Patient Body",
"patient_category": "Patient Category",
Expand Down Expand Up @@ -1065,6 +1092,7 @@
"result": "Result",
"result_date": "Result Date",
"result_details": "Result details",
"result_on": "Result on",
"resume": "Resume",
"retake": "Retake",
"return_to_care": "Return to CARE",
Expand All @@ -1078,7 +1106,11 @@
"sample_collection_date": "Sample Collection Date",
"sample_format": "Sample Format",
"sample_test": "Sample Test",
"sample_test_details": "Sample Test Details",
"sample_test_history": "Sample Test History",
"sample_type": "Sample Type",
"sample_type_description": "Sample Type Description",
"sari": "SARI - Severe Acute Respiratory illness",
"save": "Save",
"save_and_continue": "Save and Continue",
"save_investigation": "Save Investigation",
Expand Down Expand Up @@ -1145,6 +1177,7 @@
"spokes": "Spoke Facilities",
"srf_id": "SRF ID",
"staff_list": "Staff List",
"start_datetime": "Start Date/Time",
"start_dosage": "Start Dosage",
"state": "State",
"status": "Status",
Expand All @@ -1167,6 +1200,7 @@
"tachycardia": "Tachycardia",
"target_dosage": "Target Dosage",
"test_type": "Type of test done",
"tested_on": "Tested on",
"third_party_software_licenses": "Third Party Software Licenses",
"titrate_dosage": "Titrate Dosage",
"to_be_conducted": "To be conducted",
Expand Down Expand Up @@ -1236,6 +1270,13 @@
"vacant": "Vacant",
"vehicle_preference": "Vehicle preference",
"vendor_name": "Vendor Name",
"ventilator_interface": "Respiratory Support Type",
"ventilator_log": "Ventilator Log",
"ventilator_modality": "Modality",
"ventilator_mode": "Ventilator Mode",
"ventilator_oxygen_modality": "Oxygen Modality",
"ventilator_oxygen_modality_oxygen_rate": "Oxygen Flow Rate",
"ventilator_spo2": "SpO₂",
"verify_and_link": "Verify and Link",
"verify_otp": "Verify OTP",
"verify_otp_error": "Failed to verify OTP. Please try again later.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,44 @@
import Loading from "@/components/Common/Loading";
import PageTitle from "@/components/Common/PageTitle";
import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index";
import { VentilatorPlot } from "@/components/Facility/Consultations/VentilatorPlot";
import VentilatorTable from "@/components/Facility/Consultations/VentilatorTable";

import useFilters from "@/hooks/useFilters";

import routes from "@/Utils/request/api";
import useQuery from "@/Utils/request/useQuery";

export const ConsultationVentilatorTab = (props: ConsultationTabProps) => {
const { consultationId } = props;
const { qParams, Pagination, resultsPerPage } = useFilters({ limit: 36 });

const { loading: isLoading, data } = useQuery(routes.getDailyReports, {
pathParams: { consultationId },
query: {
limit: resultsPerPage,
offset: (qParams.page ? qParams.page - 1 : 0) * resultsPerPage,
},
});

if (isLoading) {
return <Loading />;
}

return (
<div>
<PageTitle
title="Respiratory Support"
hideBack={true}
breadcrumbs={false}
/>
<VentilatorPlot
facilityId={props.facilityId}
patientId={props.patientId}
consultationId={props.consultationId}
/>
<VentilatorTable dailyRoundsList={data?.results} />
<VentilatorPlot dailyRoundsList={data?.results} />
{Boolean(data?.count && data.count > 0) && (
<div className="mt-4 flex w-full justify-center">
<Pagination totalCount={data?.count ?? 0} />
</div>
)}
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export default function EventsList({ query }: { query: QueryParams }) {
}

const values = Object.fromEntries(entries);
if (
values.ventilator_interface === "INVASIVE" ||
values.ventilator_interface === "NON_INVASIVE"
) {
values.ventilator_interface += " VENTILATOR";
}

switch (item.event_type.name) {
case "INTERNAL_TRANSFER":
Expand Down
Loading

0 comments on commit e969002

Please sign in to comment.