Beispiel #1
0
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)
Beispiel #2
0
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)
Beispiel #3
0
def patientMedicineResponse():
    patientID = models.getIDByEmail(session.get("accEmail"),
                                    session.get("accType"))
    res = models.patientMedicineResponse(patientID)
    return jsonify(res)
Beispiel #4
0
def patientFetchPrescriptions():
    patientID = models.getIDByEmail(session.get("accEmail"),
                                    session.get("accType"))
    res = models.patientFetchPrescriptions(patientID)
    return jsonify(res)
Beispiel #5
0
def patientCalendarReminderUpdate():
    patientID = models.getIDByEmail(session.get("currentEmail"),
                                    session.get("accType"))
    res = models.patientCalendarReminderUpdate(patientID)
    return jsonify(res)
Beispiel #6
0
def patientLabResponse():
    patientID = models.getIDByEmail(session.get("currentEmail"),
                                    session.get("accType"))
    res = models.patientLabResponse(patientID)
    return jsonify(res)