Skip to content

Commit

Permalink
Merge pull request #4026 from mikhailprivalov/ftp-copy-and-delete-result
Browse files Browse the repository at this point in the history
copy to save and delete ftp file
urchinpro authored Jun 30, 2024
2 parents af6ecf6 + 52324be commit d94ba1c
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ftp_orders/main.py
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
from ftp_orders.sql_func import get_tubesregistration_id_by_iss
from hospitals.models import Hospitals
from directory.models import Researches, Fractions
from laboratory.settings import BASE_DIR, NEED_RECIEVE_TUBE_TO_PUSH_ORDER, FTP_SETUP_TO_SEND_HL7_BY_RESEARCHES, OWN_SETUP_TO_SEND_FTP_EXECUTOR
from laboratory.settings import BASE_DIR, NEED_RECIEVE_TUBE_TO_PUSH_ORDER, FTP_SETUP_TO_SEND_HL7_BY_RESEARCHES, OWN_SETUP_TO_SEND_FTP_EXECUTOR, FTP_PATH_TO_SAVE
from laboratory.utils import current_time
from slog.models import Log
from users.models import DoctorProfile
@@ -447,6 +447,8 @@ def pull_result(self, file: str):
iss.time_save = current_time()
iss.doc_confirmation_string = ""
iss.save()
self.copy_file(file, FTP_PATH_TO_SAVE)
self.delete_file(file)

def push_order(self, direction: Napravleniya):
hl7 = core.Message("ORM_O01", validation_level=VALIDATION_LEVEL.QUIET)
1 change: 1 addition & 0 deletions laboratory/settings.py
Original file line number Diff line number Diff line change
@@ -408,6 +408,7 @@ def __getitem__(self, item):
TUBE_BARCODE_OFFSET_X = 1
TUBE_BARCODE_WIDTH_MINDEX = 0.0125
RELATED_AGREES_FORMS_TOGETHER = {}
FTP_PATH_TO_SAVE = ""

FCM_CERT_PATH = ""
PROMETHEUS_ENABLED = False

0 comments on commit d94ba1c

Please sign in to comment.