fix: travis

This commit is contained in:
Rucha Mahabal 2021-01-15 00:19:14 +05:30
parent 751719ea0d
commit 060d647248
4 changed files with 5 additions and 4 deletions

View File

@ -156,8 +156,8 @@ def get_patient_history_config_dt(doctype):
def validate_medical_record_required(doc):
if frappe.flags.in_patch or frappe.flags.in_install or frappe.flags.in_setup_wizard or \
frappe.db.get_value('Doctype', doc.doctype, 'module') != 'Healthcare':
if frappe.flags.in_patch or frappe.flags.in_install or frappe.flags.in_setup_wizard \
or doc.meta.module != 'Healthcare':
return False
if doc.doctype not in get_patient_history_doctypes():

View File

@ -18,6 +18,7 @@ class TestPatientMedicalRecord(unittest.TestCase):
patient, medical_department, practitioner = create_healthcare_docs()
appointment = create_appointment(patient, practitioner, nowdate(), invoice=1)
encounter = create_encounter(appointment)
# check for encounter
medical_rec = frappe.db.exists('Patient Medical Record', {'status': 'Open', 'reference_name': encounter.name})
self.assertTrue(medical_rec)

View File

@ -19,7 +19,7 @@ frappe.pages['patient_history'].on_page_load = function(wrapper) {
fieldname: 'patient',
placeholder: __('Select Patient'),
only_select: true,
change: function(){
change: function() {
let patient_id = patient.get_value();
if (pid != patient_id && patient_id) {
me.start = 0;

View File

@ -223,7 +223,7 @@ standard_queries = {
doc_events = {
"*": {
"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"
},
"Stock Entry": {