medicafe 0.240716.2__py3-none-any.whl → 0.240925.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of medicafe might be problematic. Click here for more details.
- MediBot/MediBot.bat +56 -16
- MediBot/MediBot.py +100 -78
- MediBot/MediBot_Crosswalk_Library.py +496 -194
- MediBot/MediBot_Preprocessor.py +22 -14
- MediBot/MediBot_Preprocessor_lib.py +301 -143
- MediBot/MediBot_UI.py +25 -24
- MediBot/MediBot_dataformat_library.py +17 -25
- MediBot/MediBot_docx_decoder.py +267 -110
- MediBot/update_json.py +26 -1
- MediBot/update_medicafe.py +134 -44
- MediLink/MediLink.py +95 -53
- MediLink/MediLink_837p_encoder.py +83 -66
- MediLink/MediLink_837p_encoder_library.py +159 -102
- MediLink/MediLink_API_Generator.py +1 -7
- MediLink/MediLink_API_v3.py +348 -63
- MediLink/MediLink_APIs.py +1 -2
- MediLink/MediLink_ClaimStatus.py +21 -6
- MediLink/MediLink_ConfigLoader.py +9 -9
- MediLink/MediLink_DataMgmt.py +321 -100
- MediLink/MediLink_Decoder.py +249 -87
- MediLink/MediLink_Deductible.py +62 -56
- MediLink/MediLink_Down.py +115 -121
- MediLink/MediLink_Gmail.py +2 -11
- MediLink/MediLink_Parser.py +63 -36
- MediLink/MediLink_UI.py +36 -23
- MediLink/MediLink_Up.py +188 -115
- {medicafe-0.240716.2.dist-info → medicafe-0.240925.9.dist-info}/METADATA +1 -1
- medicafe-0.240925.9.dist-info/RECORD +47 -0
- medicafe-0.240716.2.dist-info/RECORD +0 -47
- {medicafe-0.240716.2.dist-info → medicafe-0.240925.9.dist-info}/LICENSE +0 -0
- {medicafe-0.240716.2.dist-info → medicafe-0.240925.9.dist-info}/WHEEL +0 -0
- {medicafe-0.240716.2.dist-info → medicafe-0.240925.9.dist-info}/top_level.txt +0 -0
MediLink/MediLink_Up.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
# MediLink_Up.py
|
|
1
2
|
from datetime import datetime
|
|
2
|
-
import os
|
|
3
|
-
import re
|
|
4
|
-
import subprocess
|
|
3
|
+
import os, re, subprocess, traceback
|
|
5
4
|
from tqdm import tqdm
|
|
6
5
|
import MediLink_837p_encoder
|
|
7
|
-
from MediLink_ConfigLoader import log
|
|
6
|
+
from MediLink_ConfigLoader import log, load_configuration
|
|
8
7
|
from MediLink_DataMgmt import operate_winscp
|
|
8
|
+
import MediLink_API_v3
|
|
9
9
|
|
|
10
10
|
# Internet Connectivity Check
|
|
11
11
|
def check_internet_connection():
|
|
@@ -13,6 +13,12 @@ def check_internet_connection():
|
|
|
13
13
|
Checks if there is an active internet connection.
|
|
14
14
|
Returns: Boolean indicating internet connectivity status.
|
|
15
15
|
"""
|
|
16
|
+
# Check if TestMode is enabled
|
|
17
|
+
config, _ = load_configuration()
|
|
18
|
+
if config.get("MediLink_Config", {}).get("TestMode", True):
|
|
19
|
+
# If TestMode is True, skip the connectivity check and return True as if the internet connection were fine
|
|
20
|
+
return True
|
|
21
|
+
|
|
16
22
|
try:
|
|
17
23
|
# Run a ping command to a reliable external server (e.g., Google's DNS server)
|
|
18
24
|
ping_process = subprocess.Popen(["ping", "-n", "1", "8.8.8.8"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
@@ -27,7 +33,17 @@ def check_internet_connection():
|
|
|
27
33
|
print("An error occurred checking for internet connectivity:", e)
|
|
28
34
|
return False
|
|
29
35
|
|
|
30
|
-
def submit_claims(detailed_patient_data_grouped_by_endpoint, config):
|
|
36
|
+
def submit_claims(detailed_patient_data_grouped_by_endpoint, config, crosswalk):
|
|
37
|
+
"""
|
|
38
|
+
Submits claims for each endpoint, either via WinSCP or API, based on configuration settings.
|
|
39
|
+
|
|
40
|
+
Parameters:
|
|
41
|
+
- detailed_patient_data_grouped_by_endpoint: Dictionary with endpoints as keys and lists of patient data as values.
|
|
42
|
+
- config: Configuration settings loaded from a JSON file.
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
- None
|
|
46
|
+
"""
|
|
31
47
|
# Accumulate submission results
|
|
32
48
|
submission_results = {}
|
|
33
49
|
|
|
@@ -35,41 +51,53 @@ def submit_claims(detailed_patient_data_grouped_by_endpoint, config):
|
|
|
35
51
|
print("No new files detected for submission.")
|
|
36
52
|
return
|
|
37
53
|
|
|
38
|
-
#
|
|
54
|
+
# Iterate through each endpoint and submit claims
|
|
39
55
|
for endpoint, patients_data in tqdm(detailed_patient_data_grouped_by_endpoint.items(), desc="Progress", unit="endpoint"):
|
|
40
|
-
if not patients_data:
|
|
56
|
+
if not patients_data:
|
|
41
57
|
continue
|
|
42
58
|
|
|
59
|
+
# Determine the submission method (e.g., "winscp" or "api")
|
|
60
|
+
method = config.get('MediLink_Config', {}).get('endpoints', {}).get(endpoint, {}).get('submission_method', 'winscp')
|
|
61
|
+
|
|
43
62
|
# Attempt submission to each endpoint
|
|
44
63
|
if True: #confirm_transmission({endpoint: patients_data}): # Confirm transmission to each endpoint with detailed overview
|
|
45
64
|
if check_internet_connection():
|
|
65
|
+
client = MediLink_API_v3.APIClient()
|
|
46
66
|
# Process files per endpoint
|
|
47
|
-
converted_files = MediLink_837p_encoder.convert_files_for_submission(patients_data, config)
|
|
48
|
-
if converted_files:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
converted_files = MediLink_837p_encoder.convert_files_for_submission(patients_data, config, crosswalk, client)
|
|
68
|
+
if converted_files:
|
|
69
|
+
if method == 'winscp':
|
|
70
|
+
# Transmit files via WinSCP
|
|
71
|
+
try:
|
|
72
|
+
operation_type = "upload"
|
|
73
|
+
transmission_result = operate_winscp(operation_type, converted_files, config['MediLink_Config']['endpoints'][endpoint], config['MediLink_Config']['local_claims_path'], config)
|
|
74
|
+
success_dict = handle_transmission_result(transmission_result, config, operation_type, method)
|
|
75
|
+
submission_results[endpoint] = success_dict
|
|
76
|
+
except FileNotFoundError as e:
|
|
77
|
+
print("Failed to transmit files to {}. Error: Log file not found - {}".format(endpoint, str(e)))
|
|
78
|
+
submission_results[endpoint] = {"status": False, "error": "Log file not found - " + str(e)}
|
|
79
|
+
except IOError as e:
|
|
80
|
+
print("Failed to transmit files to {}. Error: Input/output error - {}".format(endpoint, str(e)))
|
|
81
|
+
submission_results[endpoint] = {"status": False, "error": "Input/output error - " + str(e)}
|
|
82
|
+
except Exception as e:
|
|
83
|
+
print("Failed to transmit files to {}. Error: {}".format(endpoint, str(e)))
|
|
84
|
+
submission_results[endpoint] = {"status": False, "error": str(e)}
|
|
85
|
+
elif method == 'api':
|
|
86
|
+
# Transmit files via API
|
|
87
|
+
try:
|
|
88
|
+
api_responses = []
|
|
89
|
+
for file_path in converted_files:
|
|
90
|
+
with open(file_path, 'r') as file:
|
|
91
|
+
x12_request_data = file.read().replace('\n', '').replace('\r', '').strip()
|
|
92
|
+
response = MediLink_API_v3.submit_uhc_claim(client, x12_request_data)
|
|
93
|
+
api_responses.append((file_path, response))
|
|
94
|
+
success_dict = handle_transmission_result(api_responses, config, "api", method)
|
|
95
|
+
submission_results[endpoint] = success_dict
|
|
96
|
+
except Exception as e:
|
|
97
|
+
print("Failed to transmit files via API to {}. Error: {}".format(endpoint, str(e)))
|
|
98
|
+
submission_results[endpoint] = {"status": False, "error": str(e)}
|
|
70
99
|
else:
|
|
71
|
-
|
|
72
|
-
print("No files were converted for transmission to {0}.".format(endpoint))
|
|
100
|
+
print("No files were converted for transmission to {}.".format(endpoint))
|
|
73
101
|
else:
|
|
74
102
|
print("Error: No internet connection detected.")
|
|
75
103
|
log("Error: No internet connection detected.", level="ERROR")
|
|
@@ -78,89 +106,102 @@ def submit_claims(detailed_patient_data_grouped_by_endpoint, config):
|
|
|
78
106
|
print("Exiting transmission process. Please try again later.")
|
|
79
107
|
return # Exiting the function if the user decides not to retry
|
|
80
108
|
else:
|
|
81
|
-
|
|
109
|
+
# This else statement is inaccessible because it is preceded by an if True condition,
|
|
110
|
+
# which is always true and effectively makes the else clause unreachable.
|
|
111
|
+
# To handle this, we need to decide under what conditions the submission should be canceled.
|
|
112
|
+
# One option is to replace the if True with a condition that checks for some pre-submission criteria.
|
|
113
|
+
# For instance, if there is a confirmation step or additional checks that need to be performed before
|
|
114
|
+
# proceeding with the submission, these could be included here.
|
|
115
|
+
print("Transmission canceled for endpoint {}.".format(endpoint))
|
|
82
116
|
|
|
83
117
|
# Continue to next endpoint regardless of the previous outcomes
|
|
84
118
|
|
|
85
119
|
# Build and display receipt
|
|
86
120
|
build_and_display_receipt(submission_results, config)
|
|
87
121
|
|
|
88
|
-
print("Claim submission process completed.\n")
|
|
122
|
+
print("Claim submission process completed.\n")
|
|
89
123
|
|
|
90
|
-
def handle_transmission_result(transmission_result, config, operation_type):
|
|
91
|
-
"""
|
|
92
|
-
Analyze the outcomes of file transmissions based on WinSCP log entries.
|
|
93
|
-
|
|
94
|
-
:param transmission_result: List of paths for files that were attempted to be transmitted.
|
|
95
|
-
:param config: Configuration dictionary containing paths and settings.
|
|
96
|
-
:return: Dictionary mapping each file path to a boolean indicating successful transmission.
|
|
124
|
+
def handle_transmission_result(transmission_result, config, operation_type, method):
|
|
97
125
|
"""
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
# BUG local_claims_path is where the uploads are only. this needs to have a switch. Check where WinSCP actually logs though.
|
|
101
|
-
log_path = os.path.join(config['MediLink_Config']['local_claims_path'], log_filename)
|
|
102
|
-
success_dict = {}
|
|
126
|
+
Analyze the outcomes of file transmissions based on WinSCP log entries or API responses.
|
|
103
127
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
128
|
+
Parameters:
|
|
129
|
+
- transmission_result: List of paths for files that were attempted to be transmitted or API response details.
|
|
130
|
+
- config: Configuration dictionary containing paths and settings.
|
|
131
|
+
- operation_type: The type of operation being performed (e.g., "upload").
|
|
132
|
+
- method: The transmission method used ("winscp" or "api").
|
|
107
133
|
|
|
108
|
-
|
|
134
|
+
Returns:
|
|
135
|
+
- Dictionary mapping each file path or API response to a tuple indicating successful transmission and any relevant messages.
|
|
136
|
+
"""
|
|
137
|
+
success_dict = {}
|
|
109
138
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
139
|
+
if method == "winscp":
|
|
140
|
+
# Define the log filename based on the operation type
|
|
141
|
+
log_filename = "winscp_{}.log".format(operation_type)
|
|
142
|
+
# BUG local_claims_path is where the uploads are only. this needs to have a switch. Check where WinSCP actually logs though.
|
|
143
|
+
log_path = os.path.join(config['MediLink_Config']['local_claims_path'], log_filename)
|
|
144
|
+
|
|
145
|
+
try:
|
|
146
|
+
# Read the contents of the WinSCP log file
|
|
147
|
+
with open(log_path, 'r') as log_file:
|
|
148
|
+
log_contents = log_file.readlines()
|
|
149
|
+
|
|
150
|
+
if not log_contents:
|
|
151
|
+
# Handle the case where the log file is empty
|
|
152
|
+
log("Log file '{}' is empty.".format(log_path))
|
|
153
|
+
success_dict = {file_path: (False, "Log file empty") for file_path in transmission_result}
|
|
154
|
+
else:
|
|
155
|
+
# Process the last few lines of the log file for transfer status
|
|
156
|
+
last_lines = log_contents[-15:]
|
|
157
|
+
for file_path in transmission_result:
|
|
123
158
|
success_message = "Transfer done: '{}'".format(file_path)
|
|
124
|
-
log("Looking for: {} in WinSCP log.".format(success_message))
|
|
125
159
|
success = any(success_message in line for line in last_lines)
|
|
126
|
-
|
|
127
|
-
success_dict[file_path] = success
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
160
|
+
message = "Success" if success else "Transfer incomplete or error occurred"
|
|
161
|
+
success_dict[file_path] = (success, message)
|
|
162
|
+
|
|
163
|
+
except FileNotFoundError:
|
|
164
|
+
# Log file not found, handle the error
|
|
165
|
+
log("Log file '{}' not found.".format(log_path))
|
|
166
|
+
success_dict = {file_path: (False, "Log file not found") for file_path in transmission_result}
|
|
167
|
+
except IOError as e:
|
|
168
|
+
# Handle IO errors, such as issues reading the log file
|
|
169
|
+
log("IO error when handling the log file '{}': {}".format(log_path, e))
|
|
170
|
+
success_dict = {file_path: (False, "IO error: {}".format(e)) for file_path in transmission_result}
|
|
171
|
+
except Exception as e:
|
|
172
|
+
# Catch all other exceptions and log them
|
|
173
|
+
log("Error processing the transmission log: {}".format(e))
|
|
174
|
+
success_dict = {file_path: (False, "Error: {}".format(e)) for file_path in transmission_result}
|
|
175
|
+
|
|
176
|
+
elif method == "api":
|
|
177
|
+
# Process each API response to determine the success status
|
|
178
|
+
for file_path, response in transmission_result:
|
|
179
|
+
try:
|
|
180
|
+
# Check if the API response indicates a successful submission
|
|
181
|
+
success = response.get('message') in ["Claim validated and sent for further processing", "Acknowledgement pending"]
|
|
182
|
+
# Record the API message.
|
|
183
|
+
message = response.get('message', 'No message provided')
|
|
184
|
+
success_dict[file_path] = (success, message)
|
|
185
|
+
except Exception as e:
|
|
186
|
+
# Handle API exception
|
|
187
|
+
log("Error processing API response: {}".format(e))
|
|
188
|
+
success_dict[file_path] = (False, str(e))
|
|
143
189
|
|
|
144
190
|
return success_dict
|
|
145
191
|
|
|
146
192
|
def build_and_display_receipt(submission_results, config):
|
|
147
193
|
"""
|
|
148
|
-
|
|
149
|
-
|
|
194
|
+
Builds and displays a receipt for submitted claims, including both successful and failed submissions.
|
|
150
195
|
A receipt of submitted claims is typically attached to each printed facesheet for recordkeeping confirming submission.
|
|
151
|
-
|
|
152
|
-
input: accumulated success_dict
|
|
153
|
-
(historical record won't work because the winscp logs will be incomplete, use clearinghouse to check historical records.)
|
|
154
|
-
|
|
155
|
-
2.) Parse each of the 837p files from filepaths in success_dict:
|
|
156
196
|
|
|
157
|
-
|
|
197
|
+
Parameters:
|
|
198
|
+
- submission_results: Dictionary containing submission results with detailed information for each endpoint.
|
|
199
|
+
- config: Configuration settings loaded from a JSON file.
|
|
158
200
|
|
|
159
|
-
|
|
201
|
+
Returns:
|
|
202
|
+
- None
|
|
160
203
|
"""
|
|
161
204
|
# Prepare data for receipt
|
|
162
|
-
# Organize submission results into a format suitable for the receipt
|
|
163
|
-
log("Preparing receipt data...")
|
|
164
205
|
receipt_data = prepare_receipt_data(submission_results)
|
|
165
206
|
|
|
166
207
|
# Build the receipt
|
|
@@ -172,43 +213,64 @@ def build_and_display_receipt(submission_results, config):
|
|
|
172
213
|
|
|
173
214
|
# Save the receipt to a text file
|
|
174
215
|
save_receipt_to_file(receipt_content, config)
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
return receipt_data
|
|
216
|
+
|
|
217
|
+
log("Receipt has been generated and saved.")
|
|
178
218
|
|
|
179
219
|
def prepare_receipt_data(submission_results):
|
|
180
220
|
"""
|
|
181
221
|
Prepare submission results for a receipt, including data from both successful and failed submissions.
|
|
182
|
-
|
|
222
|
+
|
|
183
223
|
This function extracts patient names, dates of service, amounts billed, and insurance names from an 837p file.
|
|
184
224
|
It also includes the date and time of batch claim submission, and the receiver name from the 1000B segment.
|
|
185
225
|
Data is organized by receiver name and includes both successful and failed submissions.
|
|
186
|
-
|
|
226
|
+
|
|
187
227
|
Parameters:
|
|
188
|
-
- submission_results (dict): Contains submission results grouped by endpoint, with
|
|
189
|
-
|
|
228
|
+
- submission_results (dict): Contains submission results grouped by endpoint, with detailed status information.
|
|
229
|
+
|
|
190
230
|
Returns:
|
|
191
231
|
- dict: Organized data for receipt preparation, including both successful and failed submission details.
|
|
192
232
|
"""
|
|
193
233
|
receipt_data = {}
|
|
194
234
|
for endpoint, files in submission_results.items():
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
235
|
+
log("Processing endpoint: {}".format(endpoint), level="INFO")
|
|
236
|
+
for file_path, file_result in files.items():
|
|
237
|
+
log("File path: {}".format(file_path), level="DEBUG")
|
|
238
|
+
log("File result: {}".format(file_result), level="DEBUG")
|
|
239
|
+
|
|
240
|
+
try:
|
|
241
|
+
# Unpack the tuple to get status and message
|
|
242
|
+
status, message = file_result
|
|
243
|
+
except ValueError as e:
|
|
244
|
+
file_result_length = len(file_result) if hasattr(file_result, '__len__') else 'Unknown'
|
|
245
|
+
error_msg = 'Too many values to unpack.' if 'too many values to unpack' in str(e) else \
|
|
246
|
+
'Not enough values to unpack.' if 'not enough values to unpack' in str(e) else \
|
|
247
|
+
'Value unpacking error.'
|
|
248
|
+
log("ValueError: {} for file_result: {} (Length: {})".format(error_msg, file_result, file_result_length), level="ERROR")
|
|
249
|
+
continue
|
|
250
|
+
except Exception as e:
|
|
251
|
+
tb = traceback.format_exc()
|
|
252
|
+
log("Unexpected error: {}. Traceback: {}".format(e, tb), level="ERROR")
|
|
253
|
+
continue
|
|
254
|
+
|
|
255
|
+
log("Status: {}, Message: {}".format(status, message), level="DEBUG")
|
|
256
|
+
|
|
199
257
|
if endpoint not in receipt_data:
|
|
200
258
|
receipt_data[endpoint] = {
|
|
201
|
-
"
|
|
202
|
-
"
|
|
259
|
+
"patients": [],
|
|
260
|
+
"date_of_submission": datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
203
261
|
}
|
|
204
262
|
|
|
205
|
-
#
|
|
263
|
+
# Parse patient details and add the result status and message
|
|
264
|
+
patient_data, _ = parse_837p_file(file_path)
|
|
206
265
|
for patient in patient_data:
|
|
207
|
-
patient['status'] =
|
|
208
|
-
|
|
266
|
+
patient['status'] = status
|
|
267
|
+
patient['message'] = message
|
|
268
|
+
|
|
209
269
|
receipt_data[endpoint]["patients"].extend(patient_data)
|
|
210
270
|
|
|
211
271
|
validate_data(receipt_data)
|
|
272
|
+
log("Receipt data: {}".format(receipt_data), level="DEBUG")
|
|
273
|
+
|
|
212
274
|
return receipt_data
|
|
213
275
|
|
|
214
276
|
def validate_data(receipt_data):
|
|
@@ -216,7 +278,7 @@ def validate_data(receipt_data):
|
|
|
216
278
|
for endpoint, data in receipt_data.items():
|
|
217
279
|
patients = data.get("patients", [])
|
|
218
280
|
for index, patient in enumerate(patients, start=1):
|
|
219
|
-
missing_fields = [field for field in ('name', 'service_date', 'amount_billed', 'insurance_name', 'status') if
|
|
281
|
+
missing_fields = [field for field in ('name', 'service_date', 'amount_billed', 'insurance_name', 'status') if patient.get(field) in (None, '')]
|
|
220
282
|
|
|
221
283
|
if missing_fields:
|
|
222
284
|
# Log the missing fields without revealing PHI
|
|
@@ -315,13 +377,14 @@ def build_receipt_content(receipt_data):
|
|
|
315
377
|
|
|
316
378
|
# Adding patient information in a tabular format
|
|
317
379
|
for patient in data["patients"]:
|
|
318
|
-
|
|
380
|
+
# Use the message as the status if the submission failed
|
|
381
|
+
status_display = "SUCCESS" if patient['status'] else patient['message']
|
|
319
382
|
patient_info = "{:<20} | {:<15} | ${:<14} | {:<20} | {:<10}".format(
|
|
320
383
|
patient['name'],
|
|
321
384
|
patient['service_date'],
|
|
322
385
|
patient['amount_billed'],
|
|
323
386
|
patient['insurance_name'],
|
|
324
|
-
|
|
387
|
+
status_display
|
|
325
388
|
)
|
|
326
389
|
receipt_lines.append(patient_info)
|
|
327
390
|
|
|
@@ -331,17 +394,27 @@ def build_receipt_content(receipt_data):
|
|
|
331
394
|
return receipt_content
|
|
332
395
|
|
|
333
396
|
def save_receipt_to_file(receipt_content, config):
|
|
397
|
+
"""
|
|
398
|
+
Saves the receipt content to a text file and opens it for the user.
|
|
399
|
+
|
|
400
|
+
Parameters:
|
|
401
|
+
- receipt_content (str): The formatted content of the receipt.
|
|
402
|
+
- config: Configuration settings loaded from a JSON file.
|
|
403
|
+
|
|
404
|
+
Returns:
|
|
405
|
+
- None
|
|
406
|
+
"""
|
|
334
407
|
try:
|
|
335
|
-
# Save the receipt content to a text file named Receipt_[date_of_submission].txt
|
|
336
|
-
# Use the configured local storage path to determine the file location
|
|
337
408
|
file_name = "Receipt_{0}.txt".format(datetime.now().strftime('%Y%m%d_%H%M%S'))
|
|
338
409
|
file_path = os.path.join(config['MediLink_Config']['local_claims_path'], file_name)
|
|
339
410
|
|
|
340
411
|
with open(file_path, 'w') as file:
|
|
341
412
|
file.write(receipt_content)
|
|
342
413
|
|
|
343
|
-
|
|
344
|
-
|
|
414
|
+
log("Receipt saved to:", file_path)
|
|
415
|
+
# Open the file automatically for the user (Windows-specific)
|
|
416
|
+
if os.name == 'nt':
|
|
417
|
+
os.startfile(file_path)
|
|
345
418
|
except Exception as e:
|
|
346
419
|
print("Failed to save or open receipt file:", e)
|
|
347
420
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
MediBot/MediBot.bat,sha256=vV-SwnspmO8GWjwXZegKOBuzVc_ZM-pyDONViGb9FOk,8565
|
|
2
|
+
MediBot/MediBot.py,sha256=DJR814EE-qMASYf-h_gHqq6nYUV__t8LHKdrdL4lQtc,19006
|
|
3
|
+
MediBot/MediBot_Charges.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
MediBot/MediBot_Crosswalk_Library.py,sha256=ninHjG8HINyvnZ96k6VIZMoVXP_PDIFm-km46O6X2IU,34524
|
|
5
|
+
MediBot/MediBot_Post.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
MediBot/MediBot_Preprocessor.py,sha256=_gOK-l6sA5dxB9gyM38iAFKUV06jdIRn4l6k9pXHO8A,12692
|
|
7
|
+
MediBot/MediBot_Preprocessor_lib.py,sha256=jDnfbBvyEJR2T-tu2dnJD4GZWZbmZ7j52TCR2c22kCQ,33836
|
|
8
|
+
MediBot/MediBot_UI.py,sha256=34AGMKHkHrcUmB1F8Dzv7fVhW2_htOJEpaovhLAflf8,10503
|
|
9
|
+
MediBot/MediBot_dataformat_library.py,sha256=6AFGyiaUcFMVUNbudGKoBqAZuMnLf2EIWaypOq6-ZCw,7867
|
|
10
|
+
MediBot/MediBot_docx_decoder.py,sha256=z-_oVrSocu4-CenDGDHOkDeqPcKqZqm6Ao9mABgqxJU,23561
|
|
11
|
+
MediBot/MediPost.py,sha256=C1hZJFr65rN6F_dckjdBxFC0vL2CoqY9W3YFqU5HXtE,336
|
|
12
|
+
MediBot/PDF_to_CSV_Cleaner.py,sha256=ZZphmq-5K04DkrZNlcwNAIoZPOD_ROWvS3PMkKFxeiM,8799
|
|
13
|
+
MediBot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
MediBot/update_json.py,sha256=9FJZb-32EujpKuSoCjyCbdTdthOIuhcMoN4Wchuzn8A,2508
|
|
15
|
+
MediBot/update_medicafe.py,sha256=19SUpkSzbkDpa6UySskU9YRuXAPG9aO-8ocwUDI8A_0,6037
|
|
16
|
+
MediLink/MediLink.py,sha256=iGdpYZ5pA2c1yDLXTc4Zmwh8tfSppA0d-wKK6uq96IQ,20185
|
|
17
|
+
MediLink/MediLink_277_decoder.py,sha256=Z3hQK2j-YzdXjov6aDlDRc7M_auFBnl3se4OF5q6_04,4358
|
|
18
|
+
MediLink/MediLink_837p_encoder.py,sha256=QkJoJgOaztNECweoGaT2Z-Uzn4siRA18Xb8CFMBENqk,24557
|
|
19
|
+
MediLink/MediLink_837p_encoder_library.py,sha256=bysByi4FeLcTqrbQM62tcOfg_a4MA70meQlK8AaXPJQ,46406
|
|
20
|
+
MediLink/MediLink_API_Generator.py,sha256=vBZ8moR9tvv7mb200HlZnJrk1y-bQi8E16I2r41vgVM,10345
|
|
21
|
+
MediLink/MediLink_API_v2.py,sha256=mcIgLnXPS_NaUBrkKJ8mxCUaQ0AuQUeU1vG6DoplbVY,7733
|
|
22
|
+
MediLink/MediLink_API_v3.py,sha256=dWmtEwn4lVnxvSpRT15tiJTOAwH1FUkOBeyldzT2Zio,31121
|
|
23
|
+
MediLink/MediLink_APIs.py,sha256=jm3f9T034MJKH8A_CIootULoeuk7H8s7PazpFZRCbKI,6222
|
|
24
|
+
MediLink/MediLink_ClaimStatus.py,sha256=GNZ9mRrjxemBHJ5LiJb2DUWhKgWX2vTNY5jxoUgqv-I,9776
|
|
25
|
+
MediLink/MediLink_ConfigLoader.py,sha256=u9ecB0SIN7zuJAo8KcoQys95BtyAo-8S2n4mRd0S3XU,4356
|
|
26
|
+
MediLink/MediLink_DataMgmt.py,sha256=taGQuzg1IMjqIcG71mRiBN3SEF3XreOdBPWJf8guUsE,32472
|
|
27
|
+
MediLink/MediLink_Decoder.py,sha256=Suw9CmUHgoe0ZW8sJP_pIO8URBrhO5FmxFF8RcUj9lI,13318
|
|
28
|
+
MediLink/MediLink_Deductible.py,sha256=60et5Rue1jAmRb3loxiSyEpf7wXtC0MK75EXkKZgxIA,9030
|
|
29
|
+
MediLink/MediLink_Down.py,sha256=hrDODhs-zRfOKCdiRGENN5Czu-AvdtwJj4Q7grcRXME,6518
|
|
30
|
+
MediLink/MediLink_ERA_decoder.py,sha256=MiOtDcXnmevPfHAahIlTLlUc14VcQWAor9Xa7clA2Ts,8710
|
|
31
|
+
MediLink/MediLink_Gmail.py,sha256=iFI3clsmt2OMhLTHHJnj4OXw1WBR2pYc5QCfnvD-Zgg,21156
|
|
32
|
+
MediLink/MediLink_Mailer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
+
MediLink/MediLink_Parser.py,sha256=YCg2jvoJUi048GICUmP0v71b-hGqwxUQelhoi3P33i4,8128
|
|
34
|
+
MediLink/MediLink_Scan.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
+
MediLink/MediLink_Scheduler.py,sha256=UJvxhDvHraqra2_TlQVlGeh5jRFrrfK6nCVUHnKOEMY,38
|
|
36
|
+
MediLink/MediLink_StatusCheck.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
+
MediLink/MediLink_UI.py,sha256=_gdahyDpd_NPCZPYnLyFmOtmzcLbUQN_eLO3qpZ8Etc,6790
|
|
38
|
+
MediLink/MediLink_Up.py,sha256=Yr-6w1bBXLO-aydxhe2G5skS9zPoPIGVD35zvS7tzCM,22698
|
|
39
|
+
MediLink/MediLink_batch.bat,sha256=nqL5QwCLyRQFSPdv6kgtcV_cpky7FXSOWVl6OxjRXb4,118
|
|
40
|
+
MediLink/Soumit_api.py,sha256=5JfOecK98ZC6NpZklZW2AkOzkjvrbYxpJpZNH3rFxDw,497
|
|
41
|
+
MediLink/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
|
+
MediLink/test.py,sha256=kSvvJRL_3fWuNS3_x4hToOnUljGLoeEw6SUTHQWQRJk,3108
|
|
43
|
+
medicafe-0.240925.9.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
|
|
44
|
+
medicafe-0.240925.9.dist-info/METADATA,sha256=Wso7YeYSw7eKhGmNk9QlHJl3XoI6I1OhFX89rlnQNTY,4625
|
|
45
|
+
medicafe-0.240925.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
46
|
+
medicafe-0.240925.9.dist-info/top_level.txt,sha256=3uOwR4q_SP8Gufk2uCHoKngAgbtdOwQC6Qjl7ViBa_c,17
|
|
47
|
+
medicafe-0.240925.9.dist-info/RECORD,,
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
MediBot/MediBot.bat,sha256=B_iUMQro6kPrTbGOePsTvOq3N9nXn5fE7xnkt4jfSrE,7032
|
|
2
|
-
MediBot/MediBot.py,sha256=X7ZU-xYsnw7xL7nBZTDudhSXdsnEavcHORE4hPM4L58,16704
|
|
3
|
-
MediBot/MediBot_Charges.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
MediBot/MediBot_Crosswalk_Library.py,sha256=RxwihSpPtTlnDbPiQ1VWnPVVdjYA-L69OPWREXMTGiQ,14862
|
|
5
|
-
MediBot/MediBot_Post.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
MediBot/MediBot_Preprocessor.py,sha256=OI9rfDF01OLuLFZoSzIceO3r5fkKEFN7tynXPIceoo4,11941
|
|
7
|
-
MediBot/MediBot_Preprocessor_lib.py,sha256=aU5VWwLqDxka8DGLkrji6C9rYMzoqjxLScZ64Ya-0ok,24170
|
|
8
|
-
MediBot/MediBot_UI.py,sha256=_CS9BV3882mNp-UmMUPKZOsDI3ZGxft5mcr36-Nq1FQ,10318
|
|
9
|
-
MediBot/MediBot_dataformat_library.py,sha256=AVRAl4oDHR6nq2bBiJf2YABrdtnfiQYdYzV0BMvL7U0,8346
|
|
10
|
-
MediBot/MediBot_docx_decoder.py,sha256=nO5N8qPsZoiFzicSJ5mbBfjaqGinxgh_VzjLhEsj95U,13712
|
|
11
|
-
MediBot/MediPost.py,sha256=C1hZJFr65rN6F_dckjdBxFC0vL2CoqY9W3YFqU5HXtE,336
|
|
12
|
-
MediBot/PDF_to_CSV_Cleaner.py,sha256=ZZphmq-5K04DkrZNlcwNAIoZPOD_ROWvS3PMkKFxeiM,8799
|
|
13
|
-
MediBot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
MediBot/update_json.py,sha256=eAu3BPYtlGlwVGZdTUmrqq4qLTVcplt-6EnzcGCheG0,1557
|
|
15
|
-
MediBot/update_medicafe.py,sha256=CYxRHNXb-ZwGELWSXJA90foMwac_GBdXhD9hwClUjpA,2249
|
|
16
|
-
MediLink/MediLink.py,sha256=GRMe3OiskBGVpHDGIrTmY4_t2pc5J_pznHt5Z5mU8X8,18054
|
|
17
|
-
MediLink/MediLink_277_decoder.py,sha256=Z3hQK2j-YzdXjov6aDlDRc7M_auFBnl3se4OF5q6_04,4358
|
|
18
|
-
MediLink/MediLink_837p_encoder.py,sha256=onrbzk-6QG97oHRn-AvDtcsYyQ-OpqZJE4KWjgPTwxQ,23550
|
|
19
|
-
MediLink/MediLink_837p_encoder_library.py,sha256=_K162u1spMWZg-7HMebEU2yciGx_1T6lX7FW02Ek3fA,41831
|
|
20
|
-
MediLink/MediLink_API_Generator.py,sha256=AvKJOoQKl2_dJG517chsVAjBKqEEIEz_c12OL03J428,10387
|
|
21
|
-
MediLink/MediLink_API_v2.py,sha256=mcIgLnXPS_NaUBrkKJ8mxCUaQ0AuQUeU1vG6DoplbVY,7733
|
|
22
|
-
MediLink/MediLink_API_v3.py,sha256=8X-5ldKnAJzfE2R0nywa6xYq6C7kqJ3lLDCyqXg9FP4,15911
|
|
23
|
-
MediLink/MediLink_APIs.py,sha256=_EFNjBFwtZsEJM771xa6g-zQCCRrebIHj73ElVVZ8Fs,6229
|
|
24
|
-
MediLink/MediLink_ClaimStatus.py,sha256=s6Ll46yU2-jJueF-3jqVyJ53s1Qll1MONkX2vm1alLY,8655
|
|
25
|
-
MediLink/MediLink_ConfigLoader.py,sha256=p1Fkm-KeRR1vcIS-7K6RUP7g1B7HrgO_KbjmwwNCX4A,4161
|
|
26
|
-
MediLink/MediLink_DataMgmt.py,sha256=y8nNe25mj2ajUmPo7508q_T1vxkYiKzwdRit0oX8V9s,20344
|
|
27
|
-
MediLink/MediLink_Decoder.py,sha256=L4b3OnVERhgP68T4Lvty9MJNXutPAjXRPBjYpzSj2ZM,7139
|
|
28
|
-
MediLink/MediLink_Deductible.py,sha256=3uCUluPx6sHsU7tj9wM62PZK_WY8VOPFlXG3Iccgiy4,8520
|
|
29
|
-
MediLink/MediLink_Down.py,sha256=1SIzPLSI4w4Prb2u0FXsf1Bd6Nksb0tMv0N8w1aWzyE,7110
|
|
30
|
-
MediLink/MediLink_ERA_decoder.py,sha256=MiOtDcXnmevPfHAahIlTLlUc14VcQWAor9Xa7clA2Ts,8710
|
|
31
|
-
MediLink/MediLink_Gmail.py,sha256=FV13-umZIouhetnwkGOBgFQYl5FTyOs__SpjaycUxKk,21195
|
|
32
|
-
MediLink/MediLink_Mailer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
-
MediLink/MediLink_Parser.py,sha256=p2RlCut84hESXjR7tyCZ9O-gUbsUQeYqRp1bXhKbxu4,6322
|
|
34
|
-
MediLink/MediLink_Scan.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
-
MediLink/MediLink_Scheduler.py,sha256=UJvxhDvHraqra2_TlQVlGeh5jRFrrfK6nCVUHnKOEMY,38
|
|
36
|
-
MediLink/MediLink_StatusCheck.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
-
MediLink/MediLink_UI.py,sha256=kAtWApyvaE1qMOy5Vzszy3zPBI25wT29jG1XkIWnAAs,6164
|
|
38
|
-
MediLink/MediLink_Up.py,sha256=tKkMaz0FvbIXCJ9eQ2LXp6r4_Ou4yDaqRtekfZE6bF0,18546
|
|
39
|
-
MediLink/MediLink_batch.bat,sha256=nqL5QwCLyRQFSPdv6kgtcV_cpky7FXSOWVl6OxjRXb4,118
|
|
40
|
-
MediLink/Soumit_api.py,sha256=5JfOecK98ZC6NpZklZW2AkOzkjvrbYxpJpZNH3rFxDw,497
|
|
41
|
-
MediLink/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
|
-
MediLink/test.py,sha256=kSvvJRL_3fWuNS3_x4hToOnUljGLoeEw6SUTHQWQRJk,3108
|
|
43
|
-
medicafe-0.240716.2.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
|
|
44
|
-
medicafe-0.240716.2.dist-info/METADATA,sha256=edgBR0DGETtGim21JGQ13iz2K-kqqJwl41hXGAYJxRQ,4625
|
|
45
|
-
medicafe-0.240716.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
46
|
-
medicafe-0.240716.2.dist-info/top_level.txt,sha256=3uOwR4q_SP8Gufk2uCHoKngAgbtdOwQC6Qjl7ViBa_c,17
|
|
47
|
-
medicafe-0.240716.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|