示例#1
0
def patient():
    if request.method == 'GET':
        pin = request.args.get('pin')
        dnh = DoctorNotesHelper()
        data = dnh.getNote(pin)
        res = {'message': data['notes'][-1]['message']}
        return jsonify(res)
示例#2
0
def sendNote():
    pin = request.form['userPin']
    note = request.form['doctorNote']
    print(pin, note)
    d = DoctorNotesHelper()
    d.addNoteForPatient(pin, note)

    return "Hi"
示例#3
0
def sendNote():
    note = request.form['note']
    pin = request.form['pin']
    phoneNumber = request.form['phone']
    d = DoctorNotesHelper()
    d.addNoteForPatient(pin, note)
    sendText(
        "Your doctor has sent you a new message based on your last phone call "
        "to Pillar: {}.".format(note), phoneNumber)
    sendText(
        "Please go to your nearest Pillar Station to pick up your medications. "
        "Thank you.", phoneNumber)

    return "Note added."
示例#4
0
def getPatientData():
    print(request.args.get("pin"))
    d = DoctorNotesHelper()
    # d = DoctorNotesHelper()
    return jsonify(d.getNote(request.args.get("pin"))['notes'])