Beispiel #1
0
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)})
Beispiel #2
0
def dbtest():
    db = DBConnector()

    return jsonify({'patient': db.getPatient(7)})