notebookVB

This commit is contained in:
2026-01-03 11:19:23 +01:00
parent 5adefe0433
commit bef50acc9b
2 changed files with 103 additions and 24 deletions

View File

@@ -22,7 +22,7 @@ class MedicusDB:
cols = [d[0].strip().lower() for d in self.cur.description]
return [dict(zip(cols, row)) for row in self.cur.fetchall()]
def get_active_registered_patients(self):
def get_active_registered_patients(self, as_dict=False):
sql = """
SELECT
kar.rodcis,
@@ -36,7 +36,9 @@ class MedicusDB:
AND kar.rodcis IS NOT NULL
AND kar.rodcis <> ''
"""
return self.query(sql) # or self.query_dict(sql)
if as_dict:
return self.query_dict(sql)
return self.query(sql)
def close(self):
self.conn.close()