This commit is contained in:
2025-10-26 18:38:12 +01:00
parent 8712668ad4
commit e07296f23f
5 changed files with 157 additions and 0 deletions

28
MobilniCisla.py Normal file
View File

@@ -0,0 +1,28 @@
import os, fdb
from lxml import etree
import hashlib
# Connect to the Firebird database
conn = fdb.connect(
dsn=r'localhost:u:\medicus 3\data\medicus.fdb', # Database path
user='SYSDBA', # Username
password="masterkey", # Password,
charset="win1250")
cur = conn.cursor()
# cur.execute("select distinct recept.idpac, rodcis, upper(kar.PRIJMENI || ', ' || kar.jmeno) as jmeno,notifikace_kontakt "
# "from recept join kar on recept.idpac=kar.idpac "
# "join registr on recept.idpac=registr.idpac where datum_zruseni is null "
# "and notifikace_kontakt is not null "
# "order by recept.datum desc")
cur.execute("select kar.idpac, kar.prijmeni, kar.rodcis,poradi, kontakt, popis, karkontakt.typ, vztah from karkontakt join kar on kar.idpac=karkontakt.idpac")
for radek in cur.fetchall():
print(radek)