notebookVB

This commit is contained in:
2026-01-02 18:14:45 +01:00
parent 33cdd2d0e2
commit 5adefe0433
5 changed files with 39 additions and 4 deletions

View File

@@ -0,0 +1,37 @@
import pymysql
from knihovny.medicus_db import MedicusDB
# ==========================================
# CONFIGURATION
# ==========================================
HOST = "192.168.1.4"
DB_PATH = r"z:\Medicus 3\data\MEDICUS.FDB"
# ==========================================
# MYSQL CONNECTION
# ==========================================
mysql = pymysql.connect(
host="192.168.1.76",
port=3307,
user="root",
password="Vlado9674+",
database="medevio",
charset="utf8mb4",
autocommit=True
)
# ==========================================
# INIT CONNECTIONS
# ==========================================
db = MedicusDB(HOST, DB_PATH)
# ==========================================
# FETCH REGISTERED PATIENTS
# ==========================================
patients = db.get_active_registered_patients()
sqlcon=
select * from (select *, ROW_NUMBER() over (partition by rc order by k_datu desc) as rn from vzp_stav_pojisteni) t
where t.rn=1 and t.stav<>"1";