示例#1
0
文件: views.py 项目: Gaurav2609/SE-B2
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)
示例#2
0
文件: views.py 项目: Gaurav2609/SE-B2
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)
示例#3
0
文件: views.py 项目: Gaurav2609/SE-B2
def patientMedicineResponse():
    patientID = models.getIDByEmail(session.get("accEmail"),
                                    session.get("accType"))
    res = models.patientMedicineResponse(patientID)
    return jsonify(res)
示例#4
0
文件: views.py 项目: Gaurav2609/SE-B2
def patientFetchPrescriptions():
    patientID = models.getIDByEmail(session.get("accEmail"),
                                    session.get("accType"))
    res = models.patientFetchPrescriptions(patientID)
    return jsonify(res)
示例#5
0
文件: views.py 项目: Gaurav2609/SE-B2
def patientCalendarReminderUpdate():
    patientID = models.getIDByEmail(session.get("currentEmail"),
                                    session.get("accType"))
    res = models.patientCalendarReminderUpdate(patientID)
    return jsonify(res)
示例#6
0
def patientLabResponse():
    patientID = models.getIDByEmail(session.get("currentEmail"),
                                    session.get("accType"))
    res = models.patientLabResponse(patientID)
    return jsonify(res)