mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
Remove Company from Patient - Patches Added (#11716)
* Remove Company from Patient - Patches Added * Update patient DOB field label to Date of birth * Patient marital status default null * Update patient.py
This commit is contained in:
@@ -185,7 +185,7 @@
|
|||||||
"in_global_search": 0,
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "DOB",
|
"label": "Date of birth",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -353,37 +353,6 @@
|
|||||||
"set_only_once": 1,
|
"set_only_once": 1,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "company",
|
|
||||||
"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": "Company",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Company",
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
@@ -884,7 +853,7 @@
|
|||||||
"label": "Marital Status",
|
"label": "Marital Status",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Single\nMarried\nDivorced\nWidow",
|
"options": "\nSingle\nMarried\nDivorced\nWidow",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -1274,7 +1243,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 50,
|
"max_attachments": 50,
|
||||||
"modified": "2017-11-22 14:21:56.653361",
|
"modified": "2017-11-24 12:39:33.061005",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Healthcare",
|
"module": "Healthcare",
|
||||||
"name": "Patient",
|
"name": "Patient",
|
||||||
|
|||||||
@@ -69,7 +69,10 @@ class Patient(Document):
|
|||||||
frappe.db.set_value("Patient", self.name, "disabled", 0)
|
frappe.db.set_value("Patient", self.name, "disabled", 0)
|
||||||
send_registration_sms(self)
|
send_registration_sms(self)
|
||||||
if(frappe.get_value("Healthcare Settings", None, "registration_fee")>0):
|
if(frappe.get_value("Healthcare Settings", None, "registration_fee")>0):
|
||||||
sales_invoice = make_invoice(self.name, self.company)
|
company = frappe.defaults.get_user_default('company')
|
||||||
|
if not company:
|
||||||
|
company = frappe.db.get_value("Global Defaults", None, "default_company")
|
||||||
|
sales_invoice = make_invoice(self.name, company)
|
||||||
sales_invoice.save(ignore_permissions=True)
|
sales_invoice.save(ignore_permissions=True)
|
||||||
return {'invoice': sales_invoice.name}
|
return {'invoice': sales_invoice.name}
|
||||||
|
|
||||||
@@ -110,7 +113,7 @@ def make_invoice(patient, company):
|
|||||||
return sales_invoice
|
return sales_invoice
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_patient_detail(patient, company=None):
|
def get_patient_detail(patient):
|
||||||
patient_dict = frappe.db.sql("""select * from tabPatient where name=%s""", (patient), as_dict=1)
|
patient_dict = frappe.db.sql("""select * from tabPatient where name=%s""", (patient), as_dict=1)
|
||||||
if not patient_dict:
|
if not patient_dict:
|
||||||
frappe.throw("Patient not found")
|
frappe.throw("Patient not found")
|
||||||
|
|||||||
@@ -462,4 +462,5 @@ erpnext.patches.v9_0.update_employee_loan_details
|
|||||||
erpnext.patches.v9_2.delete_healthcare_domain_default_items
|
erpnext.patches.v9_2.delete_healthcare_domain_default_items
|
||||||
erpnext.patches.v9_2.rename_translated_domains_in_en
|
erpnext.patches.v9_2.rename_translated_domains_in_en
|
||||||
erpnext.patches.v9_2.repost_reserved_qty_for_production
|
erpnext.patches.v9_2.repost_reserved_qty_for_production
|
||||||
|
erpnext.patches.v9_2.remove_company_from_patient
|
||||||
erpnext.patches.v9_2.set_item_name_in_production_order
|
erpnext.patches.v9_2.set_item_name_in_production_order
|
||||||
5
erpnext/patches/v9_2/remove_company_from_patient.py
Normal file
5
erpnext/patches/v9_2/remove_company_from_patient.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
if 'company' in frappe.db.get_table_columns("Patient"):
|
||||||
|
frappe.db.sql("alter table `tabPatient` drop column company")
|
||||||
Reference in New Issue
Block a user