medicafe 0.250819.1__py3-none-any.whl → 0.250819.2__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/__init__.py +1 -1
- MediCafe/__init__.py +1 -1
- MediLink/MediLink_837p_encoder_library.py +28 -20
- MediLink/__init__.py +1 -1
- {medicafe-0.250819.1.dist-info → medicafe-0.250819.2.dist-info}/METADATA +1 -1
- {medicafe-0.250819.1.dist-info → medicafe-0.250819.2.dist-info}/RECORD +10 -10
- {medicafe-0.250819.1.dist-info → medicafe-0.250819.2.dist-info}/LICENSE +0 -0
- {medicafe-0.250819.1.dist-info → medicafe-0.250819.2.dist-info}/WHEEL +0 -0
- {medicafe-0.250819.1.dist-info → medicafe-0.250819.2.dist-info}/entry_points.txt +0 -0
- {medicafe-0.250819.1.dist-info → medicafe-0.250819.2.dist-info}/top_level.txt +0 -0
MediBot/__init__.py
CHANGED
MediCafe/__init__.py
CHANGED
@@ -201,8 +201,8 @@ def create_nm1_billing_provider_segment(config, endpoint):
|
|
201
201
|
# Resolve required values with TestMode-aware enforcement
|
202
202
|
billing_provider_lastname = legacy_require_config_value(
|
203
203
|
[config, endpoint_config],
|
204
|
-
'billing_provider_lastname',
|
205
|
-
|
204
|
+
['billing_provider_lastname', 'default_billing_provider_name'],
|
205
|
+
'DEFAULT NAME',
|
206
206
|
'2010AA Billing Provider Last Name',
|
207
207
|
config,
|
208
208
|
endpoint
|
@@ -210,12 +210,12 @@ def create_nm1_billing_provider_segment(config, endpoint):
|
|
210
210
|
billing_provider_firstname = config.get('billing_provider_firstname', '')
|
211
211
|
billing_provider_npi = legacy_require_config_value(
|
212
212
|
[endpoint_config, config],
|
213
|
-
'billing_provider_npi',
|
214
|
-
|
213
|
+
['billing_provider_npi', 'default_billing_provider_npi'],
|
214
|
+
'DEFAULT NPI',
|
215
215
|
'2010AA Billing Provider NPI',
|
216
216
|
config,
|
217
217
|
endpoint
|
218
|
-
)
|
218
|
+
) # BUG This is stupid. The NPI is the same. Maybe the first and last name registration might vary by endpoint, but the NPI wont.
|
219
219
|
|
220
220
|
# Determine billing_entity_type_qualifier based on the presence of billing_provider_firstname
|
221
221
|
billing_entity_type_qualifier = '1' if billing_provider_firstname else '2'
|
@@ -1528,20 +1528,27 @@ DEFAULT_PLACEHOLDER_VALUES = set([
|
|
1528
1528
|
'NO STATE', 'NO ZIP', 'NO TAX ID', 'NONE'
|
1529
1529
|
])
|
1530
1530
|
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1531
|
+
string_types = (str,)
|
1532
|
+
|
1533
|
+
def _get_value_from_sources(source_dicts, keys):
|
1534
|
+
# Accept a single key or an ordered list/tuple of keys; scan in priority order
|
1535
|
+
if not isinstance(keys, (list, tuple)):
|
1536
|
+
keys = [keys]
|
1537
|
+
for key in keys:
|
1538
|
+
for d in source_dicts:
|
1539
|
+
try:
|
1540
|
+
if isinstance(d, dict) and key in d:
|
1541
|
+
val = d.get(key)
|
1542
|
+
if val not in [None, '']:
|
1543
|
+
return val
|
1544
|
+
except Exception:
|
1545
|
+
pass
|
1540
1546
|
return None
|
1541
1547
|
|
1542
1548
|
def legacy_require_config_value(source_dicts, key, default_value, context_label, config, endpoint=None, allow_default_in_test=True):
|
1543
1549
|
"""
|
1544
1550
|
Fetch a configuration value from one or more dicts.
|
1551
|
+
- `key` may be a string or a list/tuple of keys to try in order (primary, secondary, ...).
|
1545
1552
|
- If found and equals a known placeholder, allow only in TestMode.
|
1546
1553
|
- If missing, allow default only in TestMode (when allow_default_in_test is True).
|
1547
1554
|
- Otherwise raise ValueError to prevent generating malformed 837p.
|
@@ -1549,18 +1556,19 @@ def legacy_require_config_value(source_dicts, key, default_value, context_label,
|
|
1549
1556
|
TODO Eventually we should get this functionality into configloader in MediCafe so that we can use it in other places.
|
1550
1557
|
"""
|
1551
1558
|
value = _get_value_from_sources(source_dicts, key)
|
1559
|
+
key_label = key if isinstance(key, string_types) else "/".join([k for k in key if isinstance(k, string_types)])
|
1552
1560
|
# Found a value
|
1553
1561
|
if value not in [None, '']:
|
1554
1562
|
if isinstance(value, str) and value in DEFAULT_PLACEHOLDER_VALUES:
|
1555
1563
|
if _is_test_mode(config):
|
1556
1564
|
try:
|
1557
|
-
MediLink_ConfigLoader.log("TEST MODE: Placeholder used for {} -> {}".format(
|
1565
|
+
MediLink_ConfigLoader.log("TEST MODE: Placeholder used for {} -> {}".format(key_label, value), level="WARNING")
|
1558
1566
|
except Exception:
|
1559
1567
|
pass
|
1560
|
-
print("TEST MODE: Using placeholder '{}' for {} ({})".format(value,
|
1568
|
+
print("TEST MODE: Using placeholder '{}' for {} ({})".format(value, key_label, context_label))
|
1561
1569
|
return value
|
1562
1570
|
else:
|
1563
|
-
msg = "Missing real value for '{}' in {}. Found placeholder '{}'. Endpoint: {}".format(
|
1571
|
+
msg = "Missing real value for '{}' in {}. Found placeholder '{}'. Endpoint: {}".format(key_label, context_label, value, (endpoint or ''))
|
1564
1572
|
try:
|
1565
1573
|
MediLink_ConfigLoader.log(msg, level="CRITICAL")
|
1566
1574
|
except Exception:
|
@@ -1570,12 +1578,12 @@ def legacy_require_config_value(source_dicts, key, default_value, context_label,
|
|
1570
1578
|
# Missing value entirely
|
1571
1579
|
if allow_default_in_test and _is_test_mode(config):
|
1572
1580
|
try:
|
1573
|
-
MediLink_ConfigLoader.log("TEST MODE: Default used for {} -> {}".format(
|
1581
|
+
MediLink_ConfigLoader.log("TEST MODE: Default used for {} -> {}".format(key_label, default_value), level="WARNING")
|
1574
1582
|
except Exception:
|
1575
1583
|
pass
|
1576
|
-
print("TEST MODE: Using default '{}' for {} ({})".format(default_value,
|
1584
|
+
print("TEST MODE: Using default '{}' for {} ({})".format(default_value, key_label, context_label))
|
1577
1585
|
return default_value
|
1578
|
-
msg = "Required configuration '{}' missing for {}. Endpoint: {}".format(
|
1586
|
+
msg = "Required configuration '{}' missing for {}. Endpoint: {}".format(key_label, context_label, (endpoint or ''))
|
1579
1587
|
try:
|
1580
1588
|
MediLink_ConfigLoader.log(msg, level="CRITICAL")
|
1581
1589
|
except Exception:
|
MediLink/__init__.py
CHANGED
@@ -10,12 +10,12 @@ MediBot/MediBot_UI.py,sha256=iG8UK71aHYBmB0lkjwl-C6L9DbsOyLaq-wt9kChV0jo,23781
|
|
10
10
|
MediBot/MediBot_dataformat_library.py,sha256=D46fdPtxcgfWTzaLBtSvjtozzZBNqNiODgu4vKMZrBg,10746
|
11
11
|
MediBot/MediBot_docx_decoder.py,sha256=gn7I7Ng5khVIzU0HTTOqi31YSSn1yW8Pyk-i_P9r1oA,32472
|
12
12
|
MediBot/MediBot_smart_import.py,sha256=Emvz7NwemHGCHvG5kZcUyXMcCheidbGKaPfOTg-YCEs,6684
|
13
|
-
MediBot/__init__.py,sha256=
|
13
|
+
MediBot/__init__.py,sha256=BsN88plf2Df_DwQcH5u984m_cB1fSH3t_0wGsv_FRjM,3192
|
14
14
|
MediBot/get_medicafe_version.py,sha256=uyL_UIE42MyFuJ3SRYxJp8sZx8xjTqlYZ3FdQuxLduY,728
|
15
15
|
MediBot/update_json.py,sha256=vvUF4mKCuaVly8MmoadDO59M231fCIInc0KI1EtDtPA,3704
|
16
16
|
MediBot/update_medicafe.py,sha256=09asEEgnGEOq4HH4dmnF18hZdzggqn8zDutQqymdVws,8550
|
17
17
|
MediCafe/MediLink_ConfigLoader.py,sha256=fNBFnPbh1YRVCs9WvZp6tPsKTUFzK3f38ePeUQ00QrQ,10161
|
18
|
-
MediCafe/__init__.py,sha256=
|
18
|
+
MediCafe/__init__.py,sha256=xGUWBKk7QuOBa-SnzrqJb-SQIDKuaBRN1wHfp0yKiCg,5721
|
19
19
|
MediCafe/__main__.py,sha256=mRNyk3D9Ilnu2XhgVI_rut7r5Ro7UIKtwV871giAHI8,12992
|
20
20
|
MediCafe/api_core.py,sha256=IZaBXnP4E7eHzxVbCk2HtxywiVBuhaUyHeaqss8llgY,66378
|
21
21
|
MediCafe/api_core_backup.py,sha256=Oy_Fqt0SEvGkQN1Oqw5iUPVFxPEokyju5CuPEb9k0OY,18686
|
@@ -31,7 +31,7 @@ MediCafe/submission_index.py,sha256=35gz8Anx1dIqG1I14GvuLY0nTO4dSBr2YsZwof9aIQg,
|
|
31
31
|
MediLink/InsuranceTypeService.py,sha256=FKWC1nRfKV_OtCDUtZustauXNhmCYDFiY9jsAGHPPUM,2178
|
32
32
|
MediLink/MediLink_837p_cob_library.py,sha256=glc7SJBDx0taCGmwmCs81GFJJcvA_D7nycIkTfmIuwE,30650
|
33
33
|
MediLink/MediLink_837p_encoder.py,sha256=lJnly96LsSBnzEgF8Ne-nQTL7cmRhoFL2fJajtpvOcU,32209
|
34
|
-
MediLink/MediLink_837p_encoder_library.py,sha256=
|
34
|
+
MediLink/MediLink_837p_encoder_library.py,sha256=VzOpzbYF3i133vdqqxYB6JVMd9N5QzfKaWNVeQKIRZM,87774
|
35
35
|
MediLink/MediLink_837p_utilities.py,sha256=AJ0F22LoF8du20zPBH4TZXgsdXCD-1qYKBnHJM-mXl0,16260
|
36
36
|
MediLink/MediLink_API_Generator.py,sha256=VZBL9W8yFTMJ4ikSwbUI8ANtaJCLnUyqoF8xQEJQn_E,11176
|
37
37
|
MediLink/MediLink_Azure.py,sha256=Ow70jctiHFIylskBExN7WUoRgrKOvBR6jNTnQMk6lJA,210
|
@@ -54,7 +54,7 @@ MediLink/MediLink_insurance_utils.py,sha256=g741Fj2K26cMy0JX5d_XavMw9LgkK6hjaUJY
|
|
54
54
|
MediLink/MediLink_main.py,sha256=5llRZ065vhUq5cWePb7Zz7QJUIAmua33BeNe3LjTVuE,21892
|
55
55
|
MediLink/MediLink_smart_import.py,sha256=B5SfBn_4bYEWJJDolXbjnwKx_-MaqGZ76LyXQwWDV80,9838
|
56
56
|
MediLink/Soumit_api.py,sha256=5JfOecK98ZC6NpZklZW2AkOzkjvrbYxpJpZNH3rFxDw,497
|
57
|
-
MediLink/__init__.py,sha256=
|
57
|
+
MediLink/__init__.py,sha256=_XkngMf4aoHnU0OdY2xvg9NTRqwdRKRLA00iLFlBKfU,3888
|
58
58
|
MediLink/gmail_http_utils.py,sha256=gtqCCrzJC7e8JFQzMNrf7EbK8na2h4sfTu-NMaZ_UHc,4006
|
59
59
|
MediLink/gmail_oauth_utils.py,sha256=Ugr-DEqs4_RddRMSCJ_dbgA3TVeaxpbAor-dktcTIgY,3713
|
60
60
|
MediLink/insurance_type_integration_test.py,sha256=pz2OCXitAznqDciYn6OL9M326m9CYU7YiK-ynssdQ5g,15172
|
@@ -64,9 +64,9 @@ MediLink/test_cob_library.py,sha256=wUMv0-Y6fNsKcAs8Z9LwfmEBRO7oBzBAfWmmzwoNd1g,
|
|
64
64
|
MediLink/test_timing.py,sha256=yH2b8QPLDlp1Zy5AhgtjzjnDHNGhAD16ZtXtZzzESZw,2042
|
65
65
|
MediLink/test_validation.py,sha256=FJrfdUFK--xRScIzrHCg1JeGdm0uJEoRnq6CgkP2lwM,4154
|
66
66
|
MediLink/webapp.html,sha256=JPKT559aFVBi1r42Hz7C77Jj0teZZRumPhBev8eSOLk,19806
|
67
|
-
medicafe-0.250819.
|
68
|
-
medicafe-0.250819.
|
69
|
-
medicafe-0.250819.
|
70
|
-
medicafe-0.250819.
|
71
|
-
medicafe-0.250819.
|
72
|
-
medicafe-0.250819.
|
67
|
+
medicafe-0.250819.2.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
|
68
|
+
medicafe-0.250819.2.dist-info/METADATA,sha256=eAsPHqAEy5kI7cWEeBeBU5jpYILTcKd3R_3cUtnRrAg,3384
|
69
|
+
medicafe-0.250819.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
70
|
+
medicafe-0.250819.2.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
|
71
|
+
medicafe-0.250819.2.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
|
72
|
+
medicafe-0.250819.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|