medicafe 0.250122.7__tar.gz → 0.250305.0__tar.gz

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.

Files changed (51) hide show
  1. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/update_medicafe.py +3 -0
  2. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_837p_encoder_library.py +3 -3
  3. medicafe-0.250305.0/MediLink/MediLink_Azure.py +13 -0
  4. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_DataMgmt.py +3 -1
  5. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_Up.py +4 -2
  6. {medicafe-0.250122.7/medicafe.egg-info → medicafe-0.250305.0}/PKG-INFO +1 -1
  7. {medicafe-0.250122.7 → medicafe-0.250305.0/medicafe.egg-info}/PKG-INFO +1 -1
  8. {medicafe-0.250122.7 → medicafe-0.250305.0}/medicafe.egg-info/SOURCES.txt +1 -0
  9. {medicafe-0.250122.7 → medicafe-0.250305.0}/medicafe.egg-info/requires.txt +1 -0
  10. {medicafe-0.250122.7 → medicafe-0.250305.0}/setup.py +3 -2
  11. {medicafe-0.250122.7 → medicafe-0.250305.0}/LICENSE +0 -0
  12. {medicafe-0.250122.7 → medicafe-0.250305.0}/MANIFEST.in +0 -0
  13. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/MediBot.bat +0 -0
  14. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/MediBot.py +0 -0
  15. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/MediBot_Charges.py +0 -0
  16. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/MediBot_Crosswalk_Library.py +0 -0
  17. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/MediBot_Post.py +0 -0
  18. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/MediBot_Preprocessor.py +0 -0
  19. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/MediBot_Preprocessor_lib.py +0 -0
  20. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/MediBot_UI.py +0 -0
  21. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/MediBot_dataformat_library.py +0 -0
  22. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/MediBot_docx_decoder.py +0 -0
  23. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/PDF_to_CSV_Cleaner.py +0 -0
  24. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/__init__.py +0 -0
  25. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediBot/update_json.py +0 -0
  26. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink.py +0 -0
  27. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_837p_encoder.py +0 -0
  28. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_API_Generator.py +0 -0
  29. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_API_v2.py +0 -0
  30. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_API_v3.py +0 -0
  31. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_APIs.py +0 -0
  32. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_ClaimStatus.py +0 -0
  33. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_ConfigLoader.py +0 -0
  34. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_Decoder.py +0 -0
  35. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_Deductible.py +0 -0
  36. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_Down.py +0 -0
  37. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_Gmail.py +0 -0
  38. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_Mailer.py +0 -0
  39. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_Parser.py +0 -0
  40. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_Scan.py +0 -0
  41. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_Scheduler.py +0 -0
  42. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_UI.py +0 -0
  43. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/MediLink_batch.bat +0 -0
  44. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/Soumit_api.py +0 -0
  45. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/__init__.py +0 -0
  46. {medicafe-0.250122.7 → medicafe-0.250305.0}/MediLink/test.py +0 -0
  47. {medicafe-0.250122.7 → medicafe-0.250305.0}/README.md +0 -0
  48. {medicafe-0.250122.7 → medicafe-0.250305.0}/medicafe.egg-info/dependency_links.txt +0 -0
  49. {medicafe-0.250122.7 → medicafe-0.250305.0}/medicafe.egg-info/not-zip-safe +0 -0
  50. {medicafe-0.250122.7 → medicafe-0.250305.0}/medicafe.egg-info/top_level.txt +0 -0
  51. {medicafe-0.250122.7 → medicafe-0.250305.0}/setup.cfg +0 -0
@@ -148,6 +148,9 @@ def ensure_dependencies(requirements_file='requirements.txt'):
148
148
  if not upgrade_package(package_name): # Attempt to upgrade/downgrade to the required version
149
149
  print("Warning: Failed to upgrade/downgrade {} to version {}.".format(package_name, version))
150
150
  time.sleep(2) # Pause for 2 seconds after failure message
151
+ elif version and installed_version == version: # Check if installed version matches required version
152
+ print("All versions match for {}. No changes needed.".format(package_name))
153
+ time.sleep(1) # Pause for 2 seconds to allow user to read the output
151
154
  elif not version: # If no specific version is required, check for the latest version
152
155
  latest_version = get_latest_version(package_name)
153
156
  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)
@@ -0,0 +1,13 @@
1
+ #MediLink_Azure.py
2
+
3
+ import requests
4
+ import json
5
+ import os
6
+
7
+ # Define the Azure AD tenant ID and client ID
8
+ TENANT_ID = 'your-tenant-id'
9
+ CLIENT_ID = 'your-client-id'
10
+
11
+ # Define the Azure AD endpoint
12
+
13
+
@@ -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 /',
@@ -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[-15:]
157
+ last_lines = log_contents[-35:]
157
158
  for file_path in transmission_result:
158
159
  success_message = "Transfer done: '{}'".format(file_path)
159
- success = any(success_message in line for line in last_lines)
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.250122.7
3
+ Version: 0.250305.0
4
4
  Summary: MediCafe
5
5
  Home-page: https://github.com/katanada2
6
6
  Author: Daniel Vidaud
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: medicafe
3
- Version: 0.250122.7
3
+ Version: 0.250305.0
4
4
  Summary: MediCafe
5
5
  Home-page: https://github.com/katanada2
6
6
  Author: Daniel Vidaud
@@ -23,6 +23,7 @@ MediLink/MediLink_API_Generator.py
23
23
  MediLink/MediLink_API_v2.py
24
24
  MediLink/MediLink_API_v3.py
25
25
  MediLink/MediLink_APIs.py
26
+ MediLink/MediLink_Azure.py
26
27
  MediLink/MediLink_ClaimStatus.py
27
28
  MediLink/MediLink_ConfigLoader.py
28
29
  MediLink/MediLink_DataMgmt.py
@@ -7,3 +7,4 @@ lxml==4.2.0
7
7
  python-docx==0.8.11
8
8
  PyYAML==5.2
9
9
  chardet==3.0.4
10
+ msal==1.26.0
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='medicafe',
5
- version="0.250122.7",
5
+ version="0.250305.0",
6
6
  description='MediCafe',
7
7
  long_description="""
8
8
  # Project Overview: MediCafe
@@ -61,7 +61,8 @@ setup(
61
61
  'lxml==4.2.0',
62
62
  'python-docx==0.8.11',
63
63
  'PyYAML==5.2',
64
- 'chardet==3.0.4'
64
+ 'chardet==3.0.4',
65
+ 'msal==1.26.0'
65
66
  ],
66
67
  zip_safe=False
67
68
  )
File without changes
File without changes
File without changes
File without changes