From 1ac2512c7302096a23f7a7e8a6aaf4fbf6fbd4c1 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Mon, 18 May 2020 12:55:05 +0530 Subject: [PATCH 01/10] refactor: desk page colors and filters --- erpnext/healthcare/dashboard_fixtures.py | 1 - erpnext/healthcare/desk_page/healthcare/healthcare.json | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/healthcare/dashboard_fixtures.py b/erpnext/healthcare/dashboard_fixtures.py index fc3d62f2d8..8b86ac39ac 100644 --- a/erpnext/healthcare/dashboard_fixtures.py +++ b/erpnext/healthcare/dashboard_fixtures.py @@ -28,7 +28,6 @@ def get_charts(): "name": "Patient Appointments", "chart_name": "Patient Appointments", "timespan": "Last Month", - "color": "#77ecca", "filters_json": json.dumps({}), "chart_type": "Count", "timeseries": 1, diff --git a/erpnext/healthcare/desk_page/healthcare/healthcare.json b/erpnext/healthcare/desk_page/healthcare/healthcare.json index 5cf09b34b2..4559606a24 100644 --- a/erpnext/healthcare/desk_page/healthcare/healthcare.json +++ b/erpnext/healthcare/desk_page/healthcare/healthcare.json @@ -63,7 +63,7 @@ "idx": 0, "is_standard": 1, "label": "Healthcare", - "modified": "2020-04-25 22:31:36.576444", + "modified": "2020-05-18 12:41:04.288871", "modified_by": "Administrator", "module": "Healthcare", "name": "Healthcare", @@ -73,13 +73,15 @@ "restrict_to_domain": "Healthcare", "shortcuts": [ { + "color": "#ffe8cd", "format": "{} Open", "label": "Patient Appointment", "link_to": "Patient Appointment", - "stats_filter": "{\n \"status\": \"Open\"\n}", + "stats_filter": "{\n \"status\": \"Open\",\n \"company\": [\"like\", '%' + frappe.defaults.get_global_default(\"company\") + '%']\n}", "type": "DocType" }, { + "color": "#ffe8cd", "format": "{} Active", "label": "Patient", "link_to": "Patient", @@ -87,10 +89,11 @@ "type": "DocType" }, { + "color": "#cef6d1", "format": "{} Vacant", "label": "Healthcare Service Unit", "link_to": "Healthcare Service Unit", - "stats_filter": "{\n \"occupancy_status\": \"Vacant\",\n \"is_group\": 0\n}", + "stats_filter": "{\n \"occupancy_status\": \"Vacant\",\n \"is_group\": 0,\n \"company\": [\"like\", \"%\" + frappe.defaults.get_global_default(\"company\") + \"%\"]\n}", "type": "DocType" }, { From fb29714911490bee40d2c5b9342a3f9a4a84d46d Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Mon, 18 May 2020 16:28:11 +0530 Subject: [PATCH 02/10] feat: Healthcare Dashboard --- erpnext/healthcare/dashboard_fixtures.py | 88 +++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/erpnext/healthcare/dashboard_fixtures.py b/erpnext/healthcare/dashboard_fixtures.py index 8b86ac39ac..0f5728de9a 100644 --- a/erpnext/healthcare/dashboard_fixtures.py +++ b/erpnext/healthcare/dashboard_fixtures.py @@ -16,7 +16,13 @@ def get_dashboards(): "name": "Healthcare", "dashboard_name": "Healthcare", "charts": [ - { "chart": "Patient Appointments" } + { "chart": "Patient Appointments", "width": "Full"}, + { "chart": "In-Patient Status", "width": "Half"}, + { "chart": "Clinical Procedures Status", "width": "Half"}, + { "chart": "Symptoms", "width": "Half"}, + { "chart": "Diagnoses", "width": "Half"}, + { "chart": "Department wise Patient Appointments", "width": "Full"}, + { "chart": "Lab Tests", "width": "Full"}, ] }] @@ -36,5 +42,85 @@ def get_charts(): "document_type": "Patient Appointment", "type": "Line", "width": "Half" + }, + { + "doctype": "Dashboard Chart", + "name": "Department wise Patient Appointments", + "chart_name": "Department wise Patient Appointments", + "chart_type": "Group By", + "document_type": "Patient Appointment", + "group_by_type": "Count", + "group_by_based_on": "department", + 'is_public': 1, + "owner": "Administrator", + "type": "Bar", + "width": "Full", + "color": "#5F62F6" + }, + { + "doctype": "Dashboard Chart", + "name": "Lab Tests", + "chart_name": "Lab Tests", + "chart_type": "Group By", + "document_type": "Lab Test", + "group_by_type": "Count", + "group_by_based_on": "template", + 'is_public': 1, + "owner": "Administrator", + "type": "Bar", + "width": "Full", + "color": "#8548EB" + }, + { + "doctype": "Dashboard Chart", + "name": "In-Patient Status", + "chart_name": "In-Patient Status", + "chart_type": "Group By", + "document_type": "Inpatient Record", + "group_by_type": "Count", + "group_by_based_on": "status", + 'is_public': 1, + "owner": "Administrator", + "type": "Bar", + "width": "Half", + }, + { + "doctype": "Dashboard Chart", + "name": "Clinical Procedures Status", + "chart_name": "Clinical Procedure Status", + "chart_type": "Group By", + "document_type": "Clinical Procedure", + "group_by_type": "Count", + "group_by_based_on": "status", + 'is_public': 1, + "owner": "Administrator", + "type": "Pie", + "width": "Half", + }, + { + "doctype": "Dashboard Chart", + "name": "Symptoms", + "chart_name": "Symptoms", + "chart_type": "Group By", + "document_type": "Patient Encounter Symptom", + "group_by_type": "Count", + "group_by_based_on": "complaint", + 'is_public': 1, + "owner": "Administrator", + "type": "Percentage", + "width": "Half", + }, + { + "doctype": "Dashboard Chart", + "name": "Diagnoses", + "chart_name": "Diagnoses", + "chart_type": "Group By", + "document_type": "Patient Encounter Diagnosis", + "group_by_type": "Count", + "group_by_based_on": "diagnosis", + 'is_public': 1, + "owner": "Administrator", + "type": "Percentage", + "width": "Half", } ] From 24477d5d0639f0ab824f045d66a58a81b860ab40 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Mon, 18 May 2020 18:15:20 +0530 Subject: [PATCH 03/10] feat: added Number Cards to Healthcare Dashboard --- erpnext/healthcare/dashboard_fixtures.py | 79 ++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/erpnext/healthcare/dashboard_fixtures.py b/erpnext/healthcare/dashboard_fixtures.py index 0f5728de9a..b3c6723be0 100644 --- a/erpnext/healthcare/dashboard_fixtures.py +++ b/erpnext/healthcare/dashboard_fixtures.py @@ -9,8 +9,19 @@ def get_data(): return frappe._dict({ "dashboards": get_dashboards(), "charts": get_charts(), + "number_cards": get_number_cards(), }) +def get_company(): + company = frappe.defaults.get_defaults().company + if company: + return company + else: + company = frappe.get_list("Company", limit=1) + if company: + return company.name + return None + def get_dashboards(): return [{ "name": "Healthcare", @@ -23,6 +34,12 @@ def get_dashboards(): { "chart": "Diagnoses", "width": "Half"}, { "chart": "Department wise Patient Appointments", "width": "Full"}, { "chart": "Lab Tests", "width": "Full"}, + ], + "cards": [ + { "card": "Total Patients" }, + { "card": "Total Patient Admitted" }, + { "card": "Open Appointments" }, + { "card": "Appointments to Bill" } ] }] @@ -124,3 +141,65 @@ def get_charts(): "width": "Half", } ] + +def get_number_cards(): + return [ + { + "name": "Total Patients", + "label": "Total Patients", + "function": "Count", + "doctype": "Number Card", + "document_type": "Patient", + "filters_json": json.dumps( + [["Patient","status","=","Active",False]] + ), + "is_public": 1, + "owner": "Administrator", + "show_percentage_stats": 1, + "stats_time_interval": "Daily" + }, + { + "name": "Total Patients Admitted", + "label": "Total Patients Admitted", + "function": "Count", + "doctype": "Number Card", + "document_type": "Patient", + "filters_json": json.dumps( + [["Patient","inpatient_status","=","Admitted",False]] + ), + "is_public": 1, + "owner": "Administrator", + "show_percentage_stats": 1, + "stats_time_interval": "Daily" + }, + { + "name": "Open Appointments", + "label": "Open Appointments", + "function": "Count", + "doctype": "Number Card", + "document_type": "Patient Appointment", + "filters_json": json.dumps( + [["Patient Appointment","company","=",get_company(),False], + ["Patient Appointment","status","=","Open",False]] + ), + "is_public": 1, + "owner": "Administrator", + "show_percentage_stats": 1, + "stats_time_interval": "Daily" + }, + { + "name": "Appointments to Bill", + "label": "Appointments to Bill", + "function": "Count", + "doctype": "Number Card", + "document_type": "Patient Appointment", + "filters_json": json.dumps( + [["Patient Appointment","company","=",get_company(),False], + ["Patient Appointment","invoiced","=",0,False]] + ), + "is_public": 1, + "owner": "Administrator", + "show_percentage_stats": 1, + "stats_time_interval": "Daily" + } + ] \ No newline at end of file From 5162faa7df623da56f87883ea29de635ef9697a4 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Mon, 18 May 2020 18:59:59 +0530 Subject: [PATCH 04/10] fix: add default filters in Dashboard Charts --- erpnext/healthcare/dashboard_fixtures.py | 28 +++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/erpnext/healthcare/dashboard_fixtures.py b/erpnext/healthcare/dashboard_fixtures.py index b3c6723be0..647d91ab60 100644 --- a/erpnext/healthcare/dashboard_fixtures.py +++ b/erpnext/healthcare/dashboard_fixtures.py @@ -44,6 +44,7 @@ def get_dashboards(): }] def get_charts(): + company = get_company() return [ { "doctype": "Dashboard Chart", @@ -51,7 +52,10 @@ def get_charts(): "name": "Patient Appointments", "chart_name": "Patient Appointments", "timespan": "Last Month", - "filters_json": json.dumps({}), + "filters_json": json.dumps([ + ["Patient Appointment", "company", "=", company, False], + ["Patient Appointment", "status", "!=", "Cancelled"] + ]), "chart_type": "Count", "timeseries": 1, "based_on": "appointment_datetime", @@ -68,6 +72,10 @@ def get_charts(): "document_type": "Patient Appointment", "group_by_type": "Count", "group_by_based_on": "department", + "filters_json": json.dumps([ + ["Patient Appointment", "company", "=", company, False], + ["Patient Appointment", "status", "!=", "Cancelled"] + ]), 'is_public': 1, "owner": "Administrator", "type": "Bar", @@ -82,6 +90,10 @@ def get_charts(): "document_type": "Lab Test", "group_by_type": "Count", "group_by_based_on": "template", + "filters_json": json.dumps([ + ["Lab Test", "company", "=", company, False], + ["Lab Test", "docstatus", "=", 1] + ]), 'is_public': 1, "owner": "Administrator", "type": "Bar", @@ -96,6 +108,9 @@ def get_charts(): "document_type": "Inpatient Record", "group_by_type": "Count", "group_by_based_on": "status", + "filters_json": json.dumps([ + ["Inpatient Record", "company", "=", company, False] + ]), 'is_public': 1, "owner": "Administrator", "type": "Bar", @@ -109,6 +124,10 @@ def get_charts(): "document_type": "Clinical Procedure", "group_by_type": "Count", "group_by_based_on": "status", + "filters_json": json.dumps([ + ["Clinical Procedure", "company", "=", company, False], + ["Clinical Procedure", "docstatus", "=", 1] + ]), 'is_public': 1, "owner": "Administrator", "type": "Pie", @@ -122,6 +141,7 @@ def get_charts(): "document_type": "Patient Encounter Symptom", "group_by_type": "Count", "group_by_based_on": "complaint", + "filters_json": json.dumps({}), 'is_public': 1, "owner": "Administrator", "type": "Percentage", @@ -135,6 +155,7 @@ def get_charts(): "document_type": "Patient Encounter Diagnosis", "group_by_type": "Count", "group_by_based_on": "diagnosis", + "filters_json": json.dumps({}), 'is_public': 1, "owner": "Administrator", "type": "Percentage", @@ -143,6 +164,7 @@ def get_charts(): ] def get_number_cards(): + company = get_company() return [ { "name": "Total Patients", @@ -179,7 +201,7 @@ def get_number_cards(): "doctype": "Number Card", "document_type": "Patient Appointment", "filters_json": json.dumps( - [["Patient Appointment","company","=",get_company(),False], + [["Patient Appointment","company","=",company,False], ["Patient Appointment","status","=","Open",False]] ), "is_public": 1, @@ -194,7 +216,7 @@ def get_number_cards(): "doctype": "Number Card", "document_type": "Patient Appointment", "filters_json": json.dumps( - [["Patient Appointment","company","=",get_company(),False], + [["Patient Appointment","company","=",company,False], ["Patient Appointment","invoiced","=",0,False]] ), "is_public": 1, From de3751387a27deff9f9dce21fd9aab3b5c99e125 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Mon, 18 May 2020 19:15:08 +0530 Subject: [PATCH 05/10] refactor: Lab Tests and Clinical Procedures charts to Percentage type --- erpnext/healthcare/dashboard_fixtures.py | 27 +++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/erpnext/healthcare/dashboard_fixtures.py b/erpnext/healthcare/dashboard_fixtures.py index 647d91ab60..faa83cccf3 100644 --- a/erpnext/healthcare/dashboard_fixtures.py +++ b/erpnext/healthcare/dashboard_fixtures.py @@ -30,10 +30,11 @@ def get_dashboards(): { "chart": "Patient Appointments", "width": "Full"}, { "chart": "In-Patient Status", "width": "Half"}, { "chart": "Clinical Procedures Status", "width": "Half"}, + { "chart": "Lab Tests", "width": "Half"}, + { "chart": "Clinical Procedures", "width": "Half"}, { "chart": "Symptoms", "width": "Half"}, { "chart": "Diagnoses", "width": "Half"}, - { "chart": "Department wise Patient Appointments", "width": "Full"}, - { "chart": "Lab Tests", "width": "Full"}, + { "chart": "Department wise Patient Appointments", "width": "Full"} ], "cards": [ { "card": "Total Patients" }, @@ -96,9 +97,25 @@ def get_charts(): ]), 'is_public': 1, "owner": "Administrator", - "type": "Bar", - "width": "Full", - "color": "#8548EB" + "type": "Percentage", + "width": "Half", + }, + { + "doctype": "Dashboard Chart", + "name": "Clinical Procedures", + "chart_name": "Clinical Procedures", + "chart_type": "Group By", + "document_type": "Clinical Procedure", + "group_by_type": "Count", + "group_by_based_on": "procedure_template", + "filters_json": json.dumps([ + ["Clinical Procedure", "company", "=", company, False], + ["Clinical Procedure", "docstatus", "=", 1] + ]), + 'is_public': 1, + "owner": "Administrator", + "type": "Percentage", + "width": "Half", }, { "doctype": "Dashboard Chart", From b8db275a357e4d8f8d730e5ff177ae73ba898bab Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Tue, 19 May 2020 01:46:48 +0530 Subject: [PATCH 06/10] feat: Department wise Patient Appointments custom chart --- .../dashboard_chart_source/__init__.py | 0 .../__init__.py | 0 .../department_wise_patient_appointments.js | 14 ++++ .../department_wise_patient_appointments.json | 13 ++++ .../department_wise_patient_appointments.py | 75 +++++++++++++++++++ erpnext/healthcare/dashboard_fixtures.py | 19 ++--- 6 files changed, 112 insertions(+), 9 deletions(-) create mode 100644 erpnext/healthcare/dashboard_chart_source/__init__.py create mode 100644 erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/__init__.py create mode 100644 erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.js create mode 100644 erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.json create mode 100644 erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py diff --git a/erpnext/healthcare/dashboard_chart_source/__init__.py b/erpnext/healthcare/dashboard_chart_source/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/__init__.py b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.js b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.js new file mode 100644 index 0000000000..dd6dc666d2 --- /dev/null +++ b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.js @@ -0,0 +1,14 @@ +frappe.provide('frappe.dashboards.chart_sources'); + +frappe.dashboards.chart_sources["Department wise Patient Appointments"] = { + method: "erpnext.healthcare.dashboard_chart_source.department_wise_patient_appointments.department_wise_patient_appointments.get", + filters: [ + { + fieldname: "company", + label: __("Company"), + fieldtype: "Link", + options: "Company", + default: frappe.defaults.get_user_default("Company") + } + ] +}; \ No newline at end of file diff --git a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.json b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.json new file mode 100644 index 0000000000..00301ef2c3 --- /dev/null +++ b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.json @@ -0,0 +1,13 @@ +{ + "creation": "2020-05-18 19:18:42.571045", + "docstatus": 0, + "doctype": "Dashboard Chart Source", + "idx": 0, + "modified": "2020-05-18 19:18:42.571045", + "modified_by": "Administrator", + "module": "Healthcare", + "name": "Department wise Patient Appointments", + "owner": "Administrator", + "source_name": "Department wise Patient Appointments", + "timeseries": 0 +} \ No newline at end of file diff --git a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py new file mode 100644 index 0000000000..3cd987b8b4 --- /dev/null +++ b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py @@ -0,0 +1,75 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe, json +from frappe import _ +from frappe.utils.dashboard import cache_source +from erpnext.stock.utils import get_stock_value_from_bin + +@frappe.whitelist() +@cache_source +def get(chart_name = None, chart = None, no_cache = None, filters = None, from_date = None, + to_date = None, timespan = None, time_interval = None, heatmap_year = None): + if chart_name: + chart = frappe.get_doc('Dashboard Chart', chart_name) + else: + chart = frappe._dict(frappe.parse_json(chart)) + + labels, datapoints = [], [] + filters = frappe.parse_json(filters) + + data = frappe.db.get_list('Medical Department', fields=['name']) + if not filters: + filters = {} + + status = ['Open', 'Scheduled', 'Closed', 'Cancelled'] + for department in data: + filters['department'] = department.name + department['total_appointments'] = frappe.db.count('Patient Appointment', filters=filters) + + for entry in status: + filters['status'] = entry + department[frappe.scrub(entry)] = frappe.db.count('Patient Appointment', filters=filters) + filters.pop('status') + + sorted_department_map = sorted(data, key = lambda i: i['total_appointments'],reverse=True) + + if len(sorted_department_map) > 10: + sorted_department_map = sorted_department_map[:10] + + labels = [] + open_appointments = [] + scheduled = [] + closed = [] + cancelled = [] + + for department in sorted_department_map: + labels.append(department.name) + open_appointments.append(department.open) + scheduled.append(department.scheduled) + closed.append(department.closed) + cancelled.append(department.cancelled) + + return { + 'labels': labels, + 'datasets': [ + { + 'name': 'Open', + 'values': open_appointments + }, + { + 'name': 'Scheduled', + 'values': scheduled + }, + { + 'name': 'Closed', + 'values': closed + }, + { + 'name': 'Cancelled', + 'values': cancelled + } + ], + 'type': 'bar' + } \ No newline at end of file diff --git a/erpnext/healthcare/dashboard_fixtures.py b/erpnext/healthcare/dashboard_fixtures.py index faa83cccf3..4fb05a8f81 100644 --- a/erpnext/healthcare/dashboard_fixtures.py +++ b/erpnext/healthcare/dashboard_fixtures.py @@ -69,19 +69,20 @@ def get_charts(): "doctype": "Dashboard Chart", "name": "Department wise Patient Appointments", "chart_name": "Department wise Patient Appointments", - "chart_type": "Group By", - "document_type": "Patient Appointment", - "group_by_type": "Count", - "group_by_based_on": "department", - "filters_json": json.dumps([ - ["Patient Appointment", "company", "=", company, False], - ["Patient Appointment", "status", "!=", "Cancelled"] - ]), + "chart_type": "Custom", + "source": "Department wise Patient Appointments", + "filters_json": json.dumps({}), 'is_public': 1, "owner": "Administrator", "type": "Bar", "width": "Full", - "color": "#5F62F6" + "custom_options": json.dumps({ + "colors": ["#7CD5FA", "#5F62F6", "#7544E2", "#EE5555"], + "barOptions":{ + "stacked":1 + }, + "height": 300 + }) }, { "doctype": "Dashboard Chart", From 0799c679d42bb7d3cffdd48a0fe7bacd07453a77 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Tue, 19 May 2020 12:07:23 +0530 Subject: [PATCH 07/10] feat: Healthcare Onboarding --- .../desk_page/healthcare/healthcare.json | 3 +- .../clinical_procedure_template.js | 35 +++++++++++++++ .../healthcare_practitioner.js | 35 +++++++++++++++ .../healthcare_settings.js | 34 ++++++++++++++ .../healthcare/healthcare.json | 45 +++++++++++++++++++ .../book_a_patient_appointment.json | 19 ++++++++ .../create_patient/create_patient.json | 19 ++++++++ .../create_practitioner.json | 19 ++++++++ .../create_practitioner_schedule.json | 19 ++++++++ .../explore_clinical_procedure_templates.json | 19 ++++++++ .../explore_healthcare_settings.json | 19 ++++++++ .../explore_lab_test_template.json | 19 ++++++++ ..._employee_for_healthcare_practitioner.json | 20 +++++++++ 13 files changed, 304 insertions(+), 1 deletion(-) create mode 100644 erpnext/healthcare/module_onboarding/healthcare/healthcare.json create mode 100644 erpnext/healthcare/onboarding_step/book_a_patient_appointment/book_a_patient_appointment.json create mode 100644 erpnext/healthcare/onboarding_step/create_patient/create_patient.json create mode 100644 erpnext/healthcare/onboarding_step/create_practitioner/create_practitioner.json create mode 100644 erpnext/healthcare/onboarding_step/create_practitioner_schedule/create_practitioner_schedule.json create mode 100644 erpnext/healthcare/onboarding_step/explore_clinical_procedure_templates/explore_clinical_procedure_templates.json create mode 100644 erpnext/healthcare/onboarding_step/explore_healthcare_settings/explore_healthcare_settings.json create mode 100644 erpnext/healthcare/onboarding_step/explore_lab_test_template/explore_lab_test_template.json create mode 100644 erpnext/healthcare/onboarding_step/setup_schedule_and_employee_for_healthcare_practitioner/setup_schedule_and_employee_for_healthcare_practitioner.json diff --git a/erpnext/healthcare/desk_page/healthcare/healthcare.json b/erpnext/healthcare/desk_page/healthcare/healthcare.json index 4559606a24..81ba61b682 100644 --- a/erpnext/healthcare/desk_page/healthcare/healthcare.json +++ b/erpnext/healthcare/desk_page/healthcare/healthcare.json @@ -63,10 +63,11 @@ "idx": 0, "is_standard": 1, "label": "Healthcare", - "modified": "2020-05-18 12:41:04.288871", + "modified": "2020-05-19 11:47:42.118464", "modified_by": "Administrator", "module": "Healthcare", "name": "Healthcare", + "onboarding": "Healthcare", "owner": "Administrator", "pin_to_bottom": 0, "pin_to_top": 0, diff --git a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js index 57f4cdf3b2..3f3d606ef8 100644 --- a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js +++ b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js @@ -144,3 +144,38 @@ cur_frm.set_query('item_code', 'items', function() { } }; }); + +frappe.tour['Clinical Procedure Template'] = [ + { + fieldname: 'template', + title: __('Template Name'), + description: __('Enter a name for the Clinical Procedure Template') + }, + { + fieldname: 'item_code', + title: __('Item Code'), + description: __('Set the Item Code which will be used for billing the Clinical Procedure.') + }, + { + fieldname: 'item_group', + title: __('Item Group'), + description: __('Select an Item Group for the Clinical Procedure Item.') + }, + { + fieldname: 'is_billable', + title: __('Clinical Procedure Rate'), + description: __('Check this if the Clinical Procedure is billable and also set the rate.') + }, + { + fieldname: 'consume_stock', + title: __('Consume Stock'), + description: __('Check this if the Clinical Procedure utilises consumables. Click ') + "here" + __(' to know more') + + }, + { + fieldname: 'medical_department', + title: __('Medical Department'), + description: __('You can also set the Medical Department for the template. After saving the document, an Item will automatically be created for billing this Clinical Procedure. You can then use this template while creating Clinical Procedures for Patients. Templates save you from filling up redundant data every single time. You can also create templates for other operations like Lab Tests, Therapy Sessions, etc.') + } +]; + diff --git a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.js b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.js index 4ab3b6e9c1..fc0b24122a 100644 --- a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.js +++ b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.js @@ -108,3 +108,38 @@ frappe.ui.form.on('Healthcare Practitioner', 'employee', function(frm) { }); } }); + +frappe.tour['Healthcare Practitioner'] = [ + { + fieldname: 'employee', + title: __('Employee'), + description: __('If you want to track Payroll and other HRMS operations for a Practitoner, create an Employee and link it here.') + }, + { + fieldname: 'practitioner_schedules', + title: __('Practitioner Schedules'), + description: __('Set the Practitioner Schedule you just created. This will be used while booking appointments.') + }, + { + fieldname: 'op_consulting_charge_item', + title: __('Out Patient Consulting Charge Item'), + description: __('Create a service item for Out Patient Consulting.') + }, + { + fieldname: 'inpatient_visit_charge_item', + title: __('Inpatient Visit Charge Item'), + description: __('If this Healthcare Practitioner works for the In-Patient Department, create a service item for Inpatient Visits.') + }, + { + fieldname: 'op_consulting_charge', + title: __('Out Patient Consulting Charge'), + description: __('Set the Out Patient Consulting Charge for this Practitioner.') + + }, + { + fieldname: 'inpatient_visit_charge', + title: __('Inpatient Visit Charge'), + description: __('If this Healthcare Practitioner also works for the In-Patient Department, set the inpatient visit charge for this Practitioner.') + } +]; + diff --git a/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js b/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js index 22fbf5019a..310ba2e510 100644 --- a/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js +++ b/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js @@ -39,3 +39,37 @@ var set_query_service_item = function(frm, service_item_field) { }; }); }; + +frappe.tour['Healthcare Settings'] = [ + { + fieldname: 'link_customer_to_patient', + title: __('Link Customer to Patient'), + description: __('If checked, a customer will be created for every Patient. Patient Invoices will be created against this Customer. You can also select existing Customer while creating a Patient. This field is checked by default.') + }, + { + fieldname: 'collect_registration_fee', + title: __('Collect Registration Fee'), + description: __('If your Healthcare facility bills registrations of Patients, you can check this and set the Registration Fee in the field below. Checking this will create new Patients with a Disabled status by default and will only be enabled after invoicing the Registration Fee.') + }, + { + fieldname: 'automate_appointment_invoicing', + title: __('Automate Appointment Invoicing'), + description: __('Checking this will automatically create a Sales Invoice whenever an appointment is booked for a Patient.') + }, + { + fieldname: 'healthcare_service_items', + title: __('Healthcare Service Items'), + description: __('Set up the Healthcare Service Items for billing. Click ') + "here" + __(' to know more') + }, + { + fieldname: 'sb_in_ac', + title: __('Set up default Accounts for the Healthcare Facility'), + description: __('If you wish to override default accounts settings and configure the Income and Receivable accounts for Healthcare, you can do so here.') + + }, + { + fieldname: 'out_patient_sms_alerts', + title: __('Out Patient SMS alerts'), + description: __('You can set up Out Patient SMS alerts here. Click ') + "here" + __(' to know more') + } +]; diff --git a/erpnext/healthcare/module_onboarding/healthcare/healthcare.json b/erpnext/healthcare/module_onboarding/healthcare/healthcare.json new file mode 100644 index 0000000000..fc8e70230e --- /dev/null +++ b/erpnext/healthcare/module_onboarding/healthcare/healthcare.json @@ -0,0 +1,45 @@ +{ + "allow_roles": [ + { + "role": "Healthcare Administrator" + } + ], + "creation": "2020-05-19 10:32:43.025852", + "docstatus": 0, + "doctype": "Module Onboarding", + "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/healthcare", + "idx": 0, + "is_complete": 0, + "modified": "2020-05-19 11:48:08.746918", + "modified_by": "Administrator", + "module": "Healthcare", + "name": "Healthcare", + "owner": "Administrator", + "steps": [ + { + "step": "Create Patient" + }, + { + "step": "Create Practitioner" + }, + { + "step": "Create Practitioner Schedule" + }, + { + "step": "Setup Schedule and Employee for Healthcare Practitioner" + }, + { + "step": "Explore Healthcare Settings" + }, + { + "step": "Book a Patient Appointment" + }, + { + "step": "Explore Clinical Procedure Templates" + } + ], + "subtitle": "Patients, Practitioner Schedules, Appointments and more.", + "success_message": "Yayy! The Healthcare Module is all set up!", + "title": "Let's Setup the Healthcare Module", + "user_can_dismiss": 1 +} \ No newline at end of file diff --git a/erpnext/healthcare/onboarding_step/book_a_patient_appointment/book_a_patient_appointment.json b/erpnext/healthcare/onboarding_step/book_a_patient_appointment/book_a_patient_appointment.json new file mode 100644 index 0000000000..5f0990931f --- /dev/null +++ b/erpnext/healthcare/onboarding_step/book_a_patient_appointment/book_a_patient_appointment.json @@ -0,0 +1,19 @@ +{ + "action": "Create Entry", + "creation": "2020-05-19 11:39:54.975372", + "docstatus": 0, + "doctype": "Onboarding Step", + "idx": 0, + "is_complete": 0, + "is_mandatory": 0, + "is_single": 0, + "is_skipped": 0, + "modified": "2020-05-19 11:39:54.975372", + "modified_by": "Administrator", + "name": "Book a Patient Appointment", + "owner": "Administrator", + "reference_document": "Patient Appointment", + "show_full_form": 1, + "title": "Book a Patient Appointment", + "validate_action": 1 +} \ No newline at end of file diff --git a/erpnext/healthcare/onboarding_step/create_patient/create_patient.json b/erpnext/healthcare/onboarding_step/create_patient/create_patient.json new file mode 100644 index 0000000000..3bfa144ba2 --- /dev/null +++ b/erpnext/healthcare/onboarding_step/create_patient/create_patient.json @@ -0,0 +1,19 @@ +{ + "action": "Create Entry", + "creation": "2020-05-19 10:32:27.648902", + "docstatus": 0, + "doctype": "Onboarding Step", + "idx": 0, + "is_complete": 0, + "is_mandatory": 0, + "is_single": 0, + "is_skipped": 0, + "modified": "2020-05-19 10:32:27.648902", + "modified_by": "Administrator", + "name": "Create Patient", + "owner": "Administrator", + "reference_document": "Patient", + "show_full_form": 1, + "title": "Create Patient", + "validate_action": 1 +} \ No newline at end of file diff --git a/erpnext/healthcare/onboarding_step/create_practitioner/create_practitioner.json b/erpnext/healthcare/onboarding_step/create_practitioner/create_practitioner.json new file mode 100644 index 0000000000..3ad60ed094 --- /dev/null +++ b/erpnext/healthcare/onboarding_step/create_practitioner/create_practitioner.json @@ -0,0 +1,19 @@ +{ + "action": "Create Entry", + "creation": "2020-05-19 10:39:55.728057", + "docstatus": 0, + "doctype": "Onboarding Step", + "idx": 0, + "is_complete": 0, + "is_mandatory": 0, + "is_single": 0, + "is_skipped": 0, + "modified": "2020-05-19 10:39:55.728057", + "modified_by": "Administrator", + "name": "Create Practitioner", + "owner": "Administrator", + "reference_document": "Healthcare Practitioner", + "show_full_form": 0, + "title": "Create Practitioner", + "validate_action": 1 +} \ No newline at end of file diff --git a/erpnext/healthcare/onboarding_step/create_practitioner_schedule/create_practitioner_schedule.json b/erpnext/healthcare/onboarding_step/create_practitioner_schedule/create_practitioner_schedule.json new file mode 100644 index 0000000000..361921710a --- /dev/null +++ b/erpnext/healthcare/onboarding_step/create_practitioner_schedule/create_practitioner_schedule.json @@ -0,0 +1,19 @@ +{ + "action": "Create Entry", + "creation": "2020-05-19 10:41:19.065753", + "docstatus": 0, + "doctype": "Onboarding Step", + "idx": 0, + "is_complete": 0, + "is_mandatory": 0, + "is_single": 0, + "is_skipped": 0, + "modified": "2020-05-19 10:41:19.065753", + "modified_by": "Administrator", + "name": "Create Practitioner Schedule", + "owner": "Administrator", + "reference_document": "Practitioner Schedule", + "show_full_form": 1, + "title": "Create Practitioner Schedule", + "validate_action": 1 +} \ No newline at end of file diff --git a/erpnext/healthcare/onboarding_step/explore_clinical_procedure_templates/explore_clinical_procedure_templates.json b/erpnext/healthcare/onboarding_step/explore_clinical_procedure_templates/explore_clinical_procedure_templates.json new file mode 100644 index 0000000000..f0c0f612e1 --- /dev/null +++ b/erpnext/healthcare/onboarding_step/explore_clinical_procedure_templates/explore_clinical_procedure_templates.json @@ -0,0 +1,19 @@ +{ + "action": "Show Form Tour", + "creation": "2020-05-19 11:40:51.963741", + "docstatus": 0, + "doctype": "Onboarding Step", + "idx": 0, + "is_complete": 0, + "is_mandatory": 0, + "is_single": 0, + "is_skipped": 0, + "modified": "2020-05-19 11:46:35.085270", + "modified_by": "Administrator", + "name": "Explore Clinical Procedure Templates", + "owner": "Administrator", + "reference_document": "Clinical Procedure Template", + "show_full_form": 0, + "title": "Explore Clinical Procedure Templates", + "validate_action": 1 +} \ No newline at end of file diff --git a/erpnext/healthcare/onboarding_step/explore_healthcare_settings/explore_healthcare_settings.json b/erpnext/healthcare/onboarding_step/explore_healthcare_settings/explore_healthcare_settings.json new file mode 100644 index 0000000000..0bdadade6f --- /dev/null +++ b/erpnext/healthcare/onboarding_step/explore_healthcare_settings/explore_healthcare_settings.json @@ -0,0 +1,19 @@ +{ + "action": "Show Form Tour", + "creation": "2020-05-19 11:14:33.044989", + "docstatus": 0, + "doctype": "Onboarding Step", + "idx": 0, + "is_complete": 0, + "is_mandatory": 0, + "is_single": 1, + "is_skipped": 0, + "modified": "2020-05-19 11:14:33.044989", + "modified_by": "Administrator", + "name": "Explore Healthcare Settings", + "owner": "Administrator", + "reference_document": "Healthcare Settings", + "show_full_form": 0, + "title": "Explore Healthcare Settings", + "validate_action": 1 +} \ No newline at end of file diff --git a/erpnext/healthcare/onboarding_step/explore_lab_test_template/explore_lab_test_template.json b/erpnext/healthcare/onboarding_step/explore_lab_test_template/explore_lab_test_template.json new file mode 100644 index 0000000000..179c24ec77 --- /dev/null +++ b/erpnext/healthcare/onboarding_step/explore_lab_test_template/explore_lab_test_template.json @@ -0,0 +1,19 @@ +{ + "action": "Show Form Tour", + "creation": "2020-05-19 11:44:35.766626", + "docstatus": 0, + "doctype": "Onboarding Step", + "idx": 0, + "is_complete": 0, + "is_mandatory": 0, + "is_single": 0, + "is_skipped": 0, + "modified": "2020-05-19 11:44:35.766626", + "modified_by": "Administrator", + "name": "Explore Lab Test Template", + "owner": "Administrator", + "reference_document": "Lab Test Template", + "show_full_form": 1, + "title": "Explore Lab Test Template", + "validate_action": 1 +} \ No newline at end of file diff --git a/erpnext/healthcare/onboarding_step/setup_schedule_and_employee_for_healthcare_practitioner/setup_schedule_and_employee_for_healthcare_practitioner.json b/erpnext/healthcare/onboarding_step/setup_schedule_and_employee_for_healthcare_practitioner/setup_schedule_and_employee_for_healthcare_practitioner.json new file mode 100644 index 0000000000..6b78db38f7 --- /dev/null +++ b/erpnext/healthcare/onboarding_step/setup_schedule_and_employee_for_healthcare_practitioner/setup_schedule_and_employee_for_healthcare_practitioner.json @@ -0,0 +1,20 @@ +{ + "action": "Show Form Tour", + "creation": "2020-05-19 10:43:56.231679", + "docstatus": 0, + "doctype": "Onboarding Step", + "field": "schedule", + "idx": 0, + "is_complete": 0, + "is_mandatory": 0, + "is_single": 0, + "is_skipped": 0, + "modified": "2020-05-19 10:43:56.231679", + "modified_by": "Administrator", + "name": "Setup Schedule and Employee for Healthcare Practitioner", + "owner": "Administrator", + "reference_document": "Healthcare Practitioner", + "show_full_form": 0, + "title": "Setup Schedule and Employee for Healthcare Practitioner", + "validate_action": 0 +} \ No newline at end of file From f472a19889a2853d716b31770539f813837a893e Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Tue, 19 May 2020 13:03:22 +0530 Subject: [PATCH 08/10] fix: mark onboarding steps as mandatory --- .../healthcare/healthcare.json | 7 ++----- .../book_a_patient_appointment.json | 19 ------------------- .../create_patient/create_patient.json | 4 ++-- .../create_practitioner.json | 6 +++--- .../create_practitioner_schedule.json | 4 ++-- .../explore_healthcare_settings.json | 4 ++-- .../explore_lab_test_template.json | 19 ------------------- ..._employee_for_healthcare_practitioner.json | 4 ++-- 8 files changed, 13 insertions(+), 54 deletions(-) delete mode 100644 erpnext/healthcare/onboarding_step/book_a_patient_appointment/book_a_patient_appointment.json delete mode 100644 erpnext/healthcare/onboarding_step/explore_lab_test_template/explore_lab_test_template.json diff --git a/erpnext/healthcare/module_onboarding/healthcare/healthcare.json b/erpnext/healthcare/module_onboarding/healthcare/healthcare.json index fc8e70230e..db35149f87 100644 --- a/erpnext/healthcare/module_onboarding/healthcare/healthcare.json +++ b/erpnext/healthcare/module_onboarding/healthcare/healthcare.json @@ -10,7 +10,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/healthcare", "idx": 0, "is_complete": 0, - "modified": "2020-05-19 11:48:08.746918", + "modified": "2020-05-19 12:52:09.757729", "modified_by": "Administrator", "module": "Healthcare", "name": "Healthcare", @@ -31,14 +31,11 @@ { "step": "Explore Healthcare Settings" }, - { - "step": "Book a Patient Appointment" - }, { "step": "Explore Clinical Procedure Templates" } ], - "subtitle": "Patients, Practitioner Schedules, Appointments and more.", + "subtitle": "Patients, Practitioner Schedules, Settings and more.", "success_message": "Yayy! The Healthcare Module is all set up!", "title": "Let's Setup the Healthcare Module", "user_can_dismiss": 1 diff --git a/erpnext/healthcare/onboarding_step/book_a_patient_appointment/book_a_patient_appointment.json b/erpnext/healthcare/onboarding_step/book_a_patient_appointment/book_a_patient_appointment.json deleted file mode 100644 index 5f0990931f..0000000000 --- a/erpnext/healthcare/onboarding_step/book_a_patient_appointment/book_a_patient_appointment.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "action": "Create Entry", - "creation": "2020-05-19 11:39:54.975372", - "docstatus": 0, - "doctype": "Onboarding Step", - "idx": 0, - "is_complete": 0, - "is_mandatory": 0, - "is_single": 0, - "is_skipped": 0, - "modified": "2020-05-19 11:39:54.975372", - "modified_by": "Administrator", - "name": "Book a Patient Appointment", - "owner": "Administrator", - "reference_document": "Patient Appointment", - "show_full_form": 1, - "title": "Book a Patient Appointment", - "validate_action": 1 -} \ No newline at end of file diff --git a/erpnext/healthcare/onboarding_step/create_patient/create_patient.json b/erpnext/healthcare/onboarding_step/create_patient/create_patient.json index 3bfa144ba2..77bc5bd7ad 100644 --- a/erpnext/healthcare/onboarding_step/create_patient/create_patient.json +++ b/erpnext/healthcare/onboarding_step/create_patient/create_patient.json @@ -5,10 +5,10 @@ "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, - "is_mandatory": 0, + "is_mandatory": 1, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-19 10:32:27.648902", + "modified": "2020-05-19 12:26:24.023418", "modified_by": "Administrator", "name": "Create Patient", "owner": "Administrator", diff --git a/erpnext/healthcare/onboarding_step/create_practitioner/create_practitioner.json b/erpnext/healthcare/onboarding_step/create_practitioner/create_practitioner.json index 3ad60ed094..614b201a58 100644 --- a/erpnext/healthcare/onboarding_step/create_practitioner/create_practitioner.json +++ b/erpnext/healthcare/onboarding_step/create_practitioner/create_practitioner.json @@ -5,15 +5,15 @@ "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, - "is_mandatory": 0, + "is_mandatory": 1, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-19 10:39:55.728057", + "modified": "2020-05-19 12:27:39.851375", "modified_by": "Administrator", "name": "Create Practitioner", "owner": "Administrator", "reference_document": "Healthcare Practitioner", - "show_full_form": 0, + "show_full_form": 1, "title": "Create Practitioner", "validate_action": 1 } \ No newline at end of file diff --git a/erpnext/healthcare/onboarding_step/create_practitioner_schedule/create_practitioner_schedule.json b/erpnext/healthcare/onboarding_step/create_practitioner_schedule/create_practitioner_schedule.json index 361921710a..65980ef668 100644 --- a/erpnext/healthcare/onboarding_step/create_practitioner_schedule/create_practitioner_schedule.json +++ b/erpnext/healthcare/onboarding_step/create_practitioner_schedule/create_practitioner_schedule.json @@ -5,10 +5,10 @@ "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, - "is_mandatory": 0, + "is_mandatory": 1, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-19 10:41:19.065753", + "modified": "2020-05-19 12:27:09.437825", "modified_by": "Administrator", "name": "Create Practitioner Schedule", "owner": "Administrator", diff --git a/erpnext/healthcare/onboarding_step/explore_healthcare_settings/explore_healthcare_settings.json b/erpnext/healthcare/onboarding_step/explore_healthcare_settings/explore_healthcare_settings.json index 0bdadade6f..2bdab69faa 100644 --- a/erpnext/healthcare/onboarding_step/explore_healthcare_settings/explore_healthcare_settings.json +++ b/erpnext/healthcare/onboarding_step/explore_healthcare_settings/explore_healthcare_settings.json @@ -5,10 +5,10 @@ "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, - "is_mandatory": 0, + "is_mandatory": 1, "is_single": 1, "is_skipped": 0, - "modified": "2020-05-19 11:14:33.044989", + "modified": "2020-05-19 12:26:48.682673", "modified_by": "Administrator", "name": "Explore Healthcare Settings", "owner": "Administrator", diff --git a/erpnext/healthcare/onboarding_step/explore_lab_test_template/explore_lab_test_template.json b/erpnext/healthcare/onboarding_step/explore_lab_test_template/explore_lab_test_template.json deleted file mode 100644 index 179c24ec77..0000000000 --- a/erpnext/healthcare/onboarding_step/explore_lab_test_template/explore_lab_test_template.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "action": "Show Form Tour", - "creation": "2020-05-19 11:44:35.766626", - "docstatus": 0, - "doctype": "Onboarding Step", - "idx": 0, - "is_complete": 0, - "is_mandatory": 0, - "is_single": 0, - "is_skipped": 0, - "modified": "2020-05-19 11:44:35.766626", - "modified_by": "Administrator", - "name": "Explore Lab Test Template", - "owner": "Administrator", - "reference_document": "Lab Test Template", - "show_full_form": 1, - "title": "Explore Lab Test Template", - "validate_action": 1 -} \ No newline at end of file diff --git a/erpnext/healthcare/onboarding_step/setup_schedule_and_employee_for_healthcare_practitioner/setup_schedule_and_employee_for_healthcare_practitioner.json b/erpnext/healthcare/onboarding_step/setup_schedule_and_employee_for_healthcare_practitioner/setup_schedule_and_employee_for_healthcare_practitioner.json index 6b78db38f7..c5af177e34 100644 --- a/erpnext/healthcare/onboarding_step/setup_schedule_and_employee_for_healthcare_practitioner/setup_schedule_and_employee_for_healthcare_practitioner.json +++ b/erpnext/healthcare/onboarding_step/setup_schedule_and_employee_for_healthcare_practitioner/setup_schedule_and_employee_for_healthcare_practitioner.json @@ -6,10 +6,10 @@ "field": "schedule", "idx": 0, "is_complete": 0, - "is_mandatory": 0, + "is_mandatory": 1, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-19 10:43:56.231679", + "modified": "2020-05-19 12:26:42.492734", "modified_by": "Administrator", "name": "Setup Schedule and Employee for Healthcare Practitioner", "owner": "Administrator", From 89dab1bc25c093eb915844d11c4f938cba4ad019 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Tue, 19 May 2020 13:46:06 +0530 Subject: [PATCH 09/10] refactor: open links in new tab in form tour --- .../department_wise_patient_appointments.py | 3 +-- .../clinical_procedure_template.js | 4 ++-- .../doctype/healthcare_settings/healthcare_settings.js | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py index 3cd987b8b4..ae3f340b1d 100644 --- a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py +++ b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py @@ -16,7 +16,6 @@ def get(chart_name = None, chart = None, no_cache = None, filters = None, from_d else: chart = frappe._dict(frappe.parse_json(chart)) - labels, datapoints = [], [] filters = frappe.parse_json(filters) data = frappe.db.get_list('Medical Department', fields=['name']) @@ -33,7 +32,7 @@ def get(chart_name = None, chart = None, no_cache = None, filters = None, from_d department[frappe.scrub(entry)] = frappe.db.count('Patient Appointment', filters=filters) filters.pop('status') - sorted_department_map = sorted(data, key = lambda i: i['total_appointments'],reverse=True) + sorted_department_map = sorted(data, key = lambda i: i['total_appointments'], reverse=True) if len(sorted_department_map) > 10: sorted_department_map = sorted_department_map[:10] diff --git a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js index 3f3d606ef8..16d4540c7c 100644 --- a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js +++ b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js @@ -168,8 +168,8 @@ frappe.tour['Clinical Procedure Template'] = [ }, { fieldname: 'consume_stock', - title: __('Consume Stock'), - description: __('Check this if the Clinical Procedure utilises consumables. Click ') + "here" + __(' to know more') + title: __('Allow Stock Consumption'), + description: __('Check this if the Clinical Procedure utilises consumables. Click ') + "here" + __(' to know more') }, { diff --git a/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js b/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js index 310ba2e510..c266ba8647 100644 --- a/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js +++ b/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js @@ -59,7 +59,7 @@ frappe.tour['Healthcare Settings'] = [ { fieldname: 'healthcare_service_items', title: __('Healthcare Service Items'), - description: __('Set up the Healthcare Service Items for billing. Click ') + "here" + __(' to know more') + description: __('Set up the Healthcare Service Items for billing. Click ') + "here" + __(' to know more') }, { fieldname: 'sb_in_ac', @@ -70,6 +70,6 @@ frappe.tour['Healthcare Settings'] = [ { fieldname: 'out_patient_sms_alerts', title: __('Out Patient SMS alerts'), - description: __('You can set up Out Patient SMS alerts here. Click ') + "here" + __(' to know more') + description: __('You can set up Out Patient SMS alerts here. Click ') + "here" + __(' to know more') } ]; From df1cd0ef7084ac44d42be0bb6fd8d7b6f2d994f3 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Tue, 19 May 2020 15:38:46 +0530 Subject: [PATCH 10/10] fix: update default dashboard in Healthcare Desk Page --- .../department_wise_patient_appointments.py | 4 +--- erpnext/healthcare/desk_page/healthcare/healthcare.json | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py index ae3f340b1d..062da6e465 100644 --- a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py +++ b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py @@ -2,10 +2,8 @@ # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals -import frappe, json -from frappe import _ +import frappe from frappe.utils.dashboard import cache_source -from erpnext.stock.utils import get_stock_value_from_bin @frappe.whitelist() @cache_source diff --git a/erpnext/healthcare/desk_page/healthcare/healthcare.json b/erpnext/healthcare/desk_page/healthcare/healthcare.json index 81ba61b682..14ad5e450a 100644 --- a/erpnext/healthcare/desk_page/healthcare/healthcare.json +++ b/erpnext/healthcare/desk_page/healthcare/healthcare.json @@ -63,7 +63,7 @@ "idx": 0, "is_standard": 1, "label": "Healthcare", - "modified": "2020-05-19 11:47:42.118464", + "modified": "2020-05-19 14:05:10.520457", "modified_by": "Administrator", "module": "Healthcare", "name": "Healthcare",