def patientDoctorAppointment(): if (request.method == "GET"): #GET all appointment patientID = models.getIDByEmail(session.get("currentEmail"), session.get("accType")) res = models.patientDoctorAppointment(patientID, None, "GET") return jsonify(res) elif (request.method == "POST"): #POST a new appointment patientID = models.getIDByEmail(session.get("currentEmail"), session.get("accType")) doctorID = request.form["doctorID"] res = models.patientDoctorAppointment(patientID, doctorID, "POST") return jsonify(res)
def patientLabRequest(): if (request.method == "GET"): #GET all appointments patientID = models.getIDByEmail(session.get("accEmail"), session.get("accType")) res = models.patientLabRequest(patientID, None, "GET") return jsonify(res) elif (request.method == "POST"): #POST a new appointment labID = models.getIDByEmail(session.get("accEmail"), session.get("accType")) payload = request.get_json( ) #Converts incoming JSON into Python Dictionary print("--------------------------------") print(payload) res = models.patientLabRequest(labID, payload, "POST") return jsonify(res)
def patientMedicineResponse(): patientID = models.getIDByEmail(session.get("accEmail"), session.get("accType")) res = models.patientMedicineResponse(patientID) return jsonify(res)
def patientFetchPrescriptions(): patientID = models.getIDByEmail(session.get("accEmail"), session.get("accType")) res = models.patientFetchPrescriptions(patientID) return jsonify(res)
def patientCalendarReminderUpdate(): patientID = models.getIDByEmail(session.get("currentEmail"), session.get("accType")) res = models.patientCalendarReminderUpdate(patientID) return jsonify(res)
def patientLabResponse(): patientID = models.getIDByEmail(session.get("currentEmail"), session.get("accType")) res = models.patientLabResponse(patientID) return jsonify(res)