medicafe 0.250822.3__py3-none-any.whl → 0.250912.0__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.
- MediBot/MediBot.py +11 -4
- MediBot/MediBot_Crosswalk_Library.py +15 -2
- MediBot/MediBot_Crosswalk_Utils.py +12 -2
- MediBot/MediBot_Preprocessor_lib.py +1821 -1728
- MediBot/MediBot_docx_decoder.py +14 -3
- MediBot/__init__.py +1 -1
- MediCafe/MediLink_ConfigLoader.py +12 -1
- MediCafe/__init__.py +1 -1
- MediCafe/core_utils.py +8 -1
- MediCafe/deductible_utils.py +1233 -0
- MediLink/MediLink_837p_encoder_library.py +123 -39
- MediLink/MediLink_Deductible.py +524 -649
- MediLink/MediLink_Deductible_Validator.py +9 -3
- MediLink/MediLink_Display_Utils.py +44 -6
- MediLink/MediLink_Gmail.py +53 -1
- MediLink/MediLink_UI.py +20 -2
- MediLink/__init__.py +1 -1
- MediLink/webapp.html +1 -0
- {medicafe-0.250822.3.dist-info → medicafe-0.250912.0.dist-info}/METADATA +1 -1
- {medicafe-0.250822.3.dist-info → medicafe-0.250912.0.dist-info}/RECORD +24 -23
- {medicafe-0.250822.3.dist-info → medicafe-0.250912.0.dist-info}/LICENSE +0 -0
- {medicafe-0.250822.3.dist-info → medicafe-0.250912.0.dist-info}/WHEEL +0 -0
- {medicafe-0.250822.3.dist-info → medicafe-0.250912.0.dist-info}/entry_points.txt +0 -0
- {medicafe-0.250822.3.dist-info → medicafe-0.250912.0.dist-info}/top_level.txt +0 -0
MediBot/MediBot.py
CHANGED
@@ -847,9 +847,9 @@ if __name__ == "__main__":
|
|
847
847
|
else:
|
848
848
|
proceed = input("\nDo you want to proceed with entering {} new patient(s) into Medisoft? (yes/no): ".format(len(patients_to_process))).lower().strip() in ['yes', 'y']
|
849
849
|
|
850
|
-
#
|
851
|
-
# The
|
852
|
-
#
|
850
|
+
# IMPLEMENTED: MediBot_Charges integration is complete (see lines 867-881)
|
851
|
+
# The charge enrichment step is implemented below with proper error handling
|
852
|
+
# and can be enabled via ENABLE_CHARGES_ENRICHMENT config flag.
|
853
853
|
|
854
854
|
if proceed:
|
855
855
|
print("\nRemember, when in Medisoft:")
|
@@ -863,7 +863,14 @@ if __name__ == "__main__":
|
|
863
863
|
if _ac():
|
864
864
|
_ac().set_pause_status(True)
|
865
865
|
_ = manage_script_pause(csv_data, error_message, reverse_mapping)
|
866
|
-
#
|
866
|
+
# IMPLEMENTED: Charges enrichment with complete error handling and fallback
|
867
|
+
# STRATEGIC NOTE: This integration is production-ready with the following features:
|
868
|
+
# - Complete charge calculation and bundling logic (MediLink_Charges.py)
|
869
|
+
# - Bilateral procedure bundling with 30-day expiration
|
870
|
+
# - Tiered pricing for private insurance and Medicare
|
871
|
+
# - Read-only historical lookups with user notifications
|
872
|
+
# - Deductible flagging (pending OptumAI integration)
|
873
|
+
# - XP SP3 + Python 3.4.4 compatible implementation
|
867
874
|
if e_state.config.get('ENABLE_CHARGES_ENRICHMENT', False):
|
868
875
|
try:
|
869
876
|
from MediCafe.smart_import import get_components
|
@@ -376,8 +376,21 @@ def crosswalk_update(client, config, crosswalk): # Upstream of this is only Medi
|
|
376
376
|
'medisoft_medicare_id': [] # PERFORMANCE FIX: Use list instead of set to avoid conversions
|
377
377
|
}
|
378
378
|
MediLink_ConfigLoader.log("Initialized payer ID {} in crosswalk with endpoint '{}'.".format(payer_id, selected_endpoint), config, level="DEBUG")
|
379
|
-
#
|
380
|
-
#
|
379
|
+
# STRATEGIC NOTE (Medicare Endpoint Routing): Medicare detection logic exists
|
380
|
+
# To activate Medicare-specific routing, implement:
|
381
|
+
# try:
|
382
|
+
# medicare_payer_ids = config.get('MediLink_Config', {}).get('cob_settings', {}).get('medicare_payer_ids', ['00850'])
|
383
|
+
# if payer_id in medicare_payer_ids or 'MEDICARE' in payer_id.upper():
|
384
|
+
# selected_endpoint = 'MEDICARE_PRIMARY'
|
385
|
+
# crosswalk['payer_id'][payer_id]['crossover_endpoint'] = 'MEDICARE_CROSSOVER'
|
386
|
+
# except Exception as e:
|
387
|
+
# MediLink_ConfigLoader.log("Medicare endpoint routing error: {}".format(str(e)), level="WARNING")
|
388
|
+
#
|
389
|
+
# IMPLEMENTATION QUESTIONS:
|
390
|
+
# 1. Should Medicare routing be automatic or require manual confirmation?
|
391
|
+
# 2. How should Medicare Advantage plans be routed differently from traditional Medicare?
|
392
|
+
# 3. Should crossover endpoints be configured per payer or globally?
|
393
|
+
# 4. What fallback behavior when Medicare-specific endpoints are unavailable?
|
381
394
|
|
382
395
|
# Add the insurance ID to the payer ID entry (PERFORMANCE FIX: Use list operations)
|
383
396
|
insurance_id_str = str(insurance_id) # Ensure ID is string
|
@@ -371,8 +371,18 @@ def save_crosswalk(client, config, crosswalk, skip_api_operations=False, api_cac
|
|
371
371
|
crosswalk['payer_id'][payer_id].setdefault('medisoft_id', [])
|
372
372
|
crosswalk['payer_id'][payer_id].setdefault('medisoft_medicare_id', []) # does this work in 3.4.4?
|
373
373
|
MediLink_ConfigLoader.log("Ensured 'medisoft_id' and 'medisoft_medicare_id' for payer ID {} are initialized.".format(payer_id), config, level="DEBUG")
|
374
|
-
#
|
375
|
-
#
|
374
|
+
# STRATEGIC NOTE (Crosswalk Validation): Medicare ID structure is ready for implementation
|
375
|
+
# To enforce Medicare-specific handling, implement:
|
376
|
+
# medicare_payer_ids = config.get('MediLink_Config', {}).get('cob_settings', {}).get('medicare_payer_ids', ['00850'])
|
377
|
+
# if payer_id in medicare_payer_ids:
|
378
|
+
# # Enforce distinctness and add crossover_endpoint
|
379
|
+
# crosswalk['payer_id'][payer_id]['crossover_endpoint'] = 'MEDICARE_CROSSOVER'
|
380
|
+
# # Validate medisoft_medicare_id is distinct from medisoft_id
|
381
|
+
#
|
382
|
+
# IMPLEMENTATION QUESTIONS:
|
383
|
+
# 1. Should Medicare ID validation be enforced strictly or with warnings?
|
384
|
+
# 2. How should crossover endpoints be configured (per-payer or global)?
|
385
|
+
# 3. Should distinctness between commercial and Medicare IDs be required or optional?
|
376
386
|
|
377
387
|
# Convert sets to sorted lists for JSON serialization
|
378
388
|
for payer_id, details in crosswalk.get('payer_id', {}).items():
|