medicafe 0.250122.7__py3-none-any.whl → 0.250305.1__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/update_medicafe.py +46 -20
- MediLink/MediLink_837p_encoder_library.py +3 -3
- MediLink/MediLink_Azure.py +13 -0
- MediLink/MediLink_DataMgmt.py +3 -1
- MediLink/MediLink_Up.py +4 -2
- {medicafe-0.250122.7.dist-info → medicafe-0.250305.1.dist-info}/METADATA +9 -5
- {medicafe-0.250122.7.dist-info → medicafe-0.250305.1.dist-info}/RECORD +10 -9
- {medicafe-0.250122.7.dist-info → medicafe-0.250305.1.dist-info}/LICENSE +0 -0
- {medicafe-0.250122.7.dist-info → medicafe-0.250305.1.dist-info}/WHEEL +0 -0
- {medicafe-0.250122.7.dist-info → medicafe-0.250305.1.dist-info}/top_level.txt +0 -0
MediBot/update_medicafe.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#update_medicafe.py
|
|
2
|
-
import subprocess, sys, requests, time, pkg_resources
|
|
2
|
+
import subprocess, sys, requests, time, pkg_resources, platform
|
|
3
3
|
|
|
4
4
|
def get_installed_version(package):
|
|
5
5
|
try:
|
|
@@ -112,25 +112,44 @@ def upgrade_package(package, retries=3, delay=2): # Updated retries to 3
|
|
|
112
112
|
print("Error: All upgrade attempts failed.")
|
|
113
113
|
return False
|
|
114
114
|
|
|
115
|
-
def ensure_dependencies(
|
|
116
|
-
"""Ensure all dependencies listed in
|
|
117
|
-
try
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
115
|
+
def ensure_dependencies():
|
|
116
|
+
"""Ensure all dependencies listed in setup.py are installed and up-to-date."""
|
|
117
|
+
# Don't try to read requirements.txt as it won't be available after installation
|
|
118
|
+
# Instead, hardcode the same dependencies that are in setup.py
|
|
119
|
+
required_packages = [
|
|
120
|
+
'requests==2.21.0',
|
|
121
|
+
'argparse==1.4.0',
|
|
122
|
+
'tqdm==4.14.0',
|
|
123
|
+
'python-docx==0.8.11',
|
|
124
|
+
'PyYAML==5.2',
|
|
125
|
+
'chardet==3.0.4',
|
|
126
|
+
'msal==1.26.0'
|
|
127
|
+
]
|
|
128
|
+
|
|
129
|
+
# Define problematic packages for Windows XP with Python 3.4
|
|
130
|
+
problematic_packages = ['numpy==1.11.3', 'pandas==0.20.0', 'lxml==4.2.0']
|
|
131
|
+
is_windows_py34 = sys.version_info[:2] == (3, 4) and platform.system() == 'Windows'
|
|
132
|
+
|
|
133
|
+
if is_windows_py34:
|
|
134
|
+
print("Detected Windows with Python 3.4")
|
|
135
|
+
print("Please ensure the following packages are installed manually:")
|
|
136
|
+
for pkg in problematic_packages:
|
|
137
|
+
package_name, version = pkg.split('==')
|
|
138
|
+
try:
|
|
139
|
+
installed_version = pkg_resources.get_distribution(package_name).version
|
|
140
|
+
print("{} {} is already installed".format(package_name, installed_version))
|
|
141
|
+
if installed_version != version:
|
|
142
|
+
print("Note: Installed version ({}) differs from required ({})".format(installed_version, version))
|
|
143
|
+
print("If you experience issues, consider installing version {} manually".format(version))
|
|
144
|
+
except pkg_resources.DistributionNotFound:
|
|
145
|
+
print("{} is not installed".format(package_name))
|
|
146
|
+
print("Please install {}=={} manually using a pre-compiled wheel".format(package_name, version))
|
|
147
|
+
print("Download from: https://www.lfd.uci.edu/~gohlke/pythonlibs/")
|
|
148
|
+
print("Then run: pip install path\\to\\{}-{}-cp34-cp34m-win32.whl".format(package_name, version))
|
|
149
|
+
print("\nContinuing with other dependencies...")
|
|
150
|
+
else:
|
|
151
|
+
# Add problematic packages to the list for non-Windows XP environments
|
|
152
|
+
required_packages.extend(problematic_packages)
|
|
134
153
|
|
|
135
154
|
for pkg in required_packages:
|
|
136
155
|
if '==' in pkg:
|
|
@@ -139,6 +158,10 @@ def ensure_dependencies(requirements_file='requirements.txt'):
|
|
|
139
158
|
package_name = pkg
|
|
140
159
|
version = None # No specific version required
|
|
141
160
|
|
|
161
|
+
# Skip problematic packages on Windows XP Python 3.4
|
|
162
|
+
if is_windows_py34 and any(package_name in p for p in problematic_packages):
|
|
163
|
+
continue
|
|
164
|
+
|
|
142
165
|
try:
|
|
143
166
|
installed_version = pkg_resources.get_distribution(package_name).version
|
|
144
167
|
if version and installed_version != version: # Check if installed version matches required version
|
|
@@ -148,6 +171,9 @@ def ensure_dependencies(requirements_file='requirements.txt'):
|
|
|
148
171
|
if not upgrade_package(package_name): # Attempt to upgrade/downgrade to the required version
|
|
149
172
|
print("Warning: Failed to upgrade/downgrade {} to version {}.".format(package_name, version))
|
|
150
173
|
time.sleep(2) # Pause for 2 seconds after failure message
|
|
174
|
+
elif version and installed_version == version: # Check if installed version matches required version
|
|
175
|
+
print("All versions match for {}. No changes needed.".format(package_name))
|
|
176
|
+
time.sleep(1) # Pause for 2 seconds to allow user to read the output
|
|
151
177
|
elif not version: # If no specific version is required, check for the latest version
|
|
152
178
|
latest_version = get_latest_version(package_name)
|
|
153
179
|
if latest_version and installed_version != latest_version:
|
|
@@ -60,7 +60,7 @@ def create_nm1_billing_provider_segment(config, endpoint):
|
|
|
60
60
|
billing_provider_npi = endpoint_config.get('billing_provider_npi', config.get('default_billing_provider_npi', 'DEFAULT NPI'))
|
|
61
61
|
|
|
62
62
|
# Determine billing_entity_type_qualifier based on the presence of billing_provider_firstname
|
|
63
|
-
billing_entity_type_qualifier = '1' if billing_provider_firstname else '2'
|
|
63
|
+
billing_entity_type_qualifier = '1' if billing_provider_firstname else '2'
|
|
64
64
|
|
|
65
65
|
# Construct NM1 segment for the billing provider
|
|
66
66
|
nm1_segment = "NM1*{}*{}*{}*{}****{}*{}~".format(
|
|
@@ -152,10 +152,10 @@ def create_1000A_submitter_name_segment(patient_data, config, endpoint):
|
|
|
152
152
|
# Submitter contact details
|
|
153
153
|
contact_name = config.get('submitter_name', 'NONE')
|
|
154
154
|
contact_telephone_number = config.get('submitter_tel', 'NONE')
|
|
155
|
-
entity_type_qualifier = '2' # if contact_name else '1' BUG - 1 if submitter_first_name is not empty.
|
|
155
|
+
entity_type_qualifier = '2' # if contact_name else '1' BUG - 1 if submitter_first_name is not empty. Reference: billing_entity_type_qualifier = '1' if billing_provider_firstname else '2'
|
|
156
156
|
|
|
157
157
|
# Construct NM1 segment for the submitter
|
|
158
|
-
nm1_segment = "NM1*41*{}*{}*****{}*{}~".format(entity_type_qualifier, submitter_name, submitter_id_qualifier, submitter_id)
|
|
158
|
+
nm1_segment = "NM1*41*{}*{}*****{}*{}~".format(entity_type_qualifier, submitter_name, submitter_id_qualifier, submitter_id) # BUG - need to check submitter_name because this is written as fixed ****** which implies a single entry and not a first and last name. This is weird.
|
|
159
159
|
|
|
160
160
|
# Construct PER segment for the submitter's contact information
|
|
161
161
|
per_segment = "PER*IC*{}*TE*{}~".format(contact_name, contact_telephone_number)
|
MediLink/MediLink_DataMgmt.py
CHANGED
|
@@ -327,11 +327,13 @@ def build_command(winscp_path, winscp_log_path, endpoint_config, remote_director
|
|
|
327
327
|
|
|
328
328
|
session_name = endpoint_config.get('session_name', '')
|
|
329
329
|
|
|
330
|
-
# Initial command structure
|
|
330
|
+
# Initial command structure with options to disable timestamp preservation and permission setting (should now be compatible with Availity, hopefully this doesn't break everything else)
|
|
331
331
|
command = [
|
|
332
332
|
winscp_path,
|
|
333
333
|
'/log=' + winscp_log_path,
|
|
334
334
|
'/loglevel=1',
|
|
335
|
+
'/nopreservetime', # Disable timestamp preservation
|
|
336
|
+
'/nopermissions', # Disable permission setting
|
|
335
337
|
'/command',
|
|
336
338
|
'open {}'.format(session_name),
|
|
337
339
|
'cd /',
|
MediLink/MediLink_Up.py
CHANGED
|
@@ -140,6 +140,7 @@ def handle_transmission_result(transmission_result, config, operation_type, meth
|
|
|
140
140
|
# Define the log filename based on the operation type
|
|
141
141
|
log_filename = "winscp_{}.log".format(operation_type)
|
|
142
142
|
# BUG local_claims_path is where the uploads are only. this needs to have a switch. Check where WinSCP actually logs though.
|
|
143
|
+
# At some point we're going to want to make some aux function that cleans the winscp logs every once in a while (once a day?).
|
|
143
144
|
log_path = os.path.join(config['MediLink_Config']['local_claims_path'], log_filename)
|
|
144
145
|
|
|
145
146
|
try:
|
|
@@ -153,10 +154,11 @@ def handle_transmission_result(transmission_result, config, operation_type, meth
|
|
|
153
154
|
success_dict = {file_path: (False, "Log file empty") for file_path in transmission_result}
|
|
154
155
|
else:
|
|
155
156
|
# Process the last few lines of the log file for transfer status
|
|
156
|
-
last_lines = log_contents[-
|
|
157
|
+
last_lines = log_contents[-35:]
|
|
157
158
|
for file_path in transmission_result:
|
|
158
159
|
success_message = "Transfer done: '{}'".format(file_path)
|
|
159
|
-
|
|
160
|
+
additional_success_message = "Upload of file '{}' was successful, but error occurred while setting the permissions and/or timestamp.".format(file_path)
|
|
161
|
+
success = any(success_message in line or additional_success_message in line for line in last_lines)
|
|
160
162
|
message = "Success" if success else "Transfer incomplete or error occurred"
|
|
161
163
|
success_dict[file_path] = (success, message)
|
|
162
164
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: medicafe
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.250305.1
|
|
4
4
|
Summary: MediCafe
|
|
5
5
|
Home-page: https://github.com/katanada2
|
|
6
6
|
Author: Daniel Vidaud
|
|
@@ -11,13 +11,17 @@ Description-Content-Type: text/markdown
|
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Requires-Dist: requests ==2.21.0
|
|
13
13
|
Requires-Dist: argparse ==1.4.0
|
|
14
|
-
Requires-Dist: numpy ==1.11.3
|
|
15
|
-
Requires-Dist: pandas ==0.20.0
|
|
16
14
|
Requires-Dist: tqdm ==4.14.0
|
|
17
|
-
Requires-Dist: lxml ==4.2.0
|
|
18
15
|
Requires-Dist: python-docx ==0.8.11
|
|
19
16
|
Requires-Dist: PyYAML ==5.2
|
|
20
17
|
Requires-Dist: chardet ==3.0.4
|
|
18
|
+
Requires-Dist: msal ==1.26.0
|
|
19
|
+
Requires-Dist: numpy ==1.11.3 ; platform_python_implementation != "CPython" or sys_platform != "win32" or python_version > "3.5"
|
|
20
|
+
Requires-Dist: pandas ==0.20.0 ; platform_python_implementation != "CPython" or sys_platform != "win32" or python_version > "3.5"
|
|
21
|
+
Requires-Dist: lxml ==4.2.0 ; platform_python_implementation != "CPython" or sys_platform != "win32" or python_version > "3.5"
|
|
22
|
+
Requires-Dist: numpy ==1.11.3 ; platform_python_implementation == "CPython" and sys_platform == "win32" and python_version <= "3.5" and extra == "binary"
|
|
23
|
+
Requires-Dist: pandas ==0.20.0 ; platform_python_implementation == "CPython" and sys_platform == "win32" and python_version <= "3.5" and extra == "binary"
|
|
24
|
+
Requires-Dist: lxml ==4.2.0 ; platform_python_implementation == "CPython" and sys_platform == "win32" and python_version <= "3.5" and extra == "binary"
|
|
21
25
|
|
|
22
26
|
|
|
23
27
|
# Project Overview: MediCafe
|
|
@@ -31,7 +35,7 @@ Requires-Dist: chardet ==3.0.4
|
|
|
31
35
|
- **Error Handling and Logging:** MediBot aims to implement a robust error handling mechanism that can log issues and provide feedback for troubleshooting.
|
|
32
36
|
- **Insurance Mode Adjustments:** The system can adjust data inputs based on specific requirements from various insurance providers, including Medicare.
|
|
33
37
|
- **Diagnosis Entry Automation:** MediBot automates the extraction and entry of diagnosis codes from surgical schedules into Medisoft.
|
|
34
|
-
- **Script Efficiency:** The module enhances the efficiency of scripts handling Medisoft
|
|
38
|
+
- **Script Efficiency:** The module enhances the efficiency of scripts handling Medisoft's quirks, such as fields that are skipped or require special navigation.
|
|
35
39
|
- **User Interface (UI) Enhancements:** Plans to develop a graphical user interface to help non-technical users manage and execute scripts more easily.
|
|
36
40
|
- **Documentation and Support:** Comprehensive documentation and support channels are being established to assist users in setup, configuration, and troubleshooting.
|
|
37
41
|
|
|
@@ -12,18 +12,19 @@ MediBot/MediPost.py,sha256=C1hZJFr65rN6F_dckjdBxFC0vL2CoqY9W3YFqU5HXtE,336
|
|
|
12
12
|
MediBot/PDF_to_CSV_Cleaner.py,sha256=ZZphmq-5K04DkrZNlcwNAIoZPOD_ROWvS3PMkKFxeiM,8799
|
|
13
13
|
MediBot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
MediBot/update_json.py,sha256=9FJZb-32EujpKuSoCjyCbdTdthOIuhcMoN4Wchuzn8A,2508
|
|
15
|
-
MediBot/update_medicafe.py,sha256=
|
|
15
|
+
MediBot/update_medicafe.py,sha256=rx1zUvCI99JRdr8c1csMGI2uJBl3pqusvX-xr3KhmR4,11881
|
|
16
16
|
MediLink/MediLink.py,sha256=G1xuHUKnCrEsKdY4RjHm7a472lShtv_gZC6rffEYzCk,21581
|
|
17
17
|
MediLink/MediLink_277_decoder.py,sha256=Z3hQK2j-YzdXjov6aDlDRc7M_auFBnl3se4OF5q6_04,4358
|
|
18
18
|
MediLink/MediLink_837p_encoder.py,sha256=id2qhKUYq_raKcDr5pAY1xF0V_UR5KBC8SXDAeh6QpU,24807
|
|
19
|
-
MediLink/MediLink_837p_encoder_library.py,sha256=
|
|
19
|
+
MediLink/MediLink_837p_encoder_library.py,sha256=tn3UPyyBEEn_7vvu2sNft6rzWcQ0B61dWvtpKHhnh00,47792
|
|
20
20
|
MediLink/MediLink_API_Generator.py,sha256=vBZ8moR9tvv7mb200HlZnJrk1y-bQi8E16I2r41vgVM,10345
|
|
21
21
|
MediLink/MediLink_API_v2.py,sha256=mcIgLnXPS_NaUBrkKJ8mxCUaQ0AuQUeU1vG6DoplbVY,7733
|
|
22
22
|
MediLink/MediLink_API_v3.py,sha256=zavJ3AQt6mAbgs8akXtpGwf0KBhFYlz3QG61Uh9BGI8,31278
|
|
23
23
|
MediLink/MediLink_APIs.py,sha256=jm3f9T034MJKH8A_CIootULoeuk7H8s7PazpFZRCbKI,6222
|
|
24
|
+
MediLink/MediLink_Azure.py,sha256=Ow70jctiHFIylskBExN7WUoRgrKOvBR6jNTnQMk6lJA,210
|
|
24
25
|
MediLink/MediLink_ClaimStatus.py,sha256=GNZ9mRrjxemBHJ5LiJb2DUWhKgWX2vTNY5jxoUgqv-I,9776
|
|
25
26
|
MediLink/MediLink_ConfigLoader.py,sha256=u9ecB0SIN7zuJAo8KcoQys95BtyAo-8S2n4mRd0S3XU,4356
|
|
26
|
-
MediLink/MediLink_DataMgmt.py,sha256=
|
|
27
|
+
MediLink/MediLink_DataMgmt.py,sha256=t5YdqFDiFHZPLIKBI0gmDGaZTRdGRiohTJImk-Y-F-4,32749
|
|
27
28
|
MediLink/MediLink_Decoder.py,sha256=Suw9CmUHgoe0ZW8sJP_pIO8URBrhO5FmxFF8RcUj9lI,13318
|
|
28
29
|
MediLink/MediLink_Deductible.py,sha256=G1l7shl6uvMBO4R14CcKJ41lRW2AiR9Ahg1tHsETZzo,13490
|
|
29
30
|
MediLink/MediLink_Down.py,sha256=hrDODhs-zRfOKCdiRGENN5Czu-AvdtwJj4Q7grcRXME,6518
|
|
@@ -35,13 +36,13 @@ MediLink/MediLink_Scan.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
35
36
|
MediLink/MediLink_Scheduler.py,sha256=UJvxhDvHraqra2_TlQVlGeh5jRFrrfK6nCVUHnKOEMY,38
|
|
36
37
|
MediLink/MediLink_StatusCheck.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
38
|
MediLink/MediLink_UI.py,sha256=2ngUg02qrE25IG8GG1cdbx8mbn71BF27r9zujHdnpNo,7575
|
|
38
|
-
MediLink/MediLink_Up.py,sha256=
|
|
39
|
+
MediLink/MediLink_Up.py,sha256=kkBxXl1xiKiblwF4uj3r_-keLlSzNNWnu4ZbY2ipNcs,23206
|
|
39
40
|
MediLink/MediLink_batch.bat,sha256=nqL5QwCLyRQFSPdv6kgtcV_cpky7FXSOWVl6OxjRXb4,118
|
|
40
41
|
MediLink/Soumit_api.py,sha256=5JfOecK98ZC6NpZklZW2AkOzkjvrbYxpJpZNH3rFxDw,497
|
|
41
42
|
MediLink/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
43
|
MediLink/test.py,sha256=kSvvJRL_3fWuNS3_x4hToOnUljGLoeEw6SUTHQWQRJk,3108
|
|
43
|
-
medicafe-0.
|
|
44
|
-
medicafe-0.
|
|
45
|
-
medicafe-0.
|
|
46
|
-
medicafe-0.
|
|
47
|
-
medicafe-0.
|
|
44
|
+
medicafe-0.250305.1.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
|
|
45
|
+
medicafe-0.250305.1.dist-info/METADATA,sha256=Hrsx8uG3I1aTLjv2MWqPB9-cYkJU5IXersvgeFiA7m4,5472
|
|
46
|
+
medicafe-0.250305.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
47
|
+
medicafe-0.250305.1.dist-info/top_level.txt,sha256=3uOwR4q_SP8Gufk2uCHoKngAgbtdOwQC6Qjl7ViBa_c,17
|
|
48
|
+
medicafe-0.250305.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|