def listPatients(cls): query = (f"SELECT * FROM {cls.tableName} WHERE utype=%s") results = DBConnect.getall(query, ("patient", )) users = [] for result in results: users.append(cls._rowToObj(result)) return users
def listAll(cls): query = (f"SELECT * FROM {cls.tableName}") results = DBConnect.getall(query, ()) objs = [] for result in results: objs.append(cls._rowToObj((result))) return objs
def listByDepartment(cls, deptID): query = (f"SELECT * FROM {cls.tableName} WHERE deptID=%s") results = DBConnect.getall(query, (deptID, )) objs = [] for result in results: objs.append(cls._rowToObj(result)) return objs