diff --git a/public/locale/en.json b/public/locale/en.json
index b6ccb84de08..686bdb79216 100644
--- a/public/locale/en.json
+++ b/public/locale/en.json
@@ -303,6 +303,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",
@@ -313,6 +314,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.",
@@ -479,6 +481,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",
@@ -543,6 +547,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",
@@ -560,7 +565,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",
@@ -627,6 +634,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",
@@ -640,6 +648,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",
@@ -685,6 +694,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",
@@ -718,6 +728,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",
@@ -752,15 +763,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",
@@ -890,7 +904,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",
@@ -924,6 +938,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",
@@ -1065,6 +1080,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",
@@ -1078,7 +1094,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",
@@ -1167,6 +1187,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",
diff --git a/src/components/Patient/SampleDetails.tsx b/src/components/Patient/SampleDetails.tsx
index c556177ec13..c16ef1c0e86 100644
--- a/src/components/Patient/SampleDetails.tsx
+++ b/src/components/Patient/SampleDetails.tsx
@@ -1,5 +1,6 @@
import { camelCase, capitalize, startCase } from "lodash-es";
import { navigate } from "raviger";
+import { useTranslation } from "react-i18next";
import Card from "@/CAREUI/display/Card";
@@ -17,6 +18,7 @@ import useQuery from "@/Utils/request/useQuery";
import { formatDateTime, formatPatientAge } from "@/Utils/utils";
export const SampleDetails = ({ id }: DetailRoute) => {
+ const { t } = useTranslation();
const { loading: isLoading, data: sampleDetails } = useQuery(
routes.getTestSample,
{
@@ -33,9 +35,9 @@ export const SampleDetails = ({ id }: DetailRoute) => {
const yesOrNoBadge = (param: any) =>
param ? (
- Yes
+ {t("yes")}
) : (
- No
+ {t("no")}
);
const showPatientCard = (patientData: any) => {
@@ -51,20 +53,24 @@ export const SampleDetails = ({ id }: DetailRoute) => {
- Name:
+
+ {t("name")}:{" "}
+
{patientData?.name}
{patientData?.is_medical_worker && (
- Medical Worker:{" "}
+ {t("medical_worker")}:{" "}
+
+
+ {t("yes")}
- Yes
)}
- Disease Status:{" "}
+ {t("disease_status")}:{" "}
{patientData?.disease_status}
@@ -72,16 +78,20 @@ export const SampleDetails = ({ id }: DetailRoute) => {
- SRF ID:
+
+ {t("srf_id")}:{" "}
+
{(patientData?.srf_id && patientData?.srf_id) || "-"}
- Test Type:
+
+ {t("test_type")}:{" "}
+
{(patientData?.test_type && testType) || "-"}
- Date of Test:{" "}
+ {t("date_of_test")}:{" "}
{(patientData?.date_of_test &&
formatDateTime(patientData?.date_of_test)) ||
@@ -89,35 +99,43 @@ export const SampleDetails = ({ id }: DetailRoute) => {
- Facility:
+
+ {t("facility")}:{" "}
+
{patientData?.facility_object?.name || "-"}
{patientData?.date_of_birth ? (
- Date of birth:{" "}
+ {t("date_of_birth")}:{" "}
{patientData?.date_of_birth}
) : (
- Age:
+
+ {t("age")}:{" "}
+
{formatPatientAge(patientData)}
)}
- Gender:
+
+ {t("gender")}:{" "}
+
{patientGender}
- Nationality:{" "}
+ {t("nationality")}:{" "}
{patientData?.nationality || "-"}
@@ -125,14 +143,14 @@ export const SampleDetails = ({ id }: DetailRoute) => {
- Blood Group:{" "}
+ {t("blood_group")}:{" "}
{patientData?.blood_group || "-"}
{patientData?.nationality !== "India" && (
- Passport Number:{" "}
+ {t("passport_number")}:{" "}
{patientData?.passport_no || "-"}
@@ -140,56 +158,60 @@ export const SampleDetails = ({ id }: DetailRoute) => {
{patientData?.nationality === "India" && (
<>
- State:
+
+ {t("state")}:{" "}
+
{patientData?.state_object?.name}
- District:{" "}
+ {t("district")}:{" "}
{patientData?.district_object?.name || "-"}
- Local Body:{" "}
+ {t("local_body")}:{" "}
{patientData?.local_body_object?.name || "-"}
>
)}
- Address:
+
+ {t("address")}:{" "}
+
{patientData?.address || "-"}
- Contact with confirmed carrier:{" "}
+ {t("contact_with_confirmed_carrier")}:{" "}
{yesOrNoBadge(patientData?.contact_with_confirmed_carrier)}
- Contact with suspected carrier:{" "}
+ {t("contact_with_suspected_carrier")}:{" "}
{yesOrNoBadge(patientData?.contact_with_suspected_carrier)}
{patientData?.estimated_contact_date && (
- Estimated contact date:{" "}
+ {t("estimated_contact_date")}:{" "}
{formatDateTime(patientData?.estimated_contact_date)}
)}
- Has SARI (Severe Acute Respiratory illness)?:{" "}
+ {t("has_sari")}:{" "}
{yesOrNoBadge(patientData?.has_SARI)}
- Domestic/international Travel (within last 28 days):{" "}
+ {t("domestic_international_travel")}:{" "}
{yesOrNoBadge(patientData?.past_travel)}
@@ -197,7 +219,7 @@ export const SampleDetails = ({ id }: DetailRoute) => {
!!patientData?.countries_travelled.length && (
- Countries travelled:{" "}
+ {t("countries_travelled")}:{" "}
{patientData?.countries_travelled.join(", ")}
@@ -205,7 +227,7 @@ export const SampleDetails = ({ id }: DetailRoute) => {
{patientData?.ongoing_medication && (
- Ongoing Medications{" "}
+ {t("ongoing_medications")}{" "}
{patientData?.ongoing_medication}
@@ -213,7 +235,7 @@ export const SampleDetails = ({ id }: DetailRoute) => {
{patientData?.allergies && (
- Allergies:{" "}
+ {t("allergies")}:{" "}
{patientData?.allergies}
@@ -221,7 +243,7 @@ export const SampleDetails = ({ id }: DetailRoute) => {
{!!patientData?.number_of_aged_dependents && (
- Number Of Aged Dependents (Above 60):{" "}
+ {t("number_of_aged_dependents")}:{" "}
{patientData?.number_of_aged_dependents}
@@ -229,7 +251,7 @@ export const SampleDetails = ({ id }: DetailRoute) => {
{!!patientData?.number_of_chronic_diseased_dependents && (
- Number Of Chronic Diseased Dependents:{" "}
+ {t("number_of_chronic_diseased_dependents")}:{" "}
{patientData?.number_of_chronic_diseased_dependents}
@@ -245,19 +267,25 @@ export const SampleDetails = ({ id }: DetailRoute) => {
- Status: {" "}
+
+ {t("status")}:{" "}
+ {" "}
{startCase(camelCase(flow.status))}
- Label:{" "}
+ {t("label")}:{" "}
{capitalize(flow.notes)}
- Created On :{" "}
+
+ {t("created_on")}:
+ {" "}
{flow.created_date ? formatDateTime(flow.created_date) : "-"}
- Modified on:{" "}
+
+ {t("modified_on")}:
+ {" "}
{flow.modified_date ? formatDateTime(flow.modified_date) : "-"}
@@ -271,7 +299,7 @@ export const SampleDetails = ({ id }: DetailRoute) => {
return (
{
- ICMR Specimen Referral Form
+ {t("icmr_specimen_referral_form")}
)
@@ -289,34 +317,42 @@ export const SampleDetails = ({ id }: DetailRoute) => {
- Status:{" "}
+ {t("status")}:{" "}
{sampleDetails?.status}
- Result:{" "}
+ {t("result")}:{" "}
{sampleDetails?.result}
- Patient:
+
+ {t("patient")}:{" "}
+
{sampleDetails?.patient_name}
{sampleDetails?.facility_object && (
- Facility:
+
+ {t("facility")}:{" "}
+
{sampleDetails?.facility_object.name}
)}
- Tested on:
+
+ {t("tested_on")}:{" "}
+
{sampleDetails?.date_of_result
? formatDateTime(sampleDetails.date_of_result)
: "-"}
-
Result on:
+
+ {t("result_on")}:{" "}
+
{sampleDetails?.date_of_result
? formatDateTime(sampleDetails.date_of_result)
: "-"}
@@ -324,7 +360,7 @@ export const SampleDetails = ({ id }: DetailRoute) => {
{sampleDetails?.fast_track && (
- Fast track testing reason:{" "}
+ {t("fast_track_testing_reason")}:{" "}
{sampleDetails.fast_track}
@@ -332,21 +368,23 @@ export const SampleDetails = ({ id }: DetailRoute) => {
{sampleDetails?.doctor_name && (
- Doctor's Name:{" "}
+ {t("doctors_name")}:{" "}
{startCase(camelCase(sampleDetails.doctor_name))}
)}
{sampleDetails?.diagnosis && (
- Diagnosis:
+
+ {t("diagnosis")}:{" "}
+
{sampleDetails.diagnosis}
)}
{sampleDetails?.diff_diagnosis && (
- Differential diagnosis:{" "}
+ {t("differential_diagnosis")}:{" "}
{sampleDetails?.diff_diagnosis}
@@ -354,52 +392,48 @@ export const SampleDetails = ({ id }: DetailRoute) => {
{sampleDetails?.etiology_identified && (
- Etiology identified:{" "}
+ {t("etiology_identified")}:{" "}
{sampleDetails.etiology_identified}
)}
- Is Atypical presentation{" "}
+ {t("is_atypical_presentation")}{" "}
{yesOrNoBadge(sampleDetails?.is_atypical_presentation)}
- Is unusual course{" "}
+ {t("is_unusual_course")}{" "}
{yesOrNoBadge(sampleDetails?.is_unusual_course)}
{sampleDetails?.atypical_presentation && (
- Atypical presentation details:{" "}
+ {t("atypical_presentation_details")}:{" "}
{sampleDetails.atypical_presentation}
)}
-
- SARI - Severe Acute Respiratory illness{" "}
-
+ {t("sari")}
{yesOrNoBadge(sampleDetails?.has_sari)}
-
- ARI - Acute Respiratory illness{" "}
-
+ {t("ari")}
{yesOrNoBadge(sampleDetails?.has_ari)}
- Contact with confirmed carrier{" "}
+ {t("contact_with_confirmed_carrier")}{" "}
{yesOrNoBadge(sampleDetails?.patient_has_confirmed_contact)}
- Contact with suspected carrier{" "}
+ {t("contact_with_suspected_carrier")}{" "}
{yesOrNoBadge(sampleDetails?.patient_has_suspected_contact)}
@@ -407,29 +441,37 @@ export const SampleDetails = ({ id }: DetailRoute) => {
sampleDetails.patient_travel_history.length !== 0 && (
- Countries travelled:{" "}
+ {t("countries_travelled")}:{" "}
{sampleDetails.patient_travel_history}
)}
{sampleDetails?.sample_type && (
-
+
- Sample Type:{" "}
+ {t("sample_type")}:{" "}
{startCase(camelCase(sampleDetails.sample_type))}
)}
+ {sampleDetails?.sample_type === "OTHER TYPE" && (
+
+
+ {t("sample_type_description")}:{" "}
+
+ {sampleDetails?.sample_type_other}
+
+ )}
-
Details of patient
+ {t("details_of_patient")}
{showPatientCard(sampleDetails?.patient_object)}
-
Sample Test History
+ {t("sample_test_history")}
{sampleDetails?.flow &&
sampleDetails.flow.map((flow: FlowModel) => renderFlow(flow))}
diff --git a/src/components/Patient/SampleTest.tsx b/src/components/Patient/SampleTest.tsx
index afddb81b654..0714de28492 100644
--- a/src/components/Patient/SampleTest.tsx
+++ b/src/components/Patient/SampleTest.tsx
@@ -218,7 +218,7 @@ export const SampleTest = ({ facilityId, patientId }: any) => {
optionValue={(option) => option.id}
/>
- {state.form.sample_type === "OTHER TYPE" && (
+ {state.form.sample_type === "9" && (
{
Sample Type{" "}
- {(itemData.sample_type !== "OTHER TYPE"
- ? itemData.sample_type
- : itemData.sample_type_other
- )?.toLowerCase()}
+ {itemData.sample_type?.toLowerCase()}