@rinse-dental/open-dental 3.0.0 → 3.1.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/api/insVerifies.d.ts +36 -0
- package/dist/api/insVerifies.d.ts.map +1 -0
- package/dist/api/insVerifies.js +62 -0
- package/dist/openDental.d.ts +5 -0
- package/dist/openDental.d.ts.map +1 -1
- package/dist/openDental.js +10 -0
- package/dist/types/insVerifiesTypes.d.ts +36 -0
- package/dist/types/insVerifiesTypes.d.ts.map +1 -0
- package/dist/types/insVerifiesTypes.js +2 -0
- package/package.json +1 -1
- package/release.sh +1 -1
- package/src/api/insVerifies.ts +85 -0
- package/src/openDental.ts +11 -0
- package/src/types/insVerifiesTypes.ts +38 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import { InsVerify, GetInsVerifiesParams, UpdateInsVerifiesParams } from "../types/insVerifiesTypes";
|
|
3
|
+
export default class InsVerifies {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(httpClient: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Fetch a single InsVerifies by its ID.
|
|
8
|
+
* @param {number} InsVerifyNum - The ID of the InsVerifies.
|
|
9
|
+
* @returns {Promise<InsVerify>} - The InsVerifies data.
|
|
10
|
+
* @throws {Error} - If `InsVerify` is not valid or the API returns an error.
|
|
11
|
+
*/
|
|
12
|
+
getInsVerify(InsVerifyNum: number): Promise<InsVerify>;
|
|
13
|
+
/**
|
|
14
|
+
* Fetch multiple InsVerifies with optional filtering and pagination.
|
|
15
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
16
|
+
* @param {"PatientEnrollment" | "InsuranceBenefit" } [params.VerifyType] - Required if FKey is specified. Either "PatientEnrollment" to verify a patient's insurance eligibility, or "InsuranceBenefit" to verify an insurance plan's benefits.
|
|
17
|
+
* @param {number} [params.FKey] - (Added in version 24.4.17) FK to patplan.PatPlanNum or FK to insplan.PlanNum depending on the VerifyType.
|
|
18
|
+
* @param {number} [params.SecDateTEdit] - Only include InsVerifies with a SecDateTEdit altered after the specified date and time. String in "yyyy-MM-dd HH:mm:ss" format.
|
|
19
|
+
* @param {number} [params.Offset] - Pagination offset for results.
|
|
20
|
+
* @returns {Promise<InsVerify[]>} - A list of InsVerifies.
|
|
21
|
+
*/
|
|
22
|
+
getInsVerifies({ VerifyType, FKey, SecDateTEdit, Offset, }?: GetInsVerifiesParams): Promise<InsVerify[]>;
|
|
23
|
+
/**
|
|
24
|
+
* This adds an InsVerify row to the database.
|
|
25
|
+
* @param {Object} data - The details of the InsVerify to create.
|
|
26
|
+
* @param {string} [data.DateLastVerified] - (Optional after version 24.1.17) String in "yyyy-MM-dd" format.
|
|
27
|
+
* @param {"PatientEnrollment" | "InsuranceBenefit" } data.VerifyType - Required. Can be either "PatientEnrollment" to verify a patient's insurance eligibility, or "InsuranceBenefit" to verify an insurance plan's benefits.
|
|
28
|
+
* @param {number} data.FKey - Required. If "PatientEnrollment" was passed in for VerifyType, then FKey must be a valid patplan.PatPlanNum. If "InsuranceBenefit" was passed in for VerifyType, FKey must be a valid insplan.PlanNum.
|
|
29
|
+
* @param {number} [data.DefNum] - Optional. Must be a valid DefNum where definition.Category=38.
|
|
30
|
+
* @param {"string"} [data.Note] - (Added in version 24.1.17) Optional. Status note for this insurance verification.
|
|
31
|
+
* @returns {Promise<InsVerify>} - The created InsVerify.
|
|
32
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
33
|
+
*/
|
|
34
|
+
createInsVerifies({ DateLastVerified, VerifyType, FKey, DefNum, Note, }: UpdateInsVerifiesParams): Promise<InsVerify>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=insVerifies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insVerifies.d.ts","sourceRoot":"","sources":["../../src/api/insVerifies.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;OAKG;IACU,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IASnE;;;;;;;;QAQI;IACS,cAAc,CAAC,EAC1B,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,MAAM,GACP,GAAE,oBAAyB,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAWnD;;;;;;;;;;OAUG;IACU,iBAAiB,CAAC,EAC7B,gBAAgB,EAChB,UAAU,EACV,IAAI,EACJ,MAAM,EACN,IAAI,GACL,EAAG,uBAAuB,GAAG,OAAO,CAAC,SAAS,CAAC;CAajD"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class InsVerifies {
|
|
4
|
+
httpClient;
|
|
5
|
+
constructor(httpClient) {
|
|
6
|
+
this.httpClient = httpClient;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Fetch a single InsVerifies by its ID.
|
|
10
|
+
* @param {number} InsVerifyNum - The ID of the InsVerifies.
|
|
11
|
+
* @returns {Promise<InsVerify>} - The InsVerifies data.
|
|
12
|
+
* @throws {Error} - If `InsVerify` is not valid or the API returns an error.
|
|
13
|
+
*/
|
|
14
|
+
async getInsVerify(InsVerifyNum) {
|
|
15
|
+
if (!InsVerifyNum || typeof InsVerifyNum !== "number") {
|
|
16
|
+
throw new Error("Invalid parameter: InsVerifyNum must be a valid number.");
|
|
17
|
+
}
|
|
18
|
+
return await this.httpClient.get(`/insverifies/${InsVerifyNum}`);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Fetch multiple InsVerifies with optional filtering and pagination.
|
|
22
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
23
|
+
* @param {"PatientEnrollment" | "InsuranceBenefit" } [params.VerifyType] - Required if FKey is specified. Either "PatientEnrollment" to verify a patient's insurance eligibility, or "InsuranceBenefit" to verify an insurance plan's benefits.
|
|
24
|
+
* @param {number} [params.FKey] - (Added in version 24.4.17) FK to patplan.PatPlanNum or FK to insplan.PlanNum depending on the VerifyType.
|
|
25
|
+
* @param {number} [params.SecDateTEdit] - Only include InsVerifies with a SecDateTEdit altered after the specified date and time. String in "yyyy-MM-dd HH:mm:ss" format.
|
|
26
|
+
* @param {number} [params.Offset] - Pagination offset for results.
|
|
27
|
+
* @returns {Promise<InsVerify[]>} - A list of InsVerifies.
|
|
28
|
+
*/
|
|
29
|
+
async getInsVerifies({ VerifyType, FKey, SecDateTEdit, Offset, } = {}) {
|
|
30
|
+
const params = {
|
|
31
|
+
VerifyType,
|
|
32
|
+
FKey,
|
|
33
|
+
SecDateTEdit,
|
|
34
|
+
Offset,
|
|
35
|
+
};
|
|
36
|
+
return this.httpClient.get("/insverifies", params);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* This adds an InsVerify row to the database.
|
|
40
|
+
* @param {Object} data - The details of the InsVerify to create.
|
|
41
|
+
* @param {string} [data.DateLastVerified] - (Optional after version 24.1.17) String in "yyyy-MM-dd" format.
|
|
42
|
+
* @param {"PatientEnrollment" | "InsuranceBenefit" } data.VerifyType - Required. Can be either "PatientEnrollment" to verify a patient's insurance eligibility, or "InsuranceBenefit" to verify an insurance plan's benefits.
|
|
43
|
+
* @param {number} data.FKey - Required. If "PatientEnrollment" was passed in for VerifyType, then FKey must be a valid patplan.PatPlanNum. If "InsuranceBenefit" was passed in for VerifyType, FKey must be a valid insplan.PlanNum.
|
|
44
|
+
* @param {number} [data.DefNum] - Optional. Must be a valid DefNum where definition.Category=38.
|
|
45
|
+
* @param {"string"} [data.Note] - (Added in version 24.1.17) Optional. Status note for this insurance verification.
|
|
46
|
+
* @returns {Promise<InsVerify>} - The created InsVerify.
|
|
47
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
48
|
+
*/
|
|
49
|
+
async createInsVerifies({ DateLastVerified, VerifyType, FKey, DefNum, Note, }) {
|
|
50
|
+
if (!VerifyType || !FKey) {
|
|
51
|
+
throw new Error("Invalid data: VerifyType and FKey are required.");
|
|
52
|
+
}
|
|
53
|
+
return this.httpClient.put("/insverifies", {
|
|
54
|
+
DateLastVerified,
|
|
55
|
+
VerifyType,
|
|
56
|
+
FKey,
|
|
57
|
+
DefNum,
|
|
58
|
+
Note,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.default = InsVerifies;
|
package/dist/openDental.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ import ProcNotes from "./api/procNotes";
|
|
|
36
36
|
import Queries from "./api/queries";
|
|
37
37
|
import SecurityLogs from "./api/securityLogs";
|
|
38
38
|
import AppointmentTypes from "./api/appointmentTypes";
|
|
39
|
+
import InsVerifies from "./api/insVerifies";
|
|
39
40
|
import * as Transformers from './transformers';
|
|
40
41
|
declare class OpenDental {
|
|
41
42
|
private static httpClient;
|
|
@@ -195,6 +196,10 @@ declare class OpenDental {
|
|
|
195
196
|
* Create a new instance of the SecurityLogs API.
|
|
196
197
|
*/
|
|
197
198
|
static AppointmentTypes(): AppointmentTypes;
|
|
199
|
+
/**
|
|
200
|
+
* Create a new instance of the InsVerifies API.
|
|
201
|
+
*/
|
|
202
|
+
static InsVerifies(): InsVerifies;
|
|
198
203
|
/**
|
|
199
204
|
* Access stateless Transformers (no initialization needed)
|
|
200
205
|
*/
|
package/dist/openDental.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openDental.d.ts","sourceRoot":"","sources":["../src/openDental.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,YAAY,MAAM,oBAAoB,CAAC;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G;WACW,QAAQ;IAOtB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,WAAW;IAOzB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,UAAU;IAOxB;;OAEG;WACW,WAAW;IAOzB;;OAEG;WACW,cAAc;IAO5B;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,IAAI;IAOlB;;KAEC;WACa,SAAS;IAOvB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,cAAc;IAO5B;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,YAAY;IAO1B;;KAEC;WACa,gBAAgB;IAO9B;;KAEC;WACa,WAAW;IAOzB;;OAEG;WACW,YAAY;CAI3B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/openDental.js
CHANGED
|
@@ -76,6 +76,7 @@ const procNotes_1 = __importDefault(require("./api/procNotes"));
|
|
|
76
76
|
const queries_1 = __importDefault(require("./api/queries"));
|
|
77
77
|
const securityLogs_1 = __importDefault(require("./api/securityLogs"));
|
|
78
78
|
const appointmentTypes_1 = __importDefault(require("./api/appointmentTypes"));
|
|
79
|
+
const insVerifies_1 = __importDefault(require("./api/insVerifies"));
|
|
79
80
|
const Transformers = __importStar(require("./transformers"));
|
|
80
81
|
class OpenDental {
|
|
81
82
|
static httpClient;
|
|
@@ -432,6 +433,15 @@ class OpenDental {
|
|
|
432
433
|
}
|
|
433
434
|
return new appointmentTypes_1.default(this.httpClient);
|
|
434
435
|
}
|
|
436
|
+
/**
|
|
437
|
+
* Create a new instance of the InsVerifies API.
|
|
438
|
+
*/
|
|
439
|
+
static InsVerifies() {
|
|
440
|
+
if (!this.httpClient) {
|
|
441
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
442
|
+
}
|
|
443
|
+
return new insVerifies_1.default(this.httpClient);
|
|
444
|
+
}
|
|
435
445
|
/**
|
|
436
446
|
* Access stateless Transformers (no initialization needed)
|
|
437
447
|
*/
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://www.opendental.com/site/apiinsverifies.html
|
|
3
|
+
*/
|
|
4
|
+
export interface InsVerify {
|
|
5
|
+
InsVerifyNum?: number;
|
|
6
|
+
DateLastVerified?: string;
|
|
7
|
+
UserNum?: number;
|
|
8
|
+
VerifyType?: string;
|
|
9
|
+
FKey?: number;
|
|
10
|
+
DefNum?: number;
|
|
11
|
+
Note?: string;
|
|
12
|
+
DateLastAssigned?: string;
|
|
13
|
+
SecDateTEdit?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Gets insurance verifications.
|
|
17
|
+
* @see https://www.opendental.com/site/apiinsverifies.html
|
|
18
|
+
*/
|
|
19
|
+
export interface GetInsVerifiesParams {
|
|
20
|
+
VerifyType?: string;
|
|
21
|
+
FKey?: number;
|
|
22
|
+
SecDateTEdit?: string;
|
|
23
|
+
Offset?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Parameters to update an InsVerifies.
|
|
27
|
+
* @see https://www.opendental.com/site/apiinsverifies.html
|
|
28
|
+
*/
|
|
29
|
+
export interface UpdateInsVerifiesParams {
|
|
30
|
+
DateLastVerified?: string;
|
|
31
|
+
VerifyType: string;
|
|
32
|
+
FKey: number;
|
|
33
|
+
DefNum?: number;
|
|
34
|
+
Note?: string;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=insVerifiesTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insVerifiesTypes.d.ts","sourceRoot":"","sources":["../../src/types/insVerifiesTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
package/package.json
CHANGED
package/release.sh
CHANGED
|
@@ -41,7 +41,7 @@ gh release create "$NEW_TAG" --title "Release $NEW_TAG" --notes "$COMMIT_MSG"
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
#example ./release.sh "updated axios error return" patch
|
|
44
|
-
#example ./release.sh "Added
|
|
44
|
+
#example ./release.sh "Added InsVerifies" minor
|
|
45
45
|
#example ./release.sh "Some commit message" major
|
|
46
46
|
|
|
47
47
|
#./release.sh "Added readme" patch
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import {
|
|
3
|
+
InsVerify,
|
|
4
|
+
GetInsVerifiesParams,
|
|
5
|
+
UpdateInsVerifiesParams,
|
|
6
|
+
} from "../types/insVerifiesTypes";
|
|
7
|
+
|
|
8
|
+
export default class InsVerifies {
|
|
9
|
+
private httpClient: HttpClient;
|
|
10
|
+
|
|
11
|
+
constructor(httpClient: HttpClient) {
|
|
12
|
+
this.httpClient = httpClient;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Fetch a single InsVerifies by its ID.
|
|
17
|
+
* @param {number} InsVerifyNum - The ID of the InsVerifies.
|
|
18
|
+
* @returns {Promise<InsVerify>} - The InsVerifies data.
|
|
19
|
+
* @throws {Error} - If `InsVerify` is not valid or the API returns an error.
|
|
20
|
+
*/
|
|
21
|
+
public async getInsVerify(InsVerifyNum: number): Promise<InsVerify> {
|
|
22
|
+
if (!InsVerifyNum || typeof InsVerifyNum !== "number") {
|
|
23
|
+
throw new Error("Invalid parameter: InsVerifyNum must be a valid number.");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return await this.httpClient.get<InsVerify>(`/insverifies/${InsVerifyNum}`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Fetch multiple InsVerifies with optional filtering and pagination.
|
|
32
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
33
|
+
* @param {"PatientEnrollment" | "InsuranceBenefit" } [params.VerifyType] - Required if FKey is specified. Either "PatientEnrollment" to verify a patient's insurance eligibility, or "InsuranceBenefit" to verify an insurance plan's benefits.
|
|
34
|
+
* @param {number} [params.FKey] - (Added in version 24.4.17) FK to patplan.PatPlanNum or FK to insplan.PlanNum depending on the VerifyType.
|
|
35
|
+
* @param {number} [params.SecDateTEdit] - Only include InsVerifies with a SecDateTEdit altered after the specified date and time. String in "yyyy-MM-dd HH:mm:ss" format.
|
|
36
|
+
* @param {number} [params.Offset] - Pagination offset for results.
|
|
37
|
+
* @returns {Promise<InsVerify[]>} - A list of InsVerifies.
|
|
38
|
+
*/
|
|
39
|
+
public async getInsVerifies({
|
|
40
|
+
VerifyType,
|
|
41
|
+
FKey,
|
|
42
|
+
SecDateTEdit,
|
|
43
|
+
Offset,
|
|
44
|
+
}: GetInsVerifiesParams = {}): Promise<InsVerify[]> {
|
|
45
|
+
const params = {
|
|
46
|
+
VerifyType,
|
|
47
|
+
FKey,
|
|
48
|
+
SecDateTEdit,
|
|
49
|
+
Offset,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
return this.httpClient.get<InsVerify[]>("/insverifies", params);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* This adds an InsVerify row to the database.
|
|
57
|
+
* @param {Object} data - The details of the InsVerify to create.
|
|
58
|
+
* @param {string} [data.DateLastVerified] - (Optional after version 24.1.17) String in "yyyy-MM-dd" format.
|
|
59
|
+
* @param {"PatientEnrollment" | "InsuranceBenefit" } data.VerifyType - Required. Can be either "PatientEnrollment" to verify a patient's insurance eligibility, or "InsuranceBenefit" to verify an insurance plan's benefits.
|
|
60
|
+
* @param {number} data.FKey - Required. If "PatientEnrollment" was passed in for VerifyType, then FKey must be a valid patplan.PatPlanNum. If "InsuranceBenefit" was passed in for VerifyType, FKey must be a valid insplan.PlanNum.
|
|
61
|
+
* @param {number} [data.DefNum] - Optional. Must be a valid DefNum where definition.Category=38.
|
|
62
|
+
* @param {"string"} [data.Note] - (Added in version 24.1.17) Optional. Status note for this insurance verification.
|
|
63
|
+
* @returns {Promise<InsVerify>} - The created InsVerify.
|
|
64
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
65
|
+
*/
|
|
66
|
+
public async createInsVerifies({
|
|
67
|
+
DateLastVerified,
|
|
68
|
+
VerifyType,
|
|
69
|
+
FKey,
|
|
70
|
+
DefNum,
|
|
71
|
+
Note,
|
|
72
|
+
} : UpdateInsVerifiesParams): Promise<InsVerify> {
|
|
73
|
+
if (!VerifyType || !FKey) {
|
|
74
|
+
throw new Error("Invalid data: VerifyType and FKey are required.");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return this.httpClient.put<InsVerify>("/insverifies", {
|
|
78
|
+
DateLastVerified,
|
|
79
|
+
VerifyType,
|
|
80
|
+
FKey,
|
|
81
|
+
DefNum,
|
|
82
|
+
Note,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
package/src/openDental.ts
CHANGED
|
@@ -37,6 +37,7 @@ import ProcNotes from "./api/procNotes";
|
|
|
37
37
|
import Queries from "./api/queries";
|
|
38
38
|
import SecurityLogs from "./api/securityLogs";
|
|
39
39
|
import AppointmentTypes from "./api/appointmentTypes";
|
|
40
|
+
import InsVerifies from "./api/insVerifies";
|
|
40
41
|
|
|
41
42
|
import * as Transformers from './transformers';
|
|
42
43
|
|
|
@@ -439,6 +440,16 @@ class OpenDental {
|
|
|
439
440
|
return new AppointmentTypes(this.httpClient);
|
|
440
441
|
}
|
|
441
442
|
|
|
443
|
+
/**
|
|
444
|
+
* Create a new instance of the InsVerifies API.
|
|
445
|
+
*/
|
|
446
|
+
public static InsVerifies() {
|
|
447
|
+
if (!this.httpClient) {
|
|
448
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
449
|
+
}
|
|
450
|
+
return new InsVerifies(this.httpClient);
|
|
451
|
+
}
|
|
452
|
+
|
|
442
453
|
/**
|
|
443
454
|
* Access stateless Transformers (no initialization needed)
|
|
444
455
|
*/
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://www.opendental.com/site/apiinsverifies.html
|
|
3
|
+
*/
|
|
4
|
+
export interface InsVerify {
|
|
5
|
+
InsVerifyNum?: number; // PK
|
|
6
|
+
DateLastVerified?: string; // String in "yyyy-MM-dd" format
|
|
7
|
+
UserNum?: number; //
|
|
8
|
+
VerifyType?: string; //
|
|
9
|
+
FKey?: number; //
|
|
10
|
+
DefNum?: number; //
|
|
11
|
+
Note?: string; //
|
|
12
|
+
DateLastAssigned?: string; // String in "yyyy-MM-dd" format
|
|
13
|
+
SecDateTEdit?: string; // String in "yyyy-MM-dd HH:mm:ss" format
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Gets insurance verifications.
|
|
18
|
+
* @see https://www.opendental.com/site/apiinsverifies.html
|
|
19
|
+
*/
|
|
20
|
+
export interface GetInsVerifiesParams {
|
|
21
|
+
VerifyType?: string; // Required if FKey is specified. Either "PatientEnrollment" to verify a patient's insurance eligibility, or "InsuranceBenefit" to verify an insurance plan's benefits.
|
|
22
|
+
FKey?: number; // (Added in version 24.4.17) FK to patplan.PatPlanNum or FK to insplan.PlanNum depending on the VerifyType.
|
|
23
|
+
SecDateTEdit?: string; // Only include InsVerifies with a SecDateTEdit altered after the specified date and time. String in "yyyy-MM-dd HH:mm:ss" format.
|
|
24
|
+
Offset?: number; // Pagination offset for results
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Parameters to update an InsVerifies.
|
|
29
|
+
* @see https://www.opendental.com/site/apiinsverifies.html
|
|
30
|
+
*/
|
|
31
|
+
export interface UpdateInsVerifiesParams {
|
|
32
|
+
DateLastVerified?: string; // (Optional after version 24.1.17) String in "yyyy-MM-dd" format.
|
|
33
|
+
VerifyType: string; // Required. Can be either "PatientEnrollment" to verify a patient's insurance eligibility, or "InsuranceBenefit" to verify an insurance plan's benefits.
|
|
34
|
+
FKey: number; // Required. If "PatientEnrollment" was passed in for VerifyType, then FKey must be a valid patplan.PatPlanNum. If "InsuranceBenefit" was passed in for VerifyType, FKey must be a valid insplan.PlanNum.
|
|
35
|
+
DefNum?: number; // Optional. Must be a valid DefNum where definition.Category=38.
|
|
36
|
+
Note?: string; // (Added in version 24.1.17) Optional. Status note for this insurance verification.
|
|
37
|
+
}
|
|
38
|
+
|