f926911399
* Rename DT - Physician Schedule Time Slot to Healthcare Schedule Time Slot * Role name change * Rename DT - Physician Schedule to Practitioner Schedule * Rename DT - Physician Service Unit Schedule * Rename DT - Physician to Practitioner * Lab Test Template - field disabled in standard filter * Patient - customer creation fix * Rename DT - Consultation - Encounter * Patches.txt updated for rename doctypes and fields in Healthcare * Patch - Rename doctypes and fields in Healthcare Domain * Fix - Patch - rename_healthcare_doctype_and_fields * Vital Signs - New Fields - Abdomen, Tongue and Reflexes * Web Form - Patient - Personal Details * Rename DocType Physician to Healthcare Practitioner * Rename DocType Consultation to Patient Encounter * Web Form - Personal Details - Fix * Web Form - Personal Details - Codacy Fix * Healthcare patch run for all domain * Rename label Practitioner to Healthcare Practitioner * Rename Encounter to Patient Encounter
26 lines
794 B
Python
26 lines
794 B
Python
from __future__ import unicode_literals
|
|
|
|
import frappe
|
|
|
|
def get_context(context):
|
|
context.read_only = 1
|
|
|
|
def get_list_context(context):
|
|
context.row_template = "erpnext/templates/includes/healthcare/prescription_row_template.html"
|
|
context.get_list = get_encounter_list
|
|
|
|
def get_encounter_list(doctype, txt, filters, limit_start, limit_page_length = 20, order_by='modified desc'):
|
|
patient = get_patient()
|
|
encounters = frappe.db.sql("""select * from `tabPatient Encounter`
|
|
where patient = %s order by creation desc""", patient, as_dict = True)
|
|
return encounters
|
|
|
|
def get_patient():
|
|
return frappe.get_value("Patient",{"email": frappe.session.user}, "name")
|
|
|
|
def has_website_permission(doc, ptype, user, verbose=False):
|
|
if doc.patient == get_patient():
|
|
return True
|
|
else:
|
|
return False
|