diff --git a/cypress/e2e/patient_spec/patient_crud.cy.ts b/cypress/e2e/patient_spec/patient_crud.cy.ts
index dc58edfbad2..d555e14ec19 100644
--- a/cypress/e2e/patient_spec/patient_crud.cy.ts
+++ b/cypress/e2e/patient_spec/patient_crud.cy.ts
@@ -184,7 +184,7 @@ describe("Patient Creation with consultation", () => {
.type("Examination details and Clinical conditions");
cy.get("#weight").click().type("70");
cy.get("#height").click().type("170");
- cy.get("#ip_no").type("192.168.1.11");
+ cy.get("#patient_no").type("IP007");
cy.get(
"#icd11_diagnoses_object input[placeholder='Select'][role='combobox']"
)
diff --git a/src/Components/Facility/ConsultationForm.tsx b/src/Components/Facility/ConsultationForm.tsx
index 847d1908373..a1830329b7a 100644
--- a/src/Components/Facility/ConsultationForm.tsx
+++ b/src/Components/Facility/ConsultationForm.tsx
@@ -87,8 +87,7 @@ type FormDetails = {
history_of_present_illness: string;
prescribed_medication: string;
consultation_notes: string;
- ip_no: string;
- op_no: string;
+ patient_no: string;
procedure: ProcedureType[];
investigation: InvestigationType[];
is_telemedicine: BooleanStrings;
@@ -132,8 +131,7 @@ const initForm: FormDetails = {
history_of_present_illness: "",
prescribed_medication: "",
consultation_notes: "",
- ip_no: "",
- op_no: "",
+ patient_no: "",
procedure: [],
investigation: [],
is_telemedicine: "false",
@@ -314,8 +312,7 @@ export const ConsultationForm = (props: any) => {
? PATIENT_CATEGORIES.find((i) => i.text === res.data.category)
?.id ?? "Comfort"
: "Comfort",
- ip_no: res.data.ip_no ? res.data.ip_no : "",
- op_no: res.data.op_no ? res.data.op_no : "",
+ patient_no: res.data.patient_no ?? "",
verified_by: res.data.verified_by ? res.data.verified_by : "",
OPconsultation: res.data.consultation_notes,
is_telemedicine: `${res.data.is_telemedicine}`,
@@ -387,7 +384,7 @@ export const ConsultationForm = (props: any) => {
invalidForm = true;
}
return;
- case "ip_no":
+ case "patient_no":
if (state.form.suggestion !== "A") return;
if (!state.form[field]) {
errors[field] = "IP Number is required as person is admitted";
@@ -612,8 +609,7 @@ export const ConsultationForm = (props: any) => {
history_of_present_illness: state.form.history_of_present_illness,
prescribed_medication: state.form.prescribed_medication,
discharge_date: state.form.discharge_date,
- ip_no: state.form.ip_no,
- op_no: state.form.op_no,
+ patient_no: state.form.patient_no,
icd11_diagnoses: state.form.icd11_diagnoses_object.map(
(o: ICD11DiagnosisModel) => o.id
),
@@ -1101,19 +1097,17 @@ export const ConsultationForm = (props: any) => {
)}
>
)}
- {state.form.suggestion !== "A" ? (
-
-
-
- ) : (
-
-
-
- )}
+
+
+
diff --git a/src/Components/Facility/models.tsx b/src/Components/Facility/models.tsx
index 037828f21c0..05cdd8cde7d 100644
--- a/src/Components/Facility/models.tsx
+++ b/src/Components/Facility/models.tsx
@@ -105,8 +105,7 @@ export interface ConsultationModel {
referred_to_object?: FacilityModel;
referred_to_external?: string;
suggestion?: string;
- ip_no?: string;
- op_no?: string;
+ patient_no?: string;
consultation_status?: number;
is_kasp?: boolean;
kasp_enabled_date?: string;
diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx
index af36318c350..677e3725289 100644
--- a/src/Components/Patient/ManagePatients.tsx
+++ b/src/Components/Patient/ManagePatients.tsx
@@ -154,7 +154,7 @@ export const PatientManager = () => {
page: qParams.page || 1,
limit: resultsPerPage,
name: qParams.name || undefined,
- ip_or_op_no: qParams.ip_or_op_no || undefined,
+ patient_no: qParams.patient_no || undefined,
is_active:
!qParams.last_consultation_discharge_reason &&
(qParams.is_active || "True"),
@@ -356,7 +356,7 @@ export const PatientManager = () => {
qParams.is_active,
qParams.disease_status,
qParams.name,
- qParams.ip_or_op_no,
+ qParams.patient_no,
qParams.page,
qParams.phone_number,
qParams.emergency_phone_number,
@@ -875,7 +875,7 @@ export const PatientManager = () => {
label="Search by IP/OP Number"
placeholder="Enter IP/OP Number"
secondary
- {...queryField("ip_or_op_no")}
+ {...queryField("patient_no")}
/>
@@ -913,7 +913,7 @@ export const PatientManager = () => {
phoneNumber("Primary number", "phone_number"),
phoneNumber("Emergency number", "emergency_phone_number"),
badge("Patient name", "name"),
- badge("IP/OP number", "ip_or_op_no"),
+ badge("IP/OP number", "patient_no"),
...dateRange("Modified", "modified_date"),
...dateRange("Created", "created_date"),
...dateRange("Admitted", "last_consultation_admission_date"),
diff --git a/src/Components/Patient/PatientInfoCard.tsx b/src/Components/Patient/PatientInfoCard.tsx
index 518ec1fb517..9df4c93051a 100644
--- a/src/Components/Patient/PatientInfoCard.tsx
+++ b/src/Components/Patient/PatientInfoCard.tsx
@@ -41,8 +41,6 @@ export default function PatientInfoCard(props: {
const patient = props.patient;
const consultation = props.consultation;
- const ip_no = consultation?.ip_no;
- const op_no = consultation?.op_no;
const category: PatientCategory | undefined =
consultation?.last_daily_round?.patient_category ?? consultation?.category;
@@ -157,12 +155,12 @@ export default function PatientInfoCard(props: {
{consultation?.facility_name}
- {(consultation?.suggestion === "A" || op_no) && (
+ {consultation?.patient_no && (
- {consultation?.suggestion !== "A"
- ? `OP: ${op_no}`
- : `IP: ${ip_no}`}
+ {`${consultation?.suggestion === "A" ? "IP" : "OP"}: ${
+ consultation?.patient_no
+ }`}
)}
diff --git a/src/Components/Shifting/ShiftDetails.tsx b/src/Components/Shifting/ShiftDetails.tsx
index d99dd9bb671..46f8c2f6af7 100644
--- a/src/Components/Shifting/ShiftDetails.tsx
+++ b/src/Components/Shifting/ShiftDetails.tsx
@@ -426,9 +426,9 @@ export default function ShiftDetails(props: { id: string }) {
- {t("op_ip_no")}:{" "}
+ {t("patient_no")}:{" "}
- {consultation.ip_no || "-"}
+ {consultation.patient_no || "-"}
diff --git a/src/Locale/en/Common.json b/src/Locale/en/Common.json
index 399cbe46716..5f71583abd7 100644
--- a/src/Locale/en/Common.json
+++ b/src/Locale/en/Common.json
@@ -61,7 +61,7 @@
"close": "Close",
"print_referral_letter": "Print Referral Letter",
"date_of_positive_covid_19_swab": "Date of Positive Covid 19 Swab",
- "op_ip_no": "OP/IP No",
+ "patient_no": "OP/IP No",
"date_of_admission": "Date of Admission",
"india_1": "India",
"unique_id": "Unique Id",