fix: msgprint for sample collection doc created on Lab Test creation
This commit is contained in:
parent
c33703d54c
commit
73edb12ab3
@ -6,7 +6,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.model.document import Document
|
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):
|
class LabTest(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
@ -262,7 +262,9 @@ def create_sample_collection(lab_test, template, patient, invoice):
|
|||||||
sample_collection = create_sample_doc(template, patient, invoice, lab_test.company)
|
sample_collection = create_sample_doc(template, patient, invoice, lab_test.company)
|
||||||
if sample_collection:
|
if sample_collection:
|
||||||
lab_test.sample = sample_collection.name
|
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
|
return lab_test
|
||||||
|
|
||||||
def load_result_format(lab_test, template, prescription, invoice):
|
def load_result_format(lab_test, template, prescription, invoice):
|
||||||
|
|||||||
@ -34,14 +34,15 @@
|
|||||||
"descriptive_test_templates",
|
"descriptive_test_templates",
|
||||||
"section_break_group",
|
"section_break_group",
|
||||||
"lab_test_groups",
|
"lab_test_groups",
|
||||||
"medical_coding_section",
|
|
||||||
"medical_code_standard",
|
|
||||||
"medical_code",
|
|
||||||
"sb_sample_collection",
|
"sb_sample_collection",
|
||||||
"sample",
|
"sample",
|
||||||
"sample_uom",
|
"sample_uom",
|
||||||
"sample_qty",
|
"sample_qty",
|
||||||
|
"column_break_33",
|
||||||
"sample_details",
|
"sample_details",
|
||||||
|
"medical_coding_section",
|
||||||
|
"medical_code",
|
||||||
|
"medical_code_standard",
|
||||||
"worksheet_section",
|
"worksheet_section",
|
||||||
"worksheet_instructions",
|
"worksheet_instructions",
|
||||||
"result_legend_section",
|
"result_legend_section",
|
||||||
@ -128,6 +129,7 @@
|
|||||||
"mandatory_depends_on": "eval:doc.is_billable == 1"
|
"mandatory_depends_on": "eval:doc.is_billable == 1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"collapsible": 1,
|
||||||
"fieldname": "medical_coding_section",
|
"fieldname": "medical_coding_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Medical Coding"
|
"label": "Medical Coding"
|
||||||
@ -217,7 +219,6 @@
|
|||||||
"no_copy": 1
|
"no_copy": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsible": 1,
|
|
||||||
"fieldname": "sb_sample_collection",
|
"fieldname": "sb_sample_collection",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Sample Collection"
|
"label": "Sample Collection"
|
||||||
@ -311,10 +312,14 @@
|
|||||||
"fieldname": "descriptive_test_templates",
|
"fieldname": "descriptive_test_templates",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"options": "Descriptive Test Template"
|
"options": "Descriptive Test Template"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_33",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-07-30 11:55:43.093828",
|
"modified": "2020-07-30 14:32:40.449818",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Healthcare",
|
"module": "Healthcare",
|
||||||
"name": "Lab Test Template",
|
"name": "Lab Test Template",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user