brotherton-erpnext/erpnext/domains/healthcare.py
Rucha Mahabal 4887b69946
feat: Inpatient Medication Order and Entry (#23473)
* feat: Inpatient Medication Order

* feat: Inpatient Medication Entry

* feat: update medication orders on medication entry submission

* feat: added custom fields for medication references in Stock Entry

* feat: make stock entry if update stock is checked in IPMOE

* fix: handle cancel event for Inpatient Medication Entry

* fix(ux): add link and progress bar to dashboard

* refactor(ux): Adding Medication Orders without linking to Patient Encounter

* fix: make medication entry child table read only

* fix: filter stock items during manual medication order creation

* fix: codacy

* chore: tests for Inpatient Medication Order

* chore: tests for Inpatient Medication Entry

* fix: code clean-up

* fix: filter for inpatients in IPMO

* fix: add datetime validations for IPME filters

* fix: do not hardcode stock entry type

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-10-23 20:33:30 +05:30

72 lines
2.0 KiB
Python

from __future__ import unicode_literals
data = {
'desktop_icons': [
'Patient',
'Patient Appointment',
'Patient Encounter',
'Lab Test',
'Healthcare',
'Vital Signs',
'Clinical Procedure',
'Inpatient Record',
'Accounts',
'Buying',
'Stock',
'HR',
'ToDo'
],
'default_portal_role': 'Patient',
'restricted_roles': [
'Healthcare Administrator',
'LabTest Approver',
'Laboratory User',
'Nursing User',
'Physician',
'Patient'
],
'custom_fields': {
'Sales Invoice': [
{
'fieldname': 'patient', 'label': 'Patient', 'fieldtype': 'Link', 'options': 'Patient',
'insert_after': 'naming_series'
},
{
'fieldname': 'patient_name', 'label': 'Patient Name', 'fieldtype': 'Data', 'fetch_from': 'patient.patient_name',
'insert_after': 'patient', 'read_only': True
},
{
'fieldname': 'ref_practitioner', 'label': 'Referring Practitioner', 'fieldtype': 'Link', 'options': 'Healthcare Practitioner',
'insert_after': 'customer'
}
],
'Sales Invoice Item': [
{
'fieldname': 'reference_dt', 'label': 'Reference DocType', 'fieldtype': 'Link', 'options': 'DocType',
'insert_after': 'edit_references'
},
{
'fieldname': 'reference_dn', 'label': 'Reference Name', 'fieldtype': 'Dynamic Link', 'options': 'reference_dt',
'insert_after': 'reference_dt'
}
],
'Stock Entry': [
{
'fieldname': 'inpatient_medication_entry', 'label': 'Inpatient Medication Entry', 'fieldtype': 'Link', 'options': 'Inpatient Medication Entry',
'insert_after': 'credit_note', 'read_only': True
}
],
'Stock Entry Detail': [
{
'fieldname': 'patient', 'label': 'Patient', 'fieldtype': 'Link', 'options': 'Patient',
'insert_after': 'po_detail', 'read_only': True
},
{
'fieldname': 'inpatient_medication_entry_child', 'label': 'Inpatient Medication Entry Child', 'fieldtype': 'Data',
'insert_after': 'patient', 'read_only': True
}
]
},
'on_setup': 'erpnext.healthcare.setup.setup_healthcare'
}