medicafe 0.250819.1__py3-none-any.whl → 0.250819.3__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 CHANGED
@@ -19,7 +19,7 @@ Smart Import Integration:
19
19
  medibot_main = get_components('medibot_main')
20
20
  """
21
21
 
22
- __version__ = "0.250819.1"
22
+ __version__ = "0.250819.3"
23
23
  __author__ = "Daniel Vidaud"
24
24
  __email__ = "daniel@personalizedtransformation.com"
25
25
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python
2
2
  # update_medicafe.py
3
- # Script Version: 2.0.0 (clean 3-try updater)
3
+ # Script Version: 2.0.1 (clean 3-try updater)
4
4
  # Target environment: Windows XP SP3 + Python 3.4.4 (ASCII-only)
5
5
 
6
6
  import sys, os, time, subprocess, platform
@@ -149,9 +149,9 @@ def verify_post_install(package, expected_version):
149
149
 
150
150
  def upgrade_package(package):
151
151
  strategies = [
152
- ['install', '--upgrade', package, '--no-cache-dir', '--disable-pip-version-check'],
153
- ['install', '--upgrade', '--force-reinstall', package, '--no-cache-dir', '--disable-pip-version-check'],
154
- ['install', '--upgrade', '--force-reinstall', '--ignore-installed', '--user', package, '--no-cache-dir', '--disable-pip-version-check']
152
+ ['install', '--upgrade', package + '[binary]', '--no-cache-dir', '--disable-pip-version-check'],
153
+ ['install', '--upgrade', '--force-reinstall', package + '[binary]', '--no-cache-dir', '--disable-pip-version-check'],
154
+ ['install', '--upgrade', '--force-reinstall', '--ignore-installed', '--user', package + '[binary]', '--no-cache-dir', '--disable-pip-version-check']
155
155
  ]
156
156
 
157
157
  latest_before = get_latest_version(package, retries=2)
MediCafe/__init__.py CHANGED
@@ -27,7 +27,7 @@ Smart Import System:
27
27
  api_suite = get_api_access()
28
28
  """
29
29
 
30
- __version__ = "0.250819.1"
30
+ __version__ = "0.250819.3"
31
31
  __author__ = "Daniel Vidaud"
32
32
  __email__ = "daniel@personalizedtransformation.com"
33
33
 
@@ -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
- config.get('default_billing_provider_name', 'DEFAULT NAME'),
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
- config.get('default_billing_provider_npi', 'DEFAULT NPI'),
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
- def _get_value_from_sources(source_dicts, key):
1532
- for d in source_dicts:
1533
- try:
1534
- if isinstance(d, dict) and key in d:
1535
- val = d.get(key)
1536
- if val not in [None, '']:
1537
- return val
1538
- except Exception:
1539
- pass
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(key, value), level="WARNING")
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, key, context_label))
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(key, context_label, value, (endpoint or ''))
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(key, default_value), level="WARNING")
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, key, context_label))
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(key, context_label, (endpoint or ''))
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
@@ -22,7 +22,7 @@ Smart Import Integration:
22
22
  datamgmt = get_components('medilink_datamgmt')
23
23
  """
24
24
 
25
- __version__ = "0.250819.1"
25
+ __version__ = "0.250819.3"
26
26
  __author__ = "Daniel Vidaud"
27
27
  __email__ = "daniel@personalizedtransformation.com"
28
28
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: medicafe
3
- Version: 0.250819.1
3
+ Version: 0.250819.3
4
4
  Summary: MediCafe
5
5
  Home-page: https://github.com/katanada2/MediCafe
6
6
  Author: Daniel Vidaud
@@ -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=I2JcvQjmAgvDibwv9qIqTmwm8aIx3wLvNrwx25U2ijU,3192
13
+ MediBot/__init__.py,sha256=4DnJJHQGqy2poHv1ifkiIKnRUPovmoPCotE1oibesns,3192
14
14
  MediBot/get_medicafe_version.py,sha256=uyL_UIE42MyFuJ3SRYxJp8sZx8xjTqlYZ3FdQuxLduY,728
15
15
  MediBot/update_json.py,sha256=vvUF4mKCuaVly8MmoadDO59M231fCIInc0KI1EtDtPA,3704
16
- MediBot/update_medicafe.py,sha256=09asEEgnGEOq4HH4dmnF18hZdzggqn8zDutQqymdVws,8550
16
+ MediBot/update_medicafe.py,sha256=exHiQ-cg-CxRfowPCBVbd_UjTSdScb--sh51q4M4Po4,8589
17
17
  MediCafe/MediLink_ConfigLoader.py,sha256=fNBFnPbh1YRVCs9WvZp6tPsKTUFzK3f38ePeUQ00QrQ,10161
18
- MediCafe/__init__.py,sha256=S7mJnzX4mN7T1iNsjNpdbVQC86cxlifqDv5d-UAEjbE,5721
18
+ MediCafe/__init__.py,sha256=SZyLtV4qK0tPs0dsfkO1v1Rih5_Y7wV13eZyLUCn15U,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=4rjzKmDcC2f6p2ja5o7cwl2cEXsLkH_0QbqcTT0MoQI,87185
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=cmVSGALQVlQ5LSCgzd5e2vnlM4q5_P5Kb8iALK1Yw9k,3888
57
+ MediLink/__init__.py,sha256=7Jbb_wxeR564PVg3WO-R3dfVmyWstDasN_y2Vu4ljQc,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.1.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
68
- medicafe-0.250819.1.dist-info/METADATA,sha256=VXbIzbDxX-2vHAXuT2jHQnujywhvBmAXjE0NLAGulOA,3384
69
- medicafe-0.250819.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
70
- medicafe-0.250819.1.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
71
- medicafe-0.250819.1.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
72
- medicafe-0.250819.1.dist-info/RECORD,,
67
+ medicafe-0.250819.3.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
68
+ medicafe-0.250819.3.dist-info/METADATA,sha256=WoLVCjhgtBSOEHfePsMI8XH9jtxDnlFh93UKbHNQ2OY,3384
69
+ medicafe-0.250819.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
70
+ medicafe-0.250819.3.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
71
+ medicafe-0.250819.3.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
72
+ medicafe-0.250819.3.dist-info/RECORD,,