def getPatient(patientID): ''' Get a patient by ID Parameter: - patientID: the ID of the patient Returns: a patient object ''' db = DBConnector() result = db.getPatient(patientID) if len(result) == 0: abort(404) db.close() return jsonify({'patient': make_public_patient(result)})
def dbtest(): db = DBConnector() return jsonify({'patient': db.getPatient(7)})