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)
def sendNote(): pin = request.form['userPin'] note = request.form['doctorNote'] print(pin, note) d = DoctorNotesHelper() d.addNoteForPatient(pin, note) return "Hi"
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."
def getPatientData(): print(request.args.get("pin")) d = DoctorNotesHelper() # d = DoctorNotesHelper() return jsonify(d.getNote(request.args.get("pin"))['notes'])