chore: whitespace cleanup from codebase

This commit is contained in:
Ankush Menat
2021-08-19 14:33:03 +05:30
parent e536f6d13f
commit 9bb69e711a
1218 changed files with 1391 additions and 1643 deletions

View File

@@ -11,4 +11,4 @@ frappe.dashboards.chart_sources["Department wise Patient Appointments"] = {
default: frappe.defaults.get_user_default("Company")
}
]
};
};

View File

@@ -69,4 +69,4 @@ def get(chart_name = None, chart = None, no_cache = None, filters = None, from_d
}
],
'type': 'bar'
}
}

View File

@@ -80,4 +80,4 @@ frappe.ui.form.on('Appointment Type Service Item', {
});
}
}
});
});

View File

@@ -63,4 +63,4 @@ def create_procedure(procedure_template, patient, practitioner):
procedure.company = "_Test Company"
procedure.warehouse = "_Test Warehouse - _TC"
procedure.submit()
return procedure
return procedure

View File

@@ -188,4 +188,3 @@ frappe.tour['Clinical Procedure Template'] = [
description: __('You can also set the Medical Department for the template. After saving the document, an Item will automatically be created for billing this Clinical Procedure. You can then use this template while creating Clinical Procedures for Patients. Templates save you from filling up redundant data every single time. You can also create templates for other operations like Lab Tests, Therapy Sessions, etc.')
}
];

View File

@@ -118,4 +118,3 @@ def change_item_code_from_template(item_code, doc):
rename_doc('Item', doc.item_code, item_code, ignore_permissions=True)
frappe.db.set_value('Clinical Procedure Template', doc.name, 'item_code', item_code)
return

View File

@@ -12,4 +12,3 @@ class ExerciseType(Document):
self.name = ' - '.join(filter(None, [self.exercise_name, self.difficulty_level]))
else:
self.name = self.exercise_name

View File

@@ -60,4 +60,4 @@ def check_is_new_patient(appointment):
})
if len(appointment_exists) and appointment_exists[0]:
return False
return True
return True

View File

@@ -47,4 +47,4 @@ class TestFeeValidity(unittest.TestCase):
# appointment should be invoiced as it is not within fee validity and the max_visits are exceeded
appointment = create_appointment(patient, practitioner, add_days(nowdate(), 10), invoice=1)
invoiced = frappe.db.get_value("Patient Appointment", appointment.name, "invoiced")
self.assertEqual(invoiced, 1)
self.assertEqual(invoiced, 1)

View File

@@ -142,4 +142,3 @@ frappe.tour['Healthcare Practitioner'] = [
description: __('If this Healthcare Practitioner also works for the In-Patient Department, set the inpatient visit charge for this Practitioner.')
}
];

View File

@@ -30,4 +30,4 @@ def get_unit_type():
unit_type.no_of_hours = 1
unit_type.rate = 4000
unit_type.save()
return unit_type
return unit_type

View File

@@ -153,4 +153,4 @@ def make_stock_entry(warehouse=None):
# in stock uom
se_child.conversion_factor = 1.0
se_child.expense_account = expense_account
stock_entry.submit()
stock_entry.submit()

View File

@@ -140,4 +140,3 @@ def create_ipme(filters, update_stock=0):
ipme = ipme.get_medication_orders()
return ipme

View File

@@ -295,4 +295,4 @@ def create_appointment_type(args=None):
'color': args.get('color') or '#7575ff',
'price_list': args.get('price_list') or frappe.db.get_value("Price List", {"selling": 1}),
'items': args.get('items') or items
}).insert()
}).insert()

View File

@@ -31,6 +31,3 @@ def create_patient_assessment(source_name, target_doc=None):
}, target_doc)
return doc

View File

@@ -99,4 +99,4 @@ def create_therapy_plan(encounter):
def delete_ip_medication_order(encounter):
record = frappe.db.exists('Inpatient Medication Order', {'patient_encounter': encounter.name})
if record:
frappe.delete_doc('Inpatient Medication Order', record, force=1)
frappe.delete_doc('Inpatient Medication Order', record, force=1)

View File

@@ -187,4 +187,4 @@ def get_module(doc):
if not module:
module = frappe.db.get_value('DocType', doc.doctype, 'module')
return module
return module

View File

@@ -101,4 +101,4 @@ def create_doc(patient):
}).insert()
doc.submit()
return doc
return doc

View File

@@ -88,4 +88,4 @@ def create_lab_test(template, patient):
lab_test.template = template
lab_test.save()
lab_test.submit()
return lab_test
return lab_test

View File

@@ -70,4 +70,4 @@ class TherapyPlanTemplate(Document):
item_price.item_name = self.item_name
item_price.price_list_rate = self.total_amount
item_price.ignore_mandatory = True
item_price.save(ignore_permissions=True)
item_price.save(ignore_permissions=True)

View File

@@ -168,4 +168,4 @@ frappe.ui.form.on('Therapy Session', {
});
}
}
});
});

View File

@@ -47,4 +47,4 @@ def create_exercise_type():
'description': 'Squat and Rise'
})
exercise_type.save()
return exercise_type
return exercise_type

View File

@@ -15,4 +15,3 @@ class VitalSigns(Document):
def set_title(self):
self.title = _('{0} on {1}').format(self.patient_name or self.patient,
frappe.utils.format_date(self.signs_date))[:100]

View File

@@ -23,4 +23,4 @@
<a class="btn btn-sm btn-default btn-get-records" style="display:none">More..</a>
</div>
</div>
</div>
</div>

View File

@@ -65,4 +65,4 @@
</div>
</div>
</div>
</div>
</div>

View File

@@ -528,4 +528,4 @@ class PatientProgress {
}
$(parent).find('.chart-container').hide();
}
}
}

View File

@@ -194,4 +194,3 @@ def get_date_range(time_span):
return time_span
except json.decoder.JSONDecodeError:
return get_timespan_date_range(time_span.lower())

View File

@@ -26,4 +26,4 @@
<p><a class="therapy-plan-link">{%=__("Therapy Plan") %}</a></p>
<p><a class="patient-history">{%=__("Patient History") %}</a></p>
</div>
</div>
</div>

View File

@@ -195,4 +195,4 @@ def get_chart_data(data):
chart["fieldtype"] = "Data"
return chart
return chart

View File

@@ -191,4 +191,4 @@ class Analytics(object):
'datasets': []
},
"type": "line"
}
}

View File

@@ -292,4 +292,4 @@ def get_patient_history_config():
{"label": "Medication Orders", "fieldname": "medication_orders", "fieldtype": "Table"},
{"label": "Total Orders", "fieldname": "total_orders", "fieldtype": "Float"}
])
}
}

View File

@@ -1,3 +1,3 @@
frappe.ready(function() {
// bind events here
});
});