test: Healthcare Consultation DocTypes
This commit is contained in:
parent
f67afe67ab
commit
aabcee4f8f
@ -112,7 +112,7 @@ class ClinicalProcedure(Document):
|
|||||||
|
|
||||||
return allow_start
|
return allow_start
|
||||||
|
|
||||||
def make_material_receipt(self):
|
def make_material_receipt(self, submit=False):
|
||||||
stock_entry = frappe.new_doc('Stock Entry')
|
stock_entry = frappe.new_doc('Stock Entry')
|
||||||
|
|
||||||
stock_entry.stock_entry_type = 'Material Receipt'
|
stock_entry.stock_entry_type = 'Material Receipt'
|
||||||
@ -133,6 +133,9 @@ class ClinicalProcedure(Document):
|
|||||||
cost_center = frappe.get_cached_value('Company', self.company, 'cost_center')
|
cost_center = frappe.get_cached_value('Company', self.company, 'cost_center')
|
||||||
se_child.cost_center = cost_center
|
se_child.cost_center = cost_center
|
||||||
se_child.expense_account = expense_account
|
se_child.expense_account = expense_account
|
||||||
|
if submit:
|
||||||
|
stock_entry.submit()
|
||||||
|
return stock_entry
|
||||||
return stock_entry.as_dict()
|
return stock_entry.as_dict()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,61 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
import frappe
|
||||||
|
from frappe.utils import nowdate
|
||||||
|
from erpnext.healthcare.doctype.patient_appointment.test_patient_appointment import create_healthcare_docs, create_clinical_procedure_template
|
||||||
|
|
||||||
class TestClinicalProcedure(unittest.TestCase):
|
class TestClinicalProcedure(unittest.TestCase):
|
||||||
pass
|
def test_procedure_template_item(self):
|
||||||
|
patient, medical_department, practitioner = create_healthcare_docs()
|
||||||
|
procedure_template = create_clinical_procedure_template()
|
||||||
|
self.assertTrue(frappe.db.exists('Item', procedure_template.item))
|
||||||
|
|
||||||
|
procedure_template.disabled = 1
|
||||||
|
procedure_template.save()
|
||||||
|
self.assertEquals(frappe.db.get_value('Item', procedure_template.item, 'disabled'), 1)
|
||||||
|
|
||||||
|
def test_consumables(self):
|
||||||
|
patient, medical_department, practitioner = create_healthcare_docs()
|
||||||
|
procedure_template = create_clinical_procedure_template()
|
||||||
|
procedure_template.allow_stock_consumption = 1
|
||||||
|
consumable = create_consumable()
|
||||||
|
procedure_template.append('items', {
|
||||||
|
'item_code': consumable.item_code,
|
||||||
|
'qty': 1,
|
||||||
|
'uom': consumable.stock_uom,
|
||||||
|
'stock_uom': consumable.stock_uom
|
||||||
|
})
|
||||||
|
procedure_template.save()
|
||||||
|
procedure = create_procedure(procedure_template, patient, practitioner)
|
||||||
|
result = procedure.start_procedure()
|
||||||
|
if result == 'insufficient stock':
|
||||||
|
material_receipt = procedure.make_material_receipt(submit=True)
|
||||||
|
result = procedure.start_procedure()
|
||||||
|
self.assertEqual(procedure.status, 'In Progress')
|
||||||
|
result = procedure.complete_procedure()
|
||||||
|
# check consumption
|
||||||
|
self.assertTrue(frappe.db.exists('Stock Entry', result))
|
||||||
|
|
||||||
|
|
||||||
|
def create_consumable():
|
||||||
|
if frappe.db.exists('Item', 'Syringe'):
|
||||||
|
return frappe.get_doc('Item', 'Syringe')
|
||||||
|
consumable = frappe.new_doc('Item')
|
||||||
|
consumable.item_code = 'Syringe'
|
||||||
|
consumable.item_group = '_Test Item Group'
|
||||||
|
consumable.stock_uom = 'Nos'
|
||||||
|
consumable.valuation_rate = 5.00
|
||||||
|
consumable.save()
|
||||||
|
return consumable
|
||||||
|
|
||||||
|
def create_procedure(procedure_template, patient, practitioner):
|
||||||
|
procedure = frappe.new_doc('Clinical Procedure')
|
||||||
|
procedure.procedure_template = procedure_template.name
|
||||||
|
procedure.patient = patient
|
||||||
|
procedure.practitioner = practitioner
|
||||||
|
procedure.consume_stock = procedure_template.allow_stock_consumption
|
||||||
|
procedure.items = procedure_template.items
|
||||||
|
procedure.warehouse = frappe.db.get_single_value('Stock Settings', 'default_warehouse')
|
||||||
|
procedure.submit()
|
||||||
|
return procedure
|
||||||
@ -27,13 +27,6 @@ class ClinicalProcedureTemplate(Document):
|
|||||||
else:
|
else:
|
||||||
frappe.db.set_value('Item', self.item, 'disabled', 0)
|
frappe.db.set_value('Item', self.item, 'disabled', 0)
|
||||||
|
|
||||||
def on_trash(self):
|
|
||||||
if self.item:
|
|
||||||
try:
|
|
||||||
frappe.delete_doc('Item', self.item)
|
|
||||||
except Exception:
|
|
||||||
frappe.throw(_('Not permitted. Please disable the Procedure Template'), title='Not Permitted')
|
|
||||||
|
|
||||||
def update_item_and_item_price(self):
|
def update_item_and_item_price(self):
|
||||||
if self.is_billable and self.item:
|
if self.is_billable and self.item:
|
||||||
item_doc = frappe.get_doc('Item', {'item_code': self.item})
|
item_doc = frappe.get_doc('Item', {'item_code': self.item})
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import frappe
|
|||||||
import unittest
|
import unittest
|
||||||
from frappe.utils.make_random import get_random
|
from frappe.utils.make_random import get_random
|
||||||
from frappe.utils import nowdate, add_days, getdate
|
from frappe.utils import nowdate, add_days, getdate
|
||||||
|
from erpnext.healthcare.doctype.patient_appointment.test_patient_appointment import create_healthcare_docs, create_appointment
|
||||||
|
|
||||||
test_dependencies = ["Company"]
|
test_dependencies = ["Company"]
|
||||||
|
|
||||||
@ -16,41 +17,7 @@ class TestFeeValidity(unittest.TestCase):
|
|||||||
frappe.db.sql("""delete from `tabFee Validity`""")
|
frappe.db.sql("""delete from `tabFee Validity`""")
|
||||||
|
|
||||||
def test_fee_validity(self):
|
def test_fee_validity(self):
|
||||||
patient = get_random("Patient")
|
patient, medical_department, practitioner = create_healthcare_docs()
|
||||||
practitioner = get_random("Healthcare Practitioner")
|
|
||||||
medical_department = get_random("Medical Department")
|
|
||||||
|
|
||||||
item = create_healthcare_service_items()
|
|
||||||
healthcare_settings = frappe.get_single("Healthcare Settings")
|
|
||||||
healthcare_settings.enable_free_follow_ups = 1
|
|
||||||
healthcare_settings.max_visits = 2
|
|
||||||
healthcare_settings.valid_days = 7
|
|
||||||
healthcare_settings.automate_appointment_invoicing = 1
|
|
||||||
healthcare_settings.op_consulting_charge_item = item
|
|
||||||
healthcare_settings.save(ignore_permissions=True)
|
|
||||||
|
|
||||||
if not patient:
|
|
||||||
patient = frappe.new_doc("Patient")
|
|
||||||
patient.first_name = "_Test Patient"
|
|
||||||
patient.sex = "Male"
|
|
||||||
patient.save(ignore_permissions=True)
|
|
||||||
patient = patient.name
|
|
||||||
|
|
||||||
if not medical_department:
|
|
||||||
medical_department = frappe.new_doc("Medical Department")
|
|
||||||
medical_department.department = "_Test Medical Department"
|
|
||||||
medical_department.save(ignore_permissions=True)
|
|
||||||
department = medical_department.name
|
|
||||||
|
|
||||||
if not practitioner:
|
|
||||||
practitioner = frappe.new_doc("Healthcare Practitioner")
|
|
||||||
practitioner.first_name = "_Test Healthcare Practitioner"
|
|
||||||
practitioner.gender = 'Female'
|
|
||||||
practitioner.department = department
|
|
||||||
practitioner.op_consulting_charge = 500
|
|
||||||
practitioner.save(ignore_permissions=True)
|
|
||||||
practitioner = practitioner.name
|
|
||||||
|
|
||||||
# appointment should not be invoiced as it is within fee validity
|
# appointment should not be invoiced as it is within fee validity
|
||||||
appointment = create_appointment(patient, practitioner, nowdate())
|
appointment = create_appointment(patient, practitioner, nowdate())
|
||||||
invoiced = frappe.db.get_value("Patient Appointment", appointment.name, "invoiced")
|
invoiced = frappe.db.get_value("Patient Appointment", appointment.name, "invoiced")
|
||||||
@ -70,28 +37,3 @@ class TestFeeValidity(unittest.TestCase):
|
|||||||
appointment = create_appointment(patient, practitioner, add_days(nowdate(), 10), invoice=1)
|
appointment = create_appointment(patient, practitioner, add_days(nowdate(), 10), invoice=1)
|
||||||
invoiced = frappe.db.get_value("Patient Appointment", appointment.name, "invoiced")
|
invoiced = frappe.db.get_value("Patient Appointment", appointment.name, "invoiced")
|
||||||
self.assertEqual(invoiced, 1)
|
self.assertEqual(invoiced, 1)
|
||||||
|
|
||||||
def create_appointment(patient, practitioner, appointment_date, invoice=0):
|
|
||||||
appointment = frappe.new_doc("Patient Appointment")
|
|
||||||
appointment.patient = patient
|
|
||||||
appointment.practitioner = practitioner
|
|
||||||
appointment.department = "_Test Medical Department"
|
|
||||||
appointment.appointment_date = appointment_date
|
|
||||||
appointment.company = "_Test Company"
|
|
||||||
appointment.duration = 15
|
|
||||||
if invoice:
|
|
||||||
appointment.mode_of_payment = "Cash"
|
|
||||||
appointment.paid_amount = 500
|
|
||||||
appointment.save(ignore_permissions=True)
|
|
||||||
return appointment
|
|
||||||
|
|
||||||
def create_healthcare_service_items():
|
|
||||||
if frappe.db.exists("Item", "HLC-SI-001"):
|
|
||||||
return "HLC-SI-001"
|
|
||||||
item = frappe.new_doc("Item")
|
|
||||||
item.item_code = "HLC-SI-001"
|
|
||||||
item.item_name = "Consulting Charges"
|
|
||||||
item.item_group = "Services"
|
|
||||||
item.is_stock_item = 0
|
|
||||||
item.save()
|
|
||||||
return item.name
|
|
||||||
@ -104,10 +104,14 @@ def check_payment_fields_reqd(patient):
|
|||||||
def invoice_appointment(appointment_doc):
|
def invoice_appointment(appointment_doc):
|
||||||
automate_invoicing = frappe.db.get_single_value('Healthcare Settings', 'automate_appointment_invoicing')
|
automate_invoicing = frappe.db.get_single_value('Healthcare Settings', 'automate_appointment_invoicing')
|
||||||
appointment_invoiced = frappe.db.get_value('Patient Appointment', appointment_doc.name, 'invoiced')
|
appointment_invoiced = frappe.db.get_value('Patient Appointment', appointment_doc.name, 'invoiced')
|
||||||
|
enable_free_follow_ups = frappe.db.get_single_value('Healthcare Settings', 'enable_free_follow_ups')
|
||||||
|
if enable_free_follow_ups:
|
||||||
fee_validity = check_fee_validity(appointment_doc)
|
fee_validity = check_fee_validity(appointment_doc)
|
||||||
if not fee_validity:
|
if not fee_validity:
|
||||||
if frappe.db.exists('Fee Validity Reference', {'appointment': appointment_doc.name}):
|
if frappe.db.exists('Fee Validity Reference', {'appointment': appointment_doc.name}):
|
||||||
return
|
return
|
||||||
|
else:
|
||||||
|
fee_validity = None
|
||||||
|
|
||||||
if automate_invoicing and not appointment_invoiced and not fee_validity:
|
if automate_invoicing and not appointment_invoiced and not fee_validity:
|
||||||
sales_invoice = frappe.new_doc('Sales Invoice')
|
sales_invoice = frappe.new_doc('Sales Invoice')
|
||||||
@ -126,11 +130,10 @@ def invoice_appointment(appointment_doc):
|
|||||||
payment.amount = appointment_doc.paid_amount
|
payment.amount = appointment_doc.paid_amount
|
||||||
|
|
||||||
sales_invoice.set_missing_values(for_validate=True)
|
sales_invoice.set_missing_values(for_validate=True)
|
||||||
frappe.as_json('Sales Invoice')
|
|
||||||
sales_invoice.save(ignore_permissions=True)
|
sales_invoice.save(ignore_permissions=True)
|
||||||
sales_invoice.submit()
|
sales_invoice.submit()
|
||||||
frappe.msgprint(_('Sales Invoice {0} created as paid'.format(sales_invoice.name)), alert=True)
|
frappe.msgprint(_('Sales Invoice {0} created as paid'.format(sales_invoice.name)), alert=True)
|
||||||
frappe.db.set_value('Patient Appointment', appointment_doc.name, 'invoiced', True)
|
frappe.db.set_value('Patient Appointment', appointment_doc.name, 'invoiced', 1)
|
||||||
frappe.db.set_value('Patient Appointment', appointment_doc.name, 'ref_sales_invoice', sales_invoice.name)
|
frappe.db.set_value('Patient Appointment', appointment_doc.name, 'ref_sales_invoice', sales_invoice.name)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,8 +3,137 @@
|
|||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import unittest
|
import unittest
|
||||||
|
import frappe
|
||||||
# test_records = frappe.get_test_records('Patient Appointment')
|
from erpnext.healthcare.doctype.patient_appointment.patient_appointment import update_status
|
||||||
|
from frappe.utils import nowdate, add_days, getdate
|
||||||
|
from frappe.utils.make_random import get_random
|
||||||
|
|
||||||
class TestPatientAppointment(unittest.TestCase):
|
class TestPatientAppointment(unittest.TestCase):
|
||||||
pass
|
def setUp(self):
|
||||||
|
frappe.db.sql("""delete from `tabPatient Appointment`""")
|
||||||
|
frappe.db.sql("""delete from `tabFee Validity""")
|
||||||
|
|
||||||
|
def test_status(self):
|
||||||
|
patient, medical_department, practitioner = create_healthcare_docs()
|
||||||
|
frappe.db.set_value('Healthcare Settings', None, 'automate_appointment_invoicing', 0)
|
||||||
|
appointment = create_appointment(patient, practitioner, nowdate())
|
||||||
|
self.assertEquals(appointment.status, 'Open')
|
||||||
|
appointment = create_appointment(patient, practitioner, add_days(nowdate(), 2))
|
||||||
|
self.assertEquals(appointment.status, 'Scheduled')
|
||||||
|
create_encounter(appointment)
|
||||||
|
self.assertEquals(frappe.db.get_value('Patient Appointment', appointment.name, 'status'), 'Closed')
|
||||||
|
|
||||||
|
def test_invoicing(self):
|
||||||
|
patient, medical_department, practitioner = create_healthcare_docs()
|
||||||
|
frappe.db.set_value('Healthcare Settings', None, 'enable_free_follow_ups', 0)
|
||||||
|
frappe.db.set_value('Healthcare Settings', None, 'automate_appointment_invoicing', 0)
|
||||||
|
appointment = create_appointment(patient, practitioner, nowdate())
|
||||||
|
self.assertEqual(frappe.db.get_value('Patient Appointment', appointment.name, 'invoiced'), 0)
|
||||||
|
|
||||||
|
frappe.db.set_value('Healthcare Settings', None, 'automate_appointment_invoicing', 1)
|
||||||
|
appointment = create_appointment(patient, practitioner, add_days(nowdate(), 2), invoice=1)
|
||||||
|
self.assertEqual(frappe.db.get_value('Patient Appointment', appointment.name, 'invoiced'), 1)
|
||||||
|
self.assertTrue(frappe.db.get_value('Patient Appointment', appointment.name, 'ref_sales_invoice'))
|
||||||
|
|
||||||
|
def test_appointment_cancel(self):
|
||||||
|
patient, medical_department, practitioner = create_healthcare_docs()
|
||||||
|
frappe.db.set_value('Healthcare Settings', None, 'enable_free_follow_ups', 1)
|
||||||
|
appointment = create_appointment(patient, practitioner, nowdate())
|
||||||
|
fee_validity = frappe.db.get_value('Fee Validity Reference', {'appointment': appointment.name}, 'parent')
|
||||||
|
# fee validity created
|
||||||
|
self.assertTrue(fee_validity)
|
||||||
|
|
||||||
|
visited = frappe.db.get_value('Fee Validity', fee_validity, 'visited')
|
||||||
|
update_status(appointment.name, 'Cancelled')
|
||||||
|
# check fee validity updated
|
||||||
|
self.assertEqual(frappe.db.get_value('Fee Validity', fee_validity, 'visited'), visited - 1)
|
||||||
|
|
||||||
|
frappe.db.set_value('Healthcare Settings', None, 'enable_free_follow_ups', 0)
|
||||||
|
frappe.db.set_value('Healthcare Settings', None, 'automate_appointment_invoicing', 1)
|
||||||
|
appointment = create_appointment(patient, practitioner, nowdate(), invoice=1)
|
||||||
|
update_status(appointment.name, 'Cancelled')
|
||||||
|
# check invoice cancelled
|
||||||
|
sales_invoice = frappe.db.get_value('Patient Appointment', appointment.name, 'ref_sales_invoice')
|
||||||
|
self.assertEqual(frappe.db.get_value('Sales Invoice', sales_invoice, 'status'), 'Cancelled')
|
||||||
|
|
||||||
|
|
||||||
|
def create_healthcare_docs():
|
||||||
|
patient = get_random('Patient')
|
||||||
|
practitioner = get_random('Healthcare Practitioner')
|
||||||
|
medical_department = get_random('Medical Department')
|
||||||
|
if not patient:
|
||||||
|
patient = frappe.new_doc('Patient')
|
||||||
|
patient.first_name = '_Test Patient'
|
||||||
|
patient.sex = 'Female'
|
||||||
|
patient.save(ignore_permissions=True)
|
||||||
|
patient = patient.name
|
||||||
|
|
||||||
|
if not medical_department:
|
||||||
|
medical_department = frappe.new_doc('Medical Department')
|
||||||
|
medical_department.department = '_Test Medical Department'
|
||||||
|
medical_department.save(ignore_permissions=True)
|
||||||
|
department = medical_department.name
|
||||||
|
|
||||||
|
if not practitioner:
|
||||||
|
practitioner = frappe.new_doc('Healthcare Practitioner')
|
||||||
|
practitioner.first_name = '_Test Healthcare Practitioner'
|
||||||
|
practitioner.gender = 'Female'
|
||||||
|
practitioner.department = department
|
||||||
|
practitioner.op_consulting_charge = 500
|
||||||
|
practitioner.save(ignore_permissions=True)
|
||||||
|
practitioner = practitioner.name
|
||||||
|
|
||||||
|
return patient, medical_department, practitioner
|
||||||
|
|
||||||
|
def create_encounter(appointment=None):
|
||||||
|
encounter = frappe.new_doc('Patient Encounter')
|
||||||
|
if appointment:
|
||||||
|
encounter.appointment = appointment.name
|
||||||
|
encounter.patient = appointment.patient
|
||||||
|
encounter.practitioner = appointment.practitioner
|
||||||
|
encounter.encounter_date = appointment.appointment_date
|
||||||
|
encounter.encounter_time = appointment.appointment_time
|
||||||
|
encounter.save()
|
||||||
|
encounter.submit()
|
||||||
|
return encounter
|
||||||
|
|
||||||
|
def create_appointment(patient, practitioner, appointment_date, invoice=0, procedure_template=0):
|
||||||
|
create_healthcare_service_items()
|
||||||
|
appointment = frappe.new_doc('Patient Appointment')
|
||||||
|
appointment.patient = patient
|
||||||
|
appointment.practitioner = practitioner
|
||||||
|
appointment.department = '_Test Medical Department'
|
||||||
|
appointment.appointment_date = appointment_date
|
||||||
|
appointment.company = '_Test Company'
|
||||||
|
appointment.duration = 15
|
||||||
|
if invoice:
|
||||||
|
appointment.mode_of_payment = 'Cash'
|
||||||
|
appointment.paid_amount = 500
|
||||||
|
if procedure_template:
|
||||||
|
appointment.procedure_template = create_clinical_procedure_template().get('name')
|
||||||
|
appointment.save(ignore_permissions=True)
|
||||||
|
return appointment
|
||||||
|
|
||||||
|
def create_healthcare_service_items():
|
||||||
|
if frappe.db.exists('Item', 'HLC-SI-001'):
|
||||||
|
return 'HLC-SI-001'
|
||||||
|
item = frappe.new_doc('Item')
|
||||||
|
item.item_code = 'HLC-SI-001'
|
||||||
|
item.item_name = 'Consulting Charges'
|
||||||
|
item.item_group = 'Services'
|
||||||
|
item.is_stock_item = 0
|
||||||
|
item.save()
|
||||||
|
return item.name
|
||||||
|
|
||||||
|
def create_clinical_procedure_template():
|
||||||
|
if frappe.db.exists('Clinical Procedure Template', 'Knee Surgery and Rehab'):
|
||||||
|
return frappe.get_doc('Clinical Procedure Template', 'Knee Surgery and Rehab')
|
||||||
|
template = frappe.new_doc('Clinical Procedure Template')
|
||||||
|
template.template = 'Knee Surgery and Rehab'
|
||||||
|
template.item_code = 'Knee Surgery and Rehab'
|
||||||
|
template.item_group = 'Services'
|
||||||
|
template.is_billable = 1
|
||||||
|
template.description = 'Knee Surgery and Rehab'
|
||||||
|
template.rate = 50000
|
||||||
|
template.save()
|
||||||
|
return template
|
||||||
@ -2,5 +2,5 @@
|
|||||||
(c) ESS 2015-16
|
(c) ESS 2015-16
|
||||||
*/
|
*/
|
||||||
frappe.listview_settings['Patient Encounter'] = {
|
frappe.listview_settings['Patient Encounter'] = {
|
||||||
filters:[["docstatus","!=","1"]]
|
filters:[["docstatus","!=","2"]]
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,450 +1,149 @@
|
|||||||
{
|
{
|
||||||
|
"actions": [],
|
||||||
"allow_copy": 1,
|
"allow_copy": 1,
|
||||||
"allow_guest_to_view": 0,
|
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 0,
|
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
"beta": 1,
|
"beta": 1,
|
||||||
"creation": "2016-06-09 11:30:44.972056",
|
"creation": "2016-06-09 11:30:44.972056",
|
||||||
"custom": 0,
|
|
||||||
"docstatus": 0,
|
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Setup",
|
"document_type": "Setup",
|
||||||
"editable_grid": 0,
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"naming_series",
|
||||||
|
"patient",
|
||||||
|
"status",
|
||||||
|
"column_break_2",
|
||||||
|
"attach",
|
||||||
|
"section_break_4",
|
||||||
|
"subject",
|
||||||
|
"section_break_8",
|
||||||
|
"communication_date",
|
||||||
|
"reference_doctype",
|
||||||
|
"reference_name",
|
||||||
|
"column_break_9",
|
||||||
|
"reference_owner",
|
||||||
|
"user"
|
||||||
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"default": "",
|
|
||||||
"fieldname": "naming_series",
|
"fieldname": "naming_series",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Series",
|
"label": "Series",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "HLC-PMR-.YYYY.-",
|
"options": "HLC-PMR-.YYYY.-",
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
"report_hide": 1
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 1,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "patient",
|
"fieldname": "patient",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 1,
|
"ignore_user_permissions": 1,
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Patient",
|
"label": "Patient",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Patient",
|
"options": "Patient",
|
||||||
"permlevel": 0,
|
"search_index": 1
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 1,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "column_break_2",
|
"fieldname": "column_break_2",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break"
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "attach",
|
"fieldname": "attach",
|
||||||
"fieldtype": "Attach",
|
"fieldtype": "Attach",
|
||||||
"hidden": 0,
|
"label": "Attach Medical Record"
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "section_break_4",
|
"fieldname": "section_break_4",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break"
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "subject",
|
"fieldname": "subject",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 1,
|
"ignore_xss_filter": 1,
|
||||||
"in_filter": 0,
|
"label": "Subject"
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Subject",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "status",
|
"fieldname": "status",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 1,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Status",
|
"label": "Status",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Open\nClose",
|
"options": "Open\nClose",
|
||||||
"permlevel": 0,
|
"read_only": 1
|
||||||
"precision": "",
|
|
||||||
"print_hide": 1,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"default": "Today",
|
"default": "Today",
|
||||||
"fieldname": "communication_date",
|
"fieldname": "communication_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"hidden": 1,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Datetime",
|
"label": "Datetime",
|
||||||
"length": 0,
|
"read_only": 1
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "reference_doctype",
|
"fieldname": "reference_doctype",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 1,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Reference DocType",
|
"label": "Reference DocType",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "DocType",
|
"options": "DocType",
|
||||||
"permlevel": 0,
|
"read_only": 1,
|
||||||
"precision": "",
|
"search_index": 1
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 1,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "reference_name",
|
"fieldname": "reference_name",
|
||||||
"fieldtype": "Dynamic Link",
|
"fieldtype": "Dynamic Link",
|
||||||
"hidden": 1,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Reference Name",
|
"label": "Reference Name",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "reference_doctype",
|
"options": "reference_doctype",
|
||||||
"permlevel": 0,
|
"read_only": 1,
|
||||||
"precision": "",
|
"search_index": 1
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 1,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fetch_from": "reference_name.owner",
|
"fetch_from": "reference_name.owner",
|
||||||
"fieldname": "reference_owner",
|
"fieldname": "reference_owner",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Reference Owner",
|
"label": "Reference Owner",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"remember_last_selected_value": 0,
|
"report_hide": 1
|
||||||
"report_hide": 1,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"default": "__user",
|
"default": "__user",
|
||||||
"fieldname": "user",
|
"fieldname": "user",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 1,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "User",
|
"label": "User",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "User",
|
"options": "User",
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"remember_last_selected_value": 0,
|
"report_hide": 1
|
||||||
"report_hide": 1,
|
},
|
||||||
"reqd": 0,
|
{
|
||||||
"search_index": 0,
|
"fieldname": "column_break_9",
|
||||||
"set_only_once": 0,
|
"fieldtype": "Column Break"
|
||||||
"translatable": 0,
|
},
|
||||||
"unique": 0
|
{
|
||||||
|
"fieldname": "section_break_8",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
|
||||||
"hide_heading": 0,
|
|
||||||
"hide_toolbar": 0,
|
|
||||||
"idx": 0,
|
|
||||||
"image_view": 0,
|
|
||||||
"in_create": 1,
|
"in_create": 1,
|
||||||
"is_submittable": 0,
|
"links": [],
|
||||||
"issingle": 0,
|
"modified": "2020-03-23 19:26:59.308383",
|
||||||
"istable": 0,
|
|
||||||
"max_attachments": 0,
|
|
||||||
"modified": "2018-08-21 14:44:37.927284",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Healthcare",
|
"module": "Healthcare",
|
||||||
"name": "Patient Medical Record",
|
"name": "Patient Medical Record",
|
||||||
"name_case": "",
|
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 0,
|
|
||||||
"cancel": 0,
|
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 1,
|
"export": 1,
|
||||||
"if_owner": 0,
|
|
||||||
"import": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Physician",
|
"role": "Physician",
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"read_only_onload": 0,
|
|
||||||
"restrict_to_domain": "Healthcare",
|
"restrict_to_domain": "Healthcare",
|
||||||
"search_fields": "patient, subject, communication_date, reference_doctype, reference_name",
|
"search_fields": "patient, subject, communication_date, reference_doctype, reference_name",
|
||||||
"show_name_in_global_search": 1,
|
"show_name_in_global_search": 1,
|
||||||
@ -452,6 +151,5 @@
|
|||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"title_field": "patient",
|
"title_field": "patient",
|
||||||
"track_changes": 1,
|
"track_changes": 1,
|
||||||
"track_seen": 1,
|
"track_seen": 1
|
||||||
"track_views": 0
|
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user