fix: msgprint for sample collection doc created on Lab Test creation
diff --git a/erpnext/healthcare/doctype/lab_test/lab_test.py b/erpnext/healthcare/doctype/lab_test/lab_test.py
index c676dfb..2bf4a3a 100644
--- a/erpnext/healthcare/doctype/lab_test/lab_test.py
+++ b/erpnext/healthcare/doctype/lab_test/lab_test.py
@@ -6,7 +6,7 @@
import frappe
from frappe import _
from frappe.model.document import Document
-from frappe.utils import getdate, cstr
+from frappe.utils import getdate, cstr, get_link_to_form
class LabTest(Document):
def validate(self):
@@ -262,7 +262,9 @@
sample_collection = create_sample_doc(template, patient, invoice, lab_test.company)
if sample_collection:
lab_test.sample = sample_collection.name
-
+ sample_collection_doc = get_link_to_form('Sample Collection', sample_collection.name)
+ frappe.msgprint(_('Sample Collection {0} has been created').format(sample_collection_doc),
+ title=_('Sample Collection'), indicator='green')
return lab_test
def load_result_format(lab_test, template, prescription, invoice):
diff --git a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json
index fc6a1e1..c3fc842 100644
--- a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json
+++ b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json
@@ -34,14 +34,15 @@
"descriptive_test_templates",
"section_break_group",
"lab_test_groups",
- "medical_coding_section",
- "medical_code_standard",
- "medical_code",
"sb_sample_collection",
"sample",
"sample_uom",
"sample_qty",
+ "column_break_33",
"sample_details",
+ "medical_coding_section",
+ "medical_code",
+ "medical_code_standard",
"worksheet_section",
"worksheet_instructions",
"result_legend_section",
@@ -128,6 +129,7 @@
"mandatory_depends_on": "eval:doc.is_billable == 1"
},
{
+ "collapsible": 1,
"fieldname": "medical_coding_section",
"fieldtype": "Section Break",
"label": "Medical Coding"
@@ -217,7 +219,6 @@
"no_copy": 1
},
{
- "collapsible": 1,
"fieldname": "sb_sample_collection",
"fieldtype": "Section Break",
"label": "Sample Collection"
@@ -311,10 +312,14 @@
"fieldname": "descriptive_test_templates",
"fieldtype": "Table",
"options": "Descriptive Test Template"
+ },
+ {
+ "fieldname": "column_break_33",
+ "fieldtype": "Column Break"
}
],
"links": [],
- "modified": "2020-07-30 11:55:43.093828",
+ "modified": "2020-07-30 14:32:40.449818",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Lab Test Template",