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