diff --git a/scripts/workers/services/npi_provider.py b/scripts/workers/services/npi_provider.py index 2bb645b..c32ff80 100644 --- a/scripts/workers/services/npi_provider.py +++ b/scripts/workers/services/npi_provider.py @@ -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( diff --git a/site/src/components/intake/steps/NpiIntakeStep.astro b/site/src/components/intake/steps/NpiIntakeStep.astro index a6b17f2..27bad03 100644 --- a/site/src/components/intake/steps/NpiIntakeStep.astro +++ b/site/src/components/intake/steps/NpiIntakeStep.astro @@ -62,6 +62,27 @@ + + + @@ -90,12 +111,14 @@ // Which extra sections to show per slug. const NPI_SECTIONS = { - "npi-reactivation": ["npi-sec-reactivation"], - "nppes-update": ["npi-sec-nppes"], + "npi-revalidation": ["npi-sec-surrogate"], + "npi-reactivation": ["npi-sec-reactivation", "npi-sec-surrogate"], + "nppes-update": ["npi-sec-nppes", "npi-sec-surrogate"], + "medicare-enrollment": ["npi-sec-surrogate"], "oig-sam-screening": ["npi-sec-screening"], - "provider-compliance-bundle": ["npi-sec-screening"], + "provider-compliance-bundle": ["npi-sec-screening", "npi-sec-surrogate"], }; - const ALL_NPI_SECTIONS = ["npi-sec-reactivation","npi-sec-nppes","npi-sec-screening"]; + const ALL_NPI_SECTIONS = ["npi-sec-reactivation","npi-sec-nppes","npi-sec-screening","npi-sec-surrogate"]; function showNpiSections() { const PW = window.PWIntake; @@ -134,6 +157,7 @@ "npi-fields-to-update": d.fields_to_update || "", "npi-org-name": d.organization_name || "", "npi-staff-count": d.staff_count || "", + "npi-surrogate-access": d.surrogate_access || "", }; for (const [id, val] of Object.entries(map)) { const el = document.getElementById(id); @@ -186,6 +210,7 @@ fields_to_update: val("npi-fields-to-update"), organization_name: val("npi-org-name"), staff_count: val("npi-staff-count"), + surrogate_access: val("npi-surrogate-access"), }}); });