@mindbill/browser 0.48.0 → 0.49.0

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/dist/index.d.ts CHANGED
@@ -1,165 +1,3 @@
1
- type RfaLifecycleStatus = "incomplete" | "sent" | "failed" | "received" | "closed" | "canceled";
2
- declare const RFA_LIFECYCLE_LABELS: Readonly<Record<RfaLifecycleStatus, string>>;
3
- type LifecycleRecord = Pick<RfaRecord, "status"> & Partial<Pick<RfaRecord, "lifecycleStatus" | "submittedAt" | "receivedAt" | "transmissions">>;
4
- /** Prefer the API lifecycle. Older responses are derived from the current submission's evidence. */
5
- declare function getRfaLifecycleStatus(rfa: LifecycleRecord): RfaLifecycleStatus;
6
-
7
- /** One patient's complete services for one provider/group. Dates are service dates, not publication dates. */
8
- type CaClaimFeeQuoteInput = {
9
- lines: Array<Omit<BillFeeQuoteInput, "billingProviderId" | "payerId" | "physicianContext"> & {
10
- id: string;
11
- serviceCounty?: string;
12
- physicianContext?: Omit<NonNullable<BillFeeQuoteInput["physicianContext"]>, "providerKind"> & {
13
- providerKind: NonNullable<BillFeeQuoteInput["physicianContext"]>["providerKind"] | "clinical_social_worker";
14
- telehealthModality?: "audio_video" | "audio_only";
15
- cmsSpecialtyCode?: string;
16
- };
17
- }>;
18
- completeDateOfServiceContext: boolean;
19
- ordinaryMultipleSurgeryContext?: boolean;
20
- };
21
- type CaFeeCitation = {
22
- id: string;
23
- url: string;
24
- sha256?: string;
25
- effectiveFrom?: string;
26
- effectiveThrough?: string;
27
- };
28
- type CaFeeCalculation = {
29
- method: "rbrvs" | "therapy_mppr";
30
- locality: string;
31
- serviceZip?: string;
32
- serviceCounty?: string;
33
- setting: "facility" | "nonfacility";
34
- units: number;
35
- conversionFactor: string;
36
- providerPercent: number;
37
- baseMaximumCents?: number;
38
- cmsIndicators?: Record<string, string>;
39
- sourceFiles?: Array<{
40
- kind: string;
41
- filename: string;
42
- }>;
43
- components: Array<{
44
- name: string;
45
- rvu: string;
46
- gpci: string;
47
- payableUnits: number;
48
- }>;
49
- rounding: string;
50
- };
51
- type CaClaimEditFinding = {
52
- type: string;
53
- lineIds: string[];
54
- message: string;
55
- citationUrl: string;
56
- column1?: string;
57
- column2?: string;
58
- modifierIndicator?: number;
59
- code?: string;
60
- limit?: number;
61
- submittedUnits?: number;
62
- adjudicationIndicator?: number;
63
- scope?: "line" | "patient_provider_date";
64
- };
65
- type CaClaimFeeFinding = {
66
- code: string;
67
- lineIds: string[];
68
- message: string;
69
- citationUrl?: string;
70
- edit?: CaClaimEditFinding;
71
- };
72
- type CaClaimLineQuote = ({
73
- status: "priced";
74
- amountCents: number;
75
- scheduleMaximumCents: number;
76
- basis: BillFeeQuoteBasis | "ca_ambulance";
77
- notes: string[];
78
- feeBreakdown?: {
79
- method: string;
80
- inputs: Array<{
81
- label: string;
82
- value: string;
83
- }>;
84
- steps: Array<{
85
- label: string;
86
- value: string;
87
- }>;
88
- };
89
- } | {
90
- status: "requires_review" | "not_separately_payable";
91
- reason: string;
92
- }) & {
93
- provenance: CaFeeCitation[];
94
- calculation?: CaFeeCalculation;
95
- };
96
- type CaClaimFeeQuoteResult = {
97
- status: "priced" | "requires_review" | "not_separately_payable";
98
- lines: Array<{
99
- id: string;
100
- input: CaClaimFeeQuoteInput["lines"][number];
101
- quote: CaClaimLineQuote;
102
- assessment: CaClaimFeeQuoteResult["status"];
103
- findings: CaClaimFeeFinding[];
104
- paymentAdjustment?: {
105
- rule: "ca_multiple_surgery";
106
- rank: number;
107
- percent: 100 | 50;
108
- unadjustedScheduleMaximumCents: number;
109
- scheduleMaximumCents: number;
110
- amountCents: number;
111
- citationUrl: string;
112
- };
113
- }>;
114
- totals: {
115
- submittedChargeCents: number | null;
116
- pricedSubtotalCents: number;
117
- estimatedPayableCents: number | null;
118
- scheduleMaximumCents: number | null;
119
- reviewLineCount: number;
120
- };
121
- claimEdits: Array<{
122
- dateOfService: string;
123
- lineIds: string[];
124
- status: "evaluated" | "requires_review" | "source_unavailable" | "not_applicable";
125
- reason?: string;
126
- findings: CaClaimEditFinding[];
127
- provenance?: unknown;
128
- supportedDateRange?: {
129
- from: string;
130
- through: string;
131
- };
132
- supportedDateIntervals?: Array<{
133
- from: string;
134
- through: string;
135
- }>;
136
- }>;
137
- limitations: string[];
138
- };
139
-
140
- type RfaAuthorizationDestinationOption = {
141
- method: "fax" | "email";
142
- destination: string;
143
- label: string;
144
- phone?: string;
145
- /** Recipient attention line, retained on the reviewed delivery cover. */
146
- recipientName?: string;
147
- };
148
- /** Accept fax numbers only, never telephone notes, email addresses, or extensions. */
149
- declare function normalizeRfaFax(value: string): string | null;
150
- /** Returns choices only. Selecting or transmitting a destination is a separate user action. */
151
- declare function rfaAuthorizationDestinations(directory: BillClaimsAdministratorDirectory | null): RfaAuthorizationDestinationOption[];
152
- declare function rfaAuthorizationGuidance(directory: BillClaimsAdministratorDirectory | null): string;
153
-
154
- type CorrectionDraft = {
155
- correctBilling: boolean;
156
- units: string;
157
- modifiers: string;
158
- charge: string;
159
- chargeReviewed: boolean;
160
- };
161
- declare function parseSecondReviewCorrection(draft: CorrectionDraft): SecondReviewLineInput["correction"];
162
-
163
1
  type RfaReceiptInput = {
164
2
  channel: "fax" | "email" | "edi" | "portal" | "mail" | "manual";
165
3
  receivedAt: string;
@@ -221,6 +59,18 @@ type RfaSchedulingInput = {
221
59
  disposition: "no_appointment" | "canceled";
222
60
  reason: string;
223
61
  });
