Skip to content

Commit

Permalink
feat: Clean up therapy plan
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillarAnand committed Nov 1, 2021
1 parent 21baccd commit 711b647
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"duration",
"type",
"mandatory",
"reference_document",
"task_doctype",
"role"
],
"fields": [
Expand Down Expand Up @@ -60,17 +60,17 @@
"label": "Mandatory"
},
{
"fieldname": "reference_document",
"fieldname": "task_doctype",
"fieldtype": "Link",
"label": "Reference Document",
"label": "Task Doctype",
"options": "DocType"
}
],
"index_web_pages_for_search": 1,
"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",
Expand Down
18 changes: 16 additions & 2 deletions healthcare/healthcare/doctype/nursing_task/nursing_task.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
"to_date",
"task_reference",
"reference_doctype",
"task_doctype",
"column_break_8",
"reference_name",
"task_document_name",
"amended_from"
],
"fields": [
Expand Down Expand Up @@ -103,21 +105,33 @@
{
"fieldname": "naming_series",
"fieldtype": "Select",
"label": "Series",
"label": "Naming Series",
"options": "HLC-NUR-.YYYY.-"
},
{
"default": "0",
"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",
Expand Down
5 changes: 3 additions & 2 deletions healthcare/healthcare/doctype/nursing_task/nursing_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 711b647

Please sign in to comment.