candidhealth 1.17.2 → 1.17.4
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/Client.js +2 -2
- package/api/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentification.d.ts +7 -1
- package/api/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentificationQualifier.d.ts +9 -0
- package/api/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentificationQualifier.js +12 -0
- package/api/resources/encounterProviders/resources/v2/types/index.d.ts +1 -0
- package/api/resources/encounterProviders/resources/v2/types/index.js +1 -0
- package/api/resources/financials/types/Allocation.d.ts +2 -0
- package/api/resources/financials/types/AllocationCreate.d.ts +1 -1
- package/api/resources/financials/types/AllocationEarmarkType.d.ts +2 -2
- package/api/resources/financials/types/BalanceEarmark.d.ts +11 -0
- package/api/resources/financials/types/BalanceEarmark.js +3 -0
- package/api/resources/financials/types/index.d.ts +1 -0
- package/api/resources/financials/types/index.js +1 -0
- package/api/resources/insuranceAdjudications/resources/v1/client/Client.js +19 -1
- package/api/resources/insuranceAdjudications/resources/v1/client/get.d.ts +7 -1
- package/api/resources/insuranceAdjudications/resources/v1/client/get.js +11 -0
- package/api/resources/insuranceCards/resources/v2/types/InsuranceCardBase.d.ts +1 -0
- package/api/resources/tasks/resources/commons/types/TaskType.d.ts +1 -0
- package/api/resources/tasks/resources/commons/types/TaskType.js +1 -0
- package/dist/Client.js +2 -2
- package/dist/api/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentification.d.ts +7 -1
- package/dist/api/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentificationQualifier.d.ts +9 -0
- package/dist/api/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentificationQualifier.js +12 -0
- package/dist/api/resources/encounterProviders/resources/v2/types/index.d.ts +1 -0
- package/dist/api/resources/encounterProviders/resources/v2/types/index.js +1 -0
- package/dist/api/resources/financials/types/Allocation.d.ts +2 -0
- package/dist/api/resources/financials/types/AllocationCreate.d.ts +1 -1
- package/dist/api/resources/financials/types/AllocationEarmarkType.d.ts +2 -2
- package/dist/api/resources/financials/types/BalanceEarmark.d.ts +11 -0
- package/dist/api/resources/financials/types/BalanceEarmark.js +3 -0
- package/dist/api/resources/financials/types/index.d.ts +1 -0
- package/dist/api/resources/financials/types/index.js +1 -0
- package/dist/api/resources/insuranceAdjudications/resources/v1/client/Client.js +19 -1
- package/dist/api/resources/insuranceAdjudications/resources/v1/client/get.d.ts +7 -1
- package/dist/api/resources/insuranceAdjudications/resources/v1/client/get.js +11 -0
- package/dist/api/resources/insuranceCards/resources/v2/types/InsuranceCardBase.d.ts +1 -0
- package/dist/api/resources/tasks/resources/commons/types/TaskType.d.ts +1 -0
- package/dist/api/resources/tasks/resources/commons/types/TaskType.js +1 -0
- package/dist/serialization/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentification.d.ts +2 -0
- package/dist/serialization/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentification.js +2 -0
- package/dist/serialization/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentificationQualifier.d.ts +7 -0
- package/dist/serialization/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentificationQualifier.js +39 -0
- package/dist/serialization/resources/encounterProviders/resources/v2/types/index.d.ts +1 -0
- package/dist/serialization/resources/encounterProviders/resources/v2/types/index.js +1 -0
- package/dist/serialization/resources/financials/types/Allocation.d.ts +2 -0
- package/dist/serialization/resources/financials/types/Allocation.js +2 -0
- package/dist/serialization/resources/financials/types/BalanceEarmark.d.ts +11 -0
- package/dist/serialization/resources/financials/types/BalanceEarmark.js +43 -0
- package/dist/serialization/resources/financials/types/index.d.ts +1 -0
- package/dist/serialization/resources/financials/types/index.js +1 -0
- package/dist/serialization/resources/insuranceAdjudications/resources/v1/client/get.d.ts +12 -0
- package/dist/serialization/resources/insuranceAdjudications/resources/v1/client/get.js +69 -0
- package/dist/serialization/resources/insuranceAdjudications/resources/v1/client/index.d.ts +1 -0
- package/dist/serialization/resources/insuranceAdjudications/resources/v1/client/index.js +37 -0
- package/dist/serialization/resources/insuranceAdjudications/resources/v1/index.d.ts +1 -0
- package/dist/serialization/resources/insuranceAdjudications/resources/v1/index.js +1 -0
- package/dist/serialization/resources/insuranceCards/resources/v2/types/InsuranceCardBase.d.ts +2 -0
- package/dist/serialization/resources/insuranceCards/resources/v2/types/InsuranceCardBase.js +2 -0
- package/dist/serialization/resources/tasks/resources/commons/types/TaskType.d.ts +1 -1
- package/dist/serialization/resources/tasks/resources/commons/types/TaskType.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +219 -219
- package/serialization/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentification.d.ts +2 -0
- package/serialization/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentification.js +2 -0
- package/serialization/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentificationQualifier.d.ts +7 -0
- package/serialization/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentificationQualifier.js +39 -0
- package/serialization/resources/encounterProviders/resources/v2/types/index.d.ts +1 -0
- package/serialization/resources/encounterProviders/resources/v2/types/index.js +1 -0
- package/serialization/resources/financials/types/Allocation.d.ts +2 -0
- package/serialization/resources/financials/types/Allocation.js +2 -0
- package/serialization/resources/financials/types/BalanceEarmark.d.ts +11 -0
- package/serialization/resources/financials/types/BalanceEarmark.js +43 -0
- package/serialization/resources/financials/types/index.d.ts +1 -0
- package/serialization/resources/financials/types/index.js +1 -0
- package/serialization/resources/insuranceAdjudications/resources/v1/client/get.d.ts +12 -0
- package/serialization/resources/insuranceAdjudications/resources/v1/client/get.js +69 -0
- package/serialization/resources/insuranceAdjudications/resources/v1/client/index.d.ts +1 -0
- package/serialization/resources/insuranceAdjudications/resources/v1/client/index.js +37 -0
- package/serialization/resources/insuranceAdjudications/resources/v1/index.d.ts +1 -0
- package/serialization/resources/insuranceAdjudications/resources/v1/index.js +1 -0
- package/serialization/resources/insuranceCards/resources/v2/types/InsuranceCardBase.d.ts +2 -0
- package/serialization/resources/insuranceCards/resources/v2/types/InsuranceCardBase.js +2 -0
- package/serialization/resources/tasks/resources/commons/types/TaskType.d.ts +1 -1
- package/serialization/resources/tasks/resources/commons/types/TaskType.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/Client.js
CHANGED
|
@@ -90,8 +90,8 @@ class CandidApiClient {
|
|
|
90
90
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_1.mergeHeaders)({
|
|
91
91
|
"X-Fern-Language": "JavaScript",
|
|
92
92
|
"X-Fern-SDK-Name": "candidhealth",
|
|
93
|
-
"X-Fern-SDK-Version": "1.17.
|
|
94
|
-
"User-Agent": "candidhealth/1.17.
|
|
93
|
+
"X-Fern-SDK-Version": "1.17.4",
|
|
94
|
+
"User-Agent": "candidhealth/1.17.4",
|
|
95
95
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
96
96
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
97
97
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
package/api/resources/encounterProviders/resources/v2/types/ProviderSecondaryIdentification.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import type * as CandidApi from "../../../../../index";
|
|
1
2
|
export interface ProviderSecondaryIdentification {
|
|
2
|
-
/** Value cannot exceed 50 characters */
|
|
3
|
+
/** Represents REF02 on the EDI 837 Loop 2010BB Billing Provider Secondary Identification segment. Value cannot exceed 50 characters */
|
|
3
4
|
referenceIdentification: string;
|
|
5
|
+
/**
|
|
6
|
+
* Represents REF01 on the EDI 837 Loop 2010BB Billing Provider Secondary Identification segment.
|
|
7
|
+
* Valid values include G2 (Provider Commercial Number) and LU (Location Number). Defaults to G2 if not set.
|
|
8
|
+
*/
|
|
9
|
+
referenceIdentificationQualifier?: CandidApi.encounterProviders.v2.ProviderSecondaryIdentificationQualifier;
|
|
4
10
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const ProviderSecondaryIdentificationQualifier: {
|
|
2
|
+
/**
|
|
3
|
+
* Provider Commercial Number */
|
|
4
|
+
readonly G2: "G2";
|
|
5
|
+
/**
|
|
6
|
+
* Location Number */
|
|
7
|
+
readonly Lu: "LU";
|
|
8
|
+
};
|
|
9
|
+
export type ProviderSecondaryIdentificationQualifier = (typeof ProviderSecondaryIdentificationQualifier)[keyof typeof ProviderSecondaryIdentificationQualifier];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ProviderSecondaryIdentificationQualifier = void 0;
|
|
5
|
+
exports.ProviderSecondaryIdentificationQualifier = {
|
|
6
|
+
/**
|
|
7
|
+
* Provider Commercial Number */
|
|
8
|
+
G2: "G2",
|
|
9
|
+
/**
|
|
10
|
+
* Location Number */
|
|
11
|
+
Lu: "LU",
|
|
12
|
+
};
|
|
@@ -11,6 +11,7 @@ export * from "./OrderingProviderOptional";
|
|
|
11
11
|
export * from "./OrderingProviderUpdate";
|
|
12
12
|
export * from "./ProviderId";
|
|
13
13
|
export * from "./ProviderSecondaryIdentification";
|
|
14
|
+
export * from "./ProviderSecondaryIdentificationQualifier";
|
|
14
15
|
export * from "./ReferringProvider";
|
|
15
16
|
export * from "./ReferringProviderUpdate";
|
|
16
17
|
export * from "./ReferringProviderUpdateWithOptionalAddress";
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./OrderingProviderOptional"), exports);
|
|
|
27
27
|
__exportStar(require("./OrderingProviderUpdate"), exports);
|
|
28
28
|
__exportStar(require("./ProviderId"), exports);
|
|
29
29
|
__exportStar(require("./ProviderSecondaryIdentification"), exports);
|
|
30
|
+
__exportStar(require("./ProviderSecondaryIdentificationQualifier"), exports);
|
|
30
31
|
__exportStar(require("./ReferringProvider"), exports);
|
|
31
32
|
__exportStar(require("./ReferringProviderUpdate"), exports);
|
|
32
33
|
__exportStar(require("./ReferringProviderUpdateWithOptionalAddress"), exports);
|
|
@@ -2,4 +2,6 @@ import type * as CandidApi from "../../../index";
|
|
|
2
2
|
export interface Allocation {
|
|
3
3
|
amountCents: number;
|
|
4
4
|
target: CandidApi.AllocationTarget;
|
|
5
|
+
/** The active earmark created by this allocation, if any. Only present when this allocation created an earmark for future auto-allocation and the earmark has not been deleted. */
|
|
6
|
+
earmark?: CandidApi.BalanceEarmark;
|
|
5
7
|
}
|
|
@@ -7,7 +7,7 @@ export interface AllocationCreate {
|
|
|
7
7
|
amountCents: number;
|
|
8
8
|
target: CandidApi.AllocationTargetCreate;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* If enabled for your organization, optional earmarking configuration for patient prepayments.
|
|
11
11
|
* When provided on unattributed allocations, holds the payment for future auto-allocation to matching encounters.
|
|
12
12
|
*/
|
|
13
13
|
earmark?: CandidApi.AllocationEarmarkType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as CandidApi from "../../../index";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* If enabled for your organization, defines how a patient prepayment allocation should be earmarked for future auto-allocation.
|
|
4
|
+
* Earmarks hold the allocation until a matching encounter is created, then attempt to allocate to that encounter.
|
|
5
5
|
* Only applicable for unattributed allocations.
|
|
6
6
|
*/
|
|
7
7
|
export type AllocationEarmarkType =
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as CandidApi from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* Represents an active balance earmarking record that holds allocated funds for future auto-allocation.
|
|
4
|
+
* Earmarks are created when funds are allocated but should be held for a specific encounter or date of service.
|
|
5
|
+
* Only active (non-deleted) earmarks are returned.
|
|
6
|
+
*/
|
|
7
|
+
export interface BalanceEarmark {
|
|
8
|
+
id: string;
|
|
9
|
+
/** The target for this earmark (date of service or external encounter ID) */
|
|
10
|
+
target: CandidApi.AllocationEarmarkType;
|
|
11
|
+
}
|
|
@@ -6,6 +6,7 @@ export * from "./AllocationTarget";
|
|
|
6
6
|
export * from "./AllocationTargetCreate";
|
|
7
7
|
export * from "./AppointmentAllocationTarget";
|
|
8
8
|
export * from "./AppointmentByIdAndPatientExternalId";
|
|
9
|
+
export * from "./BalanceEarmark";
|
|
9
10
|
export * from "./BillingProviderAllocationTarget";
|
|
10
11
|
export * from "./ClaimAllocationTarget";
|
|
11
12
|
export * from "./InvoiceUpdate";
|
|
@@ -22,6 +22,7 @@ __exportStar(require("./AllocationTarget"), exports);
|
|
|
22
22
|
__exportStar(require("./AllocationTargetCreate"), exports);
|
|
23
23
|
__exportStar(require("./AppointmentAllocationTarget"), exports);
|
|
24
24
|
__exportStar(require("./AppointmentByIdAndPatientExternalId"), exports);
|
|
25
|
+
__exportStar(require("./BalanceEarmark"), exports);
|
|
25
26
|
__exportStar(require("./BillingProviderAllocationTarget"), exports);
|
|
26
27
|
__exportStar(require("./ClaimAllocationTarget"), exports);
|
|
27
28
|
__exportStar(require("./InvoiceUpdate"), exports);
|
|
@@ -67,7 +67,7 @@ class V1 {
|
|
|
67
67
|
}
|
|
68
68
|
__get(insuranceAdjudicationId, requestOptions) {
|
|
69
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
70
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
71
71
|
const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
72
72
|
const _response = yield core.fetcher({
|
|
73
73
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, `/api/insurance-adjudications/v1/${core.url.encodePathParam(serializers.insuranceAdjudications.v1.InsuranceAdjudicationId.jsonOrThrow(insuranceAdjudicationId))}`),
|
|
@@ -94,6 +94,24 @@ class V1 {
|
|
|
94
94
|
rawResponse: _response.rawResponse,
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
+
if (_response.error.reason === "status-code") {
|
|
98
|
+
switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.errorName) {
|
|
99
|
+
case "UnauthorizedError":
|
|
100
|
+
return {
|
|
101
|
+
data: {
|
|
102
|
+
ok: false,
|
|
103
|
+
error: serializers.insuranceAdjudications.v1.get.Error.parseOrThrow(_response.error.body, {
|
|
104
|
+
unrecognizedObjectKeys: "passthrough",
|
|
105
|
+
allowUnrecognizedUnionMembers: true,
|
|
106
|
+
allowUnrecognizedEnumValues: true,
|
|
107
|
+
breadcrumbsPrefix: ["response"],
|
|
108
|
+
}),
|
|
109
|
+
rawResponse: _response.rawResponse,
|
|
110
|
+
},
|
|
111
|
+
rawResponse: _response.rawResponse,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
97
115
|
return {
|
|
98
116
|
data: {
|
|
99
117
|
ok: false,
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type * as core from "../../../../../../core";
|
|
2
2
|
import * as CandidApi from "../../../../../index";
|
|
3
|
-
export type Error = CandidApi.insuranceAdjudications.v1.get.Error._Unknown;
|
|
3
|
+
export type Error = CandidApi.insuranceAdjudications.v1.get.Error.UnauthorizedError | CandidApi.insuranceAdjudications.v1.get.Error._Unknown;
|
|
4
4
|
export declare namespace Error {
|
|
5
|
+
interface UnauthorizedError extends _Utils {
|
|
6
|
+
errorName: "UnauthorizedError";
|
|
7
|
+
content: CandidApi.UnauthorizedErrorMessage;
|
|
8
|
+
}
|
|
5
9
|
interface _Unknown extends _Utils {
|
|
6
10
|
errorName: void;
|
|
7
11
|
content: core.Fetcher.Error;
|
|
@@ -10,10 +14,12 @@ export declare namespace Error {
|
|
|
10
14
|
_visit: <_Result>(visitor: CandidApi.insuranceAdjudications.v1.get.Error._Visitor<_Result>) => _Result;
|
|
11
15
|
}
|
|
12
16
|
interface _Visitor<_Result> {
|
|
17
|
+
unauthorizedError: (value: CandidApi.UnauthorizedErrorMessage) => _Result;
|
|
13
18
|
_other: (value: core.Fetcher.Error) => _Result;
|
|
14
19
|
}
|
|
15
20
|
}
|
|
16
21
|
export declare const Error: {
|
|
22
|
+
readonly unauthorizedError: (value: CandidApi.UnauthorizedErrorMessage) => CandidApi.insuranceAdjudications.v1.get.Error.UnauthorizedError;
|
|
17
23
|
readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.insuranceAdjudications.v1.get.Error._Unknown;
|
|
18
24
|
readonly _visit: <_Result>(value: CandidApi.insuranceAdjudications.v1.get.Error, visitor: CandidApi.insuranceAdjudications.v1.get.Error._Visitor<_Result>) => _Result;
|
|
19
25
|
};
|
|
@@ -37,6 +37,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.Error = void 0;
|
|
38
38
|
const CandidApi = __importStar(require("../../../../../index"));
|
|
39
39
|
exports.Error = {
|
|
40
|
+
unauthorizedError: (value) => {
|
|
41
|
+
return {
|
|
42
|
+
content: value,
|
|
43
|
+
errorName: "UnauthorizedError",
|
|
44
|
+
_visit: function (visitor) {
|
|
45
|
+
return CandidApi.insuranceAdjudications.v1.get.Error._visit(this, visitor);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
},
|
|
40
49
|
_unknown: (fetcherError) => {
|
|
41
50
|
return {
|
|
42
51
|
errorName: undefined,
|
|
@@ -48,6 +57,8 @@ exports.Error = {
|
|
|
48
57
|
},
|
|
49
58
|
_visit: (value, visitor) => {
|
|
50
59
|
switch (value.errorName) {
|
|
60
|
+
case "UnauthorizedError":
|
|
61
|
+
return visitor.unauthorizedError(value.content);
|
|
51
62
|
default:
|
|
52
63
|
return visitor._other(value);
|
|
53
64
|
}
|
|
@@ -11,5 +11,6 @@ export declare const TaskType: {
|
|
|
11
11
|
readonly PayerConfigurationError: "PAYER_CONFIGURATION_ERROR";
|
|
12
12
|
readonly DenialResolution: "DENIAL_RESOLUTION";
|
|
13
13
|
readonly MissingEnrollment: "MISSING_ENROLLMENT";
|
|
14
|
+
readonly ChargeCaptureUpdate: "CHARGE_CAPTURE_UPDATE";
|
|
14
15
|
};
|
|
15
16
|
export type TaskType = (typeof TaskType)[keyof typeof TaskType];
|
package/dist/Client.js
CHANGED
|
@@ -90,8 +90,8 @@ class CandidApiClient {
|
|
|
90
90
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_1.mergeHeaders)({
|
|
91
91
|
"X-Fern-Language": "JavaScript",
|
|
92
92
|
"X-Fern-SDK-Name": "candidhealth",
|
|
93
|
-
"X-Fern-SDK-Version": "1.17.
|
|
94
|
-
"User-Agent": "candidhealth/1.17.
|
|
93
|
+
"X-Fern-SDK-Version": "1.17.4",
|
|
94
|
+
"User-Agent": "candidhealth/1.17.4",
|
|
95
95
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
96
96
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
97
97
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import type * as CandidApi from "../../../../../index";
|
|
1
2
|
export interface ProviderSecondaryIdentification {
|
|
2
|
-
/** Value cannot exceed 50 characters */
|
|
3
|
+
/** Represents REF02 on the EDI 837 Loop 2010BB Billing Provider Secondary Identification segment. Value cannot exceed 50 characters */
|
|
3
4
|
referenceIdentification: string;
|
|
5
|
+
/**
|
|
6
|
+
* Represents REF01 on the EDI 837 Loop 2010BB Billing Provider Secondary Identification segment.
|
|
7
|
+
* Valid values include G2 (Provider Commercial Number) and LU (Location Number). Defaults to G2 if not set.
|
|
8
|
+
*/
|
|
9
|
+
referenceIdentificationQualifier?: CandidApi.encounterProviders.v2.ProviderSecondaryIdentificationQualifier;
|
|
4
10
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const ProviderSecondaryIdentificationQualifier: {
|
|
2
|
+
/**
|
|
3
|
+
* Provider Commercial Number */
|
|
4
|
+
readonly G2: "G2";
|
|
5
|
+
/**
|
|
6
|
+
* Location Number */
|
|
7
|
+
readonly Lu: "LU";
|
|
8
|
+
};
|
|
9
|
+
export type ProviderSecondaryIdentificationQualifier = (typeof ProviderSecondaryIdentificationQualifier)[keyof typeof ProviderSecondaryIdentificationQualifier];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ProviderSecondaryIdentificationQualifier = void 0;
|
|
5
|
+
exports.ProviderSecondaryIdentificationQualifier = {
|
|
6
|
+
/**
|
|
7
|
+
* Provider Commercial Number */
|
|
8
|
+
G2: "G2",
|
|
9
|
+
/**
|
|
10
|
+
* Location Number */
|
|
11
|
+
Lu: "LU",
|
|
12
|
+
};
|
|
@@ -11,6 +11,7 @@ export * from "./OrderingProviderOptional";
|
|
|
11
11
|
export * from "./OrderingProviderUpdate";
|
|
12
12
|
export * from "./ProviderId";
|
|
13
13
|
export * from "./ProviderSecondaryIdentification";
|
|
14
|
+
export * from "./ProviderSecondaryIdentificationQualifier";
|
|
14
15
|
export * from "./ReferringProvider";
|
|
15
16
|
export * from "./ReferringProviderUpdate";
|
|
16
17
|
export * from "./ReferringProviderUpdateWithOptionalAddress";
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./OrderingProviderOptional"), exports);
|
|
|
27
27
|
__exportStar(require("./OrderingProviderUpdate"), exports);
|
|
28
28
|
__exportStar(require("./ProviderId"), exports);
|
|
29
29
|
__exportStar(require("./ProviderSecondaryIdentification"), exports);
|
|
30
|
+
__exportStar(require("./ProviderSecondaryIdentificationQualifier"), exports);
|
|
30
31
|
__exportStar(require("./ReferringProvider"), exports);
|
|
31
32
|
__exportStar(require("./ReferringProviderUpdate"), exports);
|
|
32
33
|
__exportStar(require("./ReferringProviderUpdateWithOptionalAddress"), exports);
|
|
@@ -2,4 +2,6 @@ import type * as CandidApi from "../../../index";
|
|
|
2
2
|
export interface Allocation {
|
|
3
3
|
amountCents: number;
|
|
4
4
|
target: CandidApi.AllocationTarget;
|
|
5
|
+
/** The active earmark created by this allocation, if any. Only present when this allocation created an earmark for future auto-allocation and the earmark has not been deleted. */
|
|
6
|
+
earmark?: CandidApi.BalanceEarmark;
|
|
5
7
|
}
|
|
@@ -7,7 +7,7 @@ export interface AllocationCreate {
|
|
|
7
7
|
amountCents: number;
|
|
8
8
|
target: CandidApi.AllocationTargetCreate;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* If enabled for your organization, optional earmarking configuration for patient prepayments.
|
|
11
11
|
* When provided on unattributed allocations, holds the payment for future auto-allocation to matching encounters.
|
|
12
12
|
*/
|
|
13
13
|
earmark?: CandidApi.AllocationEarmarkType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as CandidApi from "../../../index";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* If enabled for your organization, defines how a patient prepayment allocation should be earmarked for future auto-allocation.
|
|
4
|
+
* Earmarks hold the allocation until a matching encounter is created, then attempt to allocate to that encounter.
|
|
5
5
|
* Only applicable for unattributed allocations.
|
|
6
6
|
*/
|
|
7
7
|
export type AllocationEarmarkType =
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as CandidApi from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* Represents an active balance earmarking record that holds allocated funds for future auto-allocation.
|
|
4
|
+
* Earmarks are created when funds are allocated but should be held for a specific encounter or date of service.
|
|
5
|
+
* Only active (non-deleted) earmarks are returned.
|
|
6
|
+
*/
|
|
7
|
+
export interface BalanceEarmark {
|
|
8
|
+
id: string;
|
|
9
|
+
/** The target for this earmark (date of service or external encounter ID) */
|
|
10
|
+
target: CandidApi.AllocationEarmarkType;
|
|
11
|
+
}
|
|
@@ -6,6 +6,7 @@ export * from "./AllocationTarget";
|
|
|
6
6
|
export * from "./AllocationTargetCreate";
|
|
7
7
|
export * from "./AppointmentAllocationTarget";
|
|
8
8
|
export * from "./AppointmentByIdAndPatientExternalId";
|
|
9
|
+
export * from "./BalanceEarmark";
|
|
9
10
|
export * from "./BillingProviderAllocationTarget";
|
|
10
11
|
export * from "./ClaimAllocationTarget";
|
|
11
12
|
export * from "./InvoiceUpdate";
|
|
@@ -22,6 +22,7 @@ __exportStar(require("./AllocationTarget"), exports);
|
|
|
22
22
|
__exportStar(require("./AllocationTargetCreate"), exports);
|
|
23
23
|
__exportStar(require("./AppointmentAllocationTarget"), exports);
|
|
24
24
|
__exportStar(require("./AppointmentByIdAndPatientExternalId"), exports);
|
|
25
|
+
__exportStar(require("./BalanceEarmark"), exports);
|
|
25
26
|
__exportStar(require("./BillingProviderAllocationTarget"), exports);
|
|
26
27
|
__exportStar(require("./ClaimAllocationTarget"), exports);
|
|
27
28
|
__exportStar(require("./InvoiceUpdate"), exports);
|
|
@@ -67,7 +67,7 @@ class V1 {
|
|
|
67
67
|
}
|
|
68
68
|
__get(insuranceAdjudicationId, requestOptions) {
|
|
69
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
70
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
71
71
|
const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
72
72
|
const _response = yield core.fetcher({
|
|
73
73
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, `/api/insurance-adjudications/v1/${core.url.encodePathParam(serializers.insuranceAdjudications.v1.InsuranceAdjudicationId.jsonOrThrow(insuranceAdjudicationId))}`),
|
|
@@ -94,6 +94,24 @@ class V1 {
|
|
|
94
94
|
rawResponse: _response.rawResponse,
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
+
if (_response.error.reason === "status-code") {
|
|
98
|
+
switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.errorName) {
|
|
99
|
+
case "UnauthorizedError":
|
|
100
|
+
return {
|
|
101
|
+
data: {
|
|
102
|
+
ok: false,
|
|
103
|
+
error: serializers.insuranceAdjudications.v1.get.Error.parseOrThrow(_response.error.body, {
|
|
104
|
+
unrecognizedObjectKeys: "passthrough",
|
|
105
|
+
allowUnrecognizedUnionMembers: true,
|
|
106
|
+
allowUnrecognizedEnumValues: true,
|
|
107
|
+
breadcrumbsPrefix: ["response"],
|
|
108
|
+
}),
|
|
109
|
+
rawResponse: _response.rawResponse,
|
|
110
|
+
},
|
|
111
|
+
rawResponse: _response.rawResponse,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
97
115
|
return {
|
|
98
116
|
data: {
|
|
99
117
|
ok: false,
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type * as core from "../../../../../../core";
|
|
2
2
|
import * as CandidApi from "../../../../../index";
|
|
3
|
-
export type Error = CandidApi.insuranceAdjudications.v1.get.Error._Unknown;
|
|
3
|
+
export type Error = CandidApi.insuranceAdjudications.v1.get.Error.UnauthorizedError | CandidApi.insuranceAdjudications.v1.get.Error._Unknown;
|
|
4
4
|
export declare namespace Error {
|
|
5
|
+
interface UnauthorizedError extends _Utils {
|
|
6
|
+
errorName: "UnauthorizedError";
|
|
7
|
+
content: CandidApi.UnauthorizedErrorMessage;
|
|
8
|
+
}
|
|
5
9
|
interface _Unknown extends _Utils {
|
|
6
10
|
errorName: void;
|
|
7
11
|
content: core.Fetcher.Error;
|
|
@@ -10,10 +14,12 @@ export declare namespace Error {
|
|
|
10
14
|
_visit: <_Result>(visitor: CandidApi.insuranceAdjudications.v1.get.Error._Visitor<_Result>) => _Result;
|
|
11
15
|
}
|
|
12
16
|
interface _Visitor<_Result> {
|
|
17
|
+
unauthorizedError: (value: CandidApi.UnauthorizedErrorMessage) => _Result;
|
|
13
18
|
_other: (value: core.Fetcher.Error) => _Result;
|
|
14
19
|
}
|
|
15
20
|
}
|
|
16
21
|
export declare const Error: {
|
|
22
|
+
readonly unauthorizedError: (value: CandidApi.UnauthorizedErrorMessage) => CandidApi.insuranceAdjudications.v1.get.Error.UnauthorizedError;
|
|
17
23
|
readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.insuranceAdjudications.v1.get.Error._Unknown;
|
|
18
24
|
readonly _visit: <_Result>(value: CandidApi.insuranceAdjudications.v1.get.Error, visitor: CandidApi.insuranceAdjudications.v1.get.Error._Visitor<_Result>) => _Result;
|
|
19
25
|
};
|
|
@@ -37,6 +37,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.Error = void 0;
|
|
38
38
|
const CandidApi = __importStar(require("../../../../../index"));
|
|
39
39
|
exports.Error = {
|
|
40
|
+
unauthorizedError: (value) => {
|
|
41
|
+
return {
|
|
42
|
+
content: value,
|
|
43
|
+
errorName: "UnauthorizedError",
|
|
44
|
+
_visit: function (visitor) {
|
|
45
|
+
return CandidApi.insuranceAdjudications.v1.get.Error._visit(this, visitor);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
},
|
|
40
49
|
_unknown: (fetcherError) => {
|
|
41
50
|
return {
|
|
42
51
|
errorName: undefined,
|
|
@@ -48,6 +57,8 @@ exports.Error = {
|
|
|
48
57
|
},
|
|
49
58
|
_visit: (value, visitor) => {
|
|
50
59
|
switch (value.errorName) {
|
|
60
|
+
case "UnauthorizedError":
|
|
61
|
+
return visitor.unauthorizedError(value.content);
|
|
51
62
|
default:
|
|
52
63
|
return visitor._other(value);
|
|
53
64
|
}
|
|
@@ -11,5 +11,6 @@ export declare const TaskType: {
|
|
|
11
11
|
readonly PayerConfigurationError: "PAYER_CONFIGURATION_ERROR";
|
|
12
12
|
readonly DenialResolution: "DENIAL_RESOLUTION";
|
|
13
13
|
readonly MissingEnrollment: "MISSING_ENROLLMENT";
|
|
14
|
+
readonly ChargeCaptureUpdate: "CHARGE_CAPTURE_UPDATE";
|
|
14
15
|
};
|
|
15
16
|
export type TaskType = (typeof TaskType)[keyof typeof TaskType];
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type * as CandidApi from "../../../../../../api/index";
|
|
2
2
|
import * as core from "../../../../../../core";
|
|
3
3
|
import type * as serializers from "../../../../../index";
|
|
4
|
+
import { ProviderSecondaryIdentificationQualifier } from "./ProviderSecondaryIdentificationQualifier";
|
|
4
5
|
export declare const ProviderSecondaryIdentification: core.serialization.ObjectSchema<serializers.encounterProviders.v2.ProviderSecondaryIdentification.Raw, CandidApi.encounterProviders.v2.ProviderSecondaryIdentification>;
|
|
5
6
|
export declare namespace ProviderSecondaryIdentification {
|
|
6
7
|
interface Raw {
|
|
7
8
|
reference_identification: string;
|
|
9
|
+
reference_identification_qualifier?: ProviderSecondaryIdentificationQualifier.Raw | null;
|
|
8
10
|
}
|
|
9
11
|
}
|
|
@@ -36,6 +36,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.ProviderSecondaryIdentification = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../../../core"));
|
|
39
|
+
const ProviderSecondaryIdentificationQualifier_1 = require("./ProviderSecondaryIdentificationQualifier");
|
|
39
40
|
exports.ProviderSecondaryIdentification = core.serialization.object({
|
|
40
41
|
referenceIdentification: core.serialization.property("reference_identification", core.serialization.string()),
|
|
42
|
+
referenceIdentificationQualifier: core.serialization.property("reference_identification_qualifier", ProviderSecondaryIdentificationQualifier_1.ProviderSecondaryIdentificationQualifier.optional()),
|
|
41
43
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as CandidApi from "../../../../../../api/index";
|
|
2
|
+
import * as core from "../../../../../../core";
|
|
3
|
+
import type * as serializers from "../../../../../index";
|
|
4
|
+
export declare const ProviderSecondaryIdentificationQualifier: core.serialization.Schema<serializers.encounterProviders.v2.ProviderSecondaryIdentificationQualifier.Raw, CandidApi.encounterProviders.v2.ProviderSecondaryIdentificationQualifier>;
|
|
5
|
+
export declare namespace ProviderSecondaryIdentificationQualifier {
|
|
6
|
+
type Raw = "G2" | "LU";
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ProviderSecondaryIdentificationQualifier = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../../../core"));
|
|
39
|
+
exports.ProviderSecondaryIdentificationQualifier = core.serialization.enum_(["G2", "LU"]);
|
|
@@ -11,6 +11,7 @@ export * from "./OrderingProviderOptional";
|
|
|
11
11
|
export * from "./OrderingProviderUpdate";
|
|
12
12
|
export * from "./ProviderId";
|
|
13
13
|
export * from "./ProviderSecondaryIdentification";
|
|
14
|
+
export * from "./ProviderSecondaryIdentificationQualifier";
|
|
14
15
|
export * from "./ReferringProvider";
|
|
15
16
|
export * from "./ReferringProviderUpdate";
|
|
16
17
|
export * from "./ReferringProviderUpdateWithOptionalAddress";
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./OrderingProviderOptional"), exports);
|
|
|
27
27
|
__exportStar(require("./OrderingProviderUpdate"), exports);
|
|
28
28
|
__exportStar(require("./ProviderId"), exports);
|
|
29
29
|
__exportStar(require("./ProviderSecondaryIdentification"), exports);
|
|
30
|
+
__exportStar(require("./ProviderSecondaryIdentificationQualifier"), exports);
|
|
30
31
|
__exportStar(require("./ReferringProvider"), exports);
|
|
31
32
|
__exportStar(require("./ReferringProviderUpdate"), exports);
|
|
32
33
|
__exportStar(require("./ReferringProviderUpdateWithOptionalAddress"), exports);
|
|
@@ -2,10 +2,12 @@ import type * as CandidApi from "../../../../api/index";
|
|
|
2
2
|
import * as core from "../../../../core";
|
|
3
3
|
import type * as serializers from "../../../index";
|
|
4
4
|
import { AllocationTarget } from "./AllocationTarget";
|
|
5
|
+
import { BalanceEarmark } from "./BalanceEarmark";
|
|
5
6
|
export declare const Allocation: core.serialization.ObjectSchema<serializers.Allocation.Raw, CandidApi.Allocation>;
|
|
6
7
|
export declare namespace Allocation {
|
|
7
8
|
interface Raw {
|
|
8
9
|
amount_cents: number;
|
|
9
10
|
target: AllocationTarget.Raw;
|
|
11
|
+
earmark?: BalanceEarmark.Raw | null;
|
|
10
12
|
}
|
|
11
13
|
}
|
|
@@ -37,7 +37,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.Allocation = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core"));
|
|
39
39
|
const AllocationTarget_1 = require("./AllocationTarget");
|
|
40
|
+
const BalanceEarmark_1 = require("./BalanceEarmark");
|
|
40
41
|
exports.Allocation = core.serialization.object({
|
|
41
42
|
amountCents: core.serialization.property("amount_cents", core.serialization.number()),
|
|
42
43
|
target: AllocationTarget_1.AllocationTarget,
|
|
44
|
+
earmark: BalanceEarmark_1.BalanceEarmark.optional(),
|
|
43
45
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as CandidApi from "../../../../api/index";
|
|
2
|
+
import * as core from "../../../../core";
|
|
3
|
+
import type * as serializers from "../../../index";
|
|
4
|
+
import { AllocationEarmarkType } from "./AllocationEarmarkType";
|
|
5
|
+
export declare const BalanceEarmark: core.serialization.ObjectSchema<serializers.BalanceEarmark.Raw, CandidApi.BalanceEarmark>;
|
|
6
|
+
export declare namespace BalanceEarmark {
|
|
7
|
+
interface Raw {
|
|
8
|
+
id: string;
|
|
9
|
+
target: AllocationEarmarkType.Raw;
|
|
10
|
+
}
|
|
11
|
+
}
|