def patientFetchPrescriptions(): patientID = models_common.getIDByEmail(session.get("currentEmail"), session.get("accType")) # print("----------------patientID----------------") # print(patientID) res = models_patient.patientFetchPrescriptions(patientID) return jsonify(res)
def patientLabRequest(): if (request.method == "GET"): #GET all appointments patientID = models_common.getIDByEmail(session.get("currentEmail"), session.get("accType")) res = models_patient.patientLabRequest(patientID, None, "GET") return jsonify(res) elif (request.method == "POST"): #POST a new appointment labID = models_common.getIDByEmail(session.get("currentEmail"), session.get("accType")) payload = request.get_json( ) #Converts incoming JSON into Python Dictionary print("--------------------------------") print(payload) res = models_patient.patientLabRequest(labID, payload, "POST") return jsonify(res)
def patientMedicineRequest(): if (request.method == "GET"): #GET all Medicine Requests patientID = models_common.getIDByEmail(session.get("currentEmail"), session.get("accType")) res = models_patient.patientMedicineRequest(patientID, None, "GET") #None is no payload return jsonify(res) elif (request.method == "POST"): #POST a new Medicine Request patientID = models_common.getIDByEmail(session.get("currentEmail"), session.get("accType")) payload = request.get_json( ) #Converts incoming JSON into Python Dictionary # print("--------------------------------") # print(payload) res = models_patient.patientMedicineRequest(patientID, payload, "POST") return jsonify(res)
def patient(): if ((not session.get("accType") == "Patient") or (not session.get(session.get("accType") + "LoggedIn"))): return redirect(url_for("login"), 302) return render_template( "Patient/patient.html", title="Patient", user=models_common.getUsernameByEmail(session.get("currentEmail"), session.get("accType")), userID=models_common.getIDByEmail(session.get("currentEmail"), session.get("accType")), userLoggedIn=True)
def prescriptionResponseUpdate(): payload = request.get_json() ID = models_common.getIDByEmail(session.get("currentEmail"), session.get("accType")) res = models_pharmacy.prescriptionResponseUpdate(payload, ID) return jsonify(res)
def prescriptionRequest(): ID = models_common.getIDByEmail(session.get("currentEmail"), session.get("accType")) res = models_pharmacy.prescriptionRequest(ID) return jsonify(res)
def patientCalendarReminderUpdate(): patientID = models_common.getIDByEmail(session.get("currentEmail"), session.get("accType")) res = models_patient.patientCalendarReminderUpdate(patientID) return jsonify(res)
def patientMedicineResponse(): patientID = models_common.getIDByEmail(session.get("currentEmail"), session.get("accType")) res = models_patient.patientMedicineResponse(patientID) return jsonify(res)
def patientFetchLabDocs(): patientID = models_common.getIDByEmail(session.get("currentEmail"), session.get("accType")) res = models_patient.patientFetchLabDocs(patientID) return jsonify(res)