mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
fix: travis
This commit is contained in:
@@ -156,8 +156,8 @@ def get_patient_history_config_dt(doctype):
|
|||||||
|
|
||||||
|
|
||||||
def validate_medical_record_required(doc):
|
def validate_medical_record_required(doc):
|
||||||
if frappe.flags.in_patch or frappe.flags.in_install or frappe.flags.in_setup_wizard or \
|
if frappe.flags.in_patch or frappe.flags.in_install or frappe.flags.in_setup_wizard \
|
||||||
frappe.db.get_value('Doctype', doc.doctype, 'module') != 'Healthcare':
|
or doc.meta.module != 'Healthcare':
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if doc.doctype not in get_patient_history_doctypes():
|
if doc.doctype not in get_patient_history_doctypes():
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class TestPatientMedicalRecord(unittest.TestCase):
|
|||||||
patient, medical_department, practitioner = create_healthcare_docs()
|
patient, medical_department, practitioner = create_healthcare_docs()
|
||||||
appointment = create_appointment(patient, practitioner, nowdate(), invoice=1)
|
appointment = create_appointment(patient, practitioner, nowdate(), invoice=1)
|
||||||
encounter = create_encounter(appointment)
|
encounter = create_encounter(appointment)
|
||||||
|
|
||||||
# check for encounter
|
# check for encounter
|
||||||
medical_rec = frappe.db.exists('Patient Medical Record', {'status': 'Open', 'reference_name': encounter.name})
|
medical_rec = frappe.db.exists('Patient Medical Record', {'status': 'Open', 'reference_name': encounter.name})
|
||||||
self.assertTrue(medical_rec)
|
self.assertTrue(medical_rec)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ frappe.pages['patient_history'].on_page_load = function(wrapper) {
|
|||||||
fieldname: 'patient',
|
fieldname: 'patient',
|
||||||
placeholder: __('Select Patient'),
|
placeholder: __('Select Patient'),
|
||||||
only_select: true,
|
only_select: true,
|
||||||
change: function(){
|
change: function() {
|
||||||
let patient_id = patient.get_value();
|
let patient_id = patient.get_value();
|
||||||
if (pid != patient_id && patient_id) {
|
if (pid != patient_id && patient_id) {
|
||||||
me.start = 0;
|
me.start = 0;
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ standard_queries = {
|
|||||||
doc_events = {
|
doc_events = {
|
||||||
"*": {
|
"*": {
|
||||||
"on_submit": "erpnext.healthcare.doctype.patient_history_settings.patient_history_settings.create_medical_record",
|
"on_submit": "erpnext.healthcare.doctype.patient_history_settings.patient_history_settings.create_medical_record",
|
||||||
"on_update": "erpnext.healthcare.doctype.patient_history_settings.patient_history_settings.update_medical_record",
|
"on_update_after_submit": "erpnext.healthcare.doctype.patient_history_settings.patient_history_settings.update_medical_record",
|
||||||
"on_cancel": "erpnext.healthcare.doctype.patient_history_settings.patient_history_settings.delete_medical_record"
|
"on_cancel": "erpnext.healthcare.doctype.patient_history_settings.patient_history_settings.delete_medical_record"
|
||||||
},
|
},
|
||||||
"Stock Entry": {
|
"Stock Entry": {
|
||||||
|
|||||||
Reference in New Issue
Block a user