From 9c7ea9bb6062b6bb59533de5c4a9af9af5d56a59 Mon Sep 17 00:00:00 2001 From: viralkansodiya Date: Thu, 2 Jan 2025 08:50:09 +0000 Subject: [PATCH 1/3] fix: medical department field in healthcare practitioner should have a Mandatory enabled --- .../healthcare_practitioner/healthcare_practitioner.json | 3 ++- healthcare/healthcare/doctype/lab_test/test_lab_test.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/healthcare/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.json b/healthcare/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.json index b5f10d9013..276acf9b0d 100644 --- a/healthcare/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.json +++ b/healthcare/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.json @@ -113,7 +113,8 @@ "ignore_user_permissions": 1, "in_standard_filter": 1, "label": "Medical Department", - "options": "Medical Department" + "options": "Medical Department", + "reqd" : 1 }, { "fieldname": "column_break_7", diff --git a/healthcare/healthcare/doctype/lab_test/test_lab_test.py b/healthcare/healthcare/doctype/lab_test/test_lab_test.py index 58b407049f..c274c8e5c8 100644 --- a/healthcare/healthcare/doctype/lab_test/test_lab_test.py +++ b/healthcare/healthcare/doctype/lab_test/test_lab_test.py @@ -229,6 +229,7 @@ def create_practitioner(): practitioner = frappe.new_doc("Healthcare Practitioner") practitioner.first_name = "_Test Healthcare Practitioner" practitioner.gender = "Female" + practitioner.department = "Dermatology" practitioner.op_consulting_charge = 500 practitioner.inpatient_visit_charge = 500 practitioner.save(ignore_permissions=True) From a9dfd9b583c51ab2dc3e1ae05bbb790a8d3805a4 Mon Sep 17 00:00:00 2001 From: viralkansodiya Date: Fri, 3 Jan 2025 05:54:15 +0000 Subject: [PATCH 2/3] chore: test cases updated where creating health practitioner --- .../doctype/patient_encounter/test_patient_encounter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/healthcare/healthcare/doctype/patient_encounter/test_patient_encounter.py b/healthcare/healthcare/doctype/patient_encounter/test_patient_encounter.py index 5042f8e27b..40c8d30148 100644 --- a/healthcare/healthcare/doctype/patient_encounter/test_patient_encounter.py +++ b/healthcare/healthcare/doctype/patient_encounter/test_patient_encounter.py @@ -37,6 +37,7 @@ def setUp(self): "doctype": "Healthcare Practitioner", "first_name": "Doc", "sex": "MALE", + "department": "Dermatology" } ).insert() try: From f73efa040ec612bb62333d7cfdc445e7c2eac313 Mon Sep 17 00:00:00 2001 From: viralkansodiya Date: Fri, 3 Jan 2025 05:57:17 +0000 Subject: [PATCH 3/3] chore: chore: fixed the pre-commit errro --- .../doctype/patient_encounter/test_patient_encounter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/healthcare/healthcare/doctype/patient_encounter/test_patient_encounter.py b/healthcare/healthcare/doctype/patient_encounter/test_patient_encounter.py index 40c8d30148..39efb890f6 100644 --- a/healthcare/healthcare/doctype/patient_encounter/test_patient_encounter.py +++ b/healthcare/healthcare/doctype/patient_encounter/test_patient_encounter.py @@ -37,7 +37,7 @@ def setUp(self): "doctype": "Healthcare Practitioner", "first_name": "Doc", "sex": "MALE", - "department": "Dermatology" + "department": "Dermatology", } ).insert() try: