medicafe 0.250421.0__tar.gz → 0.250529.1__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.250421.0 → medicafe-0.250529.1}/MediBot/MediBot_Preprocessor_lib.py +2 -2
  2. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/MediBot_dataformat_library.py +3 -2
  3. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink.py +1 -1
  4. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_837p_encoder_library.py +2 -2
  5. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_DataMgmt.py +6 -1
  6. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_Gmail.py +607 -580
  7. {medicafe-0.250421.0/medicafe.egg-info → medicafe-0.250529.1}/PKG-INFO +1 -1
  8. {medicafe-0.250421.0 → medicafe-0.250529.1/medicafe.egg-info}/PKG-INFO +1 -1
  9. {medicafe-0.250421.0 → medicafe-0.250529.1}/setup.py +1 -1
  10. {medicafe-0.250421.0 → medicafe-0.250529.1}/LICENSE +0 -0
  11. {medicafe-0.250421.0 → medicafe-0.250529.1}/MANIFEST.in +0 -0
  12. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/MediBot.bat +0 -0
  13. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/MediBot.py +0 -0
  14. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/MediBot_Charges.py +0 -0
  15. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/MediBot_Crosswalk_Library.py +0 -0
  16. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/MediBot_Post.py +0 -0
  17. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/MediBot_Preprocessor.py +0 -0
  18. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/MediBot_UI.py +0 -0
  19. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/MediBot_docx_decoder.py +0 -0
  20. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/PDF_to_CSV_Cleaner.py +0 -0
  21. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/__init__.py +0 -0
  22. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/update_json.py +0 -0
  23. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediBot/update_medicafe.py +0 -0
  24. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_837p_encoder.py +0 -0
  25. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_API_Generator.py +0 -0
  26. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_API_v2.py +0 -0
  27. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_API_v3.py +0 -0
  28. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_APIs.py +0 -0
  29. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_Azure.py +0 -0
  30. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_ClaimStatus.py +0 -0
  31. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_ConfigLoader.py +0 -0
  32. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_Decoder.py +0 -0
  33. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_Deductible.py +0 -0
  34. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_Down.py +0 -0
  35. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_Mailer.py +0 -0
  36. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_Parser.py +0 -0
  37. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_Scan.py +0 -0
  38. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_Scheduler.py +0 -0
  39. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_UI.py +0 -0
  40. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_Up.py +0 -0
  41. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/MediLink_batch.bat +0 -0
  42. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/Soumit_api.py +0 -0
  43. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/__init__.py +0 -0
  44. {medicafe-0.250421.0 → medicafe-0.250529.1}/MediLink/test.py +0 -0
  45. {medicafe-0.250421.0 → medicafe-0.250529.1}/README.md +0 -0
  46. {medicafe-0.250421.0 → medicafe-0.250529.1}/medicafe.egg-info/SOURCES.txt +0 -0
  47. {medicafe-0.250421.0 → medicafe-0.250529.1}/medicafe.egg-info/dependency_links.txt +0 -0
  48. {medicafe-0.250421.0 → medicafe-0.250529.1}/medicafe.egg-info/not-zip-safe +0 -0
  49. {medicafe-0.250421.0 → medicafe-0.250529.1}/medicafe.egg-info/requires.txt +0 -0
  50. {medicafe-0.250421.0 → medicafe-0.250529.1}/medicafe.egg-info/top_level.txt +0 -0
  51. {medicafe-0.250421.0 → medicafe-0.250529.1}/setup.cfg +0 -0
@@ -193,10 +193,10 @@ def combine_fields(csv_data):
193
193
  surgery_date = row.get('Surgery Date')
194
194
  row['Surgery Date'] = surgery_date.strftime('%m/%d/%Y') if surgery_date else ''
195
195
 
196
- first_name = row.get('Patient First', '').strip()
196
+ first_name = '_'.join(part.strip() for part in row.get('Patient First', '').split()) # Join the first name parts with underscores after cleaning.
197
197
  middle_name = row.get('Patient Middle', '').strip()
198
198
  middle_name = middle_name[0] if len(middle_name) > 1 else '' # Take only the first character or empty
199
- last_name = row.get('Patient Last', '').strip()
199
+ last_name = '_'.join(part.strip() for part in row.get('Patient Last', '').split()) # Join the last name parts with underscores after cleaning.
200
200
  row['Patient Name'] = ', '.join(filter(None, [last_name, first_name, middle_name])) # Join non-empty parts
201
201
 
202
202
  address1 = row.get('Patient Address1', '').strip()
@@ -68,8 +68,8 @@ def enforce_significant_length(output):
68
68
  # Check if the number of significant digits exceeds 30
69
69
  if len(temp_output) > 30:
70
70
 
71
- # First line of defense: Replace ' APT ' with ' #' if the original length is longer than 30 characters.
72
- temp_output = temp_output.replace(' APT ', ' #')
71
+ # First line of defense: Replace ' APT ' or ' UNIT ' with ' #' if the original length is longer than 30 characters.
72
+ temp_output = temp_output.replace(' APT ', ' #').replace(' UNIT ', ' #')
73
73
 
74
74
  # Remove spaces in a controlled manner from right to left if still too long
75
75
  while len(temp_output) > 30:
@@ -157,6 +157,7 @@ def format_zip(value):
157
157
  # Ensure the value is a string, in case it's provided as an integer
158
158
  value_str = str(value)
159
159
  # Return only the first 5 characters of the zip code
160
+ # TODO Future, they might start using 9 digit zip codes but we don't know what format they'll use yet.
160
161
  return value_str[:5]
161
162
 
162
163
  def format_data(medisoft_field, value, csv_data, reverse_mapping, parsed_address_components):
@@ -94,7 +94,7 @@ def extract_and_suggest_endpoint(file_path, config, crosswalk):
94
94
  parsed_data = MediLink_DataMgmt.parse_fixed_width_data(personal_info, insurance_info, service_info, service_info_2, service_info_3, config.get('MediLink_Config', config))
95
95
 
96
96
  primary_insurance = parsed_data.get('INAME')
97
-
97
+
98
98
  # Retrieve the insurance ID associated with the primary insurance
99
99
  insurance_id = insurance_to_id.get(primary_insurance)
100
100
  MediLink_ConfigLoader.log("Primary insurance ID retrieved for '{}': {}".format(primary_insurance, insurance_id))
@@ -626,8 +626,8 @@ def create_nm1_subscriber_segment(config, parsed_data, endpoint):
626
626
 
627
627
  return "NM1*{entity_identifier_code}*1*{last_name}*{first_name}*{middle_name}***MI*{policy_number}~".format(
628
628
  entity_identifier_code=entity_identifier_code,
629
- last_name=parsed_data['LAST'],
630
- first_name=parsed_data['FIRST'],
629
+ last_name=parsed_data['LAST'].replace('_', ' '), # Replace underscores with spaces in the name.
630
+ first_name=parsed_data['FIRST'].replace('_', ' '),
631
631
  middle_name=parsed_data['MIDDLE'],
632
632
  policy_number=parsed_data['IPOLICY']
633
633
  )
@@ -1,4 +1,3 @@
1
-
2
1
  import csv, os, re, subprocess, time
3
2
  from datetime import datetime, timedelta
4
3
 
@@ -42,6 +41,12 @@ def parse_fixed_width_data(personal_info, insurance_info, service_info, service_
42
41
  if service_info_3:
43
42
  parsed_data.update(slice_data(service_info_3, service_slices, suffix='_3'))
44
43
 
44
+ # Replace underscores with spaces in first and last names since this is downstream of MediSoft.
45
+ if 'FIRST' in parsed_data:
46
+ parsed_data['FIRST'] = parsed_data['FIRST'].replace('_', ' ')
47
+ if 'LAST' in parsed_data:
48
+ parsed_data['LAST'] = parsed_data['LAST'].replace('_', ' ')
49
+
45
50
  MediLink_ConfigLoader.log("Successfully parsed data from segments", config, level="INFO")
46
51
 
47
52
  return parsed_data