healthcare: optional surrogate-access intake question (expedited path)

- NpiIntakeStep: add positively-framed 'can you grant electronic I&A Surrogate
  access?' question for all filing slugs (reval/reactivation/nppes-update/
  enrollment/bundle). Optional, never required, never mentions paper; captured
  as intake_data.surrogate_access (yes/no/blank). Astro build green (58 pages).
- npi_provider.py: surface the surrogate answer in the admin todo so fulfillment
  knows EXPEDITED (online via surrogate) vs STANDARD (e-sign + daily mail batch).
This commit is contained in:
justin 2026-06-07 00:33:33 -05:00
parent 138fec17e9
commit 7ea18dd3d8
2 changed files with 39 additions and 6 deletions

View file

@ -159,6 +159,7 @@ class _BaseNPIHandler:
specialty = intake.get("specialty", "")
practice_state = intake.get("practice_state", "")
pecos_id = intake.get("pecos_enrollment_id", "")
surrogate = (intake.get("surrogate_access") or "").lower()
customer_email = (
intake.get("email")
or order_data.get("customer_email")
@ -178,6 +179,11 @@ class _BaseNPIHandler:
LOG.error("[%s] CMS-855 generation failed: %s", order_number, exc)
filing_note = f"CMS-855 auto-generation FAILED ({exc}); prepare the form manually."
surrogate_label = {
"yes": "YES — client can grant I&A Surrogate access -> file the EXPEDITED way (online via surrogate).",
"no": "NO — client declined surrogate -> use the STANDARD path (prepare form, e-sign, daily mail batch).",
}.get(surrogate, "UNDECIDED — confirm with client; default to STANDARD path if not granted.")
description = (
f"{meta['action']}\n\n"
f"Provider: {provider}\n"
@ -185,12 +191,14 @@ class _BaseNPIHandler:
f"PECOS Enrollment ID: {pecos_id or 'not provided'}\n"
f"Specialty: {specialty or 'not provided'}\n"
f"Practice state: {practice_state or 'not provided'}\n"
f"Surrogate access (expedited): {surrogate_label}\n"
f"Portal: {meta['portal']}\n"
f"Access model: {meta['access']}\n"
+ (f"\n{filing_note}\n" if filing_note else "")
+ "\nReview-staged: complete/verify the form, get it signed, then "
"submit it to the provider's MAC (standard), or file in "
"PECOS if surrogate access was granted). Mark this order complete."
"submit it (STANDARD: signed form joins the daily mail batch to the "
"provider's MAC; EXPEDITED: file in PECOS/NPPES via the granted "
"surrogate access). Mark this order complete."
)
self._create_todo(