sestra
This commit is contained in:
34
02 testík.py
34
02 testík.py
@@ -17,7 +17,7 @@ from pymysql.cursors import DictCursor
|
||||
from pprint import pprint
|
||||
from functions import get_medicus_connection
|
||||
from functions import get_mysql_connection
|
||||
import time, random
|
||||
import time, random,socket
|
||||
|
||||
# ------------------- CONFIG -------------------
|
||||
ENDPOINT = "https://prod.b2b.vzp.cz/B2BProxy/HttpProxy/RegistracePojistencePZSB2B" # case-sensitive
|
||||
@@ -32,15 +32,27 @@ K_DATU = date.today().isoformat() # YYYY-MM-DD
|
||||
ODBORNOSTI = ["001"] # VPL (adult GP)
|
||||
|
||||
# MySQL
|
||||
MYSQL_CFG = dict(
|
||||
host="192.168.1.76",
|
||||
port=3307,
|
||||
user="root",
|
||||
password="Vlado9674+",
|
||||
database="medevio",
|
||||
cursorclass=DictCursor,
|
||||
autocommit=False,
|
||||
)
|
||||
if socket.gethostname().strip() == "NTBVBHP470G10":
|
||||
MYSQL_CFG = dict(
|
||||
host="192.168.1.76",
|
||||
port=3307,
|
||||
user="root",
|
||||
password="Vlado9674+",
|
||||
database="medevio",
|
||||
cursorclass=DictCursor,
|
||||
autocommit=True, # or False if you prefer manual commit
|
||||
)
|
||||
elif socket.gethostname().strip() == "SESTRA":
|
||||
MYSQL_CFG = dict(
|
||||
host="127.0.0.1",
|
||||
port=3307,
|
||||
user="root",
|
||||
password="Vlado9674+",
|
||||
database="medevio",
|
||||
cursorclass=DictCursor,
|
||||
autocommit=True, # or False if you prefer manual commit
|
||||
)
|
||||
|
||||
|
||||
# Namespaces (from your response/WSDL)
|
||||
NS = {
|
||||
@@ -204,7 +216,7 @@ def main():
|
||||
|
||||
con = get_medicus_connection()
|
||||
cur = con.cursor()
|
||||
cur.execute("select rodcis, prijmeni, jmeno from kar where rodcis starting with '0'")
|
||||
cur.execute("select rodcis, prijmeni, jmeno from kar where rodcis starting with '9'")
|
||||
# cur.execute("select first 2 rodcis, prijmeni, jmeno from kar where rodcis starting with '0'")
|
||||
|
||||
# Vytvor seznam rodnych cisel, která už máme
|
||||
|
||||
Reference in New Issue
Block a user