feat: Default Dashboard for Healthcare Workspace (#21414)
* feat: Default Dashboard for Healthcare Workspace
* fix: patch
* Update add_healthcare_dashboard.py
* fix: failing patch test
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
diff --git a/erpnext/healthcare/desk_page/healthcare/healthcare.json b/erpnext/healthcare/desk_page/healthcare/healthcare.json
index 24c6d6f..5cf09b3 100644
--- a/erpnext/healthcare/desk_page/healthcare/healthcare.json
+++ b/erpnext/healthcare/desk_page/healthcare/healthcare.json
@@ -47,7 +47,12 @@
}
],
"category": "Domains",
- "charts": [],
+ "charts": [
+ {
+ "chart_name": "Patient Appointments",
+ "label": "Patient Appointments"
+ }
+ ],
"charts_label": "",
"creation": "2020-03-02 17:23:17.919682",
"developer_mode_only": 0,
@@ -58,7 +63,7 @@
"idx": 0,
"is_standard": 1,
"label": "Healthcare",
- "modified": "2020-04-20 11:42:43.889576",
+ "modified": "2020-04-25 22:31:36.576444",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Healthcare",
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index c964292..ba17b67 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -630,7 +630,7 @@
execute:frappe.reload_doc('desk', 'doctype', 'dashboard_chart_source')
execute:frappe.reload_doc('desk', 'doctype', 'dashboard_chart')
execute:frappe.reload_doc('desk', 'doctype', 'dashboard_chart_field')
-erpnext.patches.v12_0.add_default_dashboards
+erpnext.patches.v12_0.add_default_dashboards # 2020-04-05
erpnext.patches.v12_0.remove_bank_remittance_custom_fields
erpnext.patches.v12_0.generate_leave_ledger_entries
execute:frappe.delete_doc_if_exists("Report", "Loan Repayment")
diff --git a/erpnext/patches/v12_0/add_default_dashboards.py b/erpnext/patches/v12_0/add_default_dashboards.py
index 0c3f2f8..24661cc 100644
--- a/erpnext/patches/v12_0/add_default_dashboards.py
+++ b/erpnext/patches/v12_0/add_default_dashboards.py
@@ -6,4 +6,5 @@
def execute():
frappe.reload_doc("desk", "doctype", "number_card_link")
+ frappe.reload_doc("desk", "doctype", "patient_appointment")
add_dashboards()
diff --git a/erpnext/setup/setup_wizard/data/dashboard_charts.py b/erpnext/setup/setup_wizard/data/dashboard_charts.py
index bb8c131..b182dfc 100644
--- a/erpnext/setup/setup_wizard/data/dashboard_charts.py
+++ b/erpnext/setup/setup_wizard/data/dashboard_charts.py
@@ -29,7 +29,8 @@
{ "chart": "Incoming Bills (Purchase Invoice)" },
{ "chart": "Bank Balance" },
{ "chart": "Income" },
- { "chart": "Expenses" }
+ { "chart": "Expenses" },
+ { "chart": "Patient Appointments" }
]
}
],
@@ -107,6 +108,21 @@
"document_type": "Sales Invoice",
"type": "Bar",
"width": "Half"
+ },
+ {
+ "doctype": "Dashboard Chart",
+ "time_interval": "Daily",
+ "chart_name": "Patient Appointments",
+ "timespan": "Last Month",
+ "color": "#77ecca",
+ "filters_json": json.dumps({}),
+ "chart_type": "Count",
+ "timeseries": 1,
+ "based_on": "appointment_datetime",
+ "owner": "Administrator",
+ "document_type": "Patient Appointment",
+ "type": "Line",
+ "width": "Half"
}
]
}