type RfaReceiptInput = { channel: "fax" | "email" | "edi" | "portal" | "mail" | "manual"; receivedAt: string; proofDocumentId?: string; providerMessageId?: string; }; /** An RFA the office sent itself: printed and faxed, mailed, e-mailed or hand-delivered (manual). */ type RfaSentOutsideInput = { sentAt: string; channel: "fax" | "mail" | "email" | "manual"; destination?: string; proofDocumentId?: string; /** When the claims administrator received it, if known. Starts the decision clock. */ receivedAt?: string; }; type RfaInformationRequestInput = { requestedAt: string; requestText: string; dueAt?: string; }; type RfaInformationResponseInput = { respondedAt: string; responseDocumentIds: string[]; }; type RfaTreatmentDecisionInput = { itemId: string; outcome: "approved" | "modified" | "denied"; authorizationNumber?: string; authorizedProcedureCode?: string; authorizedQuantity?: number; authorizedUnits?: number; effectiveFrom?: string; effectiveTo?: string; decisionReason?: string; reviewerName?: string; reviewerPhone?: string; }; type RfaDecisionsInput = { decidedAt: string; responseDocumentId: string; imrDocumentId?: string; decisions: RfaTreatmentDecisionInput[]; }; type RfaScheduling = { itemId: string; serviceDescription: string; outcome: string; eligible: boolean; authorizationToken: string; version: number; disposition: "pending" | "scheduled" | "no_appointment" | "canceled"; current: boolean; appointmentAt: string | null; providerName: string | null; location: string | null; reason: string | null; updatedAt: string | null; }; type RfaSchedulingInput = { expectedVersion: number; authorizationToken: string; } & ({ disposition: "scheduled"; appointmentAt: string; providerName: string; location: string; } | { disposition: "no_appointment" | "canceled"; reason: string; } | /** Removes a scheduling record entered by mistake; the treatment is unscheduled again. */ { disposition: "pending"; }); type RfaTreatmentClosureInput = { closed: boolean; reason: string; expectedVersion: number; }; type RfaTreatmentClosure = { closed: boolean; reason: string; version: number; updatedAt: string; updatedBy: string; }; type RfaDecisionCorrectionInput = { itemId: string; expectedDecisionEventId: string; reason: string; replacement: RfaDecisionsInput; }; type RfaHistoryEvent = { id: string; sequence: number; eventType: string; actor: string; payload: Record; occurredAt: string | null; }; type RfaFollowUp = { id: string; rfaId: string; claimId: string; responseDocumentId: string | null; responseFilename: string | null; kind: string; status: string; dueAt: string; assigneeReference: string | null; snoozedUntil: string | null; lastOutcome: string | null; lastNote: string | null; createdAt: string; updatedAt: string; resolvedAt: string | null; }; type RfaFollowUpUpdate = { assigneeReference?: string | null; snoozedUntil?: string | null; outcome?: "message_left" | "decision_pending" | "decision_issued" | "not_on_file" | "reviewed"; note?: string; responseReview?: { disposition: "no_new_decision"; noNewDecisionConfirmed: true; } | { disposition: "decisions_recorded"; allDecisionsRecordedConfirmed: true; }; }; type RfaInboundFax = { id: string; receivedAt: string; fromFax: string | null; fromName: string | null; pages: number | null; ocrStatus: string | null; matchedRfaId: string | null; documentId: string | null; previewUrl: string; suggestedRfaIds: string[]; }; type RfaInboundFaxMatch = { faxId: string; rfaId: string; documentId: string; alreadyAttached: boolean; }; type RfaFollowUpList = { data: RfaFollowUp[]; nextCursor: string | null; }; type RfaLifecycleClient = { listInboundFaxes(query?: { includeMatched?: boolean; cursor?: string; limit?: number; }): Promise<{ data: RfaInboundFax[]; hasMore: boolean; nextCursor: string | null; }>; getInboundFaxContent(faxId: string): Promise; matchInboundFax(faxId: string, rfaId: string, idempotencyKey: string): Promise; listScheduling(id: string): Promise; updateScheduling(id: string, itemId: string, input: RfaSchedulingInput, idempotencyKey: string): Promise; updateTreatmentClosure(id: string, itemId: string, input: RfaTreatmentClosureInput, idempotencyKey: string): Promise; correctDecision(id: string, input: RfaDecisionCorrectionInput, idempotencyKey: string): Promise; listHistory(id: string): Promise; addNote(id: string, text: string, idempotencyKey: string): Promise; recordReceipt(id: string, input: RfaReceiptInput, idempotencyKey: string): Promise; /** Record a send made outside MindBill, while the request is unsent or every attempt failed. */ recordSentOutside(id: string, input: RfaSentOutsideInput, idempotencyKey: string): Promise; /** Undo a send recorded with recordSentOutside, while nothing has happened since. */ undoSentOutside(id: string, transmissionId: string, idempotencyKey: string): Promise; recordInformationRequest(id: string, input: RfaInformationRequestInput, idempotencyKey: string): Promise; recordInformationResponse(id: string, requestId: string, input: RfaInformationResponseInput, idempotencyKey: string): Promise; recordDecisions(id: string, input: RfaDecisionsInput, idempotencyKey: string): Promise; listFollowUps(query?: { patientId?: string; renderingProviderId?: string; claimId?: string; includeResolved?: boolean; limit?: number; cursor?: string; }): Promise; updateFollowUp(id: string, input: RfaFollowUpUpdate, idempotencyKey: string): Promise; clearSession(): void; }; /** Records clinical workflow evidence. These methods never send faxes or reconcile notification queues. */ declare function createRfaLifecycleClient({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride }?: OrganizationClientOptions): RfaLifecycleClient; type RfaLifecycleStatus = "incomplete" | "sent" | "failed" | "received" | "closed" | "canceled"; declare const RFA_LIFECYCLE_LABELS: Readonly>; type LifecycleRecord = Pick & Partial>; /** Prefer the API lifecycle. Older responses are derived from the current submission's evidence. */ declare function getRfaLifecycleStatus(rfa: LifecycleRecord): RfaLifecycleStatus; /** One patient's complete services for one provider/group. Dates are service dates, not publication dates. */ type CaClaimFeeQuoteInput = { lines: Array & { id: string; serviceCounty?: string; physicianContext?: Omit, "providerKind"> & { providerKind: NonNullable["providerKind"] | "clinical_social_worker"; telehealthModality?: "audio_video" | "audio_only"; cmsSpecialtyCode?: string; }; }>; completeDateOfServiceContext: boolean; ordinaryMultipleSurgeryContext?: boolean; }; type CaFeeCitation = { id: string; url: string; sha256?: string; effectiveFrom?: string; effectiveThrough?: string; }; type CaFeeCalculation = { method: "rbrvs" | "therapy_mppr"; locality: string; serviceZip?: string; serviceCounty?: string; setting: "facility" | "nonfacility"; units: number; conversionFactor: string; providerPercent: number; baseMaximumCents?: number; cmsIndicators?: Record; sourceFiles?: Array<{ kind: string; filename: string; }>; components: Array<{ name: string; rvu: string; gpci: string; payableUnits: number; }>; rounding: string; }; type CaClaimEditFinding = { type: string; lineIds: string[]; message: string; citationUrl: string; column1?: string; column2?: string; modifierIndicator?: number; code?: string; limit?: number; submittedUnits?: number; adjudicationIndicator?: number; scope?: "line" | "patient_provider_date"; }; type CaClaimFeeFinding = { code: string; lineIds: string[]; message: string; citationUrl?: string; edit?: CaClaimEditFinding; }; type CaClaimLineQuote = ({ status: "priced"; amountCents: number; scheduleMaximumCents: number; basis: BillFeeQuoteBasis | "ca_ambulance"; notes: string[]; feeBreakdown?: { method: string; inputs: Array<{ label: string; value: string; }>; steps: Array<{ label: string; value: string; }>; }; } | { status: "requires_review" | "not_separately_payable"; reason: string; }) & { provenance: CaFeeCitation[]; calculation?: CaFeeCalculation; }; type CaClaimFeeQuoteResult = { status: "priced" | "requires_review" | "not_separately_payable"; lines: Array<{ id: string; input: CaClaimFeeQuoteInput["lines"][number]; quote: CaClaimLineQuote; assessment: CaClaimFeeQuoteResult["status"]; findings: CaClaimFeeFinding[]; paymentAdjustment?: { rule: "ca_multiple_surgery"; rank: number; percent: 100 | 50; unadjustedScheduleMaximumCents: number; scheduleMaximumCents: number; amountCents: number; citationUrl: string; }; }>; totals: { submittedChargeCents: number | null; pricedSubtotalCents: number; estimatedPayableCents: number | null; scheduleMaximumCents: number | null; reviewLineCount: number; }; claimEdits: Array<{ dateOfService: string; lineIds: string[]; status: "evaluated" | "requires_review" | "source_unavailable" | "not_applicable"; reason?: string; findings: CaClaimEditFinding[]; provenance?: unknown; supportedDateRange?: { from: string; through: string; }; supportedDateIntervals?: Array<{ from: string; through: string; }>; }>; limitations: string[]; }; /** * One treatment visit priced the way MindBill prices a saved treatment bill: every line together, with * the organization's saved rendering provider, place of service, practice charges and the claim's payer. * `POST /partner/v2/fee-quotes/encounter`; requires a `bills:read` session and treatment billing. */ type EncounterQuoteLineInput = { /** Unique within the request; results come back under the same id. */ id: string; code: string; units: number; modifiers?: string[]; /** Line date when it differs from the visit date. */ dateOfService?: string; dateOfServiceEnd?: string; /** Billed charge in cents. */ chargeCents?: number; /** Optional specialty context (anesthesia, therapy, imaging, equipment), as on bill service lines. */ feeContext?: Record; drug?: BilledDrug; }; type EncounterQuoteIdentity = { /** Saved rendering provider id (creation context or organization profile). */ renderingProviderId: string; /** Saved service location id. */ placeOfServiceId: string; /** Saved billing provider; the organization default is used when omitted. */ billingProviderId?: string; /** The claim, so its payer and prior LC 4604.5 therapy visits are used. */ claimId?: string; }; type EncounterQuoteInput = EncounterQuoteIdentity & { dateOfService: string; lines: EncounterQuoteLineInput[]; }; type EncounterQuoteLine = { id: string; assessment: "priced" | "requires_review" | "not_separately_payable" | "by_report"; quote: CaClaimLineQuote & { chargeAmountCents?: number; }; findings: CaClaimFeeFinding[]; paymentAdjustment?: { rule: string; bundled?: boolean; rank: number; percent: number; unadjustedScheduleMaximumCents: number; scheduleMaximumCents: number; amountCents: number; citationUrl: string; }; /** Short biller-facing notes for this line, one per caveat. */ displayNotes: string[]; }; type EncounterQuoteResult = { status: "priced" | "requires_review" | "not_separately_payable" | "by_report"; lines: EncounterQuoteLine[]; totals: { submittedChargeCents: number | null; pricedSubtotalCents: number; estimatedPayableCents: number | null; scheduleMaximumCents: number | null; reviewLineCount: number; }; claimEdits: unknown[]; limitations: unknown[]; /** Medical-legal ML lines: not priced by the treatment schedule. */ medicalLegalLineIds: string[]; /** Visit-wide notes (per-visit caps, LC 4604.5 counts), shown once. */ visitNotes: string[]; }; /** Validates the transport before an amount is shown. A partial or unknown result fails closed. */ declare function parseEncounterQuote(value: unknown, input: EncounterQuoteInput): EncounterQuoteResult; /** * Builds one encounter request from BillSubmissionForm's per-line fee inputs, in order (line ids * `line-0`, `line-1`, …). The first line's date is the visit date. */ declare function encounterQuoteRequest(inputs: readonly BillFeeQuoteInput[], identity: EncounterQuoteIdentity): EncounterQuoteInput; /** * One BillSubmissionForm quote per requested line: the expected payment (after any multiple-procedure * adjustment) when priced, otherwise a review or not-payable state. Notes are attached as findings. */ declare function encounterBillFeeQuotes(result: EncounterQuoteResult, count: number): BillFeeQuote[]; /** * A ready `onQuoteEncounter` for BillSubmissionForm. `onResult` receives the whole encounter (for * `visitNotes` and totals). When pricing is unavailable every line shows a review state instead of an amount. */ declare function createEncounterQuoter(client: { quoteEncounter: (input: EncounterQuoteInput) => Promise; }, identity: EncounterQuoteIdentity, onResult?: (result: EncounterQuoteResult | null) => void): (inputs: BillFeeQuoteInput[]) => Promise; type RfaAuthorizationDestinationOption = { method: "fax" | "email"; destination: string; label: string; phone?: string; /** Recipient attention line, retained on the reviewed delivery cover. */ recipientName?: string; }; /** Accept fax numbers only, never telephone notes, email addresses, or extensions. */ declare function normalizeRfaFax(value: string): string | null; /** Returns choices only. Selecting or transmitting a destination is a separate user action. */ declare function rfaAuthorizationDestinations(directory: BillClaimsAdministratorDirectory | null): RfaAuthorizationDestinationOption[]; declare function rfaAuthorizationGuidance(directory: BillClaimsAdministratorDirectory | null): string; /** * Privacy-safe SDK product analytics. Events carry only closed enums, counts, durations and * form field paths — never field values, names, free text or any patient information. */ declare const MINDBILL_ANALYTICS_EVENT_NAMES: readonly ["component_mounted", "form_viewed", "autofill_started", "autofill_completed", "autofill_failed", "validation_failed", "packet_preview_opened", "packet_preview_failed", "cms1500_preview_opened", "delivery_route_dialog_opened", "route_selected", "submit_clicked", "submit_succeeded", "submit_failed", "correction_opened", "resubmit_succeeded", "resubmit_failed"]; type MindBillAnalyticsEventName = (typeof MINDBILL_ANALYTICS_EVENT_NAMES)[number]; declare const MINDBILL_SDK_PACKAGES: readonly ["@mindbill/react", "@mindbill/angular", "@mindbill/browser", "@mindbill/embed"]; type MindBillSdkPackage = (typeof MINDBILL_SDK_PACKAGES)[number]; type MindBillAnalyticsRoute = "ebill" | "fax" | "email" | "mail"; type MindBillAnalyticsBillingMode = "med_legal" | "professional"; type MindBillAnalyticsEvent = { name: MindBillAnalyticsEventName; /** ISO-8601 time the event happened in the browser. */ occurredAt: string; /** Component name, e.g. "BillSubmissionForm". */ component: string; sdkPackage: MindBillSdkPackage; sdkVersion: string; /** Anonymous random id for this browser tab. Not tied to a person. */ tabSessionId: string; /** Environment of the browser session, when known. MindBill derives it server-side. */ environment?: "sandbox" | "live"; durationMs?: number; route?: MindBillAnalyticsRoute; /** Closed machine error code (lowercase snake case), never a message. */ errorCode?: string; /** Form field paths only (e.g. "claim.dateOfInjury"), never values. */ fieldPaths?: string[]; billingMode?: MindBillAnalyticsBillingMode; }; type MindBillAnalyticsInput = Omit; type MindBillAnalyticsOptions = { /** false keeps the event local: `onEvent` still receives it, nothing is sent to MindBill. */ send?: boolean; onEvent?: (event: MindBillAnalyticsEvent) => void; }; /** Anonymous per-tab id, kept in sessionStorage when available. */ declare function mindBillAnalyticsTabSessionId(): string; /** Normalize a code to the closed wire format, or drop it. */ declare function normalizeMindBillAnalyticsErrorCode(value: unknown): string | undefined; /** Apply the server's wire rules: invalid required fields reject the event, invalid optional fields are dropped. */ declare function sanitizeMindBillAnalyticsEvent(value: unknown): MindBillAnalyticsEvent | null; /** Record a framework package so its version rides on every MindBill API request. */ declare function registerMindBillSdk(pkg: MindBillSdkPackage, version: string): void; /** Product tokens for the X-MindBill-SDK header, browser package first. */ declare function mindBillSdkHeaderValue(): string; /** @internal Remember expiry/environment of a minted session so later uses of its token know them. */ declare function rememberMindBillSessionDetails(session: { token?: unknown; expiresAt?: unknown; environment?: unknown; }): void; /** @internal Remember the latest browser session a client used, so analytics never mints its own. */ declare function noteMindBillAnalyticsSession(session: { token: string; expiresAt?: string | undefined; apiBaseUrl?: string | undefined; environment?: unknown; }, fetcher: typeof globalThis.fetch): void; /** * Wrap a fetch implementation used by the SDK clients. Requests authenticated with a browser session and * addressed to MindBill (a mindbill.org host or the page's own origin) carry the X-MindBill-SDK header; * host session-endpoint calls and other origins are passed through untouched. */ declare function withMindBillSdkFetch(fetcher: typeof globalThis.fetch): typeof globalThis.fetch; /** True once the origin accepted the X-MindBill-SDK header on an earlier request. */ declare function mindBillSdkHeaderAccepted(apiBaseUrl: string): boolean; /** Send queued events now with the latest browser session. Never throws. */ declare function flushMindBillAnalytics(): Promise; /** Record one SDK analytics event. Returns the sanitized event, or null if it was invalid. Never throws. */ declare function trackMindBillAnalyticsEvent(input: MindBillAnalyticsInput, options?: MindBillAnalyticsOptions): MindBillAnalyticsEvent | null; /** @internal Test helper: clear queued events, noted sessions and the disabled flag. */ declare function resetMindBillAnalyticsForTests(): void; /** @internal Test helper. */ declare function pendingMindBillAnalyticsEvents(): readonly MindBillAnalyticsEvent[]; /** Published @mindbill/browser version; kept equal to package.json by a test. */ declare const MINDBILL_BROWSER_SDK_VERSION = "0.58.0"; type CorrectionDraft = { correctBilling: boolean; units: string; modifiers: string; charge: string; chargeReviewed: boolean; }; declare function parseSecondReviewCorrection(draft: CorrectionDraft): SecondReviewLineInput["correction"]; /** One mailing address split into the fields a sender edits. */ type MailingAddressParts = { line1: string; /** Suite, floor, PMB, or an attention/department line. */ line2: string; city: string; /** Two-letter state code. */ state: string; /** Five-digit ZIP or ZIP+4. */ postalCode: string; }; type MailingAddressField = keyof MailingAddressParts; type MailingAddressErrors = Partial>; declare const EMPTY_MAILING_ADDRESS: MailingAddressParts; /** * Split a free-text address (comma- or newline-separated) into fields. * `complete` is false when no "City, ST ZIP" tail is found; the raw text is then * left in `line1` so the sender can fix it field by field. */ declare function parseMailingAddress(raw: string | null | undefined): { parts: MailingAddressParts; complete: boolean; }; /** Field-level problems; an empty object means the address can be sent. */ declare function validateMailingAddress(parts: MailingAddressParts): MailingAddressErrors; declare function isMailingAddressValid(parts: MailingAddressParts): boolean; /** Single-line `line1[, line2], City, ST ZIP` sent as `destination.mailingAddress`. */ declare function composeMailingAddress(parts: MailingAddressParts): string; /** * An unsent bill draft (`/partner/v2/bill-drafts`). It holds the bill input as entered, which may be * incomplete, and the saved ids used to price it. A draft is never transmitted: submit it by sending its * bill through `submitBill` with `draft: { id, revision }`. */ type BillDraft = { id: string; externalId: string | null; status: "draft" | "submitting" | "submitted"; revision: number; claimId: string | null; patientId: string | null; bill: Partial & Record; encounter: Partial | null; serviceLineCount: number; submittedBillId: string | null; createdAt: string; updatedAt: string; submittedAt: string | null; }; type BillDraftReference = { id: string; revision: number; }; type BillDraftListQuery = { claimId?: string; status?: "draft" | "submitted"; limit?: number; cursor?: string; }; type BillDraftPage = { data: BillDraft[]; nextCursor: string | null; }; type BillDraftSaveInput = { bill: Record; encounter?: Partial | null; externalId?: string; }; type BillDraftsClient = { list(query?: BillDraftListQuery): Promise; get(id: string): Promise; /** Saves a new draft. Nothing is validated for submission or sent. */ create(input: BillDraftSaveInput, idempotencyKey?: string): Promise; /** Replaces a draft; `expectedRevision` must be its current revision. */ update(id: string, expectedRevision: number, input: Omit, idempotencyKey?: string): Promise; /** Deletes an unsent draft. */ remove(id: string, expectedRevision: number, idempotencyKey?: string): Promise; clearSession(): void; }; /** Unsent bill drafts through a short-lived browser session (`bills:read`; `bills:create` to save). Never pass an API key. */ declare function createBillDraftsClient({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride }?: OrganizationClientOptions): BillDraftsClient; type ReportAutofillField = { key: string; value: string; sourceText: string; confidence: "high" | "medium"; }; type ReportAutofillMatch = { status: "matched" | "ambiguous" | "none"; candidates: Array<{ id: string; name: string; }>; selectedId?: string; }; type ReportAutofillResult = { model: "gpt-5.6-luna"; requiresReview: true; fields: ReportAutofillField[]; matches: Record<"patient" | "billingProvider" | "renderingProvider" | "serviceLocation", ReportAutofillMatch>; warnings: string[]; }; type ReportAutofillClient = { analyze(report: File): Promise; clearSession(): void; }; /** Available only by written agreement, with an organization-wide autofill:run session. Does not save a document or submit a bill. */ declare function createReportAutofillClient({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride }?: OrganizationClientOptions): ReportAutofillClient; type RfaDraftActionsClient = { /** Copies the request content into a new unsigned draft. Attachments and delivery are not copied. */ copy(id: string, expectedRevision: number, idempotencyKey: string): Promise; /** Cancels only an unchanged, unsigned, unsubmitted draft; audit history is retained. */ cancelDraft(id: string, expectedRevision: number, idempotencyKey: string): Promise; clearSession(): void; }; declare function createRfaDraftActionsClient({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride }?: OrganizationClientOptions): RfaDraftActionsClient; /** `forward` packets are forwarded copies MindBill composed: a forward cover sheet and the documents chosen. */ type RfaSavedPacket = { id: string; source: "download" | "submission" | "forward"; sha256: string; sizeBytes: number; contentRevision: number; createdAt: string; }; type RfaPacketTransmission = { id: string; packetId: string | null; purpose: "submission" | "forward"; channel: string; status: string; destination: string | null; occurredAt: string; receivedAt: string | null; }; type RfaPacketHistory = { packets: RfaSavedPacket[]; transmissions: RfaPacketTransmission[]; }; /** * `packetId` alone re-sends that saved packet's exact bytes. With `documentIds` (empty only alongside `packetId`), * MindBill composes a forwarded copy: a forward cover sheet that keeps the original dates and decision due date, * the packet as sent when `packetId` is given, then the chosen documents. `message` and `recipientName` print on that cover. */ type RfaForwardInput = { packetId?: string; documentIds?: string[]; channel: "fax" | "email"; to: string; message?: string; recipientName?: string; }; type RfaForwardResult = { transmissionId: string; packetId: string; }; type RfaPacketsClient = { list(id: string): Promise; get(id: string, packetId: string): Promise; /** Forwards a saved packet or chosen documents without changing the original submission or review deadline. */ forward(id: string, input: RfaForwardInput, idempotencyKey: string): Promise; clearSession(): void; }; declare function createRfaPacketsClient({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride }?: OrganizationClientOptions): RfaPacketsClient; /** One request for authorization on a claim, as the claim's RFA index shows it. */ type ClaimRfaSummary = { id: string; status: string; lifecycleStatus: string; renderingProviderId: string; providerName: string; expedited: boolean; requestType: string; createdAt: string | null; submittedAt: string | null; decisionDueAt: string | null; decidedAt: string | null; items: Array<{ id: string; ordinal: number; serviceDescription: string; procedureCode: string | null; diagnosisCode: string; quantity: number | null; frequency: string | null; duration: string | null; outcome: string; /** Closed as no longer requiring a decision ("Not required"). */ notRequired: boolean; authorizationNumber: string | null; decidedAt: string | null; }>; }; /** A bill related to an RFA, or an RFA related to a bill, on the same claim. */ type RelatedAuthorizationRecord = { id: string; label: string; treatments: string[]; /** "Linked authorization" when a bill line uses one of the request's approved treatments; otherwise "Same injury". */ relationship: string; status?: string; serviceDate?: string | null; }; type RelatedAuthorizationResult = { data: RelatedAuthorizationRecord[]; claimId: string; hasMore: boolean; }; type RelatedAuthorizationQuery = { rfaId: string; billId?: never; } | { billId: string; rfaId?: never; }; type RfaEvidenceState = "attached" | "ready" | "awaiting_decision" | "denied" | "not_signed" | "unavailable" | "bill_sent"; /** The signed RFA form and the UR decision for one authorization linked to a bill's service line. */ type LinkedRfaEvidence = { rfaId: string; rfaItemId: string; service: string; form: { state: RfaEvidenceState; filename?: string; message?: string; }; decision: { state: RfaEvidenceState; filename?: string; outcome?: string; authorizationNumber?: string | null; message?: string; }; }; type BillUrDecisionTreatment = { service: string; code: string | null; outcome: string; authorizationNumber: string | null; effectiveFrom: string | null; effectiveTo: string | null; }; type BillUrDecision = { documentId: string; rfaId: string; filename: string; decidedAt: string | null; treatments: BillUrDecisionTreatment[]; /** Already on the bill. */ attached: boolean; /** Authorizes a procedure billed here, on a date inside the authorized period. */ matchesBill: boolean; }; /** `editable` is true only while the bill is unsent. */ type BillUrDecisionsResult = { editable: boolean; decisions: BillUrDecision[]; linked: LinkedRfaEvidence[]; }; type BillUrDecisionsAttachInput = { documentIds: string[]; linked?: never; } | { linked: true; documentIds?: never; }; type BillUrDecisionsAttachResult = { attached: number; linked?: LinkedRfaEvidence[]; }; type RfaRecordsClient = { /** Every RFA on one claim, newest first (all pages). */ listClaimRfas(claimId: string): Promise; listRelated(query: RelatedAuthorizationQuery): Promise; listBillUrDecisions(billId: string): Promise; /** Copies chosen decision letters onto an unsent bill, or retries attaching every linked RFA's form and decision. Sends nothing. */ attachBillUrDecisions(billId: string, input: BillUrDecisionsAttachInput, idempotencyKey?: string): Promise; /** A request's stored document, such as a UR decision letter (PDF). */ getRfaDocument(rfaId: string, documentId: string): Promise; clearSession(): void; }; /** Project a full RFA record onto the claim index summary. */ declare function claimRfaSummary(rfa: RfaRecord): ClaimRfaSummary; /** Claim RFA index, related records and bill UR decisions. Uses short-lived browser credentials; never pass a partner API key. */ declare function createRfaRecordsClient({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride }?: OrganizationClientOptions): RfaRecordsClient; /** Paper claim family; clearinghouse transport is selected by the server. */ type ClaimForm = "cms1500" | "ub04" | "ada" | "ncpdp"; /** JSON fields validated by the server's form-specific contract. */ type BillFormValue = string | number | boolean | null | BillFormValue[] | { [key: string]: BillFormValue; }; type BillFormData = { institutional?: { [key: string]: BillFormValue; }; dental?: { [key: string]: BillFormValue; }; pharmacy?: { [key: string]: BillFormValue; }; }; /** Service-line metadata, including revenue, tooth, and prescription details. */ type BillLineFormData = BillFormData; declare const DEFAULT_API_BASE_URL = "https://app.mindbill.org"; declare const DEFAULT_SESSION_ENDPOINT = "/api/mindbill/session"; type BillReviewDocumentType = "final_report" | "letter_of_attestation" | "proof_of_service" | "form_122" | "return_to_work_voucher" | "w9" | "medical_records" | "appeal" | "other"; type BillReviewBillingProvider = { name: string; taxId: string; taxIdType?: "EIN" | "SSN"; taxIdConfigured?: boolean; taxIdLast4?: string; npi: string; billType: "Professional" | "Institutional" | "Dental" | "Pharmacy"; phone?: string; billingStreet?: string; billingCity?: string; billingState?: string; billingZip?: string; }; type BillReviewClinician = { /** Canonical opaque provider ID, when available. */ id?: string; name: string; specialty: string; npi: string; taxonomy?: string; licenseNumber?: string; licenseState?: string; signaturePng?: string; signatureKey?: string; isQME?: boolean; isAME?: boolean; email?: string; active?: boolean; }; type BillReviewLocation = { billingProviderId?: string; name: string; nickname?: string; street: string; city: string; state: string; zip: string; county?: string; posCode?: string; isPrimary?: boolean; active?: boolean; }; /** Verified, server-provided fee explanation. Display strings only; never recalculate fees from these values. */ type BillLineFeeBreakdown = { method: string; inputs: Array<{ label: string; value: string; }>; steps: Array<{ label: string; value: string; }>; notes: string[]; }; type BillReviewLineItem = { formData?: BillLineFormData; drug?: BilledDrug; id?: string; code: string; modifiers: string[]; units: number; charge: number; feeSchedule?: number; /** Omitted when no verified fee explanation is available for this saved line. */ pricing?: { breakdown?: BillLineFeeBreakdown; }; serviceDate?: string | null; serviceDateEnd?: string | null; diagnosisPointers?: number[]; }; type BillReviewAttachment = { id: string; filename: string; description?: string | null; documentType: string; reportType?: string | null; source?: string; addedAt?: string; contentUrl?: string; }; /** One selectable payer (subpayor) under a claims administrator. */ type BillReviewPayerOption = { id: string; label: string; /** Directory-provided default marker. Interactive forms still require an explicit choice. */ default?: boolean; active?: boolean; aliases?: string[]; hint?: string | null; affiliatedEntities?: string[]; route?: string | null; optionType?: string | null; deliveryType?: string | null; clearinghouse?: string | null; payerId?: string | null; /** Original directory route when live delivery uses a replacement clearinghouse. */ sourceClearinghouse?: string | null; /** Original directory payer ID when live delivery uses a replacement route. */ sourcePayerId?: string | null; clearinghousePayerIds?: Record; preferredClearinghouse?: string | null; /** True when this payer can receive the bill electronically. Absent on older APIs. */ electronic?: boolean; }; type BillReviewPayer = { id: string; name: string; hasElectronic?: boolean; states?: string[]; confidence?: "high" | "medium" | "directory"; recommended?: boolean; signals?: Array<{ kind: "name" | "claim_number"; state: "match" | "warning"; label: string; }>; /** True when a bill for this claims administrator must name one of `payers`. */ payerSelectionRequired?: boolean; /** Selectable payers (subpayors) under this claims administrator. */ payers?: BillReviewPayerOption[]; /** Payer MindBill suggests preselecting (no patient data is used). Absent on older APIs. */ suggestedPayerId?: string; /** Why `suggestedPayerId` is suggested: the only e-billable payer, or the payer most used for this administrator. */ suggestedPayerReason?: "single_ebill" | "most_used"; aliases?: string[]; affiliatedEntities?: string[]; claimNumberHint?: string | null; claimNumberPatterns?: BillClaimsAdministratorPattern[]; route?: string | null; }; /** A directory suggestion derived from host-provided evidence. Suggestions are never auto-applied. */ type BillReviewPayerSuggestion = BillReviewPayer & { deterministic: boolean; reason: string; /** A uniquely proven routing payer under a multi-payer claims administrator. */ selectedPayerId?: string; }; /** Host-system evidence shown alongside claims-administrator suggestions. */ type BillClaimsAdministratorSource = { source: "eams" | "report" | string; label: string; name: string; url?: string; }; /** * The directory-marked default payer option, or null when none is marked. * Interactive forms should still require an explicit routing-payer choice. */ declare function defaultBillReviewPayerOption(payer: Pick): BillReviewPayerOption | null; type BillPostalPlace = { city: string; state: string; }; type BillDiagnosisCode = { code: string; description: string; }; type BillReviewFeatures = { authorizationNumber?: boolean; serviceDateRange?: boolean; wcabNumber?: boolean; codingPresets?: boolean; }; type BillReviewClaimPatternStatus = { state: "match" | "warning" | "unknown"; label: string; detail?: string; suggestion?: string; }; type BillReviewData = { options?: Pick; bill: { claimForm?: ClaimForm; formData?: BillFormData; id: string; billNumber: string | number; status: string; transmissionState?: string; billingMode: "med_legal" | "professional"; dos: string; dosEnd?: string | null; authorizationNumber?: string | null; billingSnapshot?: { billingProvider?: BillReviewBillingProvider; renderingProvider?: BillReviewClinician; placeOfService?: BillReviewLocation; } | null; lineItems: BillReviewLineItem[]; attachments: BillReviewAttachment[]; totalCharge: number; totalPaid: number; balanceDue: number; }; patient: { /** Canonical opaque patient ID, when available. */ id?: string; name: string; firstName?: string; middleName?: string; lastName?: string; dob?: string; phone?: string; address?: { line1?: string; city?: string; state?: string; postalCode?: string; }; }; injury: { claimNumber?: string; employer?: string; /** Date of injury; for a cumulative trauma (CT) claim, the START of the injury period. */ doi?: string; /** END of a cumulative trauma (CT) injury period. */ injuryEndDate?: string; cumulativeTrauma?: boolean; /** "cumulative" for a CT claim. Absent on older APIs; `cumulativeTrauma` carries the same fact. */ injuryType?: "specific" | "cumulative"; adjNumber?: string; medicalProviderNetworkId?: string | null; claimsAdminId?: string; claimsAdminName?: string; /** The claim's selected payer (subpayor) directory key, e.g. `ca3:4696:6`. Absent on older APIs. */ payerKey?: string | null; /** Display label of the selected payer. Absent on older APIs. */ payerName?: string | null; injuryDescription?: string; /** Diagnosis codes enriched with their human-readable ICD-10 descriptions. */ diagnoses?: BillDiagnosisCode[]; /** @deprecated Prefer diagnoses so users can understand each code. */ diagnosisCodes?: string[]; claimPatternStatus?: BillReviewClaimPatternStatus; }; }; type BillReviewSaveInput = { formData?: BillFormData; claimsAdminId: string; /** The chosen payer (subpayor) when the claims administrator requires payer selection. */ payerId?: string; patientOverrides?: { firstName: string; middleName?: string; lastName: string; dob?: string; }; injuryOverrides?: { claimNumber?: string; employer?: string; doi?: string; injuryEndDate?: string; cumulativeTrauma?: boolean; adjNumber?: string; medicalProviderNetworkId?: string | null; }; dos: string; dosEnd?: string | null; authorizationNumber?: string | null; billingProvider?: BillReviewBillingProvider; renderingProvider?: BillReviewClinician; placeOfService?: BillReviewLocation; lineItems: Array<{ formData?: BillLineFormData; drug?: BilledDrug; id?: string; code: string; modifiers: string[]; units: number; charge?: number; serviceDate?: string | null; serviceDateEnd?: string | null; diagnosisPointers?: number[]; }>; }; type BillSubmissionRoute = "ebill" | "fax" | "mail" | "email"; type BillDeliveryOption = { route: BillSubmissionRoute; label: string; detail: string; fallback: boolean; confidence: string; payerName: string; target?: string; chKey?: string; payerId?: string; printAndMail?: boolean; costUsd?: number; }; type BillDeliveryOptions = { payerName: string; recommended: BillDeliveryOption; options: BillDeliveryOption[]; contacts: { faxNumber?: string | null; claimsEmail?: string | null; portalUrl?: string | null; mailingAddress?: string | null; adjusterName?: string | null; adjusterPhone?: string | null; adjusterEmail?: string | null; }; }; type BillActorInput = { /** Human-readable name shown for user-initiated audit history. */ actorName?: string; }; type AddBillNoteInput = BillActorInput & { note: string; }; type SubmitBillInput = BillActorInput & { route: BillSubmissionRoute; destination?: { faxNumber?: string; email?: string; mailingAddress?: string; }; attention?: string; subject?: string; note?: string; /** CC recipients for the email route (at most 10). */ cc?: string[]; }; type BillLifecycleActionId = "resubmit" | "second_review" | "independent_bill_review" | "view_eor" | "post_payment" | "close" | "reopen" | "send_duplicate" | "report_bill_status" | "submit_new_bill"; type BillLifecycleAction = { id: BillLifecycleActionId; label: string; enabled: boolean; primary?: boolean; reason?: string; }; type BillEorDocument = { id: string; filename: string; description: string | null; addedAt: string; contentUrl: string; }; type BillActivityRecord = { id: string; type: string; createdAt: string; title?: string; description: string; actor: string | null; delivery: BillSubmissionRoute | null; amount: number | null; accepted: boolean | null; stcCategory: string | null; }; /** One user-facing bill history row (Date / Action / User / Details). * Server-presented: the wording is authored by MindBill so every surface (MindBill * app, React, Angular, embeds) reads identically. */ type BillHistoryEntry = { id: string; /** Immutable bill attempt that produced this event. Present on unified chain history. */ attemptId?: string; /** ISO timestamp for ordering and the Date column. */ date: string; /** Short Action label — "Original Bill", "277 Accept", "Payment", "Note", … */ action: string; kind: "created" | "submission" | "ack" | "eor" | "payment" | "review" | "close" | "reopen" | "note" | "portal" | "task" | "system"; /** Who acted: a biller name, MindBill automation, or the responding clearinghouse. */ actor: string | null; /** The one-line Details column. */ summary: string; /** Drives row highlighting: submissions are pale blue, notes pale yellow. */ tone: "submission" | "note" | "neutral" | "problem" | "success"; amount?: number; /** Expandable content; absent → the row is not expandable. */ details?: { rows?: Array<{ label: string; value: string; }>; documents?: Array<{ id: string; filename: string; }>; complianceDueDates?: Array<{ date: string; text: string; }>; codes?: Array<{ code: string; text: string; }>; text?: string; }; }; /** One immutable transmission attempt within a logical bill chain. */ type BillAttemptSummary = { /** Unique transmission identity. Draft attempts fall back to the bill record ID. */ id: string; /** Underlying bill record. Multiple transmissions may share this value. */ billId?: string; submissionId?: string; billNumber?: string | number; label: string; deliveryLabel?: string; sentAt?: string; ackLabel?: string; ackAt?: string; status?: string; complianceLabel?: string; complianceAt?: string; /** Server-resolved payer outcome; no client-side deadline inference. */ outcomeLabel?: string; outcomeAt?: string; outcomeDateLabel?: string; outcomeWorkingDays?: number; /** The latest attempt that receives lifecycle mutations. */ isCurrent: boolean; }; type BillPaymentRecord = { id: string; method: "check" | "eft"; checkNumber: string; status: string | null; depositDate: string | null; checkReceived: boolean | null; receivedDate: string | null; amount: number; principalAmount: number; feeAmount: number | null; feeReason: string | null; source: "paper" | "835" | "portal"; postedAt: string; updatedAt: string | null; note: string | null; }; type BillRemittanceSummary = { billedAmount: number; expectedAmount: number; payerAllowedAmount: number | null; payerReportedPaid: number | null; postedPrincipal: number; postedAdditional: number; totalPostedCash: number; balanceDue: number; denialReason: string | null; }; type BillLifecycleDelivery = { payerName: string; contacts: BillDeliveryOptions["contacts"]; /** * Partner-safe directory details. `id` is an opaque MindBill directory ID; * Values are safe, partner-facing directory details; internal database identifiers are opaque. */ directory?: BillClaimsAdministratorDirectory | null; }; type BillClaimsAdministratorContact = { location?: string | null; method?: "fax" | "email"; name?: string | null; phone?: string | null; email?: string | null; fax?: string | null; portalUrl?: string | null; address?: string | null; note?: string | null; }; type BillClaimsAdministratorMailingAddress = { company?: string | null; address: string; notes?: string | null; submissionTypes?: string[]; billTreatmentTypes?: string[]; }; type BillClaimsAdministratorPattern = { length?: number | string | null; pattern: string; example?: string | null; matches?: boolean | null; }; type BillClaimsAdministratorPayer = { name: string; route?: string | null; aliases?: string[]; hint?: string | null; affiliatedEntities?: string[]; optionType?: string | null; deliveryType?: string | null; clearinghouse?: string | null; payerId?: string | null; sourceClearinghouse?: string | null; sourcePayerId?: string | null; clearinghousePayerIds?: Record; preferredClearinghouse?: string | null; /** True when this payer can receive the bill electronically. Absent on older APIs. */ electronic?: boolean; }; type BillReviewPayerPage = { results: BillReviewPayer[]; suggestions?: BillReviewPayerSuggestion[]; total: number; nextOffset?: number; recommendedId?: string; }; type BillReviewPayerListInput = { query?: string; claimNumber?: string; sourceClaimsAdministratorName?: string; employerName?: string; limit?: number; offset?: number; }; type BillClaimsAdministratorAuthorizationStatus = "central_fax" | "central_email" | "claim_handling_location_routes" | "adjuster_specific_required" | "daisybill_unverified" | "profile_not_published"; type BillClaimsAdministratorDirectory = { authorizationStatus?: BillClaimsAdministratorAuthorizationStatus; authorizationSource?: { url: string; observedAt: string; }; id?: string; name?: string; type?: string | null; description?: string | null; website?: string | null; aliases?: string[]; affiliatedEntities?: string[]; hours?: string | null; claimNumberHint?: string | null; billProcessingWorkflow?: string | null; billProcessingWorkflowNotes?: string | null; telephoneNumbers?: string[]; emailAddresses?: string[]; webPortals?: string[]; payers?: BillClaimsAdministratorPayer[]; /** Payer MindBill suggests preselecting. Absent on older APIs. */ suggestedPayerId?: string; suggestedPayerReason?: "single_ebill" | "most_used"; authorizationNotice?: string | null; billReview?: BillClaimsAdministratorContact[]; authorization?: BillClaimsAdministratorContact[]; mailingAddresses?: BillClaimsAdministratorMailingAddress[]; claimNumberPatterns?: BillClaimsAdministratorPattern[]; }; /** End-user-safe details explaining why the latest submission was rejected. */ type BillRejectionIssue = { code?: string | null; description: string; /** Bill-submission field paths implicated by this issue. */ fieldPaths?: string[]; }; type BillRejection = { reason: string; code?: string | null; issues?: BillRejectionIssue[]; receivedAt?: string | null; source?: string | null; }; type BillTeamNote = { id: string; body: string; author: string; createdAt: string; pinned: boolean; }; type BillCourtesyCopyInput = { to: string[]; cc?: string[]; subject: string; bodyText: string; includeCms1500?: boolean; documentIds?: string[]; }; type BillCourtesyCopyPreview = { filename: string; documentCount: number; packetHash: string; pdfBase64: string; environment: "sandbox" | "live"; }; type BillCourtesyCopyResult = { ok: boolean; sent: boolean; simulated?: boolean; dryRun?: boolean; messageId?: string; }; /** Historical financial balances are unavailable, not zero. */ type HistoricalBillReviewData = Omit & { bill: Omit & { totalPaid: number | null; balanceDue: number | null; }; }; type BillSubmissionDetail = { attemptId: string; billId: string; source: "submission_snapshot" | "bill_record" | "unavailable"; capturedAt?: string | null; detail: HistoricalBillReviewData | null; /** Exact retained files for this attempt; never regenerated from current bill values. */ artifacts?: Array<{ id: string; label: string; kind: "submitted_attachment" | "submitted_edi"; contentType: string; }>; }; type BillLifecycleData = BillReviewData & { environment: "sandbox" | "live"; lifecycle: { state: string; nativeStatus: string; submittedAt?: string | null; agingDays?: number | null; updatedAt?: string | null; actions: BillLifecycleAction[]; }; eors: BillEorDocument[]; activity: BillActivityRecord[]; /** Presented history rows. Optional: absent when the API * predates the presented-history rollout — fall back to `activity`. */ history?: BillHistoryEntry[]; /** Canonical team notes, shared with the MindBill app. Absent on older APIs. */ notes?: BillTeamNote[]; /** Immutable submissions that share this bill's unified history. */ attempts?: BillAttemptSummary[]; /** Per-attempt details. Older APIs may omit this; never substitute the current bill. */ submissionDetails?: BillSubmissionDetail[]; payments: BillPaymentRecord[]; remittance: BillRemittanceSummary; delivery: BillLifecycleDelivery; rejection?: BillRejection | null; }; type BillLifecycleSession = { token: string; expiresAt?: string; apiBaseUrl?: string; }; type BillLifecycleSessionRequest = { signal: AbortSignal; }; type BillLifecycleSessionProvider = (request: BillLifecycleSessionRequest) => Promise; type CloseBillInput = BillActorInput & { reason: string; }; type ReopenBillInput = BillActorInput & { reason: string; }; type PostBillPaymentInput = BillActorInput & { amount: number; penaltyAmount?: number; interestAmount?: number; method: "check" | "eft"; checkNumber?: string; depositDate: string; note?: string; }; type SecondReviewLineInput = { lineItemId: string; reason: string; /** SBR-1 box for this service line. Omitted leaves the box blank. */ serviceAuthorized?: boolean; /** Absolute corrected values for this Second Review only; charge is explicitly reviewed, never inferred. */ correction?: { units: number; modifiers: string[]; charge: number; }; }; /** Starting Second Review language for one service line, matched from the EOR. */ type SecondReviewLineSuggestion = { lineItemId: string; /** Procedure code with modifiers. */ code: string; reasonCodes: string[]; /** Language to review, or null when the EOR does not identify a clear reason. */ reason: string | null; source: "saved" | "system_template" | "none"; template: { id: string; title: string; citation: string; } | null; explanation: string | null; }; /** A related DWC Independent Bill Review determination. */ type SecondReviewIbrDecision = { /** DWC IBR case number. */ id: string; date: string; code: string; issue: string; citation: string; outcome: string; awardedAmount: number | null; sourceUrl: string | null; matchedOn: string[]; /** A favorable, same-code decision MindBill would cite automatically. */ recommended: boolean; lineItemIds: string[]; }; type SecondReviewSuggestions = { billId: string; lines: SecondReviewLineSuggestion[]; ibr: { criteria: { codes: string[]; administrator: string | null; issues: string[]; }; decisions: SecondReviewIbrDecision[]; }; }; type SubmitSecondReviewInput = BillActorInput & { /** @deprecated Prefer `lineItems[].reason`; retained for older hosts. */ reason?: string; /** @deprecated MindBill derives this from the payer response on the server. */ payerClaimControlNumber?: string; disputedAmount?: number; attachmentIds: string[]; route: BillSubmissionRoute; /** New PDFs to include with the Second Review. */ documents?: BrowserBillSubmissionDocument[]; destination?: SubmitBillInput["destination"]; attention?: string; subject?: string; note?: string; cc?: string[]; /** Line-by-line SBR-1 selections, reasons, and authorization answers. */ lineItems?: SecondReviewLineInput[]; /** IBR decisions cited in the reasons. MindBill attaches each original DWC * determination PDF and encloses it in this Second Review packet. */ ibrDecisionIds?: string[]; /** @deprecated Prefer `lineItems`; omitted = the whole bill. */ lineItemIds?: string[]; /** @deprecated Prefer `lineItems[].serviceAuthorized`. */ serviceAuthorized?: boolean; }; type ReportBillStatusId = "message_left" | "eor_pending" | "eor_sent" | "bill_not_on_file" | "forwarded"; type ReportBillStatusOption = { id: ReportBillStatusId; label: string; description: string; }; /** The five supported outcomes of a bill payment-status phone call. */ declare const REPORT_BILL_STATUS_OPTIONS: ReportBillStatusOption[]; /** * Outcome of a phone call to the Claims Administrator / Bill Review vendor * about an outstanding bill, recorded through the lifecycle actions endpoint. */ type ReportBillStatusInput = BillActorInput & { status: ReportBillStatusId; company?: string; representativeName?: string; representativeRole?: string; phone?: string; callReference?: string; note?: string; }; /** * Payload for the "report_bill_status" lifecycle action: records the outcome * of a phone call to the Claims Administrator / Bill Review vendor about an * outstanding bill. Posted through the generic lifecycle actions endpoint. */ type ReportBillStatusActionInput = ReportBillStatusInput & { action: "report_bill_status"; }; /** * Payload for the "send_duplicate" lifecycle action. A duplicate is a fresh, * editable bill snapshot linked to the submitted original. The original stays * immutable; the biller must review the snapshot and explicitly confirm its * delivery route before this action is posted. */ type SendDuplicateBillInput = ResubmitBillInput; type ReportBillStatusContacts = { claimsAdmin: { name: string; hoursOfOperation?: string; phones: Array<{ label: string; value: string; }>; } | null; billReview: { name: string; phone?: string; } | null; }; /** * Partner-safe "who to call" summary for the Report Bill Status flow, derived * from the lifecycle delivery block (payer contacts + optional directory). */ declare function reportBillStatusContacts(delivery: BillLifecycleDelivery): ReportBillStatusContacts; /** * Default Second Bill Review dispute reason for an invalid med-legal denial. * Prefilled (editable) in the SBR panel. */ declare const SECOND_REVIEW_REASON_TEMPLATE = "This is an appeal of the invalid denial of this med-legal bill; per LC \u00A74622 and the OMFS/MLFS, payment is due as billed."; /** Days allowed to request Second Review after service of the denial EOR. */ declare const SECOND_REVIEW_WINDOW_DAYS = 90; type SecondReviewDeadline = { /** ISO date (yyyy-mm-dd) of the latest denial/EOR document. */ eorDate: string; /** ISO date (yyyy-mm-dd) 90 days after the EOR date. */ deadline: string; }; /** * The 90-day Second Review window anchored on the latest EOR date, or null * when the lifecycle data provides no parseable denial/EOR date. */ declare function secondReviewDeadline(eors: Array>): SecondReviewDeadline | null; /** * A corrected immutable snapshot submitted as the next attempt on the same bill. * The logical bill ID remains stable; only the submission/control-number attempt advances. */ type ResubmitBillInput = BillActorInput & { reason?: string; bill: BrowserBillCreateInput; /** Explicit delivery route confirmed by the biller for this new attempt. */ submission?: Omit; documents?: BrowserBillSubmissionDocument[]; }; /** * "Submit New Bill" from a CLOSED bill: the same snapshot payload shape as a * resubmission, but the server creates a FRESH original bill linked to the closed * predecessor — the closed bill stays closed and keeps its record, and the * submissions ribbon/timeline chains both records. */ type SubmitNewBillInput = ResubmitBillInput; type SandboxSimulationScenario = "accepted" | "rejected" | "processed" | "denied" | "partial_payment" | "paid"; type SimulateSandboxBillInput = { scenario: SandboxSimulationScenario; amount?: number; reasonCode?: string; }; type BrowserBillAddress = { line1: string; line2?: string; city: string; state: string; postalCode: string; }; /** Complete bill snapshot accepted by the browser create endpoint. */ type BrowserBillCreateInput = { claimForm?: ClaimForm; formData?: BillFormData; externalId?: string; billingMode?: "med_legal" | "professional"; patient: { id?: string; externalId?: string; firstName: string; middleName?: string; lastName: string; dateOfBirth: string; ssn?: string; gender?: "M" | "F" | "X"; phone?: string; address: BrowserBillAddress; }; claim: { id?: string; externalId?: string; claimNumber: string; adjNumber?: string; medicalProviderNetworkId?: string | null; employer: string; dateOfInjury: string; injuryState?: string; description?: string; claimsAdministrator: { id: string; name: string; /** The chosen payer (subpayor) when the claims administrator requires payer selection. */ payerId?: string; }; }; service: { date: string; endDate?: string | null; authorizationNumber?: string | null; }; billingProvider: { id?: string; name: string; taxId: string; taxIdType?: "EIN" | "SSN"; npi: string; phone: string; address: BrowserBillAddress; } | { savedProviderId: string; } | { sourceBillId: string; }; renderingProvider: { name: string; specialty?: string; npi: string; taxonomy: string; licenseNumber?: string; licenseState?: string; isQme?: boolean; isAme?: boolean; }; serviceLocation: { name?: string; address: BrowserBillAddress; placeOfServiceCode: string; }; diagnoses: string[]; serviceLines: Array<{ formData?: BillLineFormData; code: string; modifiers?: string[]; units?: number; charge?: number; serviceDate?: string; serviceDateEnd?: string | null; diagnosisPointers?: number[]; /** Calculation context revalidated by the server before bill creation. */ feeContext?: BillFeeContext; drug?: BilledDrug; /** Existing authorized RFA item linked to this service line. */ rfaItemId?: string; }>; }; /** Canonical immutable PDF snapshot sent with a bill submission. */ type BrowserBillSubmissionDocument = { externalId?: string; filename: string; description?: string; documentType: BillReviewDocumentType; /** Opaque PWK report-type code selected by the component (for example OZ:J4). */ reportTypeCode?: string; contentBase64: string; }; type BrowserBillSubmissionInput = BillActorInput & { /** Usually omitted: MindBill stamps the customer from the server-issued session. * If supplied, it must match the session customer restriction. */ customerExternalId?: string; bill: BrowserBillCreateInput; /** Submit a saved draft (createBillDraftsClient). The draft must still be at this revision and unsent. */ draft?: { id: string; revision: number; }; submission?: { route?: BillSubmissionRoute; destination?: SubmitBillInput["destination"]; attention?: string; subject?: string; note?: string; cc?: string[]; }; documents?: BrowserBillSubmissionDocument[]; }; type BrowserSubmittedBill = Record & { id: string; customerExternalId?: string | null; externalId?: string | null; state?: string; }; type BrowserBillSubmissionResult = { billId: string; bill: BrowserSubmittedBill; }; type BillLifecycleClientOptions = { /** ID of an already-submitted bill. Bills are created only by the atomic server API. */ billId: string; sessionEndpoint?: string | undefined; getSession?: BillLifecycleSessionProvider | undefined; apiBaseUrl?: string | undefined; fetch?: typeof globalThis.fetch | undefined; }; /** Browser-session options for pre-submission reference-data lookups. */ type BillReferenceClientOptions = Omit; /** Browser-session options for an atomic immutable bill submission. */ type BillSubmissionClientOptions = BillReferenceClientOptions; /** Unsaved bill plus its documents, rendered as the packet that would be sent. Nothing is created or sent. */ type BillPacketPreviewInput = { bill: BrowserBillSubmissionInput["bill"]; /** Documents in attachment order, exactly as they would be submitted. */ documents?: BrowserBillSubmissionDocument[]; /** Delivery route the packet is previewed for. Fax and mail packets begin with their cover sheet. */ route?: "ebill" | "fax" | "email" | "mail"; /** Fax/mail ATTENTION line. */ attention?: string; }; type BillPacketPreview = { pdf: Blob; /** Packet parts in order, from the X-MindBill-Packet-Sections header (e.g. "cover", "claim_form", "document", "w9"). Empty when not reported. */ sections: string[]; }; type BillSubmissionClient = { previewCms1500: (bill: BrowserBillSubmissionInput["bill"]) => Promise; /** Render the complete packet (claim form, attachments, W-9) for the selected route without creating a bill. */ previewPacket: (input: BillPacketPreviewInput) => Promise; submitBill: (input: BrowserBillSubmissionInput, options?: { idempotencyKey?: string; }) => Promise; clearSession: () => void; }; /** Input for the pre-submission delivery preview keyed on a payer-directory id. */ type BillDeliveryPreviewInput = { claimsAdministratorId: string; /** Selected payer child when the administrator exposes multiple payer routes. */ payerId?: string; /** Two-letter state; defaults to CA server-side. */ injuryState?: string; }; type BillProcedureCodeSearchInput = { query?: string; limit?: number; jurisdiction?: "CA" | "NY" | "OWCP"; }; /** Catalog membership does not imply that a fee is available for a service date. */ type BillProcedureCodePage = { results: Array<{ code: string; description?: string; }>; total: number; limit: number; jurisdiction: "CA" | "NY" | "OWCP"; catalogAsOf: string | null; }; type BillFeeSource = { id: string; url: string; sha256?: string; effectiveFrom: string; effectiveThrough: string; }; /** Drug identifiers and quantities printed on the professional claim. */ type BilledDrug = { ndcNumber: string; metricQuantity: string; unitOfMeasure: "UN" | "ML" | "GR"; administered?: { drugName: string; administeredAmount: string; doseUnit: "mg" | "mcg" | "g" | "mL" | "units"; hcpcsCode: string; amountPerHcpcsUnit: string; amountPerNdcUnit: string; hcpcsUnitSource: string; productLabelSource: string; unitDefinitionsVerified: true; }; }; /** Minutes since midnight on the service date; end must follow start. */ type CaAnesthesiaInterval = { startMinute: number; endMinute: number; }; /** Opaque references to the actual physician and service record. */ type CaAnesthesiaEvent = { physicianRef: string; recordRef: string; minute: number; }; type CaAnesthesiaParticipation = CaAnesthesiaInterval & { physicianRef: string; recordRef: string; }; type CaAnesthesiaOptionalParticipation = CaAnesthesiaParticipation | { applicability: "not_indicated"; recordRef: string; }; type CaMedicalDirectionCase = { caseRef: string; anesthetistRole: "crna" | "anesthesiologist_assistant" | "intern" | "resident" | "student_nurse_anesthetist"; qualificationRecordRef: string; procedure: "cataract" | "iridectomy" | "other"; interval: CaAnesthesiaInterval; activities: { preAnestheticEvaluation: CaAnesthesiaEvent; prescribedPlan: CaAnesthesiaEvent; demandingProcedures: CaAnesthesiaParticipation[]; induction: CaAnesthesiaOptionalParticipation; emergence: CaAnesthesiaOptionalParticipation; qualifiedAnesthetistProcedures: CaAnesthesiaEvent; frequentMonitoring: { recordRef: string; observations: CaAnesthesiaEvent[]; }; indicatedPostAnesthesiaCare: CaAnesthesiaEvent; }; }; /** All overlapping cases across all payers, including cases outside this bill. */ type CaMedicalDirection = { physicianRef: string; groupPhysicianRefs: string[]; billedCaseRef: string; rosterScope: "all_overlapping_cases_all_payers"; rosterRecordRef: string; cases: CaMedicalDirectionCase[]; physicalPresenceAndImmediateAvailability: CaAnesthesiaParticipation[]; otherPatientServices: Array<{ kind: "emergency" | "labor_analgesia" | "obstetric_monitoring" | "receiving_patient" | "recovery_care" | "other"; interval: CaAnesthesiaInterval; recordRef: string; }>; }; type CaMonitoredAnesthesiaCare = { medicallyNecessary: true; intraoperativePhysiologicalMonitoring: true; preparedForGeneralAnesthesiaOrAdverseReaction: true; perioperativeAnesthesiaCare: true; underlyingProcedureProvider: "different_provider" | "same_provider"; underlyingProcedure: "nerve_block_or_injection" | "other"; }; /** Clinical facts supplement AA or QK; monitored care also requires QS. */ type CaAnesthesiaContext = { providerKind: "physician"; actualMinutes: number; placeOfService: string; completeSameDayServices: true; otherSameDayServices: boolean; codingRequirementsSatisfied: true; monitoredCare?: CaMonitoredAnesthesiaCare; } & ({ personallyPerformedAlone: true; medicalDirection?: never; } | { personallyPerformedAlone: false; medicalDirection: CaMedicalDirection; }); type CaPadbContext = { providerKind: "physician"; placeOfService: "11"; productKind: "injectable"; bundledOrPackaged: false; codingRequirementsSatisfied: true; completeSameDayServices: true; sameDayServices: Array<{ code: string; units: number; }>; }; type CaTherapyContext = { providerKind?: "physical_therapist" | "other"; personallyPerformed?: boolean; hospitalPatient?: boolean; incidentToPhysicianService?: boolean; assistantInvolved?: boolean; placeOfService?: string; /** Whether an initial evaluation already occurred in this care episode, including prior dates. Omit when unknown. */ priorInitialEvaluationInEpisode?: boolean; /** Required for timed treatment; initial evaluations are untimed. */ directOneOnOneMinutes?: number; totalVisitMinutes?: number; visitsOnDate?: number; completeSameDayServices?: boolean; otherSameDayServices?: boolean; globalPeriodApplies?: boolean; hpsaBonusEligible?: boolean; }; /** Actual technical imaging facts. All fields are required when this context is supplied. */ type CaTechnicalComponentContext = { /** Whether the billing provider or group furnished the service; purchased or outsourced services require review. */ performedByBillingProviderGroup: boolean; patientHospitalStatus: "not_hospital_patient" | "hospital_inpatient_or_outpatient"; supervisionLevel: "general" | "direct" | "personal"; /** Actual session label, 1–64 letters/digits/._:-, beginning with a letter or digit. Never a patient identifier. */ imagingSessionReference: string; /** All imaging for this patient/provider group/date is included, including separately billed services. */ completeSameDayImagingServices: boolean; }; /** Documented interpretation and imaging-session facts; an omitted completeness fact remains unknown. */ type CaProfessionalComponentContext = { interpretationLocation: "same_as_patient_service" | "different_from_patient_service"; supervisionLevel?: "general" | "direct" | "personal"; /** Actual session label, 1–64 letters/digits/._:-, beginning with a letter or digit. Never a patient identifier. */ imagingSessionReference?: string; /** All imaging for this patient/provider group/date is included, including separately billed services. */ completeSameDayImagingServices?: boolean; }; type BillFeeQuoteInput = { drug?: BilledDrug; padbContext?: CaPadbContext; anesthesiaContext?: CaAnesthesiaContext; billingProviderId?: string; payerId?: string; code: string; dateOfService: string; chargeCents?: number; units?: number; modifiers?: string[]; pages?: number; reportKind?: "progress" | "permanent_stationary_pr3" | "permanent_stationary_pr4"; hasFeeAgreement?: boolean; serviceZip?: string; /** Explicit physical interpretation location for a professional component. */ professionalComponentContext?: CaProfessionalComponentContext; technicalComponentContext?: CaTechnicalComponentContext; /** California equipment pricing uses worker residence, independently of service location. */ dmeposContext?: { residenceZip: string; /** Continuous rental month for this equipment item; only for applicable RR lines. */ rentalMonth?: number; /** Actual prior payments for this item, including rentals; explicit zero means no prior payments. */ priorPaymentsCents?: number; }; /** Supply verified service facts; omitted context can require review. */ physicianContext?: { providerKind: "physician" | "physician_assistant" | "nurse_practitioner" | "clinical_nurse_specialist" | "other"; incidentToPhysicianService?: boolean; placeOfService: string; standaloneService: boolean; globalPeriodApplies: boolean; hpsaBonusEligible: boolean; }; therapyContext?: CaTherapyContext; catalogContext?: { codingRequirementsSatisfied: boolean; statusIAlternative?: "none" | "cpt" | "drug"; completeSurgicalPackage?: boolean; }; prolongedServiceContext?: { totalMinutes: number; relatedEvaluationDate: string; ongoingPatientManagement: boolean; personallyPerformed: boolean; timeCountedInOtherServices: boolean; completeSameDayServices: boolean; sameDayServices: Array<{ code: string; units: number; }>; }; reportQualification?: { kind: "psychiatric_report"; requestedBy: "wcab" | "administrative_director"; medicalLegalEvaluation: boolean; reportPayableUnderMedicalLegalSchedule: boolean; } | { kind: "consultation_report"; requestedBy: "wcab" | "administrative_director" | "qme" | "ame"; medicalLegalEvaluation: boolean; reportPayableUnderMedicalLegalSchedule: boolean; } | { kind: "chart_notes"; requestedBy: "claims_administrator"; writtenRequest: boolean; } | { kind: "duplicate_report"; requestedBy: "claims_administrator"; writtenRequest: boolean; relatedToBilling: boolean; initialRequiredCopy: boolean; }; }; /** Authoritative service, provider, payer and location fields come from the submitted bill. */ type BillFeeContext = Omit; /** Fee families returned by the California and practice-contract quote endpoint. */ declare const BILL_FEE_QUOTE_BASES: readonly ["ca_report", "ca_physician_rbrvs", "ca_therapy_rbrvs", "ca_clfs", "ca_simple_dispensed_drug", "ca_dmepos", "ca_padb", "ca_anesthesia", "payer_contract"]; type BillFeeQuoteBasis = typeof BILL_FEE_QUOTE_BASES[number]; type BillFeeQuote = { status: "priced"; /** Total for the service line in cents, already accounting for units. */ amountCents: number; scheduleMaximumCents: number; /** Practice or entered billed charge, distinct from estimated reimbursement. */ chargeAmountCents?: number; /** * The practice's saved charge for this code (its charge schedule × units), when the organization has one. * Independent of any charge entered on the bill; editors prefill an empty billed charge with it. */ practiceChargeCents?: number; /** California statutory maximum when the quoted basis is a payer contract. */ statutoryMaximumCents?: number; basis: BillFeeQuoteBasis; anesthesia?: { actualMinutes: number; baseUnits: number; timeUnitsTenths: number; conversionFactorCents: number; locality: string; medicalDirection?: { concurrentCases: number; baseReductionPercent: number; physicianPaymentPercent: 50; }; }; /** Relative-value calculation behind an RBRVS amount, for display. */ calculation?: CaFeeCalculation; feeBreakdown?: { method: string; inputs: Array<{ label: string; value: string; }>; steps: Array<{ label: string; value: string; }>; }; provenance: BillFeeSource[]; notes: string[]; /** Conditions that do not change the amount, such as modifier documentation or visit caps. */ findings?: BillFeeQuoteFinding[]; } | { status: "requires_review" | "not_separately_payable"; reason: string; provenance: BillFeeSource[]; /** Plain-language explanation for the biller, when available. */ message?: string; findings?: BillFeeQuoteFinding[]; }; type BillFeeQuoteFinding = { code: string; message: string; citationUrl?: string; }; /** Public DWC directory record. Only Approved records are selectable. */ type MedicalProviderNetwork = { id: string; name: string; applicantName: string; applicantType?: string; status: "Approved" | "Terminated" | "Withdrawn"; approvalDate?: string | null; website?: string | null; }; type BillReferenceClient = { listMedicalProviderNetworks: () => Promise; listClaimsAdministrators: (input?: BillReviewPayerListInput) => Promise; searchClaimsAdministrators: (query: string, claimNumber?: string) => Promise; getClaimsAdministratorDirectory: (id: string, injuryState?: string) => Promise; searchDiagnosisCodes: (query: string, limit?: number, offset?: number) => Promise; searchProcedureCodes: (input?: BillProcedureCodeSearchInput) => Promise; quoteFee: (input: BillFeeQuoteInput) => Promise; quoteClaimFees: (input: CaClaimFeeQuoteInput) => Promise; /** Expected payment for one treatment visit, priced with the organization's saved provider, location and claim. */ quoteEncounter: (input: EncounterQuoteInput) => Promise; lookupPostalCode: (postalCode: string) => Promise; /** * Delivery-route preview (recommended route + selectable options + payer * contacts) for a claims administrator BEFORE the bill exists — powers the * send-route picker shown at submit time. */ getDeliveryPreview: (input: BillDeliveryPreviewInput) => Promise; clearSession: () => void; }; type BillLifecycleClient = { getBillId: () => string; getLifecycle: (signal?: AbortSignal) => Promise; listMedicalProviderNetworks: () => Promise; listClaimsAdministrators: (input?: BillReviewPayerListInput) => Promise; searchClaimsAdministrators: (query: string, claimNumber?: string) => Promise; getClaimsAdministratorDirectory: (id: string, injuryState?: string) => Promise; searchDiagnosisCodes: (query: string, limit?: number, offset?: number) => Promise; searchProcedureCodes: (input?: BillProcedureCodeSearchInput) => Promise; quoteFee: (input: BillFeeQuoteInput) => Promise; quoteClaimFees: (input: CaClaimFeeQuoteInput) => Promise; quoteEncounter: (input: EncounterQuoteInput) => Promise; lookupPostalCode: (postalCode: string) => Promise; getDeliveryOptions: () => Promise; getDeliveryPreview: (input: BillDeliveryPreviewInput) => Promise; getAttachment: (attachmentId: string) => Promise; getEor: (documentId: string) => Promise; getElectronicEorPdf: () => Promise; getPacket: () => Promise; getSubmissionArtifact: (attemptId: string, artifactId: string) => Promise; /** Prepare a self-filing packet. Does not file IBR or send anything to a payer. */ prepareIbrPacket: () => Promise; previewCourtesyCopy: (input: BillCourtesyCopyInput) => Promise; /** Reuse the same key when retrying the same send after a network interruption. */ sendCourtesyCopy: (input: BillCourtesyCopyInput & { packetHash: string; }, idempotencyKey: string) => Promise; addNote: (input: AddBillNoteInput) => Promise; closeBill: (input: CloseBillInput) => Promise; reopenBill: (input: ReopenBillInput) => Promise; postPayment: (input: PostBillPaymentInput) => Promise; /** Rule-based starting reasons and related IBR decisions for the selected lines. Read-only. */ getSecondReviewSuggestions: (lineItemIds?: string[], signal?: AbortSignal) => Promise; submitSecondReview: (input: SubmitSecondReviewInput) => Promise; resubmitBill: (input: ResubmitBillInput) => Promise; submitNewBill: (input: SubmitNewBillInput) => Promise; sendDuplicateBill: (input: SendDuplicateBillInput) => Promise; reportBillStatus: (input: ReportBillStatusInput) => Promise; simulateSandbox: (input: SimulateSandboxBillInput) => Promise; clearSession: () => void; }; /** One citation line, worded exactly as MindBill's own Second Review cites a decision. */ declare function secondReviewIbrCitationLine(decision: Pick): string; /** Append citations for decisions not already cited in the reason. */ declare function appendSecondReviewIbrCitations(reason: string, decisions: Array>): string; /** Remove one decision's citation line, and the heading when no citation remains. */ declare function removeSecondReviewIbrCitation(reason: string, decisionId: string): string; /** Validate the Second Review suggestion payload; unknown or malformed entries are dropped. */ declare function normalizeSecondReviewSuggestions(value: unknown): SecondReviewSuggestions; /** An error response from the MindBill API. `code` is the machine error code when the API returned one. */ declare class MindBillApiError extends Error { readonly status: number; readonly code?: string; constructor(message: string, status: number, code?: string); } /** Machine error code from a problem/error body: `error`, `code`, or the last segment of `type`. */ declare function mindBillApiErrorCode(body: unknown): string | undefined; /** * Browser-safe client for one atomic create-and-submit operation. * * The browser session is short-lived and origin-bound. The host application * never needs the Partner API document schema or a long-lived API key. */ declare function createBillSubmissionClient({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride, }?: BillSubmissionClientOptions): BillSubmissionClient; /** Browser-safe, framework-neutral client for an already-submitted bill. */ declare function createBillLifecycleClient({ billId, sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride, }: BillLifecycleClientOptions): BillLifecycleClient; /** * Browser-safe client for reference data needed before a bill exists. * * Partners can pass the same short-lived session provider used by the submitted-bill * lifecycle without inventing a draft bill or exposing payer directory credentials. */ declare function createBillReferenceClient(options?: BillReferenceClientOptions): BillReferenceClient; /** Convert masked profile state to a write without clearing an unchanged saved SSN. */ declare function organizationTaxIdWrite(value: T): Omit; type OrganizationPracticeIdentity = { name?: string; legalName?: string; taxId?: string; npi?: string; taxIdType?: "EIN" | "SSN"; /** Read-only metadata. Saved SSNs are never returned in taxId. */ taxIdLast4?: string; taxIdConfigured?: boolean; phone?: string; email?: string; website?: string; }; type OrganizationBillingProviderInput = { id?: string; externalId?: string; name: string; taxId?: string; npi: string; taxIdType?: "EIN" | "SSN"; /** Read-only metadata; omit taxId on updates to preserve a saved SSN. */ taxIdLast4?: string; taxIdConfigured?: boolean; billType?: "Professional" | "Institutional"; phone?: string; billingStreet?: string; billingCity?: string; billingState?: string; billingZip?: string; }; type OrganizationLocationInput = { billingProviderId?: string; id?: string; externalId?: string; name: string; street: string; city: string; state: string; zip: string; nickname?: string; posCode?: string; isPrimary?: boolean; active?: boolean; /** Read-only: the practice contact saved for authorization requests sent from this location. */ contact?: { name?: string; phone?: string; fax?: string; email?: string; }; }; type OrganizationRenderingProviderInput = { id?: string; externalId?: string; name: string; npi: string; specialty?: string; taxonomy?: string; licenseNumber?: string; licenseState?: string; isQME?: boolean; isAME?: boolean; email?: string; active?: boolean; }; /** Response-only signature status on saved rendering providers (servers before 2026-10-28 omit it). */ type OrganizationRenderingProviderSignatureStatus = { /** A signature image is saved for this provider. */ signatureConfigured?: boolean; /** The saved signature prints in CMS-1500 Box 31 on this provider's bills; otherwise Box 31 reads "Signature on File". */ signatureOnClaimForm?: boolean; }; /** A saved rendering provider's signature image, for a settings preview. */ type OrganizationRenderingProviderSignature = { providerId: string; signatureConfigured: boolean; signatureOnClaimForm: boolean; contentType: "image/png" | "image/jpeg" | null; contentBase64: string | null; }; type OrganizationChecklistItem = { id: string; label: string; complete: boolean; }; type OrganizationProfileData = { organizationId: string; practiceIdentity: OrganizationPracticeIdentity; billingProviders: Array; /** Optional for compatibility with older organization-profile responses. */ renderingProviders?: Array; locations: Array; w9: { filename: string; addDate: string; taxYear?: number; } | null; onboarding: { status: string | null; complete: boolean; checklist: OrganizationChecklistItem[]; }; }; type OrganizationClientOptions = { sessionEndpoint?: string; getSession?: BillLifecycleSessionProvider; apiBaseUrl?: string; fetch?: typeof globalThis.fetch; }; type OrganizationTeamRole = "admin" | "manager" | "biller" | "payments" | "viewer"; type OrganizationTeamMember = { id: string; email: string; name: string; role: string; active: boolean; createdAt: string; canManage: boolean; }; type OrganizationTeam = { members: OrganizationTeamMember[]; roles: Array<{ id: OrganizationTeamRole; label: string; permissions: string[]; }>; capabilities: { canManage: boolean; canAdd: boolean; }; identityDomain: "mindbill"; }; type OrganizationClaimsAdministratorInput = { name: string; fax?: string; email?: string; mailingAddress?: string; notes?: string; }; type OrganizationClaimsAdministrator = { id: string; name: string; fax: string | null; email: string | null; mailingAddress: string | null; notes: string | null; submissionMethod: string; active: boolean; createdAt: string; }; type OrganizationClient = { /** Requires explicit team:manage; organization:manage alone does not grant team access. */ getTeam: () => Promise; updateTeamMember: (id: string, input: { role?: OrganizationTeamRole; active?: boolean; }) => Promise; getClaimsAdministrators: () => Promise; createClaimsAdministrator: (input: OrganizationClaimsAdministratorInput) => Promise; updateClaimsAdministrator: (id: string, input: OrganizationClaimsAdministratorInput) => Promise; deleteClaimsAdministrator: (id: string) => Promise<{ id: string; deleted: true; }>; getOrganization: () => Promise; /** Masked saved profiles for bill entry; requires org-wide bills:create. */ getBillingProfile: () => Promise; saveBillingProfile: (input: { practiceIdentity?: OrganizationPracticeIdentity; billingProviders?: OrganizationBillingProviderInput[]; renderingProviders?: OrganizationRenderingProviderInput[]; }) => Promise; saveLocations: (locations: OrganizationLocationInput[]) => Promise; saveW9: (input: { filename: string; contentBase64: string; taxYear?: number; }) => Promise; /** * Add a doctor (rendering provider). Add-only: a doctor already saved with the NPI rejects with a * MindBillApiError whose code is "rendering_provider_exists" (providerId on `existingProviderId`). * Works with organization:manage or an organization-wide bills:create session (servers from 2026-10-28). */ addRenderingProvider: (input: Omit) => Promise<{ providerId: string; profile: OrganizationProfileData; }>; /** The saved signature image for one rendering provider; organization:manage or bills:create. */ getRenderingProviderSignature: (providerId: string) => Promise; /** * Save or replace a rendering provider's signature (base64 PNG ≤512 KB, e.g. from signaturePngBase64). Bills created * afterwards for that provider print it in CMS-1500 Box 31. Requires organization:manage. Returns the organization profile. */ saveRenderingProviderSignature: (providerId: string, input: { contentBase64: string; physicianAuthorized: true; actorReference: string; }) => Promise; }; declare function createOrganizationClient({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride, }?: OrganizationClientOptions): OrganizationClient; type BillTasksAgingBucket = { id: string; label: string; /** Exclusive lower bound in days. The first bucket also admits day 0. */ minDays: number; /** Inclusive upper bound in days; null means unbounded. */ maxDays: number | null; }; declare const BILL_TASKS_AGING_BUCKETS: BillTasksAgingBucket[]; type BillTasksDashboardItem = { sectionId: string; rowId: string; rowLabel: string; ageDays: number; balanceDue?: number; /** Opaque bill reference echoed back in click-through payloads. */ ref?: string; }; type BillTasksDashboardRow = { id: string; label: string; /** One count per aging bucket, in bucket order. */ counts: number[]; total: number; /** Summed item balanceDue per bucket; optional for older count-only payloads. */ balances?: number[]; balanceTotal?: number; /** Collected item refs per aging bucket, in bucket order. */ refs: string[][]; }; type BillTasksDashboardTone = "violet" | "red" | "blue" | "green" | "amber" | "neutral"; type BillTasksDashboardSectionInput = { id: string; label: string; /** Shown under the section label as "by {agingBasisLabel}". */ agingBasisLabel: string; tone: BillTasksDashboardTone; }; type BillTasksDashboardSection = BillTasksDashboardSectionInput & { rows: BillTasksDashboardRow[]; /** Per-bucket totals across the section's rows. */ totals: number[]; total: number; balanceTotals?: number[]; balanceTotal?: number; empty: boolean; }; type BillTasksDashboardData = { sections: BillTasksDashboardSection[]; grandTotals: number[]; grandTotal: number; /** Work-item sums, not deduplicated financial A/R across task categories. */ grandBalanceTotals?: number[]; grandBalanceTotal?: number; }; /** * Bucket index for an item age: a bucket admits `minDays < ageDays <= maxDays` * (`maxDays: null` = unbounded) and the first bucket also admits day 0. * Ages beyond every bucket clamp into the last bucket. */ declare function billTasksAgingBucketIndex(ageDays: number, buckets?: BillTasksAgingBucket[]): number; /** * Aggregates flat work items into the Bill Tasks dashboard. * Sections render in the given order even when empty; rows appear in * first-seen item order within their section. */ declare function buildBillTasksDashboard(items: BillTasksDashboardItem[], sections: BillTasksDashboardSectionInput[], buckets?: BillTasksAgingBucket[]): BillTasksDashboardData; /** Contacts snapshotted on a request and included in the reviewed form. */ type RfaContact = { name?: string; contactName?: string; address?: string; city?: string; state?: string; zip?: string; phone?: string; fax?: string; email?: string; }; type RfaDeliveryPreviewInput = { documentIds: string[]; channel: "fax" | "email" | "download"; to?: string; recipientName?: string; message?: string; }; type RfaDeliveryPreview = { packetId: string; sha256: string; contentRevision: number; }; type RfaSubmitInput = Omit & { channel: "fax" | "email"; to: string; recipientName?: string; message?: string; nonBusinessDates?: string[]; }; /** An unsigned RFA preparation draft. Signing and sending are separate operations. */ type RfaCreateDraftInput = { claimId: string; patientId: string; renderingProviderId: string; employeeName: string; providerName: string; externalId?: string; claimsAdminId?: string; writtenConfirmation?: boolean; requestingPractice?: RfaContact | null; authorizationContact?: RfaContact | null; requestType?: "new" | "resubmission_material_change" | "oral_authorization_confirmation"; reviewType?: "prospective" | "concurrent" | "retrospective"; expedited?: boolean; placeOfServiceCode?: string; providerNpi?: string; providerPhone?: string; providerFax?: string; claimNumber?: string; dateOfInjury?: string; rationale?: string; materialChange?: string; items: Array<{ externalId?: string; diagnosisCode: string; diagnosisDescription?: string; serviceDescription: string; procedureCode?: string; quantity?: number; units?: number; frequency?: string; duration?: string; requestedFrom?: string; requestedTo?: string; metadata?: Record; }>; metadata?: Record; }; /** Full replacement of editable request content; retained service rows keep their IDs. */ type RfaUpdateDraftInput = Omit & { expectedRevision: number; items: Array & { id?: string; }>; }; type RfaRecord = { /** Optional human-readable references supplied by the source system. */ displayReference?: string; claimsAdminName?: string; injuryDescription?: string; /** Read-only current contacts used by the form when no saved contact exists. */ formContactDefaults?: { requestingPractice?: RfaContact; authorizationContact?: RfaContact; }; contentRevision: number; id: string; claimId: string; patientId: string; renderingProviderId: string; claimsAdminId: string | null; /** Employee and physician fields printed on the DWC Form RFA. */ employeeDateOfBirth?: string | null; employer?: string | null; providerSpecialty?: string | null; employeeName: string; providerName: string; claimNumber: string | null; status: string; /** Delivery/review lifecycle, separate from the clinical status and item outcomes. */ lifecycleStatus?: RfaLifecycleStatus; requestType?: RfaCreateDraftInput["requestType"]; writtenConfirmation?: boolean; requestingPractice?: RfaContact | null; authorizationContact?: RfaContact | null; placeOfServiceCode?: string | null; providerNpi?: string | null; providerPhone?: string | null; providerFax?: string | null; dateOfInjury?: string | null; rationale?: string | null; materialChange?: string | null; metadata?: Record; reviewType: string; expedited: boolean; createdAt: string | null; updatedAt: string | null; signedAt: string | null; submittedAt: string | null; receivedAt: string | null; decisionDueAt: string | null; decisionDeadlineBasis: string | null; incompleteReason: string | null; deferredReason: string | null; closedReason: string | null; readiness: { ready: boolean; missing: string[]; }; items: Array<{ id: string; diagnosisCode: string; diagnosisDescription?: string; serviceDescription: string; procedureCode: string | null; frequency?: string | null; duration?: string | null; requestedFrom?: string | null; requestedTo?: string | null; metadata?: Record; outcome: string; quantity: number | null; units: number | null; authorizationNumber: string | null; decisionReason: string | null; decisionClosure?: RfaTreatmentClosure | null; currentDecisionEventId?: string | null; currentResponseDocumentId?: string | null; currentImrDocumentId?: string | null; authorizedProcedureCode?: string | null; authorizedQuantity?: number | null; authorizedUnits?: number | null; effectiveFrom?: string | null; effectiveTo?: string | null; decidedAt?: string | null; reviewerName?: string | null; reviewerPhone?: string | null; }>; /** `source`: where the file came from (upload, mindbill, fax, bill, injury, library). `internal`: a working file such as a signing preview, not part of the request. */ documents: Array<{ id: string; documentType: string; filename: string; contentUrl: string; contentRevision: number | null; createdAt: string | null; source?: string; internal?: boolean; }>; transmissions: Array<{ id: string; purpose?: string; direction: string; channel: string; status: string; destination: string | null; occurredAt: string | null; receivedAt: string | null; proofDocumentId: string | null; providerMessageId: string | null; /** sentOutsideMindBill is true for a send the office recorded itself; such a send can be undone. */ metadata?: Record; }>; informationRequests: Array<{ id: string; requestText: string; requestedAt: string | null; dueAt: string | null; respondedAt: string | null; }>; events: Array<{ id: string; type: string; occurredAt: string | null; text?: string; }>; }; type RfaAgingBucket = "0_5" | "6_14" | "15_30" | "31_plus"; type RfaAgingSummary = { byBucket: Record; byLifecycleStatus: Record>; }; type RfaListQuery = { agingBucket?: RfaAgingBucket; patientId?: string; search?: string; sortBy?: "createdAt" | "employeeName" | "providerName" | "submittedAt" | "status" | "lifecycleStatus"; sortDirection?: "asc" | "desc"; claimId?: string; renderingProviderId?: string; status?: string; lifecycleStatus?: RfaLifecycleStatus; /** Sent requests awaiting a decision whose deadline has passed, or falls within the next seven days. */ decisionDue?: "overdue" | "next_7_days"; createdFrom?: string; createdTo?: string; limit?: number; cursor?: string; }; type RfaListResult = { data: RfaRecord[]; nextCursor: string | null; summary: { total: number; byStatus: Record; aging?: RfaAgingSummary; byLifecycleStatus?: Partial>; }; }; type RfaSigningPreviewInput = { billingProviderId?: string; diagnosisDescriptions: Record; }; type RfaSigningPreview = { id: string; contentHash: string; contentRevision: number; renderingProviderId: string; previewDocumentId: string; expiresAt: string; }; type RfaSignInput = { snapshotId: string; contentHash: string; renderingProviderId: string; physicianAuthorized: true; actorReference: string; }; type RfaFaxInput = { to: string; documentIds: string[]; nonBusinessDates?: string[]; }; type RfaUploadDocumentInput = { file: File; documentType: "clinical_report" | "supporting_record" | "ur_response" | "imr_form" | "other"; contentRevision: number; }; /** `employeeFormName`, `dateOfBirth` and `employer` mirror the DWC Form RFA employee block. Date of birth and employer are returned only when the query names this `claimId`. */ type RfaCreationClaim = { claimId: string; patientId: string; employeeName: string; employeeFormName?: string; dateOfBirth?: string; employer?: string; claimNumber?: string; dateOfInjury?: string; claimsAdminId?: string; diagnosisCodes?: string[]; }; type RfaCreationProvider = { id: string; name: string; npi?: string; specialty?: string; }; /** `returnFax` and `returnEmail` are the organization's MindBill-provided fax line and monitored e-mail address for utilization review responses, when set up. */ type RfaCreationContext = { claims: RfaCreationClaim[]; renderingProviders: RfaCreationProvider[]; nextCursor: string | null; renderingProvidersNextCursor: string | null; returnFax?: string; returnEmail?: string; }; type RfaCreationContextQuery = { search?: string; cursor?: string; providerSearch?: string; providerCursor?: string; limit?: number; claimId?: string; renderingProviderId?: string; }; type RfaProvisionClaimInput = { patient: Omit & { externalId: string; }; claim: Omit & { externalId: string; }; }; type RfaProvisionClaimResult = { patientId: string; claimId: string; patientExternalId: string; claimExternalId: string; created: { patient: boolean; claim: boolean; }; }; type RfaClient = { provisionClaim?: (input: RfaProvisionClaimInput, options?: { idempotencyKey?: string; }) => Promise; searchClaimsAdministrators?: (query: string, claimNumber?: string) => Promise; getClaimsAdministratorDirectory?: (id: string, injuryState?: string) => Promise; saveProviderSignature?: (providerId: string, input: { contentBase64: string; physicianAuthorized: true; actorReference: string; }, options?: { idempotencyKey?: string; }) => Promise<{ providerId: string; signatureConfigured: true; }>; getCreationContext: (query?: RfaCreationContextQuery) => Promise; list: (query?: RfaListQuery) => Promise; get: (rfaId: string) => Promise; createDraft: (draft: RfaCreateDraftInput, idempotencyKey: string) => Promise; updateDraft: (rfaId: string, draft: RfaUpdateDraftInput, idempotencyKey: string) => Promise; getDocument: (rfaId: string, documentId: string) => Promise; uploadDocument: (rfaId: string, input: RfaUploadDocumentInput, idempotencyKey: string) => Promise; /** Remove an uploaded supporting document from an unsent request. The server refuses sent requests and required documents. */ removeDocument?: (rfaId: string, documentId: string, idempotencyKey: string) => Promise; prepareSigning: (rfaId: string, input: RfaSigningPreviewInput, idempotencyKey: string) => Promise; sign: (rfaId: string, input: RfaSignInput, idempotencyKey: string) => Promise; prepareDelivery: (rfaId: string, input: RfaDeliveryPreviewInput, key?: string) => Promise; getPacket: (rfaId: string, packetId: string) => Promise; submit: (rfaId: string, input: RfaSubmitInput, idempotencyKey: string) => Promise; previewPacket: (rfaId: string, documentIds: string[]) => Promise; sendFax: (rfaId: string, input: RfaFaxInput, idempotencyKey: string) => Promise; refreshFaxes: (rfaId: string, idempotencyKey: string) => Promise; /** The DWC Form RFA as it stands (signed form or unsigned preview), or with `packet` the whole fax packet. Read-only. */ previewForm?: (rfaId: string, options?: { packet?: boolean; }) => Promise; /** The unsigned DWC Form RFA filled from an unsaved draft. Saves nothing. */ previewDraft?: (draft: RfaDraftPreviewInput) => Promise; /** Proposed decisions read from an attached utilization review response, for a person to check. Saves nothing. */ readResponse?: (rfaId: string, documentId: string) => Promise; /** The organization's saved treatment templates, optionally for one practice. */ listTemplates?: (billingProviderId?: string) => Promise; /** Creates a template, or updates one by id (`active: false` retires it). */ saveTemplate?: (input: RfaTemplateSaveInput, idempotencyKey?: string) => Promise; /** CSV of the filtered requests, one row per treatment. */ exportCsv?: (query?: Omit) => Promise; }; /** An unsaved request as typed so far; nothing is required for a preview. */ type RfaDraftPreviewInput = { claimId?: string | null; patientId?: string | null; renderingProviderId?: string | null; claimsAdminId?: string | null; employeeName?: string | null; providerName?: string | null; providerNpi?: string | null; providerPhone?: string | null; providerFax?: string | null; claimNumber?: string | null; dateOfInjury?: string | null; rationale?: string | null; materialChange?: string | null; requestType?: string | null; expedited?: boolean; writtenConfirmation?: boolean; requestingPractice?: Partial> | null; authorizationContact?: Partial> | null; items?: Array<{ diagnosisCode?: string | null; diagnosisDescription?: string | null; serviceDescription?: string | null; procedureCode?: string | null; frequency?: string | null; duration?: string | null; requestedFrom?: string | null; requestedTo?: string | null; quantity?: number | null; units?: number | null; metadata?: Record | null; }>; }; type RfaResponseReadingResult = { status: "read" | "unreadable"; reason?: "no_text" | "model_unavailable" | "model_answer_invalid"; decidedAt?: string; items: Array<{ itemId: string; outcome: "approved" | "modified" | "denied" | "not_addressed"; confident: boolean; authorizationNumber?: string; authorizedProcedureCode?: string; authorizedQuantity?: number; authorizedUnits?: number; effectiveFrom?: string; effectiveTo?: string; decisionReason?: string; reviewerName?: string; reviewerPhone?: string; }>; }; type RfaTemplateItemRecord = { externalId: string; serviceDescription: string; procedureCode?: string; quantity?: number; units?: number; frequency?: string; duration?: string; otherInformation?: string; }; type RfaTemplateRecord = { id: string; name: string; billingProviderId: string; renderingProviderId: string | null; active: boolean; items: RfaTemplateItemRecord[]; }; type RfaTemplateSaveInput = { id?: string; name: string; billingProviderId: string; renderingProviderId?: string | null; active?: boolean; items: RfaTemplateItemRecord[]; }; /** Uses short-lived browser credentials. Never pass a partner API key. */ declare function createRfaClient({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride }?: OrganizationClientOptions): RfaClient; export { type AddBillNoteInput, BILL_FEE_QUOTE_BASES, BILL_TASKS_AGING_BUCKETS, type BillActivityRecord, type BillActorInput, type BillAttemptSummary, type BillClaimsAdministratorAuthorizationStatus, type BillClaimsAdministratorContact, type BillClaimsAdministratorDirectory, type BillClaimsAdministratorMailingAddress, type BillClaimsAdministratorPattern, type BillClaimsAdministratorPayer, type BillClaimsAdministratorSource, type BillCourtesyCopyInput, type BillCourtesyCopyPreview, type BillCourtesyCopyResult, type BillDeliveryOption, type BillDeliveryOptions, type BillDeliveryPreviewInput, type BillDiagnosisCode, type BillDraft, type BillDraftListQuery, type BillDraftPage, type BillDraftReference, type BillDraftSaveInput, type BillDraftsClient, type BillEorDocument, type BillFeeContext, type BillFeeQuote, type BillFeeQuoteBasis, type BillFeeQuoteFinding, type BillFeeQuoteInput, type BillFeeSource, type BillFormData, type BillFormValue, type BillHistoryEntry, type BillLifecycleAction, type BillLifecycleActionId, type BillLifecycleClient, type BillLifecycleClientOptions, type BillLifecycleData, type BillLifecycleDelivery, type BillLifecycleSession, type BillLifecycleSessionProvider, type BillLifecycleSessionRequest, type BillLineFeeBreakdown, type BillLineFormData, type BillPacketPreview, type BillPacketPreviewInput, type BillPaymentRecord, type BillPostalPlace, type BillProcedureCodePage, type BillProcedureCodeSearchInput, type BillReferenceClient, type BillReferenceClientOptions, type BillRejection, type BillRejectionIssue, type BillRemittanceSummary, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClaimPatternStatus, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewFeatures, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewPayerListInput, type BillReviewPayerOption, type BillReviewPayerPage, type BillReviewPayerSuggestion, type BillReviewSaveInput, type BillSubmissionClient, type BillSubmissionClientOptions, type BillSubmissionDetail, type BillSubmissionRoute, type BillTasksAgingBucket, type BillTasksDashboardData, type BillTasksDashboardItem, type BillTasksDashboardRow, type BillTasksDashboardSection, type BillTasksDashboardSectionInput, type BillTasksDashboardTone, type BillTeamNote, type BillUrDecision, type BillUrDecisionTreatment, type BillUrDecisionsAttachInput, type BillUrDecisionsAttachResult, type BillUrDecisionsResult, type BilledDrug, type BrowserBillAddress, type BrowserBillCreateInput, type BrowserBillSubmissionDocument, type BrowserBillSubmissionInput, type BrowserBillSubmissionResult, type BrowserSubmittedBill, type CaAnesthesiaContext, type CaAnesthesiaEvent, type CaAnesthesiaInterval, type CaAnesthesiaOptionalParticipation, type CaAnesthesiaParticipation, type CaClaimEditFinding, type CaClaimFeeFinding, type CaClaimFeeQuoteInput, type CaClaimFeeQuoteResult, type CaClaimLineQuote, type CaFeeCalculation, type CaFeeCitation, type CaMedicalDirection, type CaMedicalDirectionCase, type CaMonitoredAnesthesiaCare, type CaPadbContext, type CaProfessionalComponentContext, type CaTechnicalComponentContext, type CaTherapyContext, type ClaimForm, type ClaimRfaSummary, type CloseBillInput, type CorrectionDraft, DEFAULT_API_BASE_URL, DEFAULT_SESSION_ENDPOINT, EMPTY_MAILING_ADDRESS, type EncounterQuoteIdentity, type EncounterQuoteInput, type EncounterQuoteLine, type EncounterQuoteLineInput, type EncounterQuoteResult, type HistoricalBillReviewData, type LinkedRfaEvidence, MINDBILL_ANALYTICS_EVENT_NAMES, MINDBILL_BROWSER_SDK_VERSION, MINDBILL_SDK_PACKAGES, type MailingAddressErrors, type MailingAddressField, type MailingAddressParts, type MedicalProviderNetwork, type MindBillAnalyticsBillingMode, type MindBillAnalyticsEvent, type MindBillAnalyticsEventName, type MindBillAnalyticsInput, type MindBillAnalyticsOptions, type MindBillAnalyticsRoute, MindBillApiError, type MindBillSdkPackage, type OrganizationBillingProviderInput, type OrganizationChecklistItem, type OrganizationClaimsAdministrator, type OrganizationClaimsAdministratorInput, type OrganizationClient, type OrganizationClientOptions, type OrganizationLocationInput, type OrganizationPracticeIdentity, type OrganizationProfileData, type OrganizationRenderingProviderInput, type OrganizationRenderingProviderSignature, type OrganizationRenderingProviderSignatureStatus, type OrganizationTeam, type OrganizationTeamMember, type OrganizationTeamRole, type PostBillPaymentInput, REPORT_BILL_STATUS_OPTIONS, RFA_LIFECYCLE_LABELS, type RelatedAuthorizationQuery, type RelatedAuthorizationRecord, type RelatedAuthorizationResult, type ReopenBillInput, type ReportAutofillClient, type ReportAutofillField, type ReportAutofillMatch, type ReportAutofillResult, type ReportBillStatusActionInput, type ReportBillStatusContacts, type ReportBillStatusId, type ReportBillStatusInput, type ReportBillStatusOption, type ResubmitBillInput, type RfaAgingBucket, type RfaAgingSummary, type RfaAuthorizationDestinationOption, type RfaClient, type RfaContact, type RfaCreateDraftInput, type RfaCreationClaim, type RfaCreationContext, type RfaCreationContextQuery, type RfaCreationProvider, type RfaDecisionCorrectionInput, type RfaDecisionsInput, type RfaDeliveryPreview, type RfaDeliveryPreviewInput, type RfaDraftActionsClient, type RfaDraftPreviewInput, type RfaEvidenceState, type RfaFaxInput, type RfaFollowUp, type RfaFollowUpList, type RfaFollowUpUpdate, type RfaForwardInput, type RfaForwardResult, type RfaHistoryEvent, type RfaInboundFax, type RfaInboundFaxMatch, type RfaInformationRequestInput, type RfaInformationResponseInput, type RfaLifecycleClient, type RfaLifecycleStatus, type RfaListQuery, type RfaListResult, type RfaPacketHistory, type RfaPacketTransmission, type RfaPacketsClient, type RfaProvisionClaimInput, type RfaProvisionClaimResult, type RfaReceiptInput, type RfaRecord, type RfaRecordsClient, type RfaResponseReadingResult, type RfaSavedPacket, type RfaScheduling, type RfaSchedulingInput, type RfaSentOutsideInput, type RfaSignInput, type RfaSigningPreview, type RfaSigningPreviewInput, type RfaSubmitInput, type RfaTemplateItemRecord, type RfaTemplateRecord, type RfaTemplateSaveInput, type RfaTreatmentClosure, type RfaTreatmentClosureInput, type RfaTreatmentDecisionInput, type RfaUpdateDraftInput, type RfaUploadDocumentInput, SECOND_REVIEW_REASON_TEMPLATE, SECOND_REVIEW_WINDOW_DAYS, type SandboxSimulationScenario, type SecondReviewDeadline, type SecondReviewIbrDecision, type SecondReviewLineInput, type SecondReviewLineSuggestion, type SecondReviewSuggestions, type SendDuplicateBillInput, type SimulateSandboxBillInput, type SubmitBillInput, type SubmitNewBillInput, type SubmitSecondReviewInput, appendSecondReviewIbrCitations, billTasksAgingBucketIndex, buildBillTasksDashboard, claimRfaSummary, composeMailingAddress, createBillDraftsClient, createBillLifecycleClient, createBillReferenceClient, createBillSubmissionClient, createEncounterQuoter, createOrganizationClient, createReportAutofillClient, createRfaClient, createRfaDraftActionsClient, createRfaLifecycleClient, createRfaPacketsClient, createRfaRecordsClient, defaultBillReviewPayerOption, encounterBillFeeQuotes, encounterQuoteRequest, flushMindBillAnalytics, getRfaLifecycleStatus, isMailingAddressValid, mindBillAnalyticsTabSessionId, mindBillApiErrorCode, mindBillSdkHeaderAccepted, mindBillSdkHeaderValue, normalizeMindBillAnalyticsErrorCode, normalizeRfaFax, normalizeSecondReviewSuggestions, noteMindBillAnalyticsSession, organizationTaxIdWrite, parseEncounterQuote, parseMailingAddress, parseSecondReviewCorrection, pendingMindBillAnalyticsEvents, registerMindBillSdk, rememberMindBillSessionDetails, removeSecondReviewIbrCitation, reportBillStatusContacts, resetMindBillAnalyticsForTests, rfaAuthorizationDestinations, rfaAuthorizationGuidance, sanitizeMindBillAnalyticsEvent, secondReviewDeadline, secondReviewIbrCitationLine, trackMindBillAnalyticsEvent, validateMailingAddress, withMindBillSdkFetch };