medicafe 0.250812.2__py3-none-any.whl → 0.250812.4__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.bat +17 -5
- MediLink/MediLink_837p_encoder.py +11 -2
- MediLink/MediLink_837p_encoder_library.py +12 -2
- {medicafe-0.250812.2.dist-info → medicafe-0.250812.4.dist-info}/METADATA +1 -1
- {medicafe-0.250812.2.dist-info → medicafe-0.250812.4.dist-info}/RECORD +9 -9
- {medicafe-0.250812.2.dist-info → medicafe-0.250812.4.dist-info}/LICENSE +0 -0
- {medicafe-0.250812.2.dist-info → medicafe-0.250812.4.dist-info}/WHEEL +0 -0
- {medicafe-0.250812.2.dist-info → medicafe-0.250812.4.dist-info}/entry_points.txt +0 -0
- {medicafe-0.250812.2.dist-info → medicafe-0.250812.4.dist-info}/top_level.txt +0 -0
MediBot/MediBot.bat
CHANGED
@@ -69,8 +69,9 @@ set "python_script=C:\Python34\Lib\site-packages\MediBot\update_json.py"
|
|
69
69
|
set "python_script2=C:\Python34\Lib\site-packages\MediBot\Medibot.py"
|
70
70
|
set "medicafe_package=medicafe"
|
71
71
|
|
72
|
-
::
|
73
|
-
set "
|
72
|
+
:: Absolute paths for updater scripts
|
73
|
+
set "script_dir=%~dp0"
|
74
|
+
set "upgrade_medicafe_local=%script_dir%update_medicafe.py"
|
74
75
|
set "upgrade_medicafe_legacy=F:\Medibot\update_medicafe.py"
|
75
76
|
|
76
77
|
:: Storage and config paths with local fallbacks
|
@@ -81,12 +82,23 @@ set "config_file_local=MediBot\json\config.json"
|
|
81
82
|
set "temp_file_legacy=F:\Medibot\last_update_timestamp.txt"
|
82
83
|
set "temp_file_local=MediBot\last_update_timestamp.txt"
|
83
84
|
|
84
|
-
::
|
85
|
-
if exist "
|
85
|
+
:: Ensure F: has the latest updater when available; prefer F: when present
|
86
|
+
if exist "F:\" (
|
87
|
+
if not exist "F:\Medibot" mkdir "F:\Medibot" 2>nul
|
88
|
+
if exist "%upgrade_medicafe_local%" (
|
89
|
+
copy /Y "%upgrade_medicafe_local%" "%upgrade_medicafe_legacy%" >nul 2>&1
|
90
|
+
)
|
91
|
+
)
|
92
|
+
|
93
|
+
:: Preference order: 1) F: drive updater, 2) Local updater
|
94
|
+
if exist "%upgrade_medicafe_legacy%" (
|
95
|
+
set "upgrade_medicafe=%upgrade_medicafe_legacy%"
|
96
|
+
set "use_local_update=0"
|
97
|
+
) else if exist "%upgrade_medicafe_local%" (
|
86
98
|
set "upgrade_medicafe=%upgrade_medicafe_local%"
|
87
99
|
set "use_local_update=1"
|
88
100
|
) else (
|
89
|
-
set "
|
101
|
+
set "upgrade_medicafe="
|
90
102
|
)
|
91
103
|
|
92
104
|
:: Determine which paths to use based on availability
|
@@ -255,9 +255,18 @@ def read_and_validate_claims(file_path, config):
|
|
255
255
|
# Iterate over data in the file
|
256
256
|
for personal_info, insurance_info, service_info, service_info_2, service_info_3 in read_fixed_width_data(file_path):
|
257
257
|
# Process reserved 5-line Medisoft record (currently using 3 lines, 2 reserved)
|
258
|
-
|
258
|
+
medi_cfg = extract_medilink_config(config)
|
259
|
+
parsed_data = parse_fixed_width_data(personal_info, insurance_info, service_info, service_info_2, service_info_3, medi_cfg)
|
259
260
|
# Validate the parsed data
|
260
|
-
|
261
|
+
try:
|
262
|
+
is_valid, errors = validate_claim_data(parsed_data, config)
|
263
|
+
except Exception as e:
|
264
|
+
import traceback as _tb
|
265
|
+
try:
|
266
|
+
MediLink_ConfigLoader.log("validate_claim_data crashed: {}\n{}".format(e, _tb.format_exc()), config, level="ERROR")
|
267
|
+
except Exception:
|
268
|
+
pass
|
269
|
+
raise
|
261
270
|
if is_valid:
|
262
271
|
valid_claims.append(parsed_data) # Add valid data to the list
|
263
272
|
else:
|
@@ -1163,6 +1163,13 @@ def validate_claim_data_for_837p(parsed_data, config, crosswalk):
|
|
1163
1163
|
Returns:
|
1164
1164
|
- Dictionary with validated claim data, or raises ValueError if validation fails
|
1165
1165
|
"""
|
1166
|
+
# Normalize parsed_data to a dict to avoid NoneType errors downstream
|
1167
|
+
if not isinstance(parsed_data, dict):
|
1168
|
+
try:
|
1169
|
+
MediLink_ConfigLoader.log("validate_claim_data_for_837p received non-dict parsed_data of type {}".format(type(parsed_data)), config, level="ERROR")
|
1170
|
+
except Exception:
|
1171
|
+
pass
|
1172
|
+
parsed_data = {}
|
1166
1173
|
validated_data = parsed_data.copy()
|
1167
1174
|
chart_number = parsed_data.get('CHART', 'UNKNOWN')
|
1168
1175
|
|
@@ -1257,8 +1264,11 @@ def validate_claim_data_for_837p(parsed_data, config, crosswalk):
|
|
1257
1264
|
# - MediCafe/MediLink_ConfigLoader.py (configuration management)
|
1258
1265
|
# - Current file (encoder_library.py) for existing patterns
|
1259
1266
|
#
|
1260
|
-
|
1267
|
+
# TESTING REQUIREMENTS:
|
1261
1268
|
# - Verify crosswalk changes persist across application restarts
|
1262
1269
|
# - Test concurrent access scenarios
|
1263
1270
|
# - Verify backup/restore functionality
|
1264
|
-
# - Test with invalid JSON syntax in crosswalk file
|
1271
|
+
# - Test with invalid JSON syntax in crosswalk file
|
1272
|
+
|
1273
|
+
# Always return the validated (or minimally normalized) data structure
|
1274
|
+
return validated_data
|
@@ -1,4 +1,4 @@
|
|
1
|
-
MediBot/MediBot.bat,sha256=
|
1
|
+
MediBot/MediBot.bat,sha256=_rBIGZofAFHxz0m2-b4eIWOvj0sypq0VCjIxFjCLMhU,25630
|
2
2
|
MediBot/MediBot.py,sha256=nKjYyBpQUR5ENrKsX5n30VJrUS84DdpLRhgCGZGJQy4,34671
|
3
3
|
MediBot/MediBot_Charges.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
MediBot/MediBot_Crosswalk_Library.py,sha256=HZHbjKHhjLW2jERmLS6pEZOl-MUxUu1YwA6oUltfdkE,24693
|
@@ -32,8 +32,8 @@ MediCafe/smart_import.py,sha256=23pttO7QTZyvOP9HR9czDIv7lUsE1sHaE2CWC94Xxxo,1980
|
|
32
32
|
MediLink/MediLink.py,sha256=p91MYghOCbNf3ikTzm5P9V1Luj035yd83EDbQ-Ov6oM,33258
|
33
33
|
MediLink/MediLink_277_decoder.py,sha256=Z3hQK2j-YzdXjov6aDlDRc7M_auFBnl3se4OF5q6_04,4358
|
34
34
|
MediLink/MediLink_837p_cob_library.py,sha256=Q1hc1f_JQZT_QUMuL9sbIiWM6WtYFB_T4q1vQIcuurM,30003
|
35
|
-
MediLink/MediLink_837p_encoder.py,sha256=
|
36
|
-
MediLink/MediLink_837p_encoder_library.py,sha256=
|
35
|
+
MediLink/MediLink_837p_encoder.py,sha256=kIcsO8im-sMtKnx0wN1IDXD4Lz0juSjiO33z0pncB-4,31780
|
36
|
+
MediLink/MediLink_837p_encoder_library.py,sha256=0ruNcdts0n1tjBFK7VZNAMRCfjN2dmJfeEdkbW3YN-c,67821
|
37
37
|
MediLink/MediLink_837p_utilities.py,sha256=28H4F6HNXgNHpdnardKWeTPuXgVSzuvu5QEPmkCGp8Q,16285
|
38
38
|
MediLink/MediLink_API_Generator.py,sha256=UUml-PBU3BQduun8RzFH4zfUuo6-p5Ufg7b6Vic-VrY,11171
|
39
39
|
MediLink/MediLink_API_v2.py,sha256=mcIgLnXPS_NaUBrkKJ8mxCUaQ0AuQUeU1vG6DoplbVY,7733
|
@@ -75,9 +75,9 @@ MediLink/test_cob_library.py,sha256=wUMv0-Y6fNsKcAs8Z9LwfmEBRO7oBzBAfWmmzwoNd1g,
|
|
75
75
|
MediLink/test_timing.py,sha256=yH2b8QPLDlp1Zy5AhgtjzjnDHNGhAD16ZtXtZzzESZw,2042
|
76
76
|
MediLink/test_validation.py,sha256=FJrfdUFK--xRScIzrHCg1JeGdm0uJEoRnq6CgkP2lwM,4154
|
77
77
|
MediLink/webapp.html,sha256=JPKT559aFVBi1r42Hz7C77Jj0teZZRumPhBev8eSOLk,19806
|
78
|
-
medicafe-0.250812.
|
79
|
-
medicafe-0.250812.
|
80
|
-
medicafe-0.250812.
|
81
|
-
medicafe-0.250812.
|
82
|
-
medicafe-0.250812.
|
83
|
-
medicafe-0.250812.
|
78
|
+
medicafe-0.250812.4.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
|
79
|
+
medicafe-0.250812.4.dist-info/METADATA,sha256=WZAjxI0SZ-1e8l3LKpiudq6dDp_2ySoD_RtSaiEmNjE,5663
|
80
|
+
medicafe-0.250812.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
81
|
+
medicafe-0.250812.4.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
|
82
|
+
medicafe-0.250812.4.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
|
83
|
+
medicafe-0.250812.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|