62
+ type RfaTreatmentClosureInput = {
63
+ closed: boolean;
64
+ reason: string;
65
+ expectedVersion: number;
66
+ };
67
+ type RfaTreatmentClosure = {
68
+ closed: boolean;
69
+ reason: string;
70
+ version: number;
71
+ updatedAt: string;
72
+ updatedBy: string;
73
+ };
224
74
  type RfaDecisionCorrectionInput = {
225
75
  itemId: string;
226
76
  expectedDecisionEventId: string;
@@ -301,6 +151,7 @@ type RfaLifecycleClient = {
301
151
  matchInboundFax(faxId: string, rfaId: string, idempotencyKey: string): Promise<RfaInboundFaxMatch>;
302
152
  listScheduling(id: string): Promise<RfaScheduling[]>;
303
153
  updateScheduling(id: string, itemId: string, input: RfaSchedulingInput, idempotencyKey: string): Promise<RfaScheduling[]>;
154
+ updateTreatmentClosure(id: string, itemId: string, input: RfaTreatmentClosureInput, idempotencyKey: string): Promise<RfaRecord>;
304
155
  correctDecision(id: string, input: RfaDecisionCorrectionInput, idempotencyKey: string): Promise<RfaRecord>;
305
156
  listHistory(id: string): Promise<RfaHistoryEvent[]>;
306
157
  addNote(id: string, text: string, idempotencyKey: string): Promise<RfaHistoryEvent>;
@@ -322,6 +173,168 @@ type RfaLifecycleClient = {
322
173
  /** Records clinical workflow evidence. These methods never send faxes or reconcile notification queues. */
323
174
  declare function createRfaLifecycleClient({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride }?: OrganizationClientOptions): RfaLifecycleClient;
324
175
 
176
+ type RfaLifecycleStatus = "incomplete" | "sent" | "failed" | "received" | "closed" | "canceled";
177
+ declare const RFA_LIFECYCLE_LABELS: Readonly<Record<RfaLifecycleStatus, string>>;
178
+ type LifecycleRecord = Pick<RfaRecord, "status"> & Partial<Pick<RfaRecord, "lifecycleStatus" | "submittedAt" | "receivedAt" | "transmissions">>;
179
+ /** Prefer the API lifecycle. Older responses are derived from the current submission's evidence. */
180
+ declare function getRfaLifecycleStatus(rfa: LifecycleRecord): RfaLifecycleStatus;
181
+
182
+ /** One patient's complete services for one provider/group. Dates are service dates, not publication dates. */
183
+ type CaClaimFeeQuoteInput = {
184
+ lines: Array<Omit<BillFeeQuoteInput, "billingProviderId" | "payerId" | "physicianContext"> & {
185
+ id: string;
186
+ serviceCounty?: string;
187
+ physicianContext?: Omit<NonNullable<BillFeeQuoteInput["physicianContext"]>, "providerKind"> & {
188
+ providerKind: NonNullable<BillFeeQuoteInput["physicianContext"]>["providerKind"] | "clinical_social_worker";
189
+ telehealthModality?: "audio_video" | "audio_only";
190
+ cmsSpecialtyCode?: string;
191
+ };
192
+ }>;
193
+ completeDateOfServiceContext: boolean;
194
+ ordinaryMultipleSurgeryContext?: boolean;
195
+ };
196
+ type CaFeeCitation = {
197
+ id: string;
198
+ url: string;
199
+ sha256?: string;
200
+ effectiveFrom?: string;
201
+ effectiveThrough?: string;
202
+ };
203
+ type CaFeeCalculation = {
204
+ method: "rbrvs" | "therapy_mppr";
205
+ locality: string;
206
+ serviceZip?: string;
207
+ serviceCounty?: string;
208
+ setting: "facility" | "nonfacility";
209
+ units: number;
210
+ conversionFactor: string;
211
+ providerPercent: number;
212
+ baseMaximumCents?: number;
213
+ cmsIndicators?: Record<string, string>;
214
+ sourceFiles?: Array<{
215
+ kind: string;
216
+ filename: string;
217
+ }>;
218
+ components: Array<{
219
+ name: string;
220
+ rvu: string;
221
+ gpci: string;
222
+ payableUnits: number;
223
+ }>;
224
+ rounding: string;
225
+ };
226
+ type CaClaimEditFinding = {
227
+ type: string;
228
+ lineIds: string[];
229
+ message: string;
230
+ citationUrl: string;
231
+ column1?: string;
232
+ column2?: string;
233
+ modifierIndicator?: number;
234
+ code?: string;
235
+ limit?: number;
236
+ submittedUnits?: number;
237
+ adjudicationIndicator?: number;
238
+ scope?: "line" | "patient_provider_date";
239
+ };
240
+ type CaClaimFeeFinding = {
241
+ code: string;
242
+ lineIds: string[];
243
+ message: string;
244
+ citationUrl?: string;
245
+ edit?: CaClaimEditFinding;
246
+ };
247
+ type CaClaimLineQuote = ({
248
+ status: "priced";
249
+ amountCents: number;
250
+ scheduleMaximumCents: number;
251
+ basis: BillFeeQuoteBasis | "ca_ambulance";
252
+ notes: string[];
253
+ feeBreakdown?: {
254
+ method: string;
255
+ inputs: Array<{
256
+ label: string;
257
+ value: string;
258
+ }>;
259
+ steps: Array<{
260
+ label: string;
261
+ value: string;
262
+ }>;
263
+ };
264
+ } | {
265
+ status: "requires_review" | "not_separately_payable";
266
+ reason: string;
267
+ }) & {
268
+ provenance: CaFeeCitation[];
269
+ calculation?: CaFeeCalculation;
270
+ };
271
+ type CaClaimFeeQuoteResult = {
272
+ status: "priced" | "requires_review" | "not_separately_payable";
273
+ lines: Array<{
274
+ id: string;
275
+ input: CaClaimFeeQuoteInput["lines"][number];
276
+ quote: CaClaimLineQuote;
277
+ assessment: CaClaimFeeQuoteResult["status"];
278
+ findings: CaClaimFeeFinding[];
279
+ paymentAdjustment?: {
280
+ rule: "ca_multiple_surgery";
281
+ rank: number;
282
+ percent: 100 | 50;
283
+ unadjustedScheduleMaximumCents: number;
284
+ scheduleMaximumCents: number;
285
+ amountCents: number;
286
+ citationUrl: string;
287
+ };
288
+ }>;
289
+ totals: {
290
+ submittedChargeCents: number | null;
291
+ pricedSubtotalCents: number;
292
+ estimatedPayableCents: number | null;
293
+ scheduleMaximumCents: number | null;
294
+ reviewLineCount: number;
295
+ };
296
+ claimEdits: Array<{
297
+ dateOfService: string;
298
+ lineIds: string[];
299
+ status: "evaluated" | "requires_review" | "source_unavailable" | "not_applicable";
300
+ reason?: string;
301
+ findings: CaClaimEditFinding[];
302
+ provenance?: unknown;
303
+ supportedDateRange?: {
304
+ from: string;
305
+ through: string;
306
+ };
307
+ supportedDateIntervals?: Array<{
308
+ from: string;
309
+ through: string;
310
+ }>;
311
+ }>;
312
+ limitations: string[];
313
+ };
314
+
315
+ type RfaAuthorizationDestinationOption = {
316
+ method: "fax" | "email";
317
+ destination: string;
318
+ label: string;
319
+ phone?: string;
320
+ /** Recipient attention line, retained on the reviewed delivery cover. */
321
+ recipientName?: string;
322
+ };
323
+ /** Accept fax numbers only, never telephone notes, email addresses, or extensions. */
324
+ declare function normalizeRfaFax(value: string): string | null;
325
+ /** Returns choices only. Selecting or transmitting a destination is a separate user action. */
326
+ declare function rfaAuthorizationDestinations(directory: BillClaimsAdministratorDirectory | null): RfaAuthorizationDestinationOption[];
327
+ declare function rfaAuthorizationGuidance(directory: BillClaimsAdministratorDirectory | null): string;
328
+
329
+ type CorrectionDraft = {
330
+ correctBilling: boolean;
331
+ units: string;
332
+ modifiers: string;
333
+ charge: string;
334
+ chargeReviewed: boolean;
335
+ };
336
+ declare function parseSecondReviewCorrection(draft: CorrectionDraft): SecondReviewLineInput["correction"];
337
+
325
338
  type ReportAutofillField = {
326
339
  key: string;
327
340
  value: string;
@@ -2057,6 +2070,7 @@ type RfaRecord = {
2057
2070
  units: number | null;
2058
2071
  authorizationNumber: string | null;
2059
2072
  decisionReason: string | null;
2073
+ decisionClosure?: RfaTreatmentClosure | null;
2060
2074
  currentDecisionEventId?: string | null;
2061
2075
  currentResponseDocumentId?: string | null;
2062
2076
  currentImrDocumentId?: string | null;
@@ -2103,7 +2117,13 @@ type RfaRecord = {
2103
2117
  text?: string;
2104
2118
  }>;
2105
2119
  };
2120
+ type RfaAgingBucket = "0_5" | "6_14" | "15_30" | "31_plus";
2121
+ type RfaAgingSummary = {
2122
+ byBucket: Record<RfaAgingBucket, number>;
2123
+ byLifecycleStatus: Record<RfaLifecycleStatus, Record<RfaAgingBucket, number>>;
2124
+ };
2106
2125
  type RfaListQuery = {
2126
+ agingBucket?: RfaAgingBucket;
2107
2127
  patientId?: string;
2108
2128
  search?: string;
2109
2129
  sortBy?: "createdAt" | "employeeName" | "providerName" | "submittedAt" | "status" | "lifecycleStatus";
@@ -2123,6 +2143,7 @@ type RfaListResult = {
2123
2143
  summary: {
2124
2144
  total: number;
2125
2145
  byStatus: Record<string, number>;
2146
+ aging?: RfaAgingSummary;
2126
2147
  byLifecycleStatus?: Partial<Record<RfaLifecycleStatus, number>>;
2127
2148
  };
2128
2149
  };
@@ -2236,4 +2257,4 @@ type RfaClient = {
2236
2257
  /** Uses short-lived browser credentials. Never pass a partner API key. */
2237
2258
  declare function createRfaClient({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride }?: OrganizationClientOptions): RfaClient;
2238
2259
 
2239
- 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 BillEorDocument, type BillFeeContext, type BillFeeQuote, type BillFeeQuoteBasis, 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 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 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 CloseBillInput, type CorrectionDraft, DEFAULT_API_BASE_URL, DEFAULT_SESSION_ENDPOINT, type HistoricalBillReviewData, type OrganizationBillingProviderInput, type OrganizationChecklistItem, type OrganizationClaimsAdministrator, type OrganizationClaimsAdministratorInput, type OrganizationClient, type OrganizationClientOptions, type OrganizationLocationInput, type OrganizationPracticeIdentity, type OrganizationProfileData, type OrganizationRenderingProviderInput, type OrganizationTeam, type OrganizationTeamMember, type OrganizationTeamRole, type PostBillPaymentInput, REPORT_BILL_STATUS_OPTIONS, RFA_LIFECYCLE_LABELS, type ReopenBillInput, type ReportAutofillClient, type ReportAutofillField, type ReportAutofillMatch, type ReportAutofillResult, type ReportBillStatusActionInput, type ReportBillStatusContacts, type ReportBillStatusId, type ReportBillStatusInput, type ReportBillStatusOption, type ResubmitBillInput, 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 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 RfaSavedPacket, type RfaScheduling, type RfaSchedulingInput, type RfaSignInput, type RfaSigningPreview, type RfaSigningPreviewInput, type RfaSubmitInput, type RfaTreatmentDecisionInput, type RfaUpdateDraftInput, type RfaUploadDocumentInput, SECOND_REVIEW_REASON_TEMPLATE, SECOND_REVIEW_WINDOW_DAYS, type SandboxSimulationScenario, type SecondReviewDeadline, type SecondReviewLineInput, type SendDuplicateBillInput, type SimulateSandboxBillInput, type SubmitBillInput, type SubmitNewBillInput, type SubmitSecondReviewInput, billTasksAgingBucketIndex, buildBillTasksDashboard, createBillLifecycleClient, createBillReferenceClient, createBillSubmissionClient, createOrganizationClient, createReportAutofillClient, createRfaClient, createRfaDraftActionsClient, createRfaLifecycleClient, createRfaPacketsClient, defaultBillReviewPayerOption, getRfaLifecycleStatus, normalizeRfaFax, organizationTaxIdWrite, parseSecondReviewCorrection, reportBillStatusContacts, rfaAuthorizationDestinations, rfaAuthorizationGuidance, sanitizeBillReviewSaveInput, secondReviewDeadline };
2260
+ 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 BillEorDocument, type BillFeeContext, type BillFeeQuote, type BillFeeQuoteBasis, 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 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 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 CloseBillInput, type CorrectionDraft, DEFAULT_API_BASE_URL, DEFAULT_SESSION_ENDPOINT, type HistoricalBillReviewData, type OrganizationBillingProviderInput, type OrganizationChecklistItem, type OrganizationClaimsAdministrator, type OrganizationClaimsAdministratorInput, type OrganizationClient, type OrganizationClientOptions, type OrganizationLocationInput, type OrganizationPracticeIdentity, type OrganizationProfileData, type OrganizationRenderingProviderInput, type OrganizationTeam, type OrganizationTeamMember, type OrganizationTeamRole, type PostBillPaymentInput, REPORT_BILL_STATUS_OPTIONS, RFA_LIFECYCLE_LABELS, 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 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 RfaSavedPacket, type RfaScheduling, type RfaSchedulingInput, type RfaSignInput, type RfaSigningPreview, type RfaSigningPreviewInput, type RfaSubmitInput, type RfaTreatmentClosure, type RfaTreatmentClosureInput, type RfaTreatmentDecisionInput, type RfaUpdateDraftInput, type RfaUploadDocumentInput, SECOND_REVIEW_REASON_TEMPLATE, SECOND_REVIEW_WINDOW_DAYS, type SandboxSimulationScenario, type SecondReviewDeadline, type SecondReviewLineInput, type SendDuplicateBillInput, type SimulateSandboxBillInput, type SubmitBillInput, type SubmitNewBillInput, type SubmitSecondReviewInput, billTasksAgingBucketIndex, buildBillTasksDashboard, createBillLifecycleClient, createBillReferenceClient, createBillSubmissionClient, createOrganizationClient, createReportAutofillClient, createRfaClient, createRfaDraftActionsClient, createRfaLifecycleClient, createRfaPacketsClient, defaultBillReviewPayerOption, getRfaLifecycleStatus, normalizeRfaFax, organizationTaxIdWrite, parseSecondReviewCorrection, reportBillStatusContacts, rfaAuthorizationDestinations, rfaAuthorizationGuidance, sanitizeBillReviewSaveInput, secondReviewDeadline };
package/dist/index.js CHANGED
@@ -170,6 +170,12 @@ function createRfaLifecycleClient({ sessionEndpoint = "/api/mindbill/session", g
170
170
  if (!key.trim()) return Promise.reject(new Error("An idempotency key is required."));
171
171
  return readArray(path(id, `items/${encodeURIComponent(itemId)}/scheduling`), { method: "PATCH", headers: { "idempotency-key": key }, body: JSON.stringify(input) });
172
172
  },
173
+ updateTreatmentClosure: (id, itemId, input, key) => {
174
+ const reason = input.reason.trim();
175
+ if (!reason || reason.length > 2e3) return Promise.reject(new Error("Enter a reason of 1\u20132000 characters."));
176
+ if (!Number.isInteger(input.expectedVersion) || input.expectedVersion < 0) return Promise.reject(new Error("Refresh to load the current treatment version."));
177
+ return mutate(path(id, `items/${encodeURIComponent(itemId)}/closure`), { ...input, reason }, key, "PATCH");
178
+ },
173
179
  correctDecision: (id, input, key) => mutate(path(id, "decision-corrections"), input, key),
174
180
  listHistory: (id) => readArray(path(id, "events")),
175
181
  addNote: (id, text, key) => {