@arbol-ai/sdk 5.57.0 → 5.58.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/gmedic/appointments/client.d.ts +7 -4
- package/dist/gmedic/appointments/index.d.ts +1 -1
- package/dist/gmedic/appointments/models.d.ts +59 -1
- package/dist/gmedic/availability/client.d.ts +8 -2
- package/dist/gmedic/availability/client.js +1 -1
- package/dist/gmedic/availability/index.d.ts +1 -1
- package/dist/gmedic/availability/models.d.ts +14 -1
- package/dist/gmedic/index.d.ts +1 -1
- package/dist/gmedic/models.d.ts +23 -0
- package/dist/oficlinic/appointments/client.d.ts +61 -38
- package/dist/oficlinic/appointments/index.d.ts +1 -1
- package/dist/oficlinic/appointments/models.d.ts +100 -38
- package/dist/oficlinic/patients/client.d.ts +7 -6
- package/dist/oficlinic/patients/models.d.ts +6 -4
- package/dist/sanitas/affiliations/client.d.ts +9 -5
- package/dist/sanitas/affiliations/client.js +2 -2
- package/dist/sanitas/affiliations/index.d.ts +1 -1
- package/dist/sanitas/affiliations/models.d.ts +23 -12
- package/dist/sanitas/affiliations/models.js +7 -3
- package/dist/sanitas/models.d.ts +2 -1
- package/package.json +3 -3
|
@@ -10,8 +10,10 @@ export interface Client {
|
|
|
10
10
|
/**
|
|
11
11
|
* Create appointment
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* Create a patient appointment. For agents at clinics using colored booking
|
|
14
|
+
* windows, send bookingRoute with the verified payment route. The connector
|
|
15
|
+
* selects the appointment color and rechecks the entire interval. Reconcile
|
|
16
|
+
* unknown outcomes before repeating.
|
|
15
17
|
*/
|
|
16
18
|
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
17
19
|
/**
|
|
@@ -24,8 +26,9 @@ export interface Client {
|
|
|
24
26
|
/**
|
|
25
27
|
* Update appointment
|
|
26
28
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
+
* Update a patient appointment. For agents at clinics using colored booking
|
|
30
|
+
* windows, send the verified bookingRoute when changing the time. Reconcile
|
|
31
|
+
* unknown outcomes before repeating.
|
|
29
32
|
*/
|
|
30
33
|
update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
|
|
31
34
|
}
|
|
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
|
|
|
2
2
|
export type { RequestOptions } from "../../_/index.js";
|
|
3
3
|
export { createClient } from "./client.js";
|
|
4
4
|
export type { Client, ClientOptions, CreateRequest, CreateResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
|
|
5
|
-
export type { GmedicAppointmentNotFoundFailure, GmedicAppointmentsPage, GmedicAppointmentsPageResponse, GmedicCreateAppointmentBadGatewayError, GmedicCreateAppointmentBadGatewayFailure, GmedicCreateAppointmentBody, GmedicCreateAppointmentNotFoundError, GmedicCreateAppointmentNotFoundFailure, GmedicCreateAppointmentResult, GmedicCreateAppointmentResultResponse, GmedicCreateAppointmentServiceUnavailableError, GmedicCreateAppointmentServiceUnavailableFailure, GmedicListAppointmentsBadGatewayError, GmedicListAppointmentsBadGatewayFailure, GmedicListAppointmentsNotFoundError, GmedicListAppointmentsNotFoundFailure, GmedicListAppointmentsServiceUnavailableError, GmedicListAppointmentsServiceUnavailableFailure, GmedicUpdateAppointmentBadGatewayError, GmedicUpdateAppointmentBadGatewayFailure, GmedicUpdateAppointmentBody, GmedicUpdateAppointmentNotFoundError, GmedicUpdateAppointmentNotFoundFailure, GmedicUpdateAppointmentResult, GmedicUpdateAppointmentResultResponse, GmedicUpdateAppointmentServiceUnavailableError, GmedicUpdateAppointmentServiceUnavailableFailure, } from "./models.js";
|
|
5
|
+
export type { GmedicAppointmentNotFoundFailure, GmedicAppointmentsPage, GmedicAppointmentsPageResponse, GmedicBookingInProgressFailure, GmedicCreateAppointmentBadGatewayError, GmedicCreateAppointmentBadGatewayFailure, GmedicCreateAppointmentBody, GmedicCreateAppointmentConflictError, GmedicCreateAppointmentConflictFailure, GmedicCreateAppointmentNotFoundError, GmedicCreateAppointmentNotFoundFailure, GmedicCreateAppointmentResult, GmedicCreateAppointmentResultResponse, GmedicCreateAppointmentServiceUnavailableError, GmedicCreateAppointmentServiceUnavailableFailure, GmedicListAppointmentsBadGatewayError, GmedicListAppointmentsBadGatewayFailure, GmedicListAppointmentsNotFoundError, GmedicListAppointmentsNotFoundFailure, GmedicListAppointmentsServiceUnavailableError, GmedicListAppointmentsServiceUnavailableFailure, GmedicUpdateAppointmentBadGatewayError, GmedicUpdateAppointmentBadGatewayFailure, GmedicUpdateAppointmentBody, GmedicUpdateAppointmentConflictError, GmedicUpdateAppointmentConflictFailure, GmedicUpdateAppointmentNotFoundError, GmedicUpdateAppointmentNotFoundFailure, GmedicUpdateAppointmentResult, GmedicUpdateAppointmentResultResponse, GmedicUpdateAppointmentServiceUnavailableError, GmedicUpdateAppointmentServiceUnavailableFailure, } from "./models.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Empty, OutcomeUnknownFailure, PageInfo, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
-
import type { GmedicCatalogSearchIncompleteFailure, GmedicConnectionNotFoundFailure, GmedicProviderAccessRejectedFailure, GmedicProviderResponseInvalidFailure, GmedicProviderUnavailableFailure, GmedicRecordNotFoundFailure } from "../models.js";
|
|
2
|
+
import type { GmedicBookingColorRequiredFailure, GmedicCatalogSearchIncompleteFailure, GmedicConnectionNotFoundFailure, GmedicNotConfiguredFailure, GmedicProviderAccessRejectedFailure, GmedicProviderResponseInvalidFailure, GmedicProviderUnavailableFailure, GmedicRecordNotFoundFailure } from "../models.js";
|
|
3
3
|
/**
|
|
4
4
|
* gMedic has no appointment with this id.
|
|
5
5
|
*/
|
|
@@ -145,6 +145,28 @@ export interface GmedicAppointmentsPageResponse {
|
|
|
145
145
|
metadata: ResponseMetadata;
|
|
146
146
|
success: true;
|
|
147
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Another appointment change is in progress. Check the agenda again before
|
|
150
|
+
* trying to book.
|
|
151
|
+
*/
|
|
152
|
+
export interface GmedicBookingInProgressFailure {
|
|
153
|
+
/**
|
|
154
|
+
* The failure code, stable across releases.
|
|
155
|
+
*/
|
|
156
|
+
code: "BOOKING_IN_PROGRESS";
|
|
157
|
+
/**
|
|
158
|
+
* No fields.
|
|
159
|
+
*/
|
|
160
|
+
data: Empty;
|
|
161
|
+
/**
|
|
162
|
+
* What went wrong, for people; it never contains input values.
|
|
163
|
+
*/
|
|
164
|
+
message: string;
|
|
165
|
+
/**
|
|
166
|
+
* Whether repeating the same request may succeed.
|
|
167
|
+
*/
|
|
168
|
+
retryable: false;
|
|
169
|
+
}
|
|
148
170
|
/**
|
|
149
171
|
* A failed answer.
|
|
150
172
|
*/
|
|
@@ -159,6 +181,11 @@ export interface GmedicCreateAppointmentBadGatewayError {
|
|
|
159
181
|
}
|
|
160
182
|
export type GmedicCreateAppointmentBadGatewayFailure = OutcomeUnknownFailure | GmedicProviderAccessRejectedFailure | GmedicProviderResponseInvalidFailure;
|
|
161
183
|
export interface GmedicCreateAppointmentBody {
|
|
184
|
+
/**
|
|
185
|
+
* Verified payment route, required for agent scheduling at clinics using
|
|
186
|
+
* colored booking windows.
|
|
187
|
+
*/
|
|
188
|
+
bookingRoute?: "PRIVATE" | "AXA_PREPAID" | "AXA_ARL" | "PONAL_STARKEY" | "EPS_SURA";
|
|
162
189
|
connectionId?: string;
|
|
163
190
|
data: {
|
|
164
191
|
agendaId: string;
|
|
@@ -195,6 +222,19 @@ export interface GmedicCreateAppointmentBody {
|
|
|
195
222
|
viaEntryId?: string;
|
|
196
223
|
};
|
|
197
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* A failed answer.
|
|
227
|
+
*/
|
|
228
|
+
export interface GmedicCreateAppointmentConflictError {
|
|
229
|
+
data: null;
|
|
230
|
+
error: GmedicCreateAppointmentConflictFailure;
|
|
231
|
+
/**
|
|
232
|
+
* What every answer carries besides its data or error.
|
|
233
|
+
*/
|
|
234
|
+
metadata: ResponseMetadata;
|
|
235
|
+
success: false;
|
|
236
|
+
}
|
|
237
|
+
export type GmedicCreateAppointmentConflictFailure = GmedicNotConfiguredFailure | GmedicBookingColorRequiredFailure | GmedicBookingInProgressFailure;
|
|
198
238
|
/**
|
|
199
239
|
* A failed answer.
|
|
200
240
|
*/
|
|
@@ -420,6 +460,11 @@ export interface GmedicUpdateAppointmentBadGatewayError {
|
|
|
420
460
|
}
|
|
421
461
|
export type GmedicUpdateAppointmentBadGatewayFailure = OutcomeUnknownFailure | GmedicProviderAccessRejectedFailure | GmedicProviderResponseInvalidFailure;
|
|
422
462
|
export interface GmedicUpdateAppointmentBody {
|
|
463
|
+
/**
|
|
464
|
+
* Verified payment route, required for agent scheduling at clinics using
|
|
465
|
+
* colored booking windows.
|
|
466
|
+
*/
|
|
467
|
+
bookingRoute?: "PRIVATE" | "AXA_PREPAID" | "AXA_ARL" | "PONAL_STARKEY" | "EPS_SURA";
|
|
423
468
|
color?: "BLUE" | "RED" | "PINK" | "PURPLE" | "DARK_PURPLE" | "STEELE_BLUE" | "LIGHT_BLUE" | "TEAL" | "LIGHT_TEAL" | "GREEN" | "LIGHT_GREEN" | "YELLOW_GREEN" | "YELLOW" | "ORANGE" | "RED_ORANGE" | "LIGHT_BROWN" | "LIGHT_PURPLE" | "GREY" | "BLUE_GREY" | "YELLOW_GREY" | "BROWN";
|
|
424
469
|
connectionId?: string;
|
|
425
470
|
/**
|
|
@@ -439,6 +484,19 @@ export interface GmedicUpdateAppointmentBody {
|
|
|
439
484
|
startsAt?: Temporal.Instant;
|
|
440
485
|
status?: "SCHEDULED" | "ATTENDED" | "UNATTENDED" | "CANCELED" | "PENALIZED" | "CONFIRMED" | "DECLINED";
|
|
441
486
|
}
|
|
487
|
+
/**
|
|
488
|
+
* A failed answer.
|
|
489
|
+
*/
|
|
490
|
+
export interface GmedicUpdateAppointmentConflictError {
|
|
491
|
+
data: null;
|
|
492
|
+
error: GmedicUpdateAppointmentConflictFailure;
|
|
493
|
+
/**
|
|
494
|
+
* What every answer carries besides its data or error.
|
|
495
|
+
*/
|
|
496
|
+
metadata: ResponseMetadata;
|
|
497
|
+
success: false;
|
|
498
|
+
}
|
|
499
|
+
export type GmedicUpdateAppointmentConflictFailure = GmedicNotConfiguredFailure | GmedicBookingColorRequiredFailure | GmedicBookingInProgressFailure;
|
|
442
500
|
/**
|
|
443
501
|
* A failed answer.
|
|
444
502
|
*/
|
|
@@ -10,8 +10,9 @@ export interface Client {
|
|
|
10
10
|
/**
|
|
11
11
|
* List availability
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* List available intervals. At clinics using colored booking windows, send
|
|
14
|
+
* the verified bookingRoute. Check the full duration within a returned
|
|
15
|
+
* interval and a compatible agenda.
|
|
15
16
|
*/
|
|
16
17
|
list(request: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
17
18
|
}
|
|
@@ -33,6 +34,11 @@ export interface ListRequest {
|
|
|
33
34
|
* another cursor.
|
|
34
35
|
*/
|
|
35
36
|
limit?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Verified payment route, required for agent scheduling at clinics using
|
|
39
|
+
* colored booking windows.
|
|
40
|
+
*/
|
|
41
|
+
bookingRoute?: "PRIVATE" | "AXA_PREPAID" | "AXA_ARL" | "PONAL_STARKEY" | "EPS_SURA";
|
|
36
42
|
/**
|
|
37
43
|
* The agenda id.
|
|
38
44
|
*/
|
|
@@ -13,7 +13,7 @@ export function bind(transport) {
|
|
|
13
13
|
const ListOperation = {
|
|
14
14
|
method: "GET",
|
|
15
15
|
route: "/v1/gmedic/availability",
|
|
16
|
-
query: { cursor: "cursor", direction: "direction", limit: "limit", agendaId: "agendaId", from: "from", to: "to", connectionId: "connectionId", startDate: "startDate", endDate: "endDate" },
|
|
16
|
+
query: { cursor: "cursor", direction: "direction", limit: "limit", bookingRoute: "bookingRoute", agendaId: "agendaId", from: "from", to: "to", connectionId: "connectionId", startDate: "startDate", endDate: "endDate" },
|
|
17
17
|
response: GmedicAvailabilityPageResponseCodec,
|
|
18
18
|
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
19
|
};
|
|
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
|
|
|
2
2
|
export type { RequestOptions } from "../../_/index.js";
|
|
3
3
|
export { createClient } from "./client.js";
|
|
4
4
|
export type { Client, ClientOptions, ListRequest, ListResponse, } from "./client.js";
|
|
5
|
-
export type { GmedicAvailabilityPage, GmedicAvailabilityPageResponse, GmedicListAvailabilityBadGatewayError, GmedicListAvailabilityBadGatewayFailure, GmedicListAvailabilityNotFoundError, GmedicListAvailabilityNotFoundFailure, GmedicListAvailabilityServiceUnavailableError, GmedicListAvailabilityServiceUnavailableFailure, } from "./models.js";
|
|
5
|
+
export type { GmedicAvailabilityPage, GmedicAvailabilityPageResponse, GmedicListAvailabilityBadGatewayError, GmedicListAvailabilityBadGatewayFailure, GmedicListAvailabilityConflictError, GmedicListAvailabilityConflictFailure, GmedicListAvailabilityNotFoundError, GmedicListAvailabilityNotFoundFailure, GmedicListAvailabilityServiceUnavailableError, GmedicListAvailabilityServiceUnavailableFailure, } from "./models.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OutcomeUnknownFailure, PageInfo, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
-
import type { GmedicCatalogSearchIncompleteFailure, GmedicConnectionNotFoundFailure, GmedicProviderAccessRejectedFailure, GmedicProviderResponseInvalidFailure, GmedicProviderUnavailableFailure, GmedicRecordNotFoundFailure } from "../models.js";
|
|
2
|
+
import type { GmedicBookingColorRequiredFailure, GmedicCatalogSearchIncompleteFailure, GmedicConnectionNotFoundFailure, GmedicNotConfiguredFailure, GmedicProviderAccessRejectedFailure, GmedicProviderResponseInvalidFailure, GmedicProviderUnavailableFailure, GmedicRecordNotFoundFailure } from "../models.js";
|
|
3
3
|
export interface GmedicAvailabilityPage {
|
|
4
4
|
/**
|
|
5
5
|
* Items admitted by this resource contract within the verified organization.
|
|
@@ -56,6 +56,19 @@ export interface GmedicListAvailabilityBadGatewayError {
|
|
|
56
56
|
success: false;
|
|
57
57
|
}
|
|
58
58
|
export type GmedicListAvailabilityBadGatewayFailure = OutcomeUnknownFailure | GmedicProviderAccessRejectedFailure | GmedicProviderResponseInvalidFailure;
|
|
59
|
+
/**
|
|
60
|
+
* A failed answer.
|
|
61
|
+
*/
|
|
62
|
+
export interface GmedicListAvailabilityConflictError {
|
|
63
|
+
data: null;
|
|
64
|
+
error: GmedicListAvailabilityConflictFailure;
|
|
65
|
+
/**
|
|
66
|
+
* What every answer carries besides its data or error.
|
|
67
|
+
*/
|
|
68
|
+
metadata: ResponseMetadata;
|
|
69
|
+
success: false;
|
|
70
|
+
}
|
|
71
|
+
export type GmedicListAvailabilityConflictFailure = GmedicNotConfiguredFailure | GmedicBookingColorRequiredFailure;
|
|
59
72
|
/**
|
|
60
73
|
* A failed answer.
|
|
61
74
|
*/
|
package/dist/gmedic/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export { ApiError } from "../_/index.js";
|
|
|
2
2
|
export type { RequestOptions } from "../_/index.js";
|
|
3
3
|
export { createClient } from "./client.js";
|
|
4
4
|
export type { Client, ClientOptions, } from "./client.js";
|
|
5
|
-
export type { GmedicCatalogSearchIncompleteFailure, GmedicConnectionNotFoundFailure, GmedicNotConfiguredError, GmedicNotConfiguredFailure, GmedicProviderAccessRejectedFailure, GmedicProviderInputRejectedError, GmedicProviderInputRejectedFailure, GmedicProviderResponseInvalidFailure, GmedicProviderUnavailableFailure, GmedicRecordNotFoundFailure, } from "./models.js";
|
|
5
|
+
export type { GmedicBookingColorRequiredFailure, GmedicCatalogSearchIncompleteFailure, GmedicConnectionNotFoundFailure, GmedicNotConfiguredError, GmedicNotConfiguredFailure, GmedicProviderAccessRejectedFailure, GmedicProviderInputRejectedError, GmedicProviderInputRejectedFailure, GmedicProviderResponseInvalidFailure, GmedicProviderUnavailableFailure, GmedicRecordNotFoundFailure, } from "./models.js";
|
package/dist/gmedic/models.d.ts
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
import type { Empty, ResponseMetadata } from "../models.js";
|
|
2
|
+
/**
|
|
3
|
+
* This booking requires a verified free interval in the clinic’s correct blue
|
|
4
|
+
* or gray window. Check availability with the required booking color or refer
|
|
5
|
+
* the request to reception.
|
|
6
|
+
*/
|
|
7
|
+
export interface GmedicBookingColorRequiredFailure {
|
|
8
|
+
/**
|
|
9
|
+
* The failure code, stable across releases.
|
|
10
|
+
*/
|
|
11
|
+
code: "BOOKING_COLOR_REQUIRED";
|
|
12
|
+
/**
|
|
13
|
+
* No fields.
|
|
14
|
+
*/
|
|
15
|
+
data: Empty;
|
|
16
|
+
/**
|
|
17
|
+
* What went wrong, for people; it never contains input values.
|
|
18
|
+
*/
|
|
19
|
+
message: string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether repeating the same request may succeed.
|
|
22
|
+
*/
|
|
23
|
+
retryable: false;
|
|
24
|
+
}
|
|
2
25
|
/**
|
|
3
26
|
* The service catalog search could not be completed within its limits. Service
|
|
4
27
|
* absence cannot be concluded.
|
|
@@ -14,9 +14,9 @@ export interface Client {
|
|
|
14
14
|
* resolved by citizenship card. Use the exact CAS (serviceNumber) from that
|
|
15
15
|
* patient's assigned appointments, one exact listed cancellation reason, and
|
|
16
16
|
* confirm true only after the patient or authorized staff confirms this
|
|
17
|
-
* specific cancellation.
|
|
18
|
-
*
|
|
19
|
-
* cancellation may have happened: look up the patient's cancelled
|
|
17
|
+
* specific cancellation. Repeating the identical request returns the recorded
|
|
18
|
+
* result without sending again; no idempotency key is needed. OUTCOME_UNKNOWN
|
|
19
|
+
* means the cancellation may have happened: look up the patient's cancelled
|
|
20
20
|
* appointments and do not dispatch it again. agentMode true answers concise
|
|
21
21
|
* Spanish text instead.
|
|
22
22
|
*/
|
|
@@ -25,28 +25,44 @@ export interface Client {
|
|
|
25
25
|
* Create an appointment
|
|
26
26
|
*
|
|
27
27
|
* Book one appointment in e-Oficlinic (ASIGNAR_CITAS) for a slot that
|
|
28
|
-
* list_booking_slots offered in an availability flow.
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* from
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
28
|
+
* search_booking_slots or list_booking_slots offered in an availability flow.
|
|
29
|
+
* Send what a person at the desk chooses: confirm true; the slot's flowId and
|
|
30
|
+
* slotId; the patient's documentType and documentNumber; the payer's planId
|
|
31
|
+
* and subplanId (list_payer_plans, list_payer_subplans); and in
|
|
32
|
+
* classification the patient's regime and affiliateType (list_regimes,
|
|
33
|
+
* list_affiliate_types) and, for copayments, salaryRange
|
|
34
|
+
* (list_salary_ranges). Leave the rest out: the service resolves it as the
|
|
35
|
+
* provider's own booking screen does. The payer, program and attention type
|
|
36
|
+
* are the flow's; the purpose is the form's default, 10; the contract is the
|
|
37
|
+
* payer's only active one, or none when it has none; billing takes its flags
|
|
38
|
+
* from the payer's row, its copayment rate, cap and moderator fee from the
|
|
39
|
+
* salary range's row, and its tariff from the payer's tariff matrix for the
|
|
40
|
+
* flow's service under the plan and subplan. A value the caller does send is
|
|
41
|
+
* used as given, and a billing object is sent unchanged with nothing
|
|
42
|
+
* resolved. BOOKING_VALUE_UNRESOLVED means a needed value could not be
|
|
43
|
+
* resolved from the provider's own data and nothing was written; send it and
|
|
44
|
+
* repeat: contractId when the payer has several active contracts;
|
|
45
|
+
* classification.relationship when the affiliate type is neither C nor N;
|
|
46
|
+
* classification.listStatus when the payer uses an attention list;
|
|
47
|
+
* referral.authorizationNumber when the payer requires authorization; a
|
|
48
|
+
* classification.salaryRange the regime lists; or billing when the payer's
|
|
49
|
+
* tariff grid has no positive tariff for the service. Before anything is
|
|
50
|
+
* written, the patient is resolved by citizenship card; the source must still
|
|
51
|
+
* count exactly one unit for the program and attention type; the regime,
|
|
52
|
+
* affiliate type, relationship and salary range, and the payer, plan, subplan
|
|
53
|
+
* and contract, must be listed by the provider; the service must be
|
|
54
|
+
* configured for the slot's professional; and a fresh read must still show
|
|
55
|
+
* the slot. The intent and a fence on the slot are recorded before the single
|
|
56
|
+
* provider request, which is never resent. Success means the provider
|
|
57
|
+
* answered a strictly positive appointment number, the source's own creation
|
|
58
|
+
* signal (verification provider_acknowledgement). OUTCOME_UNKNOWN means the
|
|
59
|
+
* appointment may exist: do not book again; check lookup_appointments with
|
|
60
|
+
* status assigned and ask staff. WRITE_TARGET_UNRESOLVED means another key's
|
|
61
|
+
* write to this slot has no final outcome, so nothing was sent.
|
|
62
|
+
* WRITE_LEDGER_FULL means the connection's ledger refused a new write and
|
|
63
|
+
* nothing was sent. Repeating the identical request answers the recorded
|
|
64
|
+
* outcome; no idempotency key is needed. One-slot, one-unit bookings only.
|
|
65
|
+
* agentMode true answers concise Spanish text instead.
|
|
50
66
|
*/
|
|
51
67
|
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
52
68
|
/**
|
|
@@ -72,19 +88,26 @@ export interface Client {
|
|
|
72
88
|
* must be an upcoming assigned appointment of the patient resolved by
|
|
73
89
|
* citizenship card (its CAS, serviceNumber in lookup_appointments); the
|
|
74
90
|
* cancellation reason must be exactly one list_cancellation_reasons answers;
|
|
75
|
-
* the new slot is booked first exactly as create_appointment books it
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
91
|
+
* the new slot is booked first exactly as create_appointment books it, from
|
|
92
|
+
* the same input: the new slot's flowId and slotId, the patient's document,
|
|
93
|
+
* the payer's planId and subplanId, and in classification the patient's
|
|
94
|
+
* regime, affiliateType and, for copayments, salaryRange. The service
|
|
95
|
+
* resolves the payer, program, attention type, purpose, contract and billing
|
|
96
|
+
* with its tariff from the flow and the provider's own data, as
|
|
97
|
+
* create_appointment describes; BOOKING_VALUE_UNRESOLVED means a needed value
|
|
98
|
+
* could not be resolved, nothing was written and the original is untouched:
|
|
99
|
+
* send it and repeat. Only after the provider acknowledged the new booking is
|
|
100
|
+
* the original cancelled (CANECELAR_CITAS) with the given reason and
|
|
101
|
+
* observations. If the new booking fails, nothing changes; if its outcome is
|
|
102
|
+
* unknown, OUTCOME_UNKNOWN answers and the original is never cancelled. Once
|
|
103
|
+
* the new booking is acknowledged the answer reports each phase: completed
|
|
104
|
+
* when the cancellation was confirmed too, partial otherwise (cancellation
|
|
105
|
+
* pending, unknown or not possible), when the patient may hold both
|
|
106
|
+
* appointments. pending continues when the identical request is repeated,
|
|
107
|
+
* which resumes the cancellation alone; nothing is ever resent. The slot and
|
|
108
|
+
* the original are fenced from the first dispatch: WRITE_TARGET_UNRESOLVED
|
|
109
|
+
* means another key's write to either has no final outcome, and nothing was
|
|
110
|
+
* sent. agentMode true answers concise Spanish text instead.
|
|
88
111
|
*/
|
|
89
112
|
reschedule(request: RescheduleRequest, options?: RequestOptions): Promise<RescheduleResponse>;
|
|
90
113
|
}
|
|
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
|
|
|
2
2
|
export type { RequestOptions } from "../../_/index.js";
|
|
3
3
|
export { createClient } from "./client.js";
|
|
4
4
|
export type { Client, ClientOptions, CancelRequest, CancelResponse, CreateRequest, CreateResponse, LookupRequest, LookupResponse, RescheduleRequest, RescheduleResponse, } from "./client.js";
|
|
5
|
-
export type { OficlinicAppointment, OficlinicAppointmentBooking, OficlinicAppointmentCancellation, OficlinicAppointmentNotCancellableFailure, OficlinicAppointmentNotFoundFailure, OficlinicAppointmentNotReschedulableFailure, OficlinicAppointmentPage, OficlinicAppointmentReschedule, OficlinicCancelAppointmentBadGatewayError, OficlinicCancelAppointmentBadGatewayFailure, OficlinicCancelAppointmentBody, OficlinicCancelAppointmentConflictError, OficlinicCancelAppointmentConflictFailure, OficlinicCancelAppointmentNotFoundError, OficlinicCancelAppointmentNotFoundFailure, OficlinicCancelAppointmentResult, OficlinicCancelAppointmentResultResponse, OficlinicCancelAppointmentServiceUnavailableError, OficlinicCancelAppointmentServiceUnavailableFailure, OficlinicCancelAppointmentTooManyRequestsError, OficlinicCancelAppointmentTooManyRequestsFailure, OficlinicCancelAppointmentUnprocessableContentError, OficlinicCancelAppointmentUnprocessableContentFailure, OficlinicCreateAppointmentBadGatewayError, OficlinicCreateAppointmentBadGatewayFailure, OficlinicCreateAppointmentBody, OficlinicCreateAppointmentConflictError, OficlinicCreateAppointmentConflictFailure, OficlinicCreateAppointmentNotFoundError, OficlinicCreateAppointmentNotFoundFailure, OficlinicCreateAppointmentResult, OficlinicCreateAppointmentResultResponse, OficlinicCreateAppointmentServiceUnavailableError, OficlinicCreateAppointmentServiceUnavailableFailure, OficlinicCreateAppointmentTooManyRequestsError, OficlinicCreateAppointmentTooManyRequestsFailure, OficlinicCreateAppointmentUnprocessableContentError, OficlinicCreateAppointmentUnprocessableContentFailure, OficlinicLookupAppointmentsBadGatewayError, OficlinicLookupAppointmentsBadGatewayFailure, OficlinicLookupAppointmentsBadRequestError, OficlinicLookupAppointmentsBadRequestFailure, OficlinicLookupAppointmentsBody, OficlinicLookupAppointmentsConflictError, OficlinicLookupAppointmentsConflictFailure, OficlinicLookupAppointmentsNotFoundError, OficlinicLookupAppointmentsNotFoundFailure, OficlinicLookupAppointmentsResult, OficlinicLookupAppointmentsResultResponse, OficlinicLookupAppointmentsServiceUnavailableError, OficlinicLookupAppointmentsServiceUnavailableFailure, OficlinicLookupAppointmentsTooManyRequestsError, OficlinicLookupAppointmentsTooManyRequestsFailure, OficlinicLookupAppointmentsUnprocessableContentError, OficlinicLookupAppointmentsUnprocessableContentFailure, OficlinicPatientNotFoundFailure, OficlinicRescheduleAppointmentBadGatewayError, OficlinicRescheduleAppointmentBadGatewayFailure, OficlinicRescheduleAppointmentBody, OficlinicRescheduleAppointmentConflictError, OficlinicRescheduleAppointmentConflictFailure, OficlinicRescheduleAppointmentNotFoundError, OficlinicRescheduleAppointmentNotFoundFailure, OficlinicRescheduleAppointmentResult, OficlinicRescheduleAppointmentResultResponse, OficlinicRescheduleAppointmentServiceUnavailableError, OficlinicRescheduleAppointmentServiceUnavailableFailure, OficlinicRescheduleAppointmentTooManyRequestsError, OficlinicRescheduleAppointmentTooManyRequestsFailure, OficlinicRescheduleAppointmentUnprocessableContentError, OficlinicRescheduleAppointmentUnprocessableContentFailure, OficlinicServiceNotAvailableFailure, } from "./models.js";
|
|
5
|
+
export type { OficlinicAppointment, OficlinicAppointmentBooking, OficlinicAppointmentCancellation, OficlinicAppointmentNotCancellableFailure, OficlinicAppointmentNotFoundFailure, OficlinicAppointmentNotReschedulableFailure, OficlinicAppointmentPage, OficlinicAppointmentReschedule, OficlinicBookingValueUnresolvedFailure, OficlinicCancelAppointmentBadGatewayError, OficlinicCancelAppointmentBadGatewayFailure, OficlinicCancelAppointmentBody, OficlinicCancelAppointmentConflictError, OficlinicCancelAppointmentConflictFailure, OficlinicCancelAppointmentNotFoundError, OficlinicCancelAppointmentNotFoundFailure, OficlinicCancelAppointmentResult, OficlinicCancelAppointmentResultResponse, OficlinicCancelAppointmentServiceUnavailableError, OficlinicCancelAppointmentServiceUnavailableFailure, OficlinicCancelAppointmentTooManyRequestsError, OficlinicCancelAppointmentTooManyRequestsFailure, OficlinicCancelAppointmentUnprocessableContentError, OficlinicCancelAppointmentUnprocessableContentFailure, OficlinicCreateAppointmentBadGatewayError, OficlinicCreateAppointmentBadGatewayFailure, OficlinicCreateAppointmentBody, OficlinicCreateAppointmentConflictError, OficlinicCreateAppointmentConflictFailure, OficlinicCreateAppointmentNotFoundError, OficlinicCreateAppointmentNotFoundFailure, OficlinicCreateAppointmentResult, OficlinicCreateAppointmentResultResponse, OficlinicCreateAppointmentServiceUnavailableError, OficlinicCreateAppointmentServiceUnavailableFailure, OficlinicCreateAppointmentTooManyRequestsError, OficlinicCreateAppointmentTooManyRequestsFailure, OficlinicCreateAppointmentUnprocessableContentError, OficlinicCreateAppointmentUnprocessableContentFailure, OficlinicLookupAppointmentsBadGatewayError, OficlinicLookupAppointmentsBadGatewayFailure, OficlinicLookupAppointmentsBadRequestError, OficlinicLookupAppointmentsBadRequestFailure, OficlinicLookupAppointmentsBody, OficlinicLookupAppointmentsConflictError, OficlinicLookupAppointmentsConflictFailure, OficlinicLookupAppointmentsNotFoundError, OficlinicLookupAppointmentsNotFoundFailure, OficlinicLookupAppointmentsResult, OficlinicLookupAppointmentsResultResponse, OficlinicLookupAppointmentsServiceUnavailableError, OficlinicLookupAppointmentsServiceUnavailableFailure, OficlinicLookupAppointmentsTooManyRequestsError, OficlinicLookupAppointmentsTooManyRequestsFailure, OficlinicLookupAppointmentsUnprocessableContentError, OficlinicLookupAppointmentsUnprocessableContentFailure, OficlinicPatientNotFoundFailure, OficlinicRescheduleAppointmentBadGatewayError, OficlinicRescheduleAppointmentBadGatewayFailure, OficlinicRescheduleAppointmentBody, OficlinicRescheduleAppointmentConflictError, OficlinicRescheduleAppointmentConflictFailure, OficlinicRescheduleAppointmentNotFoundError, OficlinicRescheduleAppointmentNotFoundFailure, OficlinicRescheduleAppointmentResult, OficlinicRescheduleAppointmentResultResponse, OficlinicRescheduleAppointmentServiceUnavailableError, OficlinicRescheduleAppointmentServiceUnavailableFailure, OficlinicRescheduleAppointmentTooManyRequestsError, OficlinicRescheduleAppointmentTooManyRequestsFailure, OficlinicRescheduleAppointmentUnprocessableContentError, OficlinicRescheduleAppointmentUnprocessableContentFailure, OficlinicServiceNotAvailableFailure, } from "./models.js";
|
|
@@ -164,6 +164,30 @@ export interface OficlinicAppointmentReschedule {
|
|
|
164
164
|
*/
|
|
165
165
|
status: "completed" | "partial";
|
|
166
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* A value the booking needs could not be resolved from the provider's own data,
|
|
169
|
+
* so the caller must supply it: a contract, a relationship, a list status, an
|
|
170
|
+
* authorization number, a salary range the regime lists, or the billing values.
|
|
171
|
+
* Nothing was written.
|
|
172
|
+
*/
|
|
173
|
+
export interface OficlinicBookingValueUnresolvedFailure {
|
|
174
|
+
/**
|
|
175
|
+
* The failure code, stable across releases.
|
|
176
|
+
*/
|
|
177
|
+
code: "BOOKING_VALUE_UNRESOLVED";
|
|
178
|
+
/**
|
|
179
|
+
* No fields.
|
|
180
|
+
*/
|
|
181
|
+
data: Empty;
|
|
182
|
+
/**
|
|
183
|
+
* What went wrong, for people; it never contains input values.
|
|
184
|
+
*/
|
|
185
|
+
message: string;
|
|
186
|
+
/**
|
|
187
|
+
* Whether repeating the same request may succeed.
|
|
188
|
+
*/
|
|
189
|
+
retryable: false;
|
|
190
|
+
}
|
|
167
191
|
/**
|
|
168
192
|
* A failed answer.
|
|
169
193
|
*/
|
|
@@ -207,11 +231,13 @@ export interface OficlinicCancelAppointmentBody {
|
|
|
207
231
|
*/
|
|
208
232
|
documentType: "CC";
|
|
209
233
|
/**
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* again
|
|
234
|
+
* Optional. Without it the service derives the key from the request itself,
|
|
235
|
+
* so repeating the identical request answers the recorded outcome and never
|
|
236
|
+
* writes again. A caller that retries with changed values can choose one key
|
|
237
|
+
* per intended write, such as a UUID; another request with it answers
|
|
238
|
+
* IDEMPOTENCY_KEY_REUSED.
|
|
213
239
|
*/
|
|
214
|
-
idempotencyKey
|
|
240
|
+
idempotencyKey?: string;
|
|
215
241
|
}
|
|
216
242
|
/**
|
|
217
243
|
* A failed answer.
|
|
@@ -312,10 +338,15 @@ export interface OficlinicCreateAppointmentBody {
|
|
|
312
338
|
*/
|
|
313
339
|
agentMode?: boolean;
|
|
314
340
|
/**
|
|
315
|
-
* Billing values of the
|
|
316
|
-
*
|
|
341
|
+
* Billing values of the booking screen. Leave the whole object out and the
|
|
342
|
+
* service resolves them as the screen does: tariff from the payer's tariff
|
|
343
|
+
* matrix for the flow's service under the plan and subplan; billPrivately,
|
|
344
|
+
* billCopayments and enteredCopayment from the payer's row;
|
|
345
|
+
* copaymentPercentage, maxCopayment and indicatedModeratorFee from the row of
|
|
346
|
+
* classification.salaryRange; exempt 0, courtOrder 0 and markExempt false.
|
|
347
|
+
* When given, every value is sent exactly as given and nothing is resolved.
|
|
317
348
|
*/
|
|
318
|
-
billing
|
|
349
|
+
billing?: {
|
|
319
350
|
billCopayments: string | null;
|
|
320
351
|
billPrivately: string | null;
|
|
321
352
|
copaymentPercentage: string | null;
|
|
@@ -329,14 +360,15 @@ export interface OficlinicCreateAppointmentBody {
|
|
|
329
360
|
};
|
|
330
361
|
/**
|
|
331
362
|
* Coverage and clinical classification codes, as the clinic's own provider
|
|
332
|
-
* catalogs define them.
|
|
363
|
+
* catalogs define them. regime and affiliateType are never guessed: the
|
|
364
|
+
* caller supplies them. The rest has the defaults each field states.
|
|
333
365
|
*/
|
|
334
366
|
classification: {
|
|
335
367
|
affiliateType: string;
|
|
336
|
-
attentionTypeId
|
|
368
|
+
attentionTypeId?: string;
|
|
337
369
|
listStatus?: string | null;
|
|
338
|
-
programId
|
|
339
|
-
purposeId
|
|
370
|
+
programId?: string;
|
|
371
|
+
purposeId?: string;
|
|
340
372
|
regime: string;
|
|
341
373
|
relationship?: string | null;
|
|
342
374
|
salaryRange?: string | null;
|
|
@@ -352,7 +384,12 @@ export interface OficlinicCreateAppointmentBody {
|
|
|
352
384
|
connectionId?: string;
|
|
353
385
|
/**
|
|
354
386
|
* A contract of the payer from list_payer_contracts, which must not be
|
|
355
|
-
* inactive
|
|
387
|
+
* inactive. An explicit null sends none. Leaving the key out is not the same
|
|
388
|
+
* as null: the service then sends the payer's only contract when
|
|
389
|
+
* list_payer_contracts has exactly one that is not inactive and marks it
|
|
390
|
+
* active, sends none when the payer has no contract or only inactive ones,
|
|
391
|
+
* and answers BOOKING_VALUE_UNRESOLVED otherwise (several contracts, or an
|
|
392
|
+
* unrecognized active flag).
|
|
356
393
|
*/
|
|
357
394
|
contractId?: string | null;
|
|
358
395
|
/**
|
|
@@ -370,31 +407,38 @@ export interface OficlinicCreateAppointmentBody {
|
|
|
370
407
|
*/
|
|
371
408
|
flowId: string;
|
|
372
409
|
/**
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
* again
|
|
410
|
+
* Optional. Without it the service derives the key from the request itself,
|
|
411
|
+
* so repeating the identical request answers the recorded outcome and never
|
|
412
|
+
* writes again. A caller that retries with changed values can choose one key
|
|
413
|
+
* per intended write, such as a UUID; another request with it answers
|
|
414
|
+
* IDEMPOTENCY_KEY_REUSED.
|
|
376
415
|
*/
|
|
377
|
-
idempotencyKey
|
|
416
|
+
idempotencyKey?: string;
|
|
378
417
|
/**
|
|
379
418
|
* Observations sent as pObservaciones, accents removed and uppercased; null
|
|
380
419
|
* (the default) sends none.
|
|
381
420
|
*/
|
|
382
421
|
observations?: string | null;
|
|
383
422
|
/**
|
|
384
|
-
* The flow
|
|
423
|
+
* The payer the availability flow was opened for. Left out: that payer. When
|
|
424
|
+
* given it must be that payer.
|
|
385
425
|
*/
|
|
386
|
-
payerId
|
|
426
|
+
payerId?: string;
|
|
387
427
|
/**
|
|
388
428
|
* A plan of the payer, from list_payer_plans.
|
|
389
429
|
*/
|
|
390
430
|
planId: string;
|
|
391
|
-
|
|
431
|
+
/**
|
|
432
|
+
* Referral values of the booking screen. Left out: no requesting
|
|
433
|
+
* professional, no authorization number and requestedByUser false.
|
|
434
|
+
*/
|
|
435
|
+
referral?: {
|
|
392
436
|
authorizationNumber?: string | null;
|
|
393
437
|
requestedByUser?: boolean;
|
|
394
438
|
requestingProfessionalId?: string | null;
|
|
395
439
|
};
|
|
396
440
|
/**
|
|
397
|
-
* A slot id from list_booking_slots in the same flow.
|
|
441
|
+
* A slot id from search_booking_slots or list_booking_slots in the same flow.
|
|
398
442
|
*/
|
|
399
443
|
slotId: string;
|
|
400
444
|
/**
|
|
@@ -479,7 +523,7 @@ export interface OficlinicCreateAppointmentUnprocessableContentError {
|
|
|
479
523
|
metadata: ResponseMetadata;
|
|
480
524
|
success: false;
|
|
481
525
|
}
|
|
482
|
-
export type OficlinicCreateAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicProgramUnitsNotSupportedFailure;
|
|
526
|
+
export type OficlinicCreateAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicBookingValueUnresolvedFailure | OficlinicProgramUnitsNotSupportedFailure;
|
|
483
527
|
/**
|
|
484
528
|
* A failed answer.
|
|
485
529
|
*/
|
|
@@ -666,10 +710,15 @@ export interface OficlinicRescheduleAppointmentBody {
|
|
|
666
710
|
*/
|
|
667
711
|
agentMode?: boolean;
|
|
668
712
|
/**
|
|
669
|
-
* Billing values of the
|
|
670
|
-
*
|
|
713
|
+
* Billing values of the booking screen. Leave the whole object out and the
|
|
714
|
+
* service resolves them as the screen does: tariff from the payer's tariff
|
|
715
|
+
* matrix for the flow's service under the plan and subplan; billPrivately,
|
|
716
|
+
* billCopayments and enteredCopayment from the payer's row;
|
|
717
|
+
* copaymentPercentage, maxCopayment and indicatedModeratorFee from the row of
|
|
718
|
+
* classification.salaryRange; exempt 0, courtOrder 0 and markExempt false.
|
|
719
|
+
* When given, every value is sent exactly as given and nothing is resolved.
|
|
671
720
|
*/
|
|
672
|
-
billing
|
|
721
|
+
billing?: {
|
|
673
722
|
billCopayments: string | null;
|
|
674
723
|
billPrivately: string | null;
|
|
675
724
|
copaymentPercentage: string | null;
|
|
@@ -687,14 +736,15 @@ export interface OficlinicRescheduleAppointmentBody {
|
|
|
687
736
|
};
|
|
688
737
|
/**
|
|
689
738
|
* Coverage and clinical classification codes, as the clinic's own provider
|
|
690
|
-
* catalogs define them.
|
|
739
|
+
* catalogs define them. regime and affiliateType are never guessed: the
|
|
740
|
+
* caller supplies them. The rest has the defaults each field states.
|
|
691
741
|
*/
|
|
692
742
|
classification: {
|
|
693
743
|
affiliateType: string;
|
|
694
|
-
attentionTypeId
|
|
744
|
+
attentionTypeId?: string;
|
|
695
745
|
listStatus?: string | null;
|
|
696
|
-
programId
|
|
697
|
-
purposeId
|
|
746
|
+
programId?: string;
|
|
747
|
+
purposeId?: string;
|
|
698
748
|
regime: string;
|
|
699
749
|
relationship?: string | null;
|
|
700
750
|
salaryRange?: string | null;
|
|
@@ -710,7 +760,12 @@ export interface OficlinicRescheduleAppointmentBody {
|
|
|
710
760
|
connectionId?: string;
|
|
711
761
|
/**
|
|
712
762
|
* A contract of the payer from list_payer_contracts, which must not be
|
|
713
|
-
* inactive
|
|
763
|
+
* inactive. An explicit null sends none. Leaving the key out is not the same
|
|
764
|
+
* as null: the service then sends the payer's only contract when
|
|
765
|
+
* list_payer_contracts has exactly one that is not inactive and marks it
|
|
766
|
+
* active, sends none when the payer has no contract or only inactive ones,
|
|
767
|
+
* and answers BOOKING_VALUE_UNRESOLVED otherwise (several contracts, or an
|
|
768
|
+
* unrecognized active flag).
|
|
714
769
|
*/
|
|
715
770
|
contractId?: string | null;
|
|
716
771
|
/**
|
|
@@ -728,31 +783,38 @@ export interface OficlinicRescheduleAppointmentBody {
|
|
|
728
783
|
*/
|
|
729
784
|
flowId: string;
|
|
730
785
|
/**
|
|
731
|
-
*
|
|
732
|
-
*
|
|
733
|
-
* again
|
|
786
|
+
* Optional. Without it the service derives the key from the request itself,
|
|
787
|
+
* so repeating the identical request answers the recorded outcome and never
|
|
788
|
+
* writes again. A caller that retries with changed values can choose one key
|
|
789
|
+
* per intended write, such as a UUID; another request with it answers
|
|
790
|
+
* IDEMPOTENCY_KEY_REUSED.
|
|
734
791
|
*/
|
|
735
|
-
idempotencyKey
|
|
792
|
+
idempotencyKey?: string;
|
|
736
793
|
/**
|
|
737
794
|
* Observations sent as pObservaciones, accents removed and uppercased; null
|
|
738
795
|
* (the default) sends none.
|
|
739
796
|
*/
|
|
740
797
|
observations?: string | null;
|
|
741
798
|
/**
|
|
742
|
-
* The flow
|
|
799
|
+
* The payer the availability flow was opened for. Left out: that payer. When
|
|
800
|
+
* given it must be that payer.
|
|
743
801
|
*/
|
|
744
|
-
payerId
|
|
802
|
+
payerId?: string;
|
|
745
803
|
/**
|
|
746
804
|
* A plan of the payer, from list_payer_plans.
|
|
747
805
|
*/
|
|
748
806
|
planId: string;
|
|
749
|
-
|
|
807
|
+
/**
|
|
808
|
+
* Referral values of the booking screen. Left out: no requesting
|
|
809
|
+
* professional, no authorization number and requestedByUser false.
|
|
810
|
+
*/
|
|
811
|
+
referral?: {
|
|
750
812
|
authorizationNumber?: string | null;
|
|
751
813
|
requestedByUser?: boolean;
|
|
752
814
|
requestingProfessionalId?: string | null;
|
|
753
815
|
};
|
|
754
816
|
/**
|
|
755
|
-
* A slot id from list_booking_slots in the same flow.
|
|
817
|
+
* A slot id from search_booking_slots or list_booking_slots in the same flow.
|
|
756
818
|
*/
|
|
757
819
|
slotId: string;
|
|
758
820
|
/**
|
|
@@ -837,7 +899,7 @@ export interface OficlinicRescheduleAppointmentUnprocessableContentError {
|
|
|
837
899
|
metadata: ResponseMetadata;
|
|
838
900
|
success: false;
|
|
839
901
|
}
|
|
840
|
-
export type OficlinicRescheduleAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicProgramUnitsNotSupportedFailure;
|
|
902
|
+
export type OficlinicRescheduleAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicBookingValueUnresolvedFailure | OficlinicProgramUnitsNotSupportedFailure;
|
|
841
903
|
/**
|
|
842
904
|
* The service is not configured for the selected professional.
|
|
843
905
|
*/
|
|
@@ -13,12 +13,13 @@ export interface Client {
|
|
|
13
13
|
* Create one new patient in e-Oficlinic using the clinic-confirmed legal
|
|
14
14
|
* identity, contact and classification fields. Use only with verified
|
|
15
15
|
* authority to register this person and explicit confirmation of their
|
|
16
|
-
* details. Requires confirm true
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
16
|
+
* details. Requires confirm true; repeating the identical request answers the
|
|
17
|
+
* recorded outcome, with no idempotency key needed. An existing patient is
|
|
18
|
+
* never changed. An uncertain result must be checked with lookup_patient and
|
|
19
|
+
* must not be sent again. The result contains no patient data. Verify the
|
|
20
|
+
* saved patient with lookup_patient before attempting a booking. The
|
|
21
|
+
* submission follows the live-verified Cardiología scheduling form. agentMode
|
|
22
|
+
* true answers concise Spanish text instead.
|
|
22
23
|
*/
|
|
23
24
|
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
24
25
|
/**
|
|
@@ -63,11 +63,13 @@ export interface OficlinicCreatePatientBody {
|
|
|
63
63
|
*/
|
|
64
64
|
genderId: string;
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* again
|
|
66
|
+
* Optional. Without it the service derives the key from the request itself,
|
|
67
|
+
* so repeating the identical request answers the recorded outcome and never
|
|
68
|
+
* writes again. A caller that retries with changed values can choose one key
|
|
69
|
+
* per intended write, such as a UUID; another request with it answers
|
|
70
|
+
* IDEMPOTENCY_KEY_REUSED.
|
|
69
71
|
*/
|
|
70
|
-
idempotencyKey
|
|
72
|
+
idempotencyKey?: string;
|
|
71
73
|
/**
|
|
72
74
|
* The confirmed municipality code from the provider's catalog.
|
|
73
75
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
-
import { type SanitasLookupAffiliationBody, type
|
|
2
|
+
import { type SanitasLookupAffiliationBody, type SanitasLookupAffiliationResultResponse } from "./models.js";
|
|
3
3
|
export interface ClientOptions extends BaseClientOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The URL the paths of the API are relative to.
|
|
@@ -11,13 +11,17 @@ export interface Client {
|
|
|
11
11
|
* Look up affiliation
|
|
12
12
|
*
|
|
13
13
|
* Read one matching member contract from an active Account connection.
|
|
14
|
-
* Confirmed affiliation results are reused for seven days.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* Confirmed affiliation results are reused for seven days. When the provider
|
|
15
|
+
* lists no contract for the document in the company, the answer is outcome
|
|
16
|
+
* noContract with active null: an answer, not a failure and not inactive, so
|
|
17
|
+
* confirm the document number and the company with the person.
|
|
18
|
+
* PATIENT_UNRESOLVED means it listed several contracts and none was chosen.
|
|
19
|
+
* The session is kept alive through the day, and one renewal is admitted only
|
|
20
|
+
* on expiry. This does not authorize care.
|
|
17
21
|
*/
|
|
18
22
|
lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
|
|
19
23
|
}
|
|
20
24
|
export declare function createClient(options: ClientOptions): Client;
|
|
21
25
|
export declare function bind(transport: Transport): Client;
|
|
22
26
|
export type LookupRequest = SanitasLookupAffiliationBody;
|
|
23
|
-
export type LookupResponse =
|
|
27
|
+
export type LookupResponse = SanitasLookupAffiliationResultResponse;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
import { Transport, } from "../../_/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { SanitasLookupAffiliationResultResponseCodec, } from "./models.js";
|
|
5
5
|
export function createClient(options) {
|
|
6
6
|
return bind(new Transport(options));
|
|
7
7
|
}
|
|
@@ -14,6 +14,6 @@ const LookupOperation = {
|
|
|
14
14
|
method: "POST",
|
|
15
15
|
route: "/v1/sanitas/affiliations/lookup",
|
|
16
16
|
body: "flat",
|
|
17
|
-
response:
|
|
17
|
+
response: SanitasLookupAffiliationResultResponseCodec,
|
|
18
18
|
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
19
|
};
|
|
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
|
|
|
2
2
|
export type { RequestOptions } from "../../_/index.js";
|
|
3
3
|
export { createClient } from "./client.js";
|
|
4
4
|
export type { Client, ClientOptions, LookupRequest, LookupResponse, } from "./client.js";
|
|
5
|
-
export type { SanitasLookupAffiliationBadGatewayError, SanitasLookupAffiliationBadGatewayFailure, SanitasLookupAffiliationBody, SanitasLookupAffiliationConflictError, SanitasLookupAffiliationConflictFailure, SanitasLookupAffiliationServiceUnavailableError, SanitasLookupAffiliationServiceUnavailableFailure, SanitasLookupAffiliationTooManyRequestsError, SanitasLookupAffiliationTooManyRequestsFailure, SanitasSanitasAffiliation,
|
|
5
|
+
export type { SanitasLookupAffiliationBadGatewayError, SanitasLookupAffiliationBadGatewayFailure, SanitasLookupAffiliationBody, SanitasLookupAffiliationConflictError, SanitasLookupAffiliationConflictFailure, SanitasLookupAffiliationResult, SanitasLookupAffiliationResultResponse, SanitasLookupAffiliationServiceUnavailableError, SanitasLookupAffiliationServiceUnavailableFailure, SanitasLookupAffiliationTooManyRequestsError, SanitasLookupAffiliationTooManyRequestsFailure, SanitasSanitasAffiliation, SanitasSanitasNoContract, } from "./models.js";
|
|
@@ -37,6 +37,19 @@ export interface SanitasLookupAffiliationConflictError {
|
|
|
37
37
|
success: false;
|
|
38
38
|
}
|
|
39
39
|
export type SanitasLookupAffiliationConflictFailure = SanitasConnectionRequiredFailure | SanitasProviderContextRequiredFailure | SanitasProviderSessionExpiredFailure | SanitasPatientUnresolvedFailure;
|
|
40
|
+
export type SanitasLookupAffiliationResult = SanitasSanitasAffiliation | SanitasSanitasNoContract;
|
|
41
|
+
/**
|
|
42
|
+
* A successful answer.
|
|
43
|
+
*/
|
|
44
|
+
export interface SanitasLookupAffiliationResultResponse {
|
|
45
|
+
data: SanitasLookupAffiliationResult;
|
|
46
|
+
error: null;
|
|
47
|
+
/**
|
|
48
|
+
* What every answer carries besides its data or error.
|
|
49
|
+
*/
|
|
50
|
+
metadata: ResponseMetadata;
|
|
51
|
+
success: true;
|
|
52
|
+
}
|
|
40
53
|
/**
|
|
41
54
|
* A failed answer.
|
|
42
55
|
*/
|
|
@@ -75,17 +88,15 @@ export interface SanitasSanitasAffiliation {
|
|
|
75
88
|
plan: string | null;
|
|
76
89
|
status: string;
|
|
77
90
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
* What every answer carries besides its data or error.
|
|
86
|
-
*/
|
|
87
|
-
metadata: ResponseMetadata;
|
|
88
|
-
success: true;
|
|
91
|
+
export interface SanitasSanitasNoContract {
|
|
92
|
+
active: null;
|
|
93
|
+
checkedAt: Temporal.Instant;
|
|
94
|
+
company: "sanitas" | "colsanitas" | "medisanitas";
|
|
95
|
+
documentNumber: string;
|
|
96
|
+
documentType: "AS" | "CC" | "CD" | "CE" | "CN" | "MS" | "NI" | "NU" | "PA" | "PD" | "PE" | "PT" | "RC" | "SC" | "TI";
|
|
97
|
+
outcome: "noContract";
|
|
89
98
|
}
|
|
99
|
+
export declare const SanitasLookupAffiliationResultCodec: import("../../_/codec.js").Codec;
|
|
100
|
+
export declare const SanitasLookupAffiliationResultResponseCodec: import("../../_/codec.js").Codec;
|
|
90
101
|
export declare const SanitasSanitasAffiliationCodec: import("../../_/codec.js").Codec;
|
|
91
|
-
export declare const
|
|
102
|
+
export declare const SanitasSanitasNoContractCodec: import("../../_/codec.js").Codec;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
import { instant, object } from "../../_/index.js";
|
|
3
|
+
import { instant, object, union } from "../../_/index.js";
|
|
4
|
+
export const SanitasLookupAffiliationResultCodec = union([() => SanitasSanitasAffiliationCodec, () => SanitasSanitasNoContractCodec]);
|
|
5
|
+
export const SanitasLookupAffiliationResultResponseCodec = object([
|
|
6
|
+
["data", null, () => SanitasLookupAffiliationResultCodec],
|
|
7
|
+
]);
|
|
4
8
|
export const SanitasSanitasAffiliationCodec = object([
|
|
5
9
|
["checkedAt", null, instant],
|
|
6
10
|
]);
|
|
7
|
-
export const
|
|
8
|
-
["
|
|
11
|
+
export const SanitasSanitasNoContractCodec = object([
|
|
12
|
+
["checkedAt", null, instant],
|
|
9
13
|
]);
|
package/dist/sanitas/models.d.ts
CHANGED
|
@@ -114,7 +114,8 @@ export interface SanitasLoginCoolingDownFailure {
|
|
|
114
114
|
retryable: false;
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
|
-
* The provider
|
|
117
|
+
* The provider listed several contracts for this document in this company and
|
|
118
|
+
* none was chosen. Coverage is unknown.
|
|
118
119
|
*/
|
|
119
120
|
export interface SanitasPatientUnresolvedFailure {
|
|
120
121
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbol-ai/sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.58.0",
|
|
4
4
|
"description": "The Arbol API for TypeScript and JavaScript, generated by Cloudflare Forge from the platform's public OpenAPI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arbol",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"packageManager": "bun@1.4.3",
|
|
59
59
|
"arbol": {
|
|
60
60
|
"openapi": {
|
|
61
|
-
"release": "1.20261113.
|
|
62
|
-
"sha256": "
|
|
61
|
+
"release": "1.20261113.150152",
|
|
62
|
+
"sha256": "5846d7f85161ffc99a3121a402c3da9d4715375f9ea331a74c815e682af08e8d"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|