fix: remove Expired status from Appointment
This commit is contained in:
parent
197165ff40
commit
cdf7189c29
@ -90,7 +90,7 @@
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Status",
|
||||
"options": "\nScheduled\nOpen\nClosed\nExpired\nCancelled",
|
||||
"options": "\nScheduled\nOpen\nClosed\nCancelled",
|
||||
"read_only": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
@ -285,7 +285,7 @@
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2020-03-02 14:35:54.040428",
|
||||
"modified": "2020-03-27 11:27:33.773195",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Healthcare",
|
||||
"name": "Patient Appointment",
|
||||
|
@ -37,8 +37,6 @@ class PatientAppointment(Document):
|
||||
self.status = 'Open'
|
||||
elif appointment_date > today:
|
||||
self.status = 'Scheduled'
|
||||
elif appointment_date < today:
|
||||
self.status = 'Expired'
|
||||
|
||||
def validate_overlaps(self):
|
||||
end_time = datetime.datetime.combine(getdate(self.appointment_date), get_time(self.appointment_time)) \
|
||||
@ -421,8 +419,8 @@ def get_procedure_prescribed(patient):
|
||||
return frappe.db.sql("""select pp.name, pp.procedure, pp.parent, ct.practitioner,
|
||||
ct.encounter_date, pp.practitioner, pp.date, pp.department
|
||||
from `tabPatient Encounter` ct, `tabProcedure Prescription` pp
|
||||
where ct.patient='{0}' and pp.parent=ct.name and pp.appointment_booked=0
|
||||
order by ct.creation desc""".format(patient))
|
||||
where ct.patient=%(patient)s and pp.parent=ct.name and pp.appointment_booked=0
|
||||
order by ct.creation desc""", {'patient': patient})
|
||||
|
||||
|
||||
def update_appointment_status():
|
||||
|
@ -13,7 +13,7 @@ def execute(filters=None):
|
||||
|
||||
class Analytics(object):
|
||||
def __init__(self, filters=None):
|
||||
"""Patient Appointment Analytics Report"""
|
||||
"""Patient Appointment Analytics Report."""
|
||||
self.filters = frappe._dict(filters or {})
|
||||
self.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
||||
self.get_period_date_ranges()
|
||||
|
@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user