fix: Healthcare Domain Issues (#21112)

* fix (Lab Test): None TypeError in Patient Medical Record

* fix: Lab Test Template data import failing in Lab Test Item creation

* fix: disabled Procedure Template shown as enabled in List View

* fix: change item_code from Link to Data to avoid item not found error

* fix: disabled patient shown as enabled

* fix: disabled practitioner schedule shown as enabled in list view

* fix: appointment reminders not working

* fix: Batch not getting fetched in Clinical Procedure Item
This commit is contained in:
Rucha Mahabal
2020-03-31 10:52:51 +05:30
committed by GitHub
parent d13e7d00b0
commit b80213d65d
16 changed files with 451 additions and 1986 deletions

View File

@@ -6,19 +6,15 @@ frappe.ui.form.on('Clinical Procedure', {
frm.set_query('batch_no', 'items', function(doc, cdt, cdn) { frm.set_query('batch_no', 'items', function(doc, cdt, cdn) {
var item = locals[cdt][cdn]; var item = locals[cdt][cdn];
if (!item.item_code) { if (!item.item_code) {
frappe.throw(__("Please enter Item Code to get Batch Number")); frappe.throw(__('Please enter Item Code to get Batch Number'));
} else { } else {
let filters = {'item_code': item.item_code};
if (frm.doc.status == 'In Progress') { if (frm.doc.status == 'In Progress') {
var filters = { filters['posting_date'] = frm.doc.start_date || frappe.datetime.nowdate();
'item_code': item.item_code, if (frm.doc.warehouse) filters['warehouse'] = frm.doc.warehouse;
'posting_date': frm.doc.start_date || frappe.datetime.nowdate()
};
if(frm.doc.warehouse) filters["warehouse"] = frm.doc.warehouse;
} else {
filters = {
'item_code': item.item_code
};
} }
return { return {
query : "erpnext.controllers.queries.get_batch_no", query : "erpnext.controllers.queries.get_batch_no",
filters: filters filters: filters
@@ -29,7 +25,7 @@ frappe.ui.form.on('Clinical Procedure', {
refresh: function(frm) { refresh: function(frm) {
frm.set_query("patient", function () { frm.set_query("patient", function () {
return { return {
filters: {"disabled": 0} filters: {"status": "Active"}
}; };
}); });
frm.set_query("appointment", function () { frm.set_query("appointment", function () {

View File

@@ -32,16 +32,6 @@ frappe.ui.form.on('Clinical Procedure Template', {
cur_frm.add_custom_button(__('Change Item Code'), function() { cur_frm.add_custom_button(__('Change Item Code'), function() {
change_template_code(frm.doc); change_template_code(frm.doc);
}); });
if(frm.doc.disabled == 1){
cur_frm.add_custom_button(__('Enable Template'), function() {
enable_template(frm.doc);
} );
}
else{
cur_frm.add_custom_button(__('Disable Template'), function() {
disable_template(frm.doc);
} );
}
} }
} }
}); });
@@ -52,27 +42,6 @@ var mark_change_in_item = function(frm) {
} }
}; };
var disable_template = function(doc){
frappe.call({
method: "erpnext.healthcare.doctype.clinical_procedure_template.clinical_procedure_template.disable_enable_template",
args: {status: 1, name: doc.name, item_code: doc.item_code, is_billable: doc.is_billable},
callback: function(){
cur_frm.reload_doc();
}
});
};
var enable_template = function(doc){
frappe.call({
method: "erpnext.healthcare.doctype.clinical_procedure_template.clinical_procedure_template.disable_enable_template",
args: {status: 0, name: doc.name, item_code: doc.item_code, is_billable: doc.is_billable},
callback: function(){
cur_frm.reload_doc();
}
});
};
var change_template_code = function(doc){ var change_template_code = function(doc){
var d = new frappe.ui.Dialog({ var d = new frappe.ui.Dialog({
title:__("Change Template Code"), title:__("Change Template Code"),

View File

@@ -1,807 +1,230 @@
{ {
"allow_copy": 0, "actions": [],
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1, "allow_import": 1,
"allow_rename": 1, "allow_rename": 1,
"autoname": "field:template", "autoname": "field:template",
"beta": 1, "beta": 1,
"creation": "2017-10-05 14:59:55.438359", "creation": "2017-10-05 14:59:55.438359",
"custom": 0,
"description": "Procedure Template", "description": "Procedure Template",
"docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "Setup", "document_type": "Setup",
"editable_grid": 1, "editable_grid": 1,
"engine": "InnoDB", "engine": "InnoDB",
"field_order": [
"template",
"item",
"item_code",
"item_group",
"description",
"column_break_5",
"disabled",
"is_billable",
"rate",
"medical_department",
"consumables",
"consume_stock",
"items",
"sample_collection",
"sample",
"sample_uom",
"sample_qty",
"column_break_21",
"sample_details",
"change_in_item"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "template", "fieldname": "template",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1, "in_global_search": 1,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0,
"label": "Template Name", "label": "Template Name",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 1 "unique": 1
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "item_code", "fieldname": "item_code",
"fieldtype": "Link", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Code", "label": "Item Code",
"length": 0,
"no_copy": 1,
"options": "Item", "options": "Item",
"permlevel": 0, "reqd": 1
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "item_group", "fieldname": "item_group",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1, "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 1, "in_standard_filter": 1,
"label": "Item Group", "label": "Item Group",
"length": 0,
"no_copy": 0,
"options": "Item Group", "options": "Item Group",
"permlevel": 0, "reqd": 1
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "medical_department", "fieldname": "medical_department",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Medical Department", "label": "Medical Department",
"length": 0, "options": "Medical Department"
"no_copy": 0,
"options": "Medical Department",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_5", "fieldname": "column_break_5",
"fieldtype": "Column Break", "fieldtype": "Column Break"
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "is_billable", "fieldname": "is_billable",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "label": "Is Billable"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Billable",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "is_billable", "depends_on": "is_billable",
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate", "label": "Rate",
"length": 0, "mandatory_depends_on": "is_billable"
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 1, "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description", "label": "Description",
"length": 0,
"no_copy": 1, "no_copy": 1,
"permlevel": 0, "reqd": 1
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "section_break_9",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "consume_stock", "fieldname": "consume_stock",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allow Stock Consumption", "label": "Allow Stock Consumption",
"length": 0, "search_index": 1
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.consume_stock == 1",
"fieldname": "consumables", "fieldname": "consumables",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "label": "Consumables"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Consumables",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0, "depends_on": "eval:doc.consume_stock == 1",
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "items", "fieldname": "items",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 1, "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items", "label": "Items",
"length": 0, "options": "Clinical Procedure Item"
"no_copy": 0,
"options": "Clinical Procedure Item",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1, "collapsible": 1,
"columns": 0,
"depends_on": "",
"fieldname": "sample_collection", "fieldname": "sample_collection",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "label": "Sample Collection"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sample Collection",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "sample", "fieldname": "sample",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1, "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sample", "label": "Sample",
"length": 0, "options": "Lab Test Sample"
"no_copy": 0,
"options": "Lab Test Sample",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_from": "sample.sample_uom", "fetch_from": "sample.sample_uom",
"fieldname": "sample_uom", "fieldname": "sample_uom",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "label": "UOM"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "sample_qty", "fieldname": "sample_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "label": "Quantity"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quantity",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_21", "fieldname": "column_break_21",
"fieldtype": "Column Break", "fieldtype": "Column Break"
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "sample_details", "fieldname": "sample_details",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 1, "ignore_xss_filter": 1,
"in_filter": 0, "label": "Collection Details"
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Collection Details",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "change_in_item", "fieldname": "change_in_item",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 1, "hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Change In Item", "label": "Change In Item",
"length": 0,
"no_copy": 1, "no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1, "print_hide": 1,
"print_hide_if_no_value": 0, "report_hide": 1
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "disabled", "fieldname": "disabled",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 1, "label": "Disabled"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disabled",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "item", "fieldname": "item",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item", "label": "Item",
"length": 0,
"no_copy": 1, "no_copy": 1,
"options": "Item", "options": "Item",
"permlevel": 0, "read_only": 1
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
} }
], ],
"has_web_view": 0, "links": [],
"hide_heading": 0, "modified": "2020-02-27 16:32:55.780893",
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-02-12 11:37:18.713344",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Healthcare", "module": "Healthcare",
"name": "Clinical Procedure Template", "name": "Clinical Procedure Template",
"name_case": "",
"owner": "Administrator", "owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 0,
"cancel": 0,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "System Manager", "role": "System Manager",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 0,
"cancel": 0,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Healthcare Administrator", "role": "Healthcare Administrator",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Nursing User", "role": "Nursing User",
"set_user_permissions": 0, "share": 1
"share": 1,
"submit": 0,
"write": 0
}, },
{ {
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Physician", "role": "Physician",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0,
"write": 1 "write": 1
} }
], ],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"restrict_to_domain": "Healthcare", "restrict_to_domain": "Healthcare",
"search_fields": "template", "search_fields": "template",
"show_name_in_global_search": 0,
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",
"title_field": "template", "title_field": "template",
"track_changes": 1, "track_changes": 1,
"track_seen": 1, "track_seen": 1
"track_views": 0
} }

View File

@@ -9,26 +9,36 @@ from frappe.model.document import Document
from frappe.utils import nowdate from frappe.utils import nowdate
class ClinicalProcedureTemplate(Document): class ClinicalProcedureTemplate(Document):
def on_update(self): def validate(self):
#Item and Price List update --> if (change_in_item) self.enable_disable_item()
if(self.change_in_item and self.is_billable == 1 and self.item):
updating_item(self)
if(self.rate != 0.0):
updating_rate(self)
elif(self.is_billable == 0 and self.item):
frappe.db.set_value("Item",self.item,"disabled",1)
frappe.db.set_value(self.doctype,self.name,"change_in_item",0)
self.reload()
def after_insert(self): def after_insert(self):
create_item_from_template(self) create_item_from_template(self)
def on_update(self):
#Item and Price List update --> if (change_in_item)
if self.change_in_item and self.is_billable == 1 and self.item:
updating_item(self)
if self.rate != 0.0:
updating_rate(self)
elif self.is_billable == 0 and self.item:
frappe.db.set_value('Item',self.item,'disabled',1)
frappe.db.set_value(self.doctype,self.name,'change_in_item',0)
self.reload()
def enable_disable_item(self):
if self.is_billable:
if self.disabled:
frappe.db.set_value('Item', self.item, 'disabled', 1)
else:
frappe.db.set_value('Item', self.item, 'disabled', 0)
#Call before delete the template #Call before delete the template
def on_trash(self): def on_trash(self):
if(self.item): if(self.item):
try: try:
frappe.delete_doc("Item",self.item) frappe.delete_doc('Item',self.item)
except Exception: except Exception:
frappe.throw(_("""Not permitted. Please disable the Procedure Template""")) frappe.throw(_("""Not permitted. Please disable the Procedure Template"""))
@@ -40,7 +50,7 @@ class ClinicalProcedureTemplate(Document):
and (end_of_life is null or end_of_life='0000-00-00' or end_of_life > %s)""", and (end_of_life is null or end_of_life='0000-00-00' or end_of_life > %s)""",
(args.get('item_code'), nowdate()), as_dict = 1) (args.get('item_code'), nowdate()), as_dict = 1)
if not item: if not item:
frappe.throw(_("Item {0} is not active or end of life has been reached").format(args.get('item_code'))) frappe.throw(_('Item {0} is not active or end of life has been reached').format(args.get('item_code')))
item = item[0] item = item[0]
@@ -63,46 +73,47 @@ def updating_rate(self):
item_code=%s""",(self.template, self.rate, self.item)) item_code=%s""",(self.template, self.rate, self.item))
def create_item_from_template(doc): def create_item_from_template(doc):
if(doc.is_billable == 1):
disabled = 0
else:
disabled = 1 disabled = 1
if doc.is_billable:
disabled = 0
#insert item #insert item
item = frappe.get_doc({ item = frappe.get_doc({
"doctype": "Item", 'doctype': 'Item',
"item_code": doc.template, 'item_code': doc.template,
"item_name":doc.template, 'item_name':doc.template,
"item_group": doc.item_group, 'item_group': doc.item_group,
"description":doc.description, 'description':doc.description,
"is_sales_item": 1, 'is_sales_item': 1,
"is_service_item": 1, 'is_service_item': 1,
"is_purchase_item": 0, 'is_purchase_item': 0,
"is_stock_item": 0, 'is_stock_item': 0,
"show_in_website": 0, 'show_in_website': 0,
"is_pro_applicable": 0, 'is_pro_applicable': 0,
"disabled": disabled, 'disabled': disabled,
"stock_uom": "Unit" 'stock_uom': 'Unit'
}).insert(ignore_permissions=True) }).insert(ignore_permissions=True)
#insert item price #insert item price
#get item price list to insert item price #get item price list to insert item price
if(doc.rate != 0.0): if(doc.rate != 0.0):
price_list_name = frappe.db.get_value("Price List", {"selling": 1}) price_list_name = frappe.db.get_value('Price List', {'selling': 1})
if(doc.rate): if(doc.rate):
make_item_price(item.name, price_list_name, doc.rate) make_item_price(item.name, price_list_name, doc.rate)
else: else:
make_item_price(item.name, price_list_name, 0.0) make_item_price(item.name, price_list_name, 0.0)
#Set item to the template #Set item to the template
frappe.db.set_value("Clinical Procedure Template", doc.name, "item", item.name) frappe.db.set_value('Clinical Procedure Template', doc.name, 'item', item.name)
doc.reload() #refresh the doc after insert. doc.reload() #refresh the doc after insert.
def make_item_price(item, price_list_name, item_price): def make_item_price(item, price_list_name, item_price):
frappe.get_doc({ frappe.get_doc({
"doctype": "Item Price", 'doctype': 'Item Price',
"price_list": price_list_name, 'price_list': price_list_name,
"item_code": item, 'item_code': item,
"price_list_rate": item_price 'price_list_rate': item_price
}).insert(ignore_permissions=True) }).insert(ignore_permissions=True)
@frappe.whitelist() @frappe.whitelist()
@@ -111,20 +122,11 @@ def change_item_code_from_template(item_code, doc):
doc = frappe._dict(args) doc = frappe._dict(args)
if(frappe.db.exists({ if(frappe.db.exists({
"doctype": "Item", 'doctype': 'Item',
"item_code": item_code})): 'item_code': item_code})):
frappe.throw(_("Code {0} already exist").format(item_code)) frappe.throw(_('Code {0} already exist').format(item_code))
else: else:
frappe.rename_doc("Item", doc.item_code, item_code, ignore_permissions = True) frappe.rename_doc('Item', doc.item_code, item_code, ignore_permissions=True)
frappe.db.set_value("Clinical Procedure Template", doc.name, "item_code", item_code) frappe.db.set_value('Clinical Procedure Template', doc.name, 'item_code', item_code)
return return
@frappe.whitelist()
def disable_enable_template(status, name, item_code):
frappe.db.set_value("Clinical Procedure Template", name, "disabled", status)
if (frappe.db.exists({ #set Item's disabled field to status
"doctype": "Item",
"item_code": item_code})):
frappe.db.set_value("Item", item_code, "disabled", status)
return

View File

@@ -78,6 +78,7 @@
}, },
{ {
"default": "0", "default": "0",
"description": "Checking this will create new Patients with a Disabled status by default and will only be enabled after invoicing the Registration Fee.",
"fieldname": "collect_registration_fee", "fieldname": "collect_registration_fee",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Collect Fee for Patient Registration" "label": "Collect Fee for Patient Registration"

View File

@@ -290,10 +290,14 @@ def insert_lab_test_to_medical_record(doc):
comment = "" comment = ""
if item.lab_test_comment: if item.lab_test_comment:
comment = str(item.lab_test_comment) comment = str(item.lab_test_comment)
event = "" table_row = item.lab_test_name
if item.lab_test_event: if item.lab_test_event:
event = item.lab_test_event table_row += " " + item.lab_test_event
table_row = item.lab_test_name +" "+ event +" "+ item.result_value
if item.result_value:
table_row += " " + item.result_value
if item.normal_range: if item.normal_range:
table_row += " normal_range("+item.normal_range+")" table_row += " normal_range("+item.normal_range+")"
table_row += " " + comment table_row += " " + comment

View File

@@ -5,6 +5,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe, json import frappe, json
from frappe.model.document import Document from frappe.model.document import Document
from frappe.model.rename_doc import rename_doc
from frappe import _ from frappe import _
class LabTestTemplate(Document): class LabTestTemplate(Document):
@@ -98,13 +99,11 @@ def create_item_from_template(doc):
# get item price list to insert item price # get item price list to insert item price
if doc.lab_test_rate != 0.0: if doc.lab_test_rate != 0.0:
price_list_name = frappe.db.get_value("Price List", {"selling": 1}) price_list_name = frappe.db.get_value("Price List", {"selling": 1})
if(doc.lab_test_rate): if doc.lab_test_rate:
make_item_price(item.name, price_list_name, doc.lab_test_rate) make_item_price(item.name, price_list_name, doc.lab_test_rate)
item.standard_rate = doc.lab_test_rate
else: else:
make_item_price(item.name, price_list_name, 0.0) make_item_price(item.name, price_list_name, 0.0)
item.standard_rate = 0.0
item.save(ignore_permissions = True)
# Set item in the template # Set item in the template
frappe.db.set_value("Lab Test Template", doc.name, "item", item.name) frappe.db.set_value("Lab Test Template", doc.name, "item", item.name)

View File

@@ -15,7 +15,7 @@ frappe.ui.form.on('Patient', {
} else { } else {
erpnext.toggle_naming_series(); erpnext.toggle_naming_series();
} }
if (frappe.defaults.get_default("collect_registration_fee") && frm.doc.disabled == 1) { if (frappe.defaults.get_default("collect_registration_fee") && frm.doc.status == 'Disabled') {
frm.add_custom_button(__('Invoice Patient Registration'), function () { frm.add_custom_button(__('Invoice Patient Registration'), function () {
btn_invoice_registration(frm); btn_invoice_registration(frm);
}); });

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"allow_copy": 1, "allow_copy": 1,
"allow_import": 1, "allow_import": 1,
"allow_rename": 1, "allow_rename": 1,
@@ -19,15 +20,14 @@
"blood_group", "blood_group",
"dob", "dob",
"age_html", "age_html",
"status",
"image", "image",
"column_break_14", "column_break_14",
"status",
"customer", "customer",
"report_preference", "report_preference",
"mobile", "mobile",
"email", "email",
"phone", "phone",
"disabled",
"sb_relation", "sb_relation",
"patient_relation", "patient_relation",
"allergy_medical_and_surgical_history", "allergy_medical_and_surgical_history",
@@ -125,15 +125,15 @@
"report_hide": 1 "report_hide": 1
}, },
{ {
"default": "Active",
"fieldname": "status", "fieldname": "status",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 1, "in_filter": 1,
"in_list_view": 1,
"label": "Status", "label": "Status",
"no_copy": 1, "no_copy": 1,
"options": "Active\nDormant\nOpen", "options": "Active\nDisabled",
"print_hide": 1, "print_hide": 1,
"report_hide": 1 "read_only": 1
}, },
{ {
"fieldname": "image", "fieldname": "image",
@@ -183,19 +183,8 @@
"fieldname": "phone", "fieldname": "phone",
"fieldtype": "Data", "fieldtype": "Data",
"in_filter": 1, "in_filter": 1,
"in_list_view": 1,
"label": "Phone" "label": "Phone"
}, },
{
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"hidden": 1,
"label": "Disabled",
"no_copy": 1,
"print_hide": 1,
"report_hide": 1
},
{ {
"collapsible": 1, "collapsible": 1,
"fieldname": "sb_relation", "fieldname": "sb_relation",
@@ -346,8 +335,9 @@
], ],
"icon": "fa fa-user", "icon": "fa fa-user",
"image_field": "image", "image_field": "image",
"links": [],
"max_attachments": 50, "max_attachments": 50,
"modified": "2019-09-25 23:30:49.905893", "modified": "2020-01-29 11:22:40.698125",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Healthcare", "module": "Healthcare",
"name": "Patient", "name": "Patient",

View File

@@ -15,8 +15,8 @@ class Patient(Document):
def after_insert(self): def after_insert(self):
if(frappe.db.get_value("Healthcare Settings", None, "manage_customer") == '1' and not self.customer): if(frappe.db.get_value("Healthcare Settings", None, "manage_customer") == '1' and not self.customer):
create_customer(self) create_customer(self)
if(frappe.db.get_value("Healthcare Settings", None, "collect_registration_fee") == '1'): if frappe.db.get_single_value('Healthcare Settings', 'collect_registration_fee'):
frappe.db.set_value("Patient", self.name, "disabled", 1) frappe.db.set_value('Patient', self.name, 'status', 'Disabled')
else: else:
send_registration_sms(self) send_registration_sms(self)
self.reload() self.reload()
@@ -62,7 +62,7 @@ class Patient(Document):
return age_str return age_str
def invoice_patient_registration(self): def invoice_patient_registration(self):
frappe.db.set_value("Patient", self.name, "disabled", 0) frappe.db.set_value("Patient", self.name, "status", "Active")
send_registration_sms(self) send_registration_sms(self)
if(flt(frappe.get_value("Healthcare Settings", None, "registration_fee"))>0): if(flt(frappe.get_value("Healthcare Settings", None, "registration_fee"))>0):
company = frappe.defaults.get_user_default('company') company = frappe.defaults.get_user_default('company')

View File

@@ -11,7 +11,7 @@ frappe.ui.form.on('Patient Appointment', {
refresh: function(frm) { refresh: function(frm) {
frm.set_query("patient", function () { frm.set_query("patient", function () {
return { return {
filters: {"disabled": 0} filters: {"status": "Active"}
}; };
}); });
frm.set_query("practitioner", function() { frm.set_query("practitioner", function() {
@@ -293,7 +293,14 @@ var get_procedure_prescribed = function(frm){
method:"erpnext.healthcare.doctype.patient_appointment.patient_appointment.get_procedure_prescribed", method:"erpnext.healthcare.doctype.patient_appointment.patient_appointment.get_procedure_prescribed",
args: {patient: frm.doc.patient}, args: {patient: frm.doc.patient},
callback: function(r) { callback: function(r) {
if (r.message && r.message.length) {
show_procedure_templates(frm, r.message); show_procedure_templates(frm, r.message);
} else {
frappe.msgprint({
title: __('Not Found'),
message: __('No Prescribed Procedures found for the selected Patient')
});
}
} }
}); });
} }

View File

@@ -25,6 +25,7 @@ class PatientAppointment(Document):
self.reload() self.reload()
def validate(self): def validate(self):
self.set_appointment_datetime()
end_time = datetime.datetime.combine(getdate(self.appointment_date), get_time(self.appointment_time)) + datetime.timedelta(minutes=float(self.duration)) end_time = datetime.datetime.combine(getdate(self.appointment_date), get_time(self.appointment_time)) + datetime.timedelta(minutes=float(self.duration))
overlaps = frappe.db.sql(""" overlaps = frappe.db.sql("""
select select
@@ -44,6 +45,9 @@ class PatientAppointment(Document):
frappe.throw(_("""Appointment overlaps with {0}.<br> {1} has appointment scheduled frappe.throw(_("""Appointment overlaps with {0}.<br> {1} has appointment scheduled
with {2} at {3} having {4} minute(s) duration.""").format(overlaps[0][0], overlaps[0][1], overlaps[0][2], overlaps[0][3], overlaps[0][4])) with {2} at {3} having {4} minute(s) duration.""").format(overlaps[0][0], overlaps[0][1], overlaps[0][2], overlaps[0][3], overlaps[0][4]))
def set_appointment_datetime(self):
self.appointment_datetime = "%s %s" % (self.appointment_date, self.appointment_time or "00:00:00")
def after_insert(self): def after_insert(self):
if self.procedure_prescription: if self.procedure_prescription:
frappe.db.set_value("Procedure Prescription", self.procedure_prescription, "appointment_booked", True) frappe.db.set_value("Procedure Prescription", self.procedure_prescription, "appointment_booked", True)
@@ -319,27 +323,29 @@ def create_encounter(appointment):
return encounter.as_dict() return encounter.as_dict()
def remind_appointment(): def set_appointment_reminder():
if frappe.db.get_value("Healthcare Settings", None, "app_rem") == '1': if frappe.db.get_single_value("Healthcare Settings", "app_rem"):
rem_before = datetime.datetime.strptime(frappe.get_value("Healthcare Settings", None, "rem_before"), "%H:%M:%S") remind_before = datetime.datetime.strptime(frappe.db.get_single_value("Healthcare Settings", "rem_before"), '%H:%M:%S')
rem_dt = datetime.datetime.now() + datetime.timedelta(
hours=rem_before.hour, minutes=rem_before.minute, seconds=rem_before.second)
appointment_list = frappe.db.sql( reminder_dt = datetime.datetime.now() + datetime.timedelta(
"select name from `tabPatient Appointment` where start_dt between %s and %s and reminded = 0 ", hours=remind_before.hour, minutes=remind_before.minute, seconds=remind_before.second)
(datetime.datetime.now(), rem_dt)
)
for i in range(0, len(appointment_list)): appointment_list = frappe.db.get_all("Patient Appointment", {
doc = frappe.get_doc("Patient Appointment", appointment_list[i][0]) "appointment_datetime": ["between", (datetime.datetime.now(), reminder_dt)],
message = frappe.db.get_value("Healthcare Settings", None, "app_rem_msg") "reminded": 0,
"status": ["!=", "Cancelled"]
})
for appointment in appointment_list:
doc = frappe.get_doc('Patient Appointment', appointment.name)
message = frappe.db.get_single_value("Healthcare Settings", "app_rem_msg")
send_message(doc, message) send_message(doc, message)
frappe.db.set_value("Patient Appointment", doc.name, "reminded",1) frappe.db.set_value('Patient Appointment', doc.name, 'reminded', 1)
def send_message(doc, message): def send_message(doc, message):
patient = frappe.get_doc("Patient", doc.patient) patient_mobile = frappe.db.get_value("Patient", doc.patient, "mobile")
if patient.mobile: if patient_mobile:
context = {"doc": doc, "alert": doc, "comments": None} context = {"doc": doc, "alert": doc, "comments": None}
if doc.get("_comments"): if doc.get("_comments"):
context["comments"] = json.loads(doc.get("_comments")) context["comments"] = json.loads(doc.get("_comments"))

View File

@@ -62,7 +62,7 @@ frappe.ui.form.on('Patient Encounter', {
frm.set_query("patient", function () { frm.set_query("patient", function () {
return { return {
filters: {"disabled": 0} filters: {"status": "Active"}
}; };
}); });
frm.set_query("drug_code", "drug_prescription", function() { frm.set_query("drug_code", "drug_prescription", function() {

View File

@@ -1,160 +1,71 @@
{ {
"allow_copy": 0, "actions": [],
"allow_guest_to_view": 0,
"allow_import": 1, "allow_import": 1,
"allow_rename": 1, "allow_rename": 1,
"autoname": "field:schedule_name", "autoname": "field:schedule_name",
"beta": 1, "beta": 1,
"creation": "2017-05-03 17:28:03.926787", "creation": "2017-05-03 17:28:03.926787",
"custom": 0,
"docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "",
"editable_grid": 1, "editable_grid": 1,
"engine": "InnoDB", "engine": "InnoDB",
"field_order": [
"disabled",
"schedule_details_section",
"schedule_name",
"time_slots"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "schedule_name", "fieldname": "schedule_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 1, "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0,
"label": "Schedule Name", "label": "Schedule Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0, "unique": 1
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "time_slots", "fieldname": "time_slots",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Time Slots", "label": "Time Slots",
"length": 0, "options": "Healthcare Schedule Time Slot"
"no_copy": 0,
"options": "Healthcare Schedule Time Slot",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "disabled", "fieldname": "disabled",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disabled", "label": "Disabled",
"length": 0, "print_hide": 1
"no_copy": 0, },
"permlevel": 0, {
"precision": "", "fieldname": "schedule_details_section",
"print_hide": 1, "fieldtype": "Section Break",
"print_hide_if_no_value": 0, "label": "Schedule Details"
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
} }
], ],
"has_web_view": 0, "links": [],
"hide_heading": 0, "modified": "2020-01-31 12:21:45.975488",
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-06-29 14:55:34.795995",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Healthcare", "module": "Healthcare",
"name": "Practitioner Schedule", "name": "Practitioner Schedule",
"name_case": "",
"owner": "rmehta@gmail.com", "owner": "rmehta@gmail.com",
"permissions": [ "permissions": [
{ {
"amend": 0,
"cancel": 0,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Healthcare Administrator", "role": "Healthcare Administrator",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0,
"write": 1 "write": 1
} }
], ],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"restrict_to_domain": "Healthcare", "restrict_to_domain": "Healthcare",
"show_name_in_global_search": 1, "show_name_in_global_search": 1,
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",
"track_changes": 1, "track_changes": 1
"track_seen": 0
} }

View File

@@ -268,7 +268,9 @@ doc_events = {
scheduler_events = { scheduler_events = {
"all": [ "all": [
"erpnext.projects.doctype.project.project.project_status_update_reminder" "erpnext.projects.doctype.project.project.project_status_update_reminder",
"erpnext.healthcare_healthcare.doctype.patient_appointment.patient_appointment.send_appointment_reminder"
], ],
"hourly": [ "hourly": [
'erpnext.hr.doctype.daily_work_summary_group.daily_work_summary_group.trigger_emails', 'erpnext.hr.doctype.daily_work_summary_group.daily_work_summary_group.trigger_emails',