notebook vb
@@ -1,8 +1,6 @@
|
||||
import fdb,os
|
||||
import fdb
|
||||
from datetime import date
|
||||
|
||||
from pathlib import Path
|
||||
import time
|
||||
import funkce
|
||||
|
||||
# Connect to the Firebird database
|
||||
@@ -16,5 +14,5 @@ cur = conn.cursor()
|
||||
cur.execute("delete from dekurs where idpac=9742")
|
||||
conn.commit()
|
||||
|
||||
print(funkce.zapis_dekurs(conn,cur,9742,2,6,2,3,"Příloha.pdf","test text",date(2023, 10, 15),date(2023, 10, 15)))
|
||||
print(funkce.zapis_dekurs(conn,cur,9742,2,6,2,3,"Příloha.pdf","test text",date(2023, 10, 15),date(2023, 10, 15)))
|
||||
print(funkce.zapis_dekurs(conn, cur, 9742, 2, 6, 2, 3, "Příloha.pdf", "test text", date(2023, 10, 15), date(2023, 10, 15)))
|
||||
print(funkce.zapis_dekurs(conn, cur, 9742, 2, 6, 2, 3, "Příloha.pdf", "test text", date(2023, 10, 15), date(2023, 10, 15)))
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import os,shutil,fdb
|
||||
import re,datetime,funkce1
|
||||
import os, fdb
|
||||
import funkce1
|
||||
|
||||
# Connect to the Firebird database
|
||||
conn = fdb.connect(
|
||||
@@ -15,9 +15,9 @@ cesta=r"u:\NextcloudOrdinace\Dokumentace_ke_zpracování"
|
||||
for soubor in os.listdir(cesta):
|
||||
print(soubor)
|
||||
if os.path.isfile(os.path.join(cesta, soubor)):
|
||||
if funkce1.kontrola_struktury(soubor,conn):
|
||||
if funkce1.kontrola_struktury(soubor, conn):
|
||||
# info.append(vrat_info_o_souboru(soubor,conn))
|
||||
# os.remove(os.path.join(cesta,soubor))
|
||||
continue
|
||||
else:
|
||||
funkce1.prejmenuj_chybny_soubor(soubor,cesta)
|
||||
funkce1.prejmenuj_chybny_soubor(soubor, cesta)
|
||||
@@ -6,7 +6,7 @@ from requests_pkcs12 import Pkcs12Adapter
|
||||
from zeep import Client
|
||||
from zeep.transports import Transport
|
||||
|
||||
PFX_FILE = "AMBSUKL214235369G_31DEC2024.pfx"
|
||||
PFX_FILE = "../AMBSUKL214235369G_31DEC2024.pfx"
|
||||
PFX_PASSWORD = os.getenv("Vlado7309208104++", "") # nebo zadejte přímo jako řetězec
|
||||
# WSDL_URL = "https://<ERECEPT_ENDPOINT>/path?wsdl" # doplňte
|
||||
WSDL_URL = "https://lekar-soap.erecept.sukl.cz/cuer/Lekar?wsdl" # doplňte
|
||||
@@ -56,12 +56,12 @@ for soubor in os.listdir(cesta):
|
||||
print("Chyba")
|
||||
continue
|
||||
|
||||
newdekursid=funkce.get_dekurs_id(con)
|
||||
newdekursid= funkce.get_dekurs_id(con)
|
||||
if newdekursid is None:
|
||||
print("Chyba")
|
||||
continue
|
||||
|
||||
idpac=funkce.get_idpac(rc,con)
|
||||
idpac= funkce.get_idpac(rc, con)
|
||||
if idpac is None:
|
||||
print("Chyba")
|
||||
continue
|
||||
@@ -84,7 +84,7 @@ for soubor in os.listdir(cesta):
|
||||
|
||||
#zapis do dekurzu
|
||||
# funkce.zapis_dekurs(con, idpac, 2, 6, 2, newfileid, prvnizavorka, "test text", datetime.date(2023, 10, 15),datetime.date(2023, 10, 15))
|
||||
funkce.zapis_dekurs(con, 9742, 2, 6, 2, newfileid, datum_object.strftime('%Y-%m-%d')+" "+ prvnizavorka+ ": "+druhazavorka, "test text", datetime.date(2023, 10, 15),
|
||||
funkce.zapis_dekurs(con, 9742, 2, 6, 2, newfileid, datum_object.strftime('%Y-%m-%d') + " " + prvnizavorka + ": " + druhazavorka, "test text", datetime.date(2023, 10, 15),
|
||||
datetime.date(2023, 10, 15))
|
||||
|
||||
#vymazat zpracovaný soubor
|
||||
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
@@ -169,7 +169,7 @@ BOOKMARKSTEXT
|
||||
# print(row)
|
||||
pacid=row[1]
|
||||
filename=row[6]
|
||||
fileid=funkce.zapis_file(vstupconnection=conn, idpac=row[1],
|
||||
fileid= funkce.zapis_file(vstupconnection=conn, idpac=row[1],
|
||||
cesta=cesta, souborname=row[6], prvnizavorka=row[4],
|
||||
soubordate=row[2], souborfiledate=row[7], poznamka=row[5])
|
||||
|
||||
@@ -196,7 +196,7 @@ BOOKMARKSTEXT
|
||||
print("Max retries reached. Command failed.")
|
||||
|
||||
|
||||
filename=funkce.convert_to1250(filename)
|
||||
filename= funkce.convert_to1250(filename)
|
||||
print("Encodedfilename", filename)
|
||||
filenameforbookmark=row[2].strftime('%Y-%m-%d')+" "+row[4]+": "+row[5]
|
||||
bookmark=bookmark+'"'+filenameforbookmark+'","Files:'+str(fileid)+'",'+str(cislo)+";"
|
||||
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |