diff --git a/healthcare/healthcare/doctype/nursing_checklist_template_task/nursing_checklist_template_task.json b/healthcare/healthcare/doctype/nursing_checklist_template_task/nursing_checklist_template_task.json index 7d10bbd49a..0f7738de15 100644 --- a/healthcare/healthcare/doctype/nursing_checklist_template_task/nursing_checklist_template_task.json +++ b/healthcare/healthcare/doctype/nursing_checklist_template_task/nursing_checklist_template_task.json @@ -12,7 +12,7 @@ "duration", "type", "mandatory", - "reference_document", + "task_doctype", "role" ], "fields": [ @@ -60,9 +60,9 @@ "label": "Mandatory" }, { - "fieldname": "reference_document", + "fieldname": "task_doctype", "fieldtype": "Link", - "label": "Reference Document", + "label": "Task Doctype", "options": "DocType" } ], @@ -70,7 +70,7 @@ "istable": 1, "links": [], "migration_hash": "bc7820f21e821210df5a4edeb732721e", - "modified": "2021-11-01 05:28:58.539498", + "modified": "2021-11-01 06:13:49.475267", "modified_by": "Administrator", "module": "Healthcare", "name": "Nursing Checklist Template Task", diff --git a/healthcare/healthcare/doctype/nursing_task/nursing_task.json b/healthcare/healthcare/doctype/nursing_task/nursing_task.json index 7aeeb4fda4..7e29c109d0 100644 --- a/healthcare/healthcare/doctype/nursing_task/nursing_task.json +++ b/healthcare/healthcare/doctype/nursing_task/nursing_task.json @@ -19,8 +19,10 @@ "to_date", "task_reference", "reference_doctype", + "task_doctype", "column_break_8", "reference_name", + "task_document_name", "amended_from" ], "fields": [ @@ -103,7 +105,7 @@ { "fieldname": "naming_series", "fieldtype": "Select", - "label": "Series", + "label": "Naming Series", "options": "HLC-NUR-.YYYY.-" }, { @@ -111,13 +113,25 @@ "fieldname": "mandatory", "fieldtype": "Check", "label": "Mandatory" + }, + { + "fieldname": "task_doctype", + "fieldtype": "Link", + "label": "Task Doctype", + "options": "DocType" + }, + { + "fieldname": "task_document_name", + "fieldtype": "Dynamic Link", + "label": "Task Document Name", + "options": "task_doctype" } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], "migration_hash": "30192cebf6f0444cbb4a4647eb5e4a89", - "modified": "2021-11-01 05:28:11.663862", + "modified": "2021-11-01 06:05:42.214897", "modified_by": "Administrator", "module": "Healthcare", "name": "Nursing Task", diff --git a/healthcare/healthcare/doctype/nursing_task/nursing_task.py b/healthcare/healthcare/doctype/nursing_task/nursing_task.py index bb30766923..242f381461 100644 --- a/healthcare/healthcare/doctype/nursing_task/nursing_task.py +++ b/healthcare/healthcare/doctype/nursing_task/nursing_task.py @@ -16,10 +16,11 @@ def create_nursing_tasks_from_template(cls, template, dt=None, dn=None): for task in tasks: doc = frappe.get_doc({ 'doctype': 'Nursing Task', - 'activity': task.activity, - 'mandatory': task.mandatory, 'status': 'Requested', 'reference_doctype': dt, 'reference_name': dn, + 'activity': task.activity, + 'mandatory': task.mandatory, + 'task_doctype': task.task_doctype, }) doc.insert()