@mindbill/react 0.52.1 → 0.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -389,3 +389,12 @@ import { OrganizationOnboarding } from "@mindbill/react";
389
389
  ```
390
390
 
391
391
  The session must be minted with the optional `organization:manage` permission. Each step saves independently through idempotent upserts that never delete records created elsewhere; the review step mirrors MindBill's onboarding checklist and `onCompleted` fires when everything required is in place.
392
+
393
+ ## Dental and authorization drafts
394
+
395
+ `DentalDraftEditor` captures dental services, tooth details, and nullable extended
396
+ practice charges. `RfaDraftForm` prepares unsigned requests for authorization,
397
+ including review type, rationale, and requested services. Both save through your
398
+ host-server callback; saving does not transmit or authorize anything. See
399
+ [treatment draft integration](../../docs/treatment-drafts.md) for input types,
400
+ revision handling, charge semantics, and signing boundaries.
package/dist/index.d.ts CHANGED
@@ -1633,6 +1633,95 @@ type ConnectedBillingWorkspaceProps = ConnectedSurfaceProps & {
1633
1633
  };
1634
1634
  declare function ConnectedBillingWorkspace({ appearance, className, style, initialView, onCreateBill, onPostPayment, sandboxControls, getCourtesyCopyRecipientOptions, ...options }: ConnectedBillingWorkspaceProps): ReactElement;
1635
1635
 
1636
+ type TreatmentDraftAppearance = {
1637
+ appearance?: MindBillReactAppearance;
1638
+ className?: string;
1639
+ style?: CSSProperties;
1640
+ disabled?: boolean;
1641
+ };
1642
+
1643
+ type DentalDraftLineInput = {
1644
+ code: string | null;
1645
+ description: string | null;
1646
+ editionYear: number | null;
1647
+ serviceDate: string | null;
1648
+ quantity: number; /** Extended charge, already includes quantity. Null means unknown. */
1649
+ chargeCents: number | null;
1650
+ chargeReference: string | null;
1651
+ teeth: string[];
1652
+ surfaces: string[];
1653
+ oralCavity: string | null;
1654
+ prosthesisNotes: string | null;
1655
+ };
1656
+ type DentalDraftContentInput = {
1657
+ renderingProviderId: string;
1658
+ billingProviderId?: string | null;
1659
+ diagnosisCodes: string[];
1660
+ notes: string | null;
1661
+ lines: DentalDraftLineInput[];
1662
+ };
1663
+ type DentalDraftEditorProps = TreatmentDraftAppearance & {
1664
+ /** Use a different React key when switching drafts; edits remain local until Save. */
1665
+ initialContent: DentalDraftContentInput;
1666
+ /** Host persists content using the public dental-drafts API and handles revision conflicts. Never transmits a claim. */
1667
+ onSave: (content: DentalDraftContentInput) => Promise<void>;
1668
+ };
1669
+ declare function dentalDraftChargeSummary(lines: readonly Pick<DentalDraftLineInput, "chargeCents">[]): {
1670
+ knownChargeCents: number;
1671
+ totalChargeCents: number | null;
1672
+ };
1673
+ /** Convert decimal dollars exactly; reject excess precision, zero, and exponential notation. */
1674
+ declare function parseDentalCharge(value: string): number | null;
1675
+ declare function validateDentalDraftContent(content: DentalDraftContentInput): string | null;
1676
+ declare function DentalDraftEditor({ initialContent, onSave, disabled, ...appearance }: DentalDraftEditorProps): ReactElement;
1677
+
1678
+ type RfaDraftItemInput = {
1679
+ externalId?: string;
1680
+ diagnosisCode: string;
1681
+ serviceDescription: string;
1682
+ procedureCode?: string;
1683
+ quantity?: number;
1684
+ units?: number;
1685
+ frequency?: string;
1686
+ duration?: string;
1687
+ requestedFrom?: string;
1688
+ requestedTo?: string;
1689
+ metadata?: Record<string, unknown>;
1690
+ };
1691
+ /** An unsigned preparation draft. The host owns identity selection, signing, and delivery. */
1692
+ type RfaDraftInput = {
1693
+ claimId: string;
1694
+ patientId: string;
1695
+ renderingProviderId: string;
1696
+ employeeName: string;
1697
+ providerName: string;
1698
+ externalId?: string;
1699
+ claimsAdminId?: string;
1700
+ requestType?: "new" | "resubmission_material_change" | "oral_authorization_confirmation";
1701
+ reviewType?: "prospective" | "concurrent" | "retrospective";
1702
+ expedited?: boolean;
1703
+ placeOfServiceCode?: string;
1704
+ providerNpi?: string;
1705
+ providerPhone?: string;
1706
+ providerFax?: string;
1707
+ claimNumber?: string;
1708
+ dateOfInjury?: string;
1709
+ rationale?: string;
1710
+ materialChange?: string;
1711
+ items: RfaDraftItemInput[];
1712
+ metadata?: Record<string, unknown>;
1713
+ };
1714
+ type RfaDraftFormProps = TreatmentDraftAppearance & {
1715
+ /** Remount with a different React key when switching requests. Never pass a signed request. */
1716
+ initialDraft: RfaDraftInput;
1717
+ /** Persist an unsigned draft only; this callback must not sign or transmit the request. */
1718
+ onSave: (draft: RfaDraftInput) => Promise<void>;
1719
+ };
1720
+ /** Remove blank optional item fields, retaining an explicitly cleared return fax. */
1721
+ declare function normalizeRfaDraft(draft: RfaDraftInput): RfaDraftInput;
1722
+ declare function validateRfaDraft(draft: RfaDraftInput): string | null;
1723
+ declare function RfaDraftForm({ initialDraft, onSave, disabled, ...appearance }: RfaDraftFormProps): ReactElement;
1724
+
1636
1725
  type MindBillWidgetProps = {
1637
1726
  sessionToken: string;
1638
1727
  embedUrl: string;
@@ -1645,4 +1734,4 @@ type MindBillWidgetProps = {
1645
1734
  declare function MindBillBillTimeline(props: MindBillWidgetProps): ReactElement;
1646
1735
  declare function MindBillBillReview(props: MindBillWidgetProps): ReactElement;
1647
1736
 
1648
- export { BILL_STATUS_AGING_BUCKETS, BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, BILL_SUBMISSION_DOCUMENT_TYPES, BILL_SUBMISSION_REPORT_TYPES, BILL_SUBMISSION_REQUIRED_FIELDS, type BillActivityEvent, BillActivityTimeline, type BillActivityTimelineProps, type BillAgingBucket, type BillAgingBucketId, BillAgingSummary, type BillAgingSummaryProps, BillCourtesyCopyForm, type BillCourtesyCopyFormProps, BillExplanationOfReview, type BillExplanationOfReviewProps, BillHistoryTable, type BillHistoryTableProps, BillLifecycleActions, type BillLifecycleActionsProps, BillLifecycleProgress, type BillLifecycleProgressProps, type BillLifecycleProgressStepsOptions, type BillLifecycleStage, BillList, type BillListProps, BillPayerContactCard, type BillPayerContactCardProps, BillPaymentLedger, type BillPaymentLedgerProps, BillReadOnlyForm, type BillReadOnlyFormProps, type BillRegistryAge, type BillRegistryItem, type BillRegistryQuery, type BillRegistryResult, type BillRegistrySort, type BillRegistryStatus, BillRejectionNotice, type BillRejectionNoticeProps, BillRemittanceCard, type BillRemittanceCardProps, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, type BillReviewFeatures, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewSaveInput, BillSnapshotSummary, type BillSnapshotSummaryProps, type BillStatusAction, type BillStatusAgingCell, BillStatusAgingMatrix, type BillStatusAgingMatrixData, type BillStatusAgingMatrixProps, type BillStatusAgingRow, type BillStatusClient, type BillStatusClientOptions, type BillStatusData, type BillStatusSession, type BillStatusSessionProvider, type BillStatusSessionRequest, BillStatusSummary, type BillStatusSummaryProps, BillSubmissionActions, type BillSubmissionAddress, type BillSubmissionAttachmentReportTypeMode, BillSubmissionAttachmentsSection, BillSubmissionClaimSection, type BillSubmissionDiagnosisOption, type BillSubmissionDocumentType, type BillSubmissionEvaluationType, BillSubmissionForm, type BillSubmissionFormProps, type BillSubmissionFormValue, BillSubmissionHeader, type BillSubmissionInput$1 as BillSubmissionInput, type BillSubmissionModifierOption, BillSubmissionPatientSection, type BillSubmissionPostalPlace, type BillSubmissionProcedureOption, type BillSubmissionProfileOption, type BillSubmissionProfileOptions, BillSubmissionProvidersSection, type BillSubmissionReportTypeOption, type BillSubmissionRibbonItem, type BillSubmissionRoute, type BillSubmissionSectionId, BillSubmissionServiceLinesSection, type BillSubmissionSourceAttachment, type BillSubmissionTaxonomyOption, type BillSubmissionUpload, type BillSubmissionValidation, BillSubmissionsRibbon, type BillSubmissionsRibbonProps, BillTasksDashboard, type BillTasksDashboardCell, type BillTasksDashboardProps, type BillTasksResult, type BillingComponentProps, BillingDashboard, type BillingDashboardBill, type BillingDashboardProps, type BillingDashboardSummary, type BillingOperationsClient, type BillingOperationsClientOptions, BillingReport, type BillingReportDimension, type BillingReportProps, type BillingReportRow, BillingSettings, ClaimsAdministratorDirectoryDialog, type ClaimsAdministratorDirectoryDialogProps, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillSearch, type ConnectedBillSearchProps, ConnectedBillStatus, type ConnectedBillStatusProps, ConnectedBillTasksDashboard, type ConnectedBillTasksDashboardProps, ConnectedBillingWorkspace, type ConnectedBillingWorkspaceProps, ConnectedNotificationRecipientsSettings, ConnectedNotificationSettings, ConnectedPaymentReview, type ConnectedPaymentReviewProps, ConnectedProductivityReport, ConnectedServiceLineItemsReport, type CourtesyCopyRecipientOption, DEFAULT_BILL_SUBMISSION_MODIFIERS, DEFAULT_BILL_SUBMISSION_PROCEDURES, DEFAULT_BILL_SUBMISSION_TAXONOMIES, MED_LEGAL_REPORT_TYPE_CODE, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, type NotificationAgingDay, type NotificationPreferences, type NotificationRecipient, type NotificationRecipientInvitation, type NotificationRecipientsAdapter, NotificationRecipientsSettings, type NotificationRecipientsSettingsProps, type NotificationRecipientsSnapshot, type NotificationReportDigest, NotificationSettings, type NotificationSettingsAdapter, type NotificationSettingsProps, type NotificationSettingsSnapshot, type NotificationSettingsUpdate, OrganizationOnboarding, type OrganizationOnboardingProps, PSYCH_QME_DEFAULT_DIAGNOSIS, type PaymentReviewItem, type PaymentReviewQuery, type PaymentReviewRange, type PaymentReviewResult, type ProductivityReport, ReportBillStatusDialog, type ReportBillStatusDialogProps, SECOND_REVIEW_REASON_TEMPLATES, SecondReviewForm, type SecondReviewFormProps, SendRouteDialog, type SendRouteDialogProps, type SendRouteSubmission, type ServiceLineItemsReport, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, type W9ExtractionStatus, W9Upload, type W9UploadProps, applyBillSubmissionEvaluationDiagnoses, applyBillSubmissionEvaluationModifiers, billActivityEventLabel, billAgingBucket, billAgingDays, billLifecycleDisplayLabel, billLifecycleStage, billSubmissionsRibbonDeliveryLabel, billSubmissionsRibbonFromHistory, buildBillReviewSaveInput, buildBillStatusAgingCsv, buildBillStatusAgingMatrix, buildBillingReportCsv, buildBillingReportRows, calculateBillSubmissionAllowedAmount, chooseClaimsAdministrator, claimsAdministratorRecommendations, createBillStatusClient, createBillingOperationsClient, ensureTrailingBillSubmissionLine, ensureTrailingProcedureLine, exactClaimsAdministratorMatch, extractSendRouteEmail, formatBillSubmissionDate, formatSendRouteFax, isBillLifecycleDraft, mindBillAppearanceStyle, mindBillThemePresets, normalizeClaimsAdministratorName, organizationProfileOptions, parseBillSubmissionDate, prepareBillSubmissionDocuments, resolveMindBillAppearance, submittedClaimsAdministrator, summarizeBillingDashboard, useBillLifecycle, useBillStatus, validateBillSubmission, visibleBillLifecycleActions };
1737
+ export { BILL_STATUS_AGING_BUCKETS, BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, BILL_SUBMISSION_DOCUMENT_TYPES, BILL_SUBMISSION_REPORT_TYPES, BILL_SUBMISSION_REQUIRED_FIELDS, type BillActivityEvent, BillActivityTimeline, type BillActivityTimelineProps, type BillAgingBucket, type BillAgingBucketId, BillAgingSummary, type BillAgingSummaryProps, BillCourtesyCopyForm, type BillCourtesyCopyFormProps, BillExplanationOfReview, type BillExplanationOfReviewProps, BillHistoryTable, type BillHistoryTableProps, BillLifecycleActions, type BillLifecycleActionsProps, BillLifecycleProgress, type BillLifecycleProgressProps, type BillLifecycleProgressStepsOptions, type BillLifecycleStage, BillList, type BillListProps, BillPayerContactCard, type BillPayerContactCardProps, BillPaymentLedger, type BillPaymentLedgerProps, BillReadOnlyForm, type BillReadOnlyFormProps, type BillRegistryAge, type BillRegistryItem, type BillRegistryQuery, type BillRegistryResult, type BillRegistrySort, type BillRegistryStatus, BillRejectionNotice, type BillRejectionNoticeProps, BillRemittanceCard, type BillRemittanceCardProps, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, type BillReviewFeatures, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewSaveInput, BillSnapshotSummary, type BillSnapshotSummaryProps, type BillStatusAction, type BillStatusAgingCell, BillStatusAgingMatrix, type BillStatusAgingMatrixData, type BillStatusAgingMatrixProps, type BillStatusAgingRow, type BillStatusClient, type BillStatusClientOptions, type BillStatusData, type BillStatusSession, type BillStatusSessionProvider, type BillStatusSessionRequest, BillStatusSummary, type BillStatusSummaryProps, BillSubmissionActions, type BillSubmissionAddress, type BillSubmissionAttachmentReportTypeMode, BillSubmissionAttachmentsSection, BillSubmissionClaimSection, type BillSubmissionDiagnosisOption, type BillSubmissionDocumentType, type BillSubmissionEvaluationType, BillSubmissionForm, type BillSubmissionFormProps, type BillSubmissionFormValue, BillSubmissionHeader, type BillSubmissionInput$1 as BillSubmissionInput, type BillSubmissionModifierOption, BillSubmissionPatientSection, type BillSubmissionPostalPlace, type BillSubmissionProcedureOption, type BillSubmissionProfileOption, type BillSubmissionProfileOptions, BillSubmissionProvidersSection, type BillSubmissionReportTypeOption, type BillSubmissionRibbonItem, type BillSubmissionRoute, type BillSubmissionSectionId, BillSubmissionServiceLinesSection, type BillSubmissionSourceAttachment, type BillSubmissionTaxonomyOption, type BillSubmissionUpload, type BillSubmissionValidation, BillSubmissionsRibbon, type BillSubmissionsRibbonProps, BillTasksDashboard, type BillTasksDashboardCell, type BillTasksDashboardProps, type BillTasksResult, type BillingComponentProps, BillingDashboard, type BillingDashboardBill, type BillingDashboardProps, type BillingDashboardSummary, type BillingOperationsClient, type BillingOperationsClientOptions, BillingReport, type BillingReportDimension, type BillingReportProps, type BillingReportRow, BillingSettings, ClaimsAdministratorDirectoryDialog, type ClaimsAdministratorDirectoryDialogProps, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillSearch, type ConnectedBillSearchProps, ConnectedBillStatus, type ConnectedBillStatusProps, ConnectedBillTasksDashboard, type ConnectedBillTasksDashboardProps, ConnectedBillingWorkspace, type ConnectedBillingWorkspaceProps, ConnectedNotificationRecipientsSettings, ConnectedNotificationSettings, ConnectedPaymentReview, type ConnectedPaymentReviewProps, ConnectedProductivityReport, ConnectedServiceLineItemsReport, type CourtesyCopyRecipientOption, DEFAULT_BILL_SUBMISSION_MODIFIERS, DEFAULT_BILL_SUBMISSION_PROCEDURES, DEFAULT_BILL_SUBMISSION_TAXONOMIES, type DentalDraftContentInput, DentalDraftEditor, type DentalDraftEditorProps, type DentalDraftLineInput, MED_LEGAL_REPORT_TYPE_CODE, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, type NotificationAgingDay, type NotificationPreferences, type NotificationRecipient, type NotificationRecipientInvitation, type NotificationRecipientsAdapter, NotificationRecipientsSettings, type NotificationRecipientsSettingsProps, type NotificationRecipientsSnapshot, type NotificationReportDigest, NotificationSettings, type NotificationSettingsAdapter, type NotificationSettingsProps, type NotificationSettingsSnapshot, type NotificationSettingsUpdate, OrganizationOnboarding, type OrganizationOnboardingProps, PSYCH_QME_DEFAULT_DIAGNOSIS, type PaymentReviewItem, type PaymentReviewQuery, type PaymentReviewRange, type PaymentReviewResult, type ProductivityReport, ReportBillStatusDialog, type ReportBillStatusDialogProps, RfaDraftForm, type RfaDraftFormProps, type RfaDraftInput, type RfaDraftItemInput, SECOND_REVIEW_REASON_TEMPLATES, SecondReviewForm, type SecondReviewFormProps, SendRouteDialog, type SendRouteDialogProps, type SendRouteSubmission, type ServiceLineItemsReport, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, type W9ExtractionStatus, W9Upload, type W9UploadProps, applyBillSubmissionEvaluationDiagnoses, applyBillSubmissionEvaluationModifiers, billActivityEventLabel, billAgingBucket, billAgingDays, billLifecycleDisplayLabel, billLifecycleStage, billSubmissionsRibbonDeliveryLabel, billSubmissionsRibbonFromHistory, buildBillReviewSaveInput, buildBillStatusAgingCsv, buildBillStatusAgingMatrix, buildBillingReportCsv, buildBillingReportRows, calculateBillSubmissionAllowedAmount, chooseClaimsAdministrator, claimsAdministratorRecommendations, createBillStatusClient, createBillingOperationsClient, dentalDraftChargeSummary, ensureTrailingBillSubmissionLine, ensureTrailingProcedureLine, exactClaimsAdministratorMatch, extractSendRouteEmail, formatBillSubmissionDate, formatSendRouteFax, isBillLifecycleDraft, mindBillAppearanceStyle, mindBillThemePresets, normalizeClaimsAdministratorName, normalizeRfaDraft, organizationProfileOptions, parseBillSubmissionDate, parseDentalCharge, prepareBillSubmissionDocuments, resolveMindBillAppearance, submittedClaimsAdministrator, summarizeBillingDashboard, useBillLifecycle, useBillStatus, validateBillSubmission, validateDentalDraftContent, validateRfaDraft, visibleBillLifecycleActions };