Set up the CLIA recurring-renewal vein (every clinical lab renews its CLIA cert on a 2-year cycle; CMS publishes the full lab file with expiration dates): - service-catalog: clia-renewal ($449, discountable) + order page (npi-intake steps) + intake manifest entry. - harvest_clia_renewals.py: parse the CMS Provider-of-Services CLIA file, filter to labs expiring within a window (default 120d), emit name/address/phone/expiry. 676k labs -> ~70k expiring in the next ~4 months. - match_clia_to_nppes.py: CLIA has no NPI/email, so bridge to emailable NPPES orgs by normalized name+zip to recover NPI+email (yield TBD; labs that do not match still have clean phone+postal for a phone/mail channel). - hc_clia_renewal.html: warm turnover-safety-net email with the striped official- record card (CLIA #, expiry, status), verify-on-CMS-QCOR, founder guarantee card, full CAN-SPAM address.
208 lines
10 KiB
TypeScript
208 lines
10 KiB
TypeScript
/**
|
|
* Per-service intake step manifest.
|
|
*
|
|
* Each service slug maps to the ordered list of wizard steps. The Wizard
|
|
* component inserts category-gated dynamic steps (wireless, earth_station,
|
|
* audio_bridging, icc_import, reseller_cert) at runtime based on the
|
|
* user's Line 105 selection, between the declared step markers.
|
|
*
|
|
* Keep in sync with:
|
|
* - api/src/routes/compliance-orders.ts REQUIRED_FIELDS
|
|
* - scripts/workers/services/__init__.py SERVICE_HANDLERS registry
|
|
*/
|
|
|
|
export type IntakeStep =
|
|
| "entity"
|
|
| "classification" // entity classification step (FCC 499 flows)
|
|
| "category" // NEW: Line 105 ranked multi-select
|
|
| "officer"
|
|
| "jurisdiction"
|
|
| "history" // NEW: Line 228 first-service date
|
|
| "wireless" // NEW: category-gated — inserted when wireless selected
|
|
| "earth_station" // NEW: category-gated — satellite + private_line
|
|
| "audio_bridging" // NEW: category-gated — audio_bridging
|
|
| "revenue"
|
|
| "bundled_service" // NEW: local+toll bundle allocation
|
|
| "icc_import" // NEW: ICC revenue file uploads
|
|
| "reseller_cert" // NEW: Line 303 reseller certifications
|
|
| "lnpa_region" // NEW: Block 5 Lines 503-510 LNPA regions
|
|
| "block6_cert" // NEW: exemptions + nondisclosure + filing type
|
|
| "bdc_data"
|
|
| "stir_shaken"
|
|
| "calea"
|
|
| "foreign_carrier"
|
|
| "foreign_qual" // NEW: multi-state COA picker
|
|
| "dc_agent" // NEW: DC registered agent choice
|
|
| "cpni_questions" // NEW: CPNI certification questionnaire (sec 5-9)
|
|
| "cdr_period"
|
|
| "ocn"
|
|
| "mcs150" // MCS-150 biennial update form fields (standalone)
|
|
| "dot-intake" // Unified DOT intake — shows sections based on services ordered
|
|
| "state-trucking" // State-level trucking + hazmat/emissions intake (slug-gated sections)
|
|
| "npi-intake" // Healthcare / NPI provider intake (NPI, PECOS, practice)
|
|
| "review"
|
|
| "payment";
|
|
|
|
export const INTAKE_MANIFEST: Record<string, IntakeStep[]> = {
|
|
// Diagnostic — lightweight; just needs the entity
|
|
"fcc-compliance-checkup": ["entity", "review", "payment"],
|
|
|
|
// Entry-point filings
|
|
"cores-frn-registration": ["entity", "officer", "review", "payment"],
|
|
"fcc-499-initial": [
|
|
"entity", "classification", "category", "officer", "jurisdiction", "history",
|
|
"dc_agent", "block6_cert", "review", "payment",
|
|
],
|
|
|
|
// Annual + quarterly revenue filings — the full fidelity flow
|
|
"fcc-499a": [
|
|
"entity", "classification", "category", "officer", "jurisdiction", "history",
|
|
"dc_agent", "revenue", "bundled_service", "icc_import",
|
|
"reseller_cert", "lnpa_region",
|
|
"block6_cert", "review", "payment",
|
|
],
|
|
"fcc-499a-499q": [
|
|
"entity", "classification", "category", "officer", "jurisdiction",
|
|
"revenue", "icc_import",
|
|
"block6_cert", "review", "payment",
|
|
],
|
|
|
|
// RMD + CPNI + STIR/SHAKEN
|
|
"rmd-filing": ["entity", "officer", "stir_shaken", "review", "payment"],
|
|
"cpni-certification": ["entity", "officer", "cpni_questions", "review", "payment"],
|
|
"stir-shaken": ["entity", "stir_shaken", "review", "payment"],
|
|
|
|
// BDC tiers (formerly Form 477)
|
|
"bdc-broadband": ["entity", "bdc_data", "review", "payment"],
|
|
"bdc-voice": ["entity", "bdc_data", "review", "payment"],
|
|
"bdc-filing": ["entity", "bdc_data", "review", "payment"],
|
|
|
|
// CALEA + foreign-affiliation
|
|
"calea-ssi": ["entity", "category", "calea", "review", "payment"],
|
|
"fcc-63-11-notification": ["entity", "foreign_carrier", "review", "payment"],
|
|
|
|
// Supporting services
|
|
"ocn-registration": ["entity", "ocn", "review", "payment"],
|
|
"dc-agent": ["entity", "review", "payment"],
|
|
"cdr-analysis": ["entity", "cdr_period", "review", "payment"],
|
|
|
|
// Foreign qualification — Certificate of Authority across US states
|
|
"foreign-qualification-single": [
|
|
"entity", "foreign_qual", "review", "payment",
|
|
],
|
|
"foreign-qualification-multi": [
|
|
"entity", "foreign_qual", "review", "payment",
|
|
],
|
|
|
|
// Bundles
|
|
"fcc-full-compliance": [
|
|
"entity", "category", "officer", "jurisdiction", "history",
|
|
"revenue", "stir_shaken", "icc_import",
|
|
"reseller_cert", "lnpa_region", "block6_cert",
|
|
"review", "payment",
|
|
],
|
|
"new-carrier-bundle": [
|
|
"entity", "category", "officer", "jurisdiction", "history",
|
|
"dc_agent", "calea", "review", "payment",
|
|
],
|
|
|
|
// ── DOT / FMCSA Motor Carrier Services ──────────────────────────
|
|
// Unified DOT intake form — shows relevant sections based on service.
|
|
"mcs150-update": ["dot-intake", "review", "payment"],
|
|
"boc3-filing": ["dot-intake", "review", "payment"],
|
|
"ucr-registration": ["dot-intake", "review", "payment"],
|
|
"dot-registration": ["dot-intake", "review", "payment"],
|
|
"mc-authority": ["dot-intake", "review", "payment"],
|
|
"dot-drug-alcohol": ["dot-intake", "review", "payment"],
|
|
"dot-audit-prep": ["dot-intake", "review", "payment"],
|
|
"dot-full-compliance": ["dot-intake", "review", "payment"],
|
|
// These all file an MCS-150 or operating authority with FMCSA → require the
|
|
// authorized signer's government photo ID (collected in the dot-intake step).
|
|
"usdot-reactivation": ["dot-intake", "review", "payment"],
|
|
"emergency-temporary-authority": ["dot-intake", "review", "payment"],
|
|
"carrier-closeout": ["dot-intake", "review", "payment"],
|
|
"entity-dissolution": ["dot-intake", "review", "payment"],
|
|
|
|
// ── State-Level Trucking Compliance ─────────────────────────────────
|
|
// Collected via the dedicated state-trucking intake step.
|
|
"irp-registration": ["state-trucking", "review", "payment"],
|
|
"ifta-application": ["state-trucking", "review", "payment"],
|
|
"ifta-quarterly": ["state-trucking", "review", "payment"],
|
|
"or-weight-mile-tax": ["state-trucking", "review", "payment"],
|
|
"ny-hut-registration": ["state-trucking", "review", "payment"],
|
|
"ky-kyu-registration": ["state-trucking", "review", "payment"],
|
|
"nm-weight-distance": ["state-trucking", "review", "payment"],
|
|
"ct-highway-use-fee": ["state-trucking", "review", "payment"],
|
|
"ca-mcp-carb": ["state-trucking", "review", "payment"],
|
|
"state-dot-registration":["state-trucking", "review", "payment"],
|
|
"intrastate-authority": ["state-trucking", "review", "payment"],
|
|
"osow-permit": ["state-trucking", "review", "payment"],
|
|
"state-trucking-bundle": ["state-trucking", "review", "payment"],
|
|
|
|
// ── Hazmat / Emissions ───────────────────────────────────────────────
|
|
"hazmat-phmsa": ["state-trucking", "review", "payment"],
|
|
"state-emissions": ["state-trucking", "review", "payment"],
|
|
|
|
// ── Entity / Corporate Upgrade ─────────────────────────────────────
|
|
"entity-upgrade-bundle": ["dot-intake", "review", "payment"],
|
|
|
|
// ── Healthcare / NPI ───────────────────────────────────────────────
|
|
"npi-revalidation": ["npi-intake", "review", "payment"],
|
|
"npi-reactivation": ["npi-intake", "review", "payment"],
|
|
"nppes-update": ["npi-intake", "review", "payment"],
|
|
"clia-renewal": ["npi-intake", "review", "payment"],
|
|
"medicare-enrollment": ["npi-intake", "review", "payment"],
|
|
"oig-sam-screening": ["npi-intake", "review", "payment"],
|
|
"provider-compliance-bundle": ["npi-intake", "review", "payment"],
|
|
};
|
|
|
|
// Category-gated dynamic steps. The Wizard inserts these after the `category`
|
|
// step when the corresponding Line 105 category is in line_105_categories.
|
|
export const CATEGORY_GATED_STEPS: Record<string, IntakeStep[]> = {
|
|
wireless: ["wireless"],
|
|
satellite: ["earth_station"],
|
|
mobile_satellite:["earth_station"],
|
|
private_line: ["earth_station"],
|
|
audio_bridging: ["audio_bridging"],
|
|
};
|
|
|
|
// ── Pricing + human name lookup ──────────────────────────────────────────
|
|
// Re-exported from the generated catalog so the site can never drift from the
|
|
// API's prices. SINGLE SOURCE OF TRUTH: api/src/service-catalog.ts.
|
|
// Regenerated by scripts/gen-service-catalog.mjs on site prebuild.
|
|
export { SERVICE_META, type ServiceMeta } from "./service-catalog.generated.js";
|
|
|
|
export function formatUSD(cents: number): string {
|
|
return `$${(cents / 100).toLocaleString("en-US", {
|
|
minimumFractionDigits: 2, maximumFractionDigits: 2,
|
|
})}`;
|
|
}
|
|
|
|
// ── Vertical inference ──────────────────────────────────────────────────
|
|
// Derives a service's compliance vertical from its intake-step list, so we
|
|
// have a single source of truth (no hand-maintained slug->vertical table).
|
|
// Used by the shared CheckoutTrustBand to show the right "not affiliated with
|
|
// <agency>" disclaimer at the payment / review steps.
|
|
export type Vertical = "trucking" | "telecom" | "healthcare" | "corporate";
|
|
|
|
export function slugVertical(slug: string): Vertical | undefined {
|
|
const steps = INTAKE_MANIFEST[slug];
|
|
if (!steps) return undefined;
|
|
if (steps.includes("npi-intake")) return "healthcare";
|
|
if (steps.includes("dot-intake") || steps.includes("state-trucking")) return "trucking";
|
|
// Corporate services run on the generic `entity` step (same as telecom) and
|
|
// can't be told apart by step shape (note: the `dc_agent` step is the D.C.
|
|
// process-agent designation used by telecom 499 filers, NOT corporate). So
|
|
// corporate slugs are listed explicitly, plus the `foreign_qual` step which
|
|
// only appears on foreign-qualification orders.
|
|
if (steps.includes("foreign_qual")) return "corporate";
|
|
if (CORPORATE_SLUGS.has(slug)) return "corporate";
|
|
// Everything else is entity/FCC-based telecom.
|
|
return "telecom";
|
|
}
|
|
|
|
const CORPORATE_SLUGS = new Set<string>([
|
|
"dc-agent",
|
|
"foreign-qualification-single",
|
|
"foreign-qualification-multi",
|
|
]);
|