candidhealth 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/resources/auth/resources/v2/client/Client.js +1 -1
- package/api/resources/billingNotes/client/Client.js +1 -1
- package/api/resources/commons/types/DateRangeOptionalEnd.d.ts +8 -0
- package/api/resources/commons/types/Decimal.d.ts +11 -0
- package/api/resources/commons/types/Decimal.js +10 -0
- package/api/resources/commons/types/EmrPayerCrosswalk.d.ts +8 -0
- package/api/resources/commons/types/EmrPayerCrosswalk.js +10 -0
- package/api/resources/commons/types/UserId.d.ts +8 -0
- package/api/resources/commons/types/index.d.ts +4 -1
- package/api/resources/commons/types/index.js +4 -1
- package/api/resources/encounters/resources/v4/client/Client.js +16 -12
- package/api/resources/encounters/resources/v4/client/create.d.ts +7 -1
- package/api/resources/encounters/resources/v4/client/create.js +11 -0
- package/api/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -1
- package/api/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +2 -7
- package/api/resources/encounters/resources/v4/client/requests/GetAllEncountersRequest.d.ts +2 -1
- package/api/resources/encounters/resources/v4/types/BillableStatusType.d.ts +8 -0
- package/api/resources/encounters/resources/v4/types/BillableStatusType.js +10 -0
- package/api/resources/encounters/resources/v4/types/Encounter.d.ts +1 -0
- package/api/resources/encounters/resources/v4/types/EncounterBase.d.ts +13 -7
- package/api/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.d.ts +6 -0
- package/api/resources/encounters/resources/v4/types/ResponsiblePartyType.d.ts +9 -0
- package/api/resources/encounters/resources/v4/types/ResponsiblePartyType.js +11 -0
- package/api/resources/encounters/resources/v4/types/index.d.ts +3 -0
- package/api/resources/encounters/resources/v4/types/index.js +3 -0
- package/api/resources/expectedNetworkStatus/client/Client.js +1 -1
- package/api/resources/guarantor/resources/v1/client/Client.d.ts +2 -2
- package/api/resources/guarantor/resources/v1/client/Client.js +20 -6
- package/api/resources/guarantor/resources/v1/client/create.d.ts +7 -1
- package/api/resources/guarantor/resources/v1/client/create.js +11 -0
- package/api/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.d.ts +6 -3
- package/api/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.d.ts +6 -0
- package/api/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.js +5 -0
- package/api/resources/guarantor/resources/v1/types/Guarantor.d.ts +4 -0
- package/api/resources/guarantor/resources/v1/types/GuarantorBase.d.ts +1 -2
- package/api/resources/guarantor/resources/v1/types/GuarantorCreate.d.ts +6 -0
- package/api/resources/guarantor/resources/v1/types/index.d.ts +1 -0
- package/api/resources/guarantor/resources/v1/types/index.js +1 -0
- package/api/resources/individual/types/Patient.d.ts +4 -0
- package/api/resources/individual/types/PatientBase.d.ts +0 -1
- package/api/resources/individual/types/PatientCreate.d.ts +6 -0
- package/api/resources/insuranceCard/types/InsuranceCardBase.d.ts +1 -1
- package/api/resources/insuranceCard/types/InsuranceCardCreate.d.ts +1 -0
- package/api/resources/payers/client/Client.js +2 -2
- package/api/resources/serviceLines/types/ServiceLine.d.ts +13 -1
- package/api/resources/serviceLines/types/ServiceLineCreate.d.ts +7 -1
- package/api/resources/tasks/resources/v3/client/Client.js +1 -1
- package/api/resources/users/resources/v2/types/UserV2.d.ts +1 -1
- package/api/resources/users/resources/v2/types/index.d.ts +0 -1
- package/api/resources/users/resources/v2/types/index.js +0 -1
- package/dist/api/resources/auth/resources/v2/client/Client.js +1 -1
- package/dist/api/resources/billingNotes/client/Client.js +1 -1
- package/dist/api/resources/commons/types/DateRangeOptionalEnd.d.ts +8 -0
- package/dist/api/resources/commons/types/DateRangeOptionalEnd.js +5 -0
- package/dist/api/resources/commons/types/Decimal.d.ts +11 -0
- package/dist/api/resources/commons/types/Decimal.js +10 -0
- package/dist/api/resources/commons/types/EmrPayerCrosswalk.d.ts +8 -0
- package/dist/api/resources/commons/types/EmrPayerCrosswalk.js +10 -0
- package/dist/api/resources/commons/types/UserId.d.ts +8 -0
- package/dist/api/resources/commons/types/index.d.ts +4 -1
- package/dist/api/resources/commons/types/index.js +4 -1
- package/dist/api/resources/encounters/resources/v4/client/Client.js +16 -12
- package/dist/api/resources/encounters/resources/v4/client/create.d.ts +7 -1
- package/dist/api/resources/encounters/resources/v4/client/create.js +11 -0
- package/dist/api/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -1
- package/dist/api/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +2 -7
- package/dist/api/resources/encounters/resources/v4/client/requests/GetAllEncountersRequest.d.ts +2 -1
- package/dist/api/resources/encounters/resources/v4/types/BillableStatusType.d.ts +8 -0
- package/dist/api/resources/encounters/resources/v4/types/BillableStatusType.js +10 -0
- package/dist/api/resources/encounters/resources/v4/types/Encounter.d.ts +1 -0
- package/dist/api/resources/encounters/resources/v4/types/EncounterBase.d.ts +13 -7
- package/dist/api/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.d.ts +6 -0
- package/dist/api/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.js +5 -0
- package/dist/api/resources/encounters/resources/v4/types/ResponsiblePartyType.d.ts +9 -0
- package/dist/api/resources/encounters/resources/v4/types/ResponsiblePartyType.js +11 -0
- package/dist/api/resources/encounters/resources/v4/types/index.d.ts +3 -0
- package/dist/api/resources/encounters/resources/v4/types/index.js +3 -0
- package/dist/api/resources/expectedNetworkStatus/client/Client.js +1 -1
- package/dist/api/resources/guarantor/resources/v1/client/Client.d.ts +2 -2
- package/dist/api/resources/guarantor/resources/v1/client/Client.js +20 -6
- package/dist/api/resources/guarantor/resources/v1/client/create.d.ts +7 -1
- package/dist/api/resources/guarantor/resources/v1/client/create.js +11 -0
- package/dist/api/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.d.ts +6 -3
- package/dist/api/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.d.ts +6 -0
- package/dist/api/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.js +5 -0
- package/dist/api/resources/guarantor/resources/v1/types/Guarantor.d.ts +4 -0
- package/dist/api/resources/guarantor/resources/v1/types/GuarantorBase.d.ts +1 -2
- package/dist/api/resources/guarantor/resources/v1/types/GuarantorCreate.d.ts +6 -0
- package/dist/api/resources/guarantor/resources/v1/types/index.d.ts +1 -0
- package/dist/api/resources/guarantor/resources/v1/types/index.js +1 -0
- package/dist/api/resources/individual/types/Patient.d.ts +4 -0
- package/dist/api/resources/individual/types/PatientBase.d.ts +0 -1
- package/dist/api/resources/individual/types/PatientCreate.d.ts +6 -0
- package/dist/api/resources/insuranceCard/types/InsuranceCardBase.d.ts +1 -1
- package/dist/api/resources/insuranceCard/types/InsuranceCardCreate.d.ts +1 -0
- package/dist/api/resources/payers/client/Client.js +2 -2
- package/dist/api/resources/serviceLines/types/ServiceLine.d.ts +13 -1
- package/dist/api/resources/serviceLines/types/ServiceLineCreate.d.ts +7 -1
- package/dist/api/resources/tasks/resources/v3/client/Client.js +1 -1
- package/dist/api/resources/users/resources/v2/types/UserV2.d.ts +1 -1
- package/dist/api/resources/users/resources/v2/types/index.d.ts +0 -1
- package/dist/api/resources/users/resources/v2/types/index.js +0 -1
- package/dist/serialization/resources/commons/types/DateRangeOptionalEnd.d.ts +13 -0
- package/dist/serialization/resources/commons/types/{ContactInfo.js → DateRangeOptionalEnd.js} +4 -6
- package/dist/serialization/resources/commons/types/Decimal.d.ts +10 -0
- package/{serialization/resources/commons/types/ContactInfo.js → dist/serialization/resources/commons/types/Decimal.js} +7 -6
- package/dist/serialization/resources/commons/types/EmrPayerCrosswalk.d.ts +10 -0
- package/dist/serialization/resources/commons/types/EmrPayerCrosswalk.js +31 -0
- package/dist/serialization/resources/commons/types/UserId.d.ts +10 -0
- package/dist/serialization/resources/commons/types/UserId.js +37 -0
- package/dist/serialization/resources/commons/types/index.d.ts +4 -1
- package/dist/serialization/resources/commons/types/index.js +4 -1
- package/dist/serialization/resources/encounters/resources/v4/client/create.d.ts +5 -1
- package/dist/serialization/resources/encounters/resources/v4/client/create.js +5 -0
- package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -1
- package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.js +0 -1
- package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +2 -2
- package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.js +6 -2
- package/dist/serialization/resources/encounters/resources/v4/types/BillableStatusType.d.ts +10 -0
- package/dist/serialization/resources/encounters/resources/v4/types/BillableStatusType.js +31 -0
- package/dist/serialization/resources/encounters/resources/v4/types/Encounter.d.ts +1 -0
- package/dist/serialization/resources/encounters/resources/v4/types/Encounter.js +3 -0
- package/dist/serialization/resources/encounters/resources/v4/types/EncounterBase.d.ts +3 -2
- package/dist/serialization/resources/encounters/resources/v4/types/EncounterBase.js +3 -2
- package/dist/serialization/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.d.ts +12 -0
- package/dist/serialization/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.js +33 -0
- package/dist/serialization/resources/encounters/resources/v4/types/ResponsiblePartyType.d.ts +10 -0
- package/dist/serialization/resources/encounters/resources/v4/types/ResponsiblePartyType.js +31 -0
- package/dist/serialization/resources/encounters/resources/v4/types/index.d.ts +3 -0
- package/dist/serialization/resources/encounters/resources/v4/types/index.js +3 -0
- package/dist/serialization/resources/guarantor/resources/v1/client/create.d.ts +14 -0
- package/dist/serialization/resources/guarantor/resources/v1/client/create.js +46 -0
- package/dist/serialization/resources/guarantor/resources/v1/client/index.d.ts +1 -0
- package/dist/serialization/resources/guarantor/resources/v1/client/index.js +14 -0
- package/dist/serialization/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.d.ts +6 -3
- package/dist/serialization/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.js +8 -3
- package/dist/serialization/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.d.ts +12 -0
- package/dist/serialization/resources/{users/resources/v2/types/UserId.js → guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.js} +3 -5
- package/dist/serialization/resources/guarantor/resources/v1/types/Guarantor.d.ts +4 -0
- package/dist/serialization/resources/guarantor/resources/v1/types/Guarantor.js +4 -0
- package/dist/serialization/resources/guarantor/resources/v1/types/GuarantorBase.d.ts +1 -2
- package/dist/serialization/resources/guarantor/resources/v1/types/GuarantorBase.js +1 -2
- package/dist/serialization/resources/guarantor/resources/v1/types/GuarantorCreate.d.ts +4 -0
- package/dist/serialization/resources/guarantor/resources/v1/types/GuarantorCreate.js +8 -1
- package/dist/serialization/resources/guarantor/resources/v1/types/index.d.ts +1 -0
- package/dist/serialization/resources/guarantor/resources/v1/types/index.js +1 -0
- package/dist/serialization/resources/individual/types/Patient.d.ts +4 -0
- package/dist/serialization/resources/individual/types/Patient.js +4 -0
- package/dist/serialization/resources/individual/types/PatientBase.d.ts +0 -1
- package/dist/serialization/resources/individual/types/PatientBase.js +0 -1
- package/dist/serialization/resources/individual/types/PatientCreate.d.ts +4 -0
- package/dist/serialization/resources/individual/types/PatientCreate.js +8 -1
- package/dist/serialization/resources/insuranceCard/types/InsuranceCardBase.d.ts +1 -1
- package/dist/serialization/resources/insuranceCard/types/InsuranceCardBase.js +1 -1
- package/dist/serialization/resources/insuranceCard/types/InsuranceCardCreate.d.ts +1 -0
- package/dist/serialization/resources/insuranceCard/types/InsuranceCardCreate.js +1 -0
- package/dist/serialization/resources/serviceLines/types/ServiceLine.d.ts +2 -1
- package/dist/serialization/resources/serviceLines/types/ServiceLine.js +2 -1
- package/dist/serialization/resources/serviceLines/types/ServiceLineCreate.d.ts +1 -1
- package/dist/serialization/resources/serviceLines/types/ServiceLineCreate.js +1 -1
- package/dist/serialization/resources/users/resources/v2/types/UserV2.d.ts +1 -1
- package/dist/serialization/resources/users/resources/v2/types/UserV2.js +1 -1
- package/dist/serialization/resources/users/resources/v2/types/index.d.ts +0 -1
- package/dist/serialization/resources/users/resources/v2/types/index.js +0 -1
- package/package.json +1 -1
- package/serialization/resources/commons/types/DateRangeOptionalEnd.d.ts +13 -0
- package/serialization/resources/commons/types/DateRangeOptionalEnd.js +34 -0
- package/serialization/resources/commons/types/Decimal.d.ts +10 -0
- package/serialization/resources/commons/types/Decimal.js +37 -0
- package/serialization/resources/commons/types/EmrPayerCrosswalk.d.ts +10 -0
- package/serialization/resources/commons/types/EmrPayerCrosswalk.js +31 -0
- package/serialization/resources/commons/types/UserId.d.ts +10 -0
- package/serialization/resources/commons/types/UserId.js +37 -0
- package/serialization/resources/commons/types/index.d.ts +4 -1
- package/serialization/resources/commons/types/index.js +4 -1
- package/serialization/resources/encounters/resources/v4/client/create.d.ts +5 -1
- package/serialization/resources/encounters/resources/v4/client/create.js +5 -0
- package/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -1
- package/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.js +0 -1
- package/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +2 -2
- package/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.js +6 -2
- package/serialization/resources/encounters/resources/v4/types/BillableStatusType.d.ts +10 -0
- package/serialization/resources/encounters/resources/v4/types/BillableStatusType.js +31 -0
- package/serialization/resources/encounters/resources/v4/types/Encounter.d.ts +1 -0
- package/serialization/resources/encounters/resources/v4/types/Encounter.js +3 -0
- package/serialization/resources/encounters/resources/v4/types/EncounterBase.d.ts +3 -2
- package/serialization/resources/encounters/resources/v4/types/EncounterBase.js +3 -2
- package/serialization/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.d.ts +12 -0
- package/serialization/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.js +33 -0
- package/serialization/resources/encounters/resources/v4/types/ResponsiblePartyType.d.ts +10 -0
- package/serialization/resources/encounters/resources/v4/types/ResponsiblePartyType.js +31 -0
- package/serialization/resources/encounters/resources/v4/types/index.d.ts +3 -0
- package/serialization/resources/encounters/resources/v4/types/index.js +3 -0
- package/serialization/resources/guarantor/resources/v1/client/create.d.ts +14 -0
- package/serialization/resources/guarantor/resources/v1/client/create.js +46 -0
- package/serialization/resources/guarantor/resources/v1/client/index.d.ts +1 -0
- package/serialization/resources/guarantor/resources/v1/client/index.js +14 -0
- package/serialization/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.d.ts +6 -3
- package/serialization/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.js +8 -3
- package/serialization/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.d.ts +12 -0
- package/serialization/resources/{users/resources/v2/types/UserId.js → guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.js} +3 -5
- package/serialization/resources/guarantor/resources/v1/types/Guarantor.d.ts +4 -0
- package/serialization/resources/guarantor/resources/v1/types/Guarantor.js +4 -0
- package/serialization/resources/guarantor/resources/v1/types/GuarantorBase.d.ts +1 -2
- package/serialization/resources/guarantor/resources/v1/types/GuarantorBase.js +1 -2
- package/serialization/resources/guarantor/resources/v1/types/GuarantorCreate.d.ts +4 -0
- package/serialization/resources/guarantor/resources/v1/types/GuarantorCreate.js +8 -1
- package/serialization/resources/guarantor/resources/v1/types/index.d.ts +1 -0
- package/serialization/resources/guarantor/resources/v1/types/index.js +1 -0
- package/serialization/resources/individual/types/Patient.d.ts +4 -0
- package/serialization/resources/individual/types/Patient.js +4 -0
- package/serialization/resources/individual/types/PatientBase.d.ts +0 -1
- package/serialization/resources/individual/types/PatientBase.js +0 -1
- package/serialization/resources/individual/types/PatientCreate.d.ts +4 -0
- package/serialization/resources/individual/types/PatientCreate.js +8 -1
- package/serialization/resources/insuranceCard/types/InsuranceCardBase.d.ts +1 -1
- package/serialization/resources/insuranceCard/types/InsuranceCardBase.js +1 -1
- package/serialization/resources/insuranceCard/types/InsuranceCardCreate.d.ts +1 -0
- package/serialization/resources/insuranceCard/types/InsuranceCardCreate.js +1 -0
- package/serialization/resources/serviceLines/types/ServiceLine.d.ts +2 -1
- package/serialization/resources/serviceLines/types/ServiceLine.js +2 -1
- package/serialization/resources/serviceLines/types/ServiceLineCreate.d.ts +1 -1
- package/serialization/resources/serviceLines/types/ServiceLineCreate.js +1 -1
- package/serialization/resources/users/resources/v2/types/UserV2.d.ts +1 -1
- package/serialization/resources/users/resources/v2/types/UserV2.js +1 -1
- package/serialization/resources/users/resources/v2/types/index.d.ts +0 -1
- package/serialization/resources/users/resources/v2/types/index.js +0 -1
- package/api/resources/commons/types/ContactInfo.d.ts +0 -10
- package/api/resources/users/resources/v2/types/UserId.d.ts +0 -8
- package/dist/api/resources/commons/types/ContactInfo.d.ts +0 -10
- package/dist/api/resources/users/resources/v2/types/UserId.d.ts +0 -8
- package/dist/serialization/resources/commons/types/ContactInfo.d.ts +0 -15
- package/dist/serialization/resources/users/resources/v2/types/UserId.d.ts +0 -10
- package/serialization/resources/commons/types/ContactInfo.d.ts +0 -15
- package/serialization/resources/users/resources/v2/types/UserId.d.ts +0 -10
- /package/api/resources/commons/types/{ContactInfo.js → DateRangeOptionalEnd.js} +0 -0
- /package/api/resources/{users/resources/v2 → commons}/types/UserId.js +0 -0
- /package/{dist/api/resources/commons/types/ContactInfo.js → api/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.js} +0 -0
- /package/dist/api/resources/{users/resources/v2 → commons}/types/UserId.js +0 -0
|
@@ -48,7 +48,7 @@ class V2 {
|
|
|
48
48
|
Authorization: await this._getAuthorizationHeader(),
|
|
49
49
|
"X-Fern-Language": "JavaScript",
|
|
50
50
|
"X-Fern-SDK-Name": "candidhealth",
|
|
51
|
-
"X-Fern-SDK-Version": "0.3.
|
|
51
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
52
52
|
},
|
|
53
53
|
contentType: "application/json",
|
|
54
54
|
body: await serializers.auth.v2.AuthGetTokenRequest.jsonOrThrow(request, {
|
|
@@ -48,7 +48,7 @@ class BillingNotes {
|
|
|
48
48
|
Authorization: await this._getAuthorizationHeader(),
|
|
49
49
|
"X-Fern-Language": "JavaScript",
|
|
50
50
|
"X-Fern-SDK-Name": "candidhealth",
|
|
51
|
-
"X-Fern-SDK-Version": "0.3.
|
|
51
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
52
52
|
},
|
|
53
53
|
contentType: "application/json",
|
|
54
54
|
body: await serializers.StandaloneBillingNoteCreate.jsonOrThrow(request, {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CandidApi from "../../..";
|
|
5
|
+
/**
|
|
6
|
+
* String representation of a Decimal that can be parsed by most libraries.
|
|
7
|
+
*/
|
|
8
|
+
export declare type Decimal = string & {
|
|
9
|
+
Decimal: void;
|
|
10
|
+
};
|
|
11
|
+
export declare function Decimal(value: string): CandidApi.Decimal;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Decimal = void 0;
|
|
7
|
+
function Decimal(value) {
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
exports.Decimal = Decimal;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.EmrPayerCrosswalk = void 0;
|
|
7
|
+
exports.EmrPayerCrosswalk = {
|
|
8
|
+
Healthie: "HEALTHIE",
|
|
9
|
+
Canvas: "CANVAS",
|
|
10
|
+
};
|
|
@@ -6,10 +6,13 @@ export * from "./PatientExternalId";
|
|
|
6
6
|
export * from "./EncounterExternalId";
|
|
7
7
|
export * from "./Npi";
|
|
8
8
|
export * from "./WorkQueueId";
|
|
9
|
+
export * from "./UserId";
|
|
9
10
|
export * from "./LinkUrl";
|
|
10
11
|
export * from "./ContentDownloadUrl";
|
|
11
12
|
export * from "./PageToken";
|
|
12
13
|
export * from "./Date_";
|
|
14
|
+
export * from "./DateRangeOptionalEnd";
|
|
15
|
+
export * from "./Decimal";
|
|
13
16
|
export * from "./ResourcePage";
|
|
14
17
|
export * from "./StreetAddressBase";
|
|
15
18
|
export * from "./StreetAddressShortZip";
|
|
@@ -24,7 +27,7 @@ export * from "./PatientRelationshipToInsuredCodeAll";
|
|
|
24
27
|
export * from "./ProcedureModifier";
|
|
25
28
|
export * from "./ServiceLineUnits";
|
|
26
29
|
export * from "./InsuranceTypeCode";
|
|
30
|
+
export * from "./EmrPayerCrosswalk";
|
|
27
31
|
export * from "./PhoneNumber";
|
|
28
32
|
export * from "./PhoneNumberType";
|
|
29
33
|
export * from "./Email";
|
|
30
|
-
export * from "./ContactInfo";
|
|
@@ -22,10 +22,13 @@ __exportStar(require("./PatientExternalId"), exports);
|
|
|
22
22
|
__exportStar(require("./EncounterExternalId"), exports);
|
|
23
23
|
__exportStar(require("./Npi"), exports);
|
|
24
24
|
__exportStar(require("./WorkQueueId"), exports);
|
|
25
|
+
__exportStar(require("./UserId"), exports);
|
|
25
26
|
__exportStar(require("./LinkUrl"), exports);
|
|
26
27
|
__exportStar(require("./ContentDownloadUrl"), exports);
|
|
27
28
|
__exportStar(require("./PageToken"), exports);
|
|
28
29
|
__exportStar(require("./Date_"), exports);
|
|
30
|
+
__exportStar(require("./DateRangeOptionalEnd"), exports);
|
|
31
|
+
__exportStar(require("./Decimal"), exports);
|
|
29
32
|
__exportStar(require("./ResourcePage"), exports);
|
|
30
33
|
__exportStar(require("./StreetAddressBase"), exports);
|
|
31
34
|
__exportStar(require("./StreetAddressShortZip"), exports);
|
|
@@ -40,7 +43,7 @@ __exportStar(require("./PatientRelationshipToInsuredCodeAll"), exports);
|
|
|
40
43
|
__exportStar(require("./ProcedureModifier"), exports);
|
|
41
44
|
__exportStar(require("./ServiceLineUnits"), exports);
|
|
42
45
|
__exportStar(require("./InsuranceTypeCode"), exports);
|
|
46
|
+
__exportStar(require("./EmrPayerCrosswalk"), exports);
|
|
43
47
|
__exportStar(require("./PhoneNumber"), exports);
|
|
44
48
|
__exportStar(require("./PhoneNumberType"), exports);
|
|
45
49
|
__exportStar(require("./Email"), exports);
|
|
46
|
-
__exportStar(require("./ContactInfo"), exports);
|
|
@@ -42,7 +42,7 @@ class V4 {
|
|
|
42
42
|
this.options = options;
|
|
43
43
|
}
|
|
44
44
|
async getAll(request = {}) {
|
|
45
|
-
const { limit, claimStatus, sort, pageToken, dateOfServiceMin, dateOfServiceMax, primaryPayerNames, searchTerm, externalId, diagnosesUpdatedSince, tagIds,
|
|
45
|
+
const { limit, claimStatus, sort, pageToken, dateOfServiceMin, dateOfServiceMax, primaryPayerNames, searchTerm, externalId, diagnosesUpdatedSince, tagIds, workQueueId, billableStatus, responsibleParty, } = request;
|
|
46
46
|
const _queryParams = new url_search_params_1.default();
|
|
47
47
|
if (limit != null) {
|
|
48
48
|
_queryParams.append("limit", limit.toString());
|
|
@@ -84,12 +84,15 @@ class V4 {
|
|
|
84
84
|
_queryParams.append("tag_ids", tagIds);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
if (doNotBill != null) {
|
|
88
|
-
_queryParams.append("do_not_bill", doNotBill.toString());
|
|
89
|
-
}
|
|
90
87
|
if (workQueueId != null) {
|
|
91
88
|
_queryParams.append("work_queue_id", workQueueId);
|
|
92
89
|
}
|
|
90
|
+
if (billableStatus != null) {
|
|
91
|
+
_queryParams.append("billable_status", billableStatus);
|
|
92
|
+
}
|
|
93
|
+
if (responsibleParty != null) {
|
|
94
|
+
_queryParams.append("responsible_party", responsibleParty);
|
|
95
|
+
}
|
|
93
96
|
const _response = await core.fetcher({
|
|
94
97
|
url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production, "/api/encounters/v4"),
|
|
95
98
|
method: "GET",
|
|
@@ -97,7 +100,7 @@ class V4 {
|
|
|
97
100
|
Authorization: await this._getAuthorizationHeader(),
|
|
98
101
|
"X-Fern-Language": "JavaScript",
|
|
99
102
|
"X-Fern-SDK-Name": "candidhealth",
|
|
100
|
-
"X-Fern-SDK-Version": "0.3.
|
|
103
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
101
104
|
},
|
|
102
105
|
contentType: "application/json",
|
|
103
106
|
queryParameters: _queryParams,
|
|
@@ -127,7 +130,7 @@ class V4 {
|
|
|
127
130
|
Authorization: await this._getAuthorizationHeader(),
|
|
128
131
|
"X-Fern-Language": "JavaScript",
|
|
129
132
|
"X-Fern-SDK-Name": "candidhealth",
|
|
130
|
-
"X-Fern-SDK-Version": "0.3.
|
|
133
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
131
134
|
},
|
|
132
135
|
contentType: "application/json",
|
|
133
136
|
timeoutMs: 60000,
|
|
@@ -156,7 +159,7 @@ class V4 {
|
|
|
156
159
|
Authorization: await this._getAuthorizationHeader(),
|
|
157
160
|
"X-Fern-Language": "JavaScript",
|
|
158
161
|
"X-Fern-SDK-Name": "candidhealth",
|
|
159
|
-
"X-Fern-SDK-Version": "0.3.
|
|
162
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
160
163
|
},
|
|
161
164
|
contentType: "application/json",
|
|
162
165
|
body: await serializers.encounters.v4.EncounterCreate.jsonOrThrow(request, {
|
|
@@ -178,6 +181,7 @@ class V4 {
|
|
|
178
181
|
if (_response.error.reason === "status-code") {
|
|
179
182
|
switch (_response.error.body?.errorName) {
|
|
180
183
|
case "EncounterExternalIdUniquenessError":
|
|
184
|
+
case "EncounterGuarantorMissingContactInfoError":
|
|
181
185
|
return {
|
|
182
186
|
ok: false,
|
|
183
187
|
error: await serializers.encounters.v4.create.Error.parseOrThrow(_response.error.body, {
|
|
@@ -202,7 +206,7 @@ class V4 {
|
|
|
202
206
|
Authorization: await this._getAuthorizationHeader(),
|
|
203
207
|
"X-Fern-Language": "JavaScript",
|
|
204
208
|
"X-Fern-SDK-Name": "candidhealth",
|
|
205
|
-
"X-Fern-SDK-Version": "0.3.
|
|
209
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
206
210
|
},
|
|
207
211
|
contentType: "application/json",
|
|
208
212
|
body: await serializers.encounters.v4.EncounterUpdate.jsonOrThrow(request, {
|
|
@@ -248,7 +252,7 @@ class V4 {
|
|
|
248
252
|
Authorization: await this._getAuthorizationHeader(),
|
|
249
253
|
"X-Fern-Language": "JavaScript",
|
|
250
254
|
"X-Fern-SDK-Name": "candidhealth",
|
|
251
|
-
"X-Fern-SDK-Version": "0.3.
|
|
255
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
252
256
|
},
|
|
253
257
|
contentType: "application/json",
|
|
254
258
|
timeoutMs: 60000,
|
|
@@ -277,7 +281,7 @@ class V4 {
|
|
|
277
281
|
Authorization: await this._getAuthorizationHeader(),
|
|
278
282
|
"X-Fern-Language": "JavaScript",
|
|
279
283
|
"X-Fern-SDK-Name": "candidhealth",
|
|
280
|
-
"X-Fern-SDK-Version": "0.3.
|
|
284
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
281
285
|
},
|
|
282
286
|
contentType: "application/json",
|
|
283
287
|
timeoutMs: 60000,
|
|
@@ -309,7 +313,7 @@ class V4 {
|
|
|
309
313
|
Authorization: await this._getAuthorizationHeader(),
|
|
310
314
|
"X-Fern-Language": "JavaScript",
|
|
311
315
|
"X-Fern-SDK-Name": "candidhealth",
|
|
312
|
-
"X-Fern-SDK-Version": "0.3.
|
|
316
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
313
317
|
},
|
|
314
318
|
contentType: "application/json",
|
|
315
319
|
timeoutMs: 60000,
|
|
@@ -338,7 +342,7 @@ class V4 {
|
|
|
338
342
|
Authorization: await this._getAuthorizationHeader(),
|
|
339
343
|
"X-Fern-Language": "JavaScript",
|
|
340
344
|
"X-Fern-SDK-Name": "candidhealth",
|
|
341
|
-
"X-Fern-SDK-Version": "0.3.
|
|
345
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
342
346
|
},
|
|
343
347
|
contentType: "application/json",
|
|
344
348
|
timeoutMs: 60000,
|
|
@@ -3,12 +3,16 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as CandidApi from "../../../../..";
|
|
5
5
|
import * as core from "../../../../../../core";
|
|
6
|
-
export declare type Error = CandidApi.encounters.v4.create.Error.EncounterExternalIdUniquenessError | CandidApi.encounters.v4.create.Error._Unknown;
|
|
6
|
+
export declare type Error = CandidApi.encounters.v4.create.Error.EncounterExternalIdUniquenessError | CandidApi.encounters.v4.create.Error.EncounterGuarantorMissingContactInfoError | CandidApi.encounters.v4.create.Error._Unknown;
|
|
7
7
|
export declare namespace Error {
|
|
8
8
|
interface EncounterExternalIdUniquenessError extends _Utils {
|
|
9
9
|
errorName: "EncounterExternalIdUniquenessError";
|
|
10
10
|
content: CandidApi.encounters.v4.EncounterExternalIdUniquenessErrorType;
|
|
11
11
|
}
|
|
12
|
+
interface EncounterGuarantorMissingContactInfoError extends _Utils {
|
|
13
|
+
errorName: "EncounterGuarantorMissingContactInfoError";
|
|
14
|
+
content: CandidApi.encounters.v4.EncounterGuarantorMissingContactInfoErrorType;
|
|
15
|
+
}
|
|
12
16
|
interface _Unknown extends _Utils {
|
|
13
17
|
errorName: void;
|
|
14
18
|
content: core.Fetcher.Error;
|
|
@@ -18,11 +22,13 @@ export declare namespace Error {
|
|
|
18
22
|
}
|
|
19
23
|
interface _Visitor<_Result> {
|
|
20
24
|
encounterExternalIdUniquenessError: (value: CandidApi.encounters.v4.EncounterExternalIdUniquenessErrorType) => _Result;
|
|
25
|
+
encounterGuarantorMissingContactInfoError: (value: CandidApi.encounters.v4.EncounterGuarantorMissingContactInfoErrorType) => _Result;
|
|
21
26
|
_other: (value: core.Fetcher.Error) => _Result;
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
export declare const Error: {
|
|
25
30
|
readonly encounterExternalIdUniquenessError: (value: CandidApi.encounters.v4.EncounterExternalIdUniquenessErrorType) => CandidApi.encounters.v4.create.Error.EncounterExternalIdUniquenessError;
|
|
31
|
+
readonly encounterGuarantorMissingContactInfoError: (value: CandidApi.encounters.v4.EncounterGuarantorMissingContactInfoErrorType) => CandidApi.encounters.v4.create.Error.EncounterGuarantorMissingContactInfoError;
|
|
26
32
|
readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.encounters.v4.create.Error._Unknown;
|
|
27
33
|
readonly _visit: <_Result>(value: CandidApi.encounters.v4.create.Error, visitor: CandidApi.encounters.v4.create.Error._Visitor<_Result>) => _Result;
|
|
28
34
|
};
|
|
@@ -38,6 +38,15 @@ exports.Error = {
|
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
40
|
},
|
|
41
|
+
encounterGuarantorMissingContactInfoError: (value) => {
|
|
42
|
+
return {
|
|
43
|
+
content: value,
|
|
44
|
+
errorName: "EncounterGuarantorMissingContactInfoError",
|
|
45
|
+
_visit: function (visitor) {
|
|
46
|
+
return CandidApi.encounters.v4.create.Error._visit(this, visitor);
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
},
|
|
41
50
|
_unknown: (fetcherError) => {
|
|
42
51
|
return {
|
|
43
52
|
errorName: undefined,
|
|
@@ -51,6 +60,8 @@ exports.Error = {
|
|
|
51
60
|
switch (value.errorName) {
|
|
52
61
|
case "EncounterExternalIdUniquenessError":
|
|
53
62
|
return visitor.encounterExternalIdUniquenessError(value.content);
|
|
63
|
+
case "EncounterGuarantorMissingContactInfoError":
|
|
64
|
+
return visitor.encounterGuarantorMissingContactInfoError(value.content);
|
|
54
65
|
default:
|
|
55
66
|
return visitor._other(value);
|
|
56
67
|
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import * as CandidApi from "../../../../../..";
|
|
5
5
|
export interface EncounterCreate extends CandidApi.encounters.v4.EncounterBase {
|
|
6
6
|
patient: CandidApi.PatientCreate;
|
|
7
|
-
patientIsSelfGuarantor?: boolean;
|
|
8
7
|
billingProvider: CandidApi.encounterProviders.v2.BillingProvider;
|
|
9
8
|
renderingProvider: CandidApi.encounterProviders.v2.RenderingProvider;
|
|
10
9
|
/**
|
|
@@ -30,13 +30,8 @@ export interface EncounterUpdate {
|
|
|
30
30
|
tagIds?: CandidApi.TagId[];
|
|
31
31
|
clinicalNotes?: CandidApi.encounters.v4.ClinicalNoteCategoryCreate[];
|
|
32
32
|
payToAddress?: CandidApi.StreetAddressLongZip;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* If a patient is no longer a self-guarantor, a newly-created guarantor object can be passed
|
|
36
|
-
* via this field. Note that patient_is_self_guarantor should be toggled to False
|
|
37
|
-
*
|
|
38
|
-
*/
|
|
39
|
-
guarantorId?: CandidApi.guarantor.v1.GuarantorId;
|
|
33
|
+
billableStatus?: CandidApi.encounters.v4.BillableStatusType;
|
|
34
|
+
responsibleParty?: CandidApi.encounters.v4.ResponsiblePartyType;
|
|
40
35
|
providerAcceptsAssignment?: boolean;
|
|
41
36
|
benefitsAssignedToProvider?: boolean;
|
|
42
37
|
synchronicity?: CandidApi.encounters.v4.SynchronicityType;
|
|
@@ -36,6 +36,7 @@ export interface GetAllEncountersRequest {
|
|
|
36
36
|
*/
|
|
37
37
|
diagnosesUpdatedSince?: Date;
|
|
38
38
|
tagIds?: CandidApi.TagId | CandidApi.TagId[];
|
|
39
|
-
doNotBill?: boolean;
|
|
40
39
|
workQueueId?: CandidApi.WorkQueueId;
|
|
40
|
+
billableStatus?: CandidApi.encounters.v4.BillableStatusType;
|
|
41
|
+
responsibleParty?: CandidApi.encounters.v4.ResponsiblePartyType;
|
|
41
42
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare type BillableStatusType = "BILLABLE" | "NOT_BILLABLE";
|
|
5
|
+
export declare const BillableStatusType: {
|
|
6
|
+
readonly Billable: "BILLABLE";
|
|
7
|
+
readonly NotBillable: "NOT_BILLABLE";
|
|
8
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BillableStatusType = void 0;
|
|
7
|
+
exports.BillableStatusType = {
|
|
8
|
+
Billable: "BILLABLE",
|
|
9
|
+
NotBillable: "NOT_BILLABLE",
|
|
10
|
+
};
|
|
@@ -6,6 +6,7 @@ export interface Encounter extends CandidApi.encounters.v4.EncounterBase {
|
|
|
6
6
|
encounterId: CandidApi.EncounterId;
|
|
7
7
|
claims: CandidApi.Claim[];
|
|
8
8
|
patient: CandidApi.Patient;
|
|
9
|
+
guarantor?: CandidApi.guarantor.v1.Guarantor;
|
|
9
10
|
billingProvider: CandidApi.encounterProviders.v2.EncounterProvider;
|
|
10
11
|
renderingProvider: CandidApi.encounterProviders.v2.EncounterProvider;
|
|
11
12
|
referringProvider?: CandidApi.encounterProviders.v2.EncounterProvider;
|
|
@@ -9,7 +9,7 @@ export interface EncounterBase {
|
|
|
9
9
|
* This field should not contain PHI.
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
externalId
|
|
12
|
+
externalId: CandidApi.EncounterExternalId;
|
|
13
13
|
/**
|
|
14
14
|
* Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
|
15
15
|
* This date must be the local date in the timezone where the service occurred.
|
|
@@ -54,12 +54,6 @@ export interface EncounterBase {
|
|
|
54
54
|
*
|
|
55
55
|
*/
|
|
56
56
|
appointmentType?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Should be set to true if Candid should not create or submit a claim but you'd
|
|
59
|
-
* like us to track this encounter anyway (ex: patient is paying cash)
|
|
60
|
-
*
|
|
61
|
-
*/
|
|
62
|
-
doNotBill?: boolean;
|
|
63
57
|
existingMedications?: CandidApi.encounters.v4.Medication[];
|
|
64
58
|
vitals?: CandidApi.encounters.v4.Vitals;
|
|
65
59
|
interventions?: CandidApi.encounters.v4.Intervention[];
|
|
@@ -73,4 +67,16 @@ export interface EncounterBase {
|
|
|
73
67
|
*
|
|
74
68
|
*/
|
|
75
69
|
synchronicity?: CandidApi.encounters.v4.SynchronicityType;
|
|
70
|
+
/**
|
|
71
|
+
* Defines if the Encounter is to be billed by Candid to the responsible_party.
|
|
72
|
+
* Examples for when this should be set to NOT_BILLABLE include
|
|
73
|
+
* if the Encounter has not occurred yet or if there is no intention of ever billing the responsible_party.
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
billableStatus: CandidApi.encounters.v4.BillableStatusType;
|
|
77
|
+
/**
|
|
78
|
+
* Defines the party to be billed with the initial balance owed on the claim.
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
responsibleParty: CandidApi.encounters.v4.ResponsiblePartyType;
|
|
76
82
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare type ResponsiblePartyType = "INSURANCE_PAY" | "SELF_PAY" | "UNKNOWN";
|
|
5
|
+
export declare const ResponsiblePartyType: {
|
|
6
|
+
readonly InsurancePay: "INSURANCE_PAY";
|
|
7
|
+
readonly SelfPay: "SELF_PAY";
|
|
8
|
+
readonly Unknown: "UNKNOWN";
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ResponsiblePartyType = void 0;
|
|
7
|
+
exports.ResponsiblePartyType = {
|
|
8
|
+
InsurancePay: "INSURANCE_PAY",
|
|
9
|
+
SelfPay: "SELF_PAY",
|
|
10
|
+
Unknown: "UNKNOWN",
|
|
11
|
+
};
|
|
@@ -16,6 +16,8 @@ export * from "./ClinicalNoteCategoryCreate";
|
|
|
16
16
|
export * from "./ClinicalNoteCategory";
|
|
17
17
|
export * from "./NoteCategory";
|
|
18
18
|
export * from "./ClinicalNote";
|
|
19
|
+
export * from "./ResponsiblePartyType";
|
|
20
|
+
export * from "./BillableStatusType";
|
|
19
21
|
export * from "./SynchronicityType";
|
|
20
22
|
export * from "./CodingAttributionType";
|
|
21
23
|
export * from "./AttachmentId";
|
|
@@ -37,3 +39,4 @@ export * from "./RxCui";
|
|
|
37
39
|
export * from "./IntakeQuestionId";
|
|
38
40
|
export * from "./IntakeFollowUpId";
|
|
39
41
|
export * from "./EncounterExternalIdUniquenessErrorType";
|
|
42
|
+
export * from "./EncounterGuarantorMissingContactInfoErrorType";
|
|
@@ -32,6 +32,8 @@ __exportStar(require("./ClinicalNoteCategoryCreate"), exports);
|
|
|
32
32
|
__exportStar(require("./ClinicalNoteCategory"), exports);
|
|
33
33
|
__exportStar(require("./NoteCategory"), exports);
|
|
34
34
|
__exportStar(require("./ClinicalNote"), exports);
|
|
35
|
+
__exportStar(require("./ResponsiblePartyType"), exports);
|
|
36
|
+
__exportStar(require("./BillableStatusType"), exports);
|
|
35
37
|
__exportStar(require("./SynchronicityType"), exports);
|
|
36
38
|
__exportStar(require("./CodingAttributionType"), exports);
|
|
37
39
|
__exportStar(require("./AttachmentId"), exports);
|
|
@@ -53,3 +55,4 @@ __exportStar(require("./RxCui"), exports);
|
|
|
53
55
|
__exportStar(require("./IntakeQuestionId"), exports);
|
|
54
56
|
__exportStar(require("./IntakeFollowUpId"), exports);
|
|
55
57
|
__exportStar(require("./EncounterExternalIdUniquenessErrorType"), exports);
|
|
58
|
+
__exportStar(require("./EncounterGuarantorMissingContactInfoErrorType"), exports);
|
|
@@ -48,7 +48,7 @@ class ExpectedNetworkStatus {
|
|
|
48
48
|
Authorization: await this._getAuthorizationHeader(),
|
|
49
49
|
"X-Fern-Language": "JavaScript",
|
|
50
50
|
"X-Fern-SDK-Name": "candidhealth",
|
|
51
|
-
"X-Fern-SDK-Version": "0.3.
|
|
51
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
52
52
|
},
|
|
53
53
|
contentType: "application/json",
|
|
54
54
|
body: await serializers.ExpectedNetworkStatusRequest.jsonOrThrow(request, {
|
|
@@ -13,8 +13,8 @@ export declare namespace V1 {
|
|
|
13
13
|
export declare class V1 {
|
|
14
14
|
protected readonly options: V1.Options;
|
|
15
15
|
constructor(options: V1.Options);
|
|
16
|
-
create(request: CandidApi.guarantor.v1.GuarantorCreate): Promise<core.APIResponse<CandidApi.guarantor.v1.Guarantor, CandidApi.guarantor.v1.create.Error>>;
|
|
16
|
+
create(encounterId: CandidApi.EncounterId, request: CandidApi.guarantor.v1.GuarantorCreate): Promise<core.APIResponse<CandidApi.guarantor.v1.Guarantor, CandidApi.guarantor.v1.create.Error>>;
|
|
17
17
|
get(guarantorId: CandidApi.guarantor.v1.GuarantorId): Promise<core.APIResponse<CandidApi.guarantor.v1.Guarantor, CandidApi.guarantor.v1.get.Error>>;
|
|
18
|
-
update(guarantorId: CandidApi.guarantor.v1.GuarantorId, request
|
|
18
|
+
update(guarantorId: CandidApi.guarantor.v1.GuarantorId, request?: CandidApi.guarantor.v1.GuarantorUpdate): Promise<core.APIResponse<CandidApi.guarantor.v1.Guarantor, CandidApi.guarantor.v1.update.Error>>;
|
|
19
19
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
20
20
|
}
|
|
@@ -40,15 +40,15 @@ class V1 {
|
|
|
40
40
|
constructor(options) {
|
|
41
41
|
this.options = options;
|
|
42
42
|
}
|
|
43
|
-
async create(request) {
|
|
43
|
+
async create(encounterId, request) {
|
|
44
44
|
const _response = await core.fetcher({
|
|
45
|
-
url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production,
|
|
45
|
+
url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production, `/api/guarantors/v1/${await serializers.EncounterId.jsonOrThrow(encounterId)}`),
|
|
46
46
|
method: "POST",
|
|
47
47
|
headers: {
|
|
48
48
|
Authorization: await this._getAuthorizationHeader(),
|
|
49
49
|
"X-Fern-Language": "JavaScript",
|
|
50
50
|
"X-Fern-SDK-Name": "candidhealth",
|
|
51
|
-
"X-Fern-SDK-Version": "0.3.
|
|
51
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
52
52
|
},
|
|
53
53
|
contentType: "application/json",
|
|
54
54
|
body: await serializers.guarantor.v1.GuarantorCreate.jsonOrThrow(request, {
|
|
@@ -67,6 +67,20 @@ class V1 {
|
|
|
67
67
|
}),
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
+
if (_response.error.reason === "status-code") {
|
|
71
|
+
switch (_response.error.body?.errorName) {
|
|
72
|
+
case "EncounterHasExistingGuarantorError":
|
|
73
|
+
return {
|
|
74
|
+
ok: false,
|
|
75
|
+
error: await serializers.guarantor.v1.create.Error.parseOrThrow(_response.error.body, {
|
|
76
|
+
unrecognizedObjectKeys: "passthrough",
|
|
77
|
+
allowUnrecognizedUnionMembers: true,
|
|
78
|
+
allowUnrecognizedEnumValues: true,
|
|
79
|
+
breadcrumbsPrefix: ["response"],
|
|
80
|
+
}),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
70
84
|
return {
|
|
71
85
|
ok: false,
|
|
72
86
|
error: CandidApi.guarantor.v1.create.Error._unknown(_response.error),
|
|
@@ -80,7 +94,7 @@ class V1 {
|
|
|
80
94
|
Authorization: await this._getAuthorizationHeader(),
|
|
81
95
|
"X-Fern-Language": "JavaScript",
|
|
82
96
|
"X-Fern-SDK-Name": "candidhealth",
|
|
83
|
-
"X-Fern-SDK-Version": "0.3.
|
|
97
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
84
98
|
},
|
|
85
99
|
contentType: "application/json",
|
|
86
100
|
timeoutMs: 60000,
|
|
@@ -101,7 +115,7 @@ class V1 {
|
|
|
101
115
|
error: CandidApi.guarantor.v1.get.Error._unknown(_response.error),
|
|
102
116
|
};
|
|
103
117
|
}
|
|
104
|
-
async update(guarantorId, request) {
|
|
118
|
+
async update(guarantorId, request = {}) {
|
|
105
119
|
const _response = await core.fetcher({
|
|
106
120
|
url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production, `/api/guarantors/v1/${await serializers.guarantor.v1.GuarantorId.jsonOrThrow(guarantorId)}`),
|
|
107
121
|
method: "PATCH",
|
|
@@ -109,7 +123,7 @@ class V1 {
|
|
|
109
123
|
Authorization: await this._getAuthorizationHeader(),
|
|
110
124
|
"X-Fern-Language": "JavaScript",
|
|
111
125
|
"X-Fern-SDK-Name": "candidhealth",
|
|
112
|
-
"X-Fern-SDK-Version": "0.3.
|
|
126
|
+
"X-Fern-SDK-Version": "0.3.1",
|
|
113
127
|
},
|
|
114
128
|
contentType: "application/json",
|
|
115
129
|
body: await serializers.guarantor.v1.GuarantorUpdate.jsonOrThrow(request, {
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as CandidApi from "../../../../..";
|
|
5
5
|
import * as core from "../../../../../../core";
|
|
6
|
-
export declare type Error = CandidApi.guarantor.v1.create.Error._Unknown;
|
|
6
|
+
export declare type Error = CandidApi.guarantor.v1.create.Error.EncounterHasExistingGuarantorError | CandidApi.guarantor.v1.create.Error._Unknown;
|
|
7
7
|
export declare namespace Error {
|
|
8
|
+
interface EncounterHasExistingGuarantorError extends _Utils {
|
|
9
|
+
errorName: "EncounterHasExistingGuarantorError";
|
|
10
|
+
content: CandidApi.guarantor.v1.EncounterHasExistingGuarantorErrorType;
|
|
11
|
+
}
|
|
8
12
|
interface _Unknown extends _Utils {
|
|
9
13
|
errorName: void;
|
|
10
14
|
content: core.Fetcher.Error;
|
|
@@ -13,10 +17,12 @@ export declare namespace Error {
|
|
|
13
17
|
_visit: <_Result>(visitor: CandidApi.guarantor.v1.create.Error._Visitor<_Result>) => _Result;
|
|
14
18
|
}
|
|
15
19
|
interface _Visitor<_Result> {
|
|
20
|
+
encounterHasExistingGuarantorError: (value: CandidApi.guarantor.v1.EncounterHasExistingGuarantorErrorType) => _Result;
|
|
16
21
|
_other: (value: core.Fetcher.Error) => _Result;
|
|
17
22
|
}
|
|
18
23
|
}
|
|
19
24
|
export declare const Error: {
|
|
25
|
+
readonly encounterHasExistingGuarantorError: (value: CandidApi.guarantor.v1.EncounterHasExistingGuarantorErrorType) => CandidApi.guarantor.v1.create.Error.EncounterHasExistingGuarantorError;
|
|
20
26
|
readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.guarantor.v1.create.Error._Unknown;
|
|
21
27
|
readonly _visit: <_Result>(value: CandidApi.guarantor.v1.create.Error, visitor: CandidApi.guarantor.v1.create.Error._Visitor<_Result>) => _Result;
|
|
22
28
|
};
|
|
@@ -29,6 +29,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.Error = void 0;
|
|
30
30
|
const CandidApi = __importStar(require("../../../../.."));
|
|
31
31
|
exports.Error = {
|
|
32
|
+
encounterHasExistingGuarantorError: (value) => {
|
|
33
|
+
return {
|
|
34
|
+
content: value,
|
|
35
|
+
errorName: "EncounterHasExistingGuarantorError",
|
|
36
|
+
_visit: function (visitor) {
|
|
37
|
+
return CandidApi.guarantor.v1.create.Error._visit(this, visitor);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
},
|
|
32
41
|
_unknown: (fetcherError) => {
|
|
33
42
|
return {
|
|
34
43
|
errorName: undefined,
|
|
@@ -40,6 +49,8 @@ exports.Error = {
|
|
|
40
49
|
},
|
|
41
50
|
_visit: (value, visitor) => {
|
|
42
51
|
switch (value.errorName) {
|
|
52
|
+
case "EncounterHasExistingGuarantorError":
|
|
53
|
+
return visitor.encounterHasExistingGuarantorError(value.content);
|
|
43
54
|
default:
|
|
44
55
|
return visitor._other(value);
|
|
45
56
|
}
|
|
@@ -6,7 +6,10 @@ export interface GuarantorUpdate {
|
|
|
6
6
|
firstName?: string;
|
|
7
7
|
lastName?: string;
|
|
8
8
|
externalId?: string;
|
|
9
|
-
dateOfBirth
|
|
10
|
-
address?: CandidApi.
|
|
11
|
-
|
|
9
|
+
dateOfBirth?: string;
|
|
10
|
+
address?: CandidApi.StreetAddressShortZip;
|
|
11
|
+
phoneNumbers?: CandidApi.PhoneNumber[];
|
|
12
|
+
phoneConsent?: boolean;
|
|
13
|
+
email?: CandidApi.Email;
|
|
14
|
+
emailConsent?: boolean;
|
|
12
15
|
}
|