@rinse-dental/open-dental 1.5.1 → 1.7.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/paySplits.d.ts +17 -0
- package/dist/api/paySplits.d.ts.map +1 -0
- package/dist/api/paySplits.js +27 -0
- package/dist/api/procedureCodes.d.ts +22 -0
- package/dist/api/procedureCodes.d.ts.map +1 -0
- package/dist/api/procedureCodes.js +35 -0
- package/dist/openDental.d.ts +10 -0
- package/dist/openDental.d.ts.map +1 -1
- package/dist/openDental.js +20 -0
- package/dist/types/paySplitTypes.d.ts +33 -0
- package/dist/types/paySplitTypes.d.ts.map +1 -0
- package/dist/types/paySplitTypes.js +2 -0
- package/dist/types/paymentTypes.d.ts +1 -2
- package/dist/types/paymentTypes.d.ts.map +1 -1
- package/dist/types/procedureCodeTypes.d.ts +47 -0
- package/dist/types/procedureCodeTypes.d.ts.map +1 -0
- package/dist/types/procedureCodeTypes.js +2 -0
- package/package.json +3 -3
- package/release.sh +4 -3
- package/src/api/paySplits.ts +38 -0
- package/src/api/procedureCodes.ts +45 -0
- package/src/openDental.ts +23 -0
- package/src/types/paySplitTypes.ts +34 -0
- package/src/types/paymentTypes.ts +1 -2
- package/src/types/procedureCodeTypes.ts +48 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import { GetPaySplitsParams } from "../types/paySplitTypes";
|
|
3
|
+
export default class PaySplits {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(httpClient: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Fetch multiple payments with optional filtering and pagination.
|
|
8
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
9
|
+
* @param {number} [params.PatNum] - Optional. Get all PaySplits for a single patient.
|
|
10
|
+
* @param {number} [params.PayNum] - Optional. Get all PaySplits for a single payment.
|
|
11
|
+
* @param {number} [params.ProcNum] - Optional. Get all PaySplits attached to a specific procedure.
|
|
12
|
+
* @param {number} [params.Offset] - Optional. Pagination offset for results.
|
|
13
|
+
* @returns {Promise<PaySplits[]>} - A list of paysplits.
|
|
14
|
+
*/
|
|
15
|
+
getPaySplits({ PatNum, PayNum, ProcNum, Offset, }?: GetPaySplitsParams): Promise<PaySplits[]>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=paySplits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paySplits.d.ts","sourceRoot":"","sources":["../../src/api/paySplits.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAEL,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIpC;;;;;;;;OAQG;IACU,YAAY,CAAC,EACtB,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,GACP,GAAE,kBAAuB,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;CAUlD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class PaySplits {
|
|
4
|
+
httpClient;
|
|
5
|
+
constructor(httpClient) {
|
|
6
|
+
this.httpClient = httpClient;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Fetch multiple payments with optional filtering and pagination.
|
|
10
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
11
|
+
* @param {number} [params.PatNum] - Optional. Get all PaySplits for a single patient.
|
|
12
|
+
* @param {number} [params.PayNum] - Optional. Get all PaySplits for a single payment.
|
|
13
|
+
* @param {number} [params.ProcNum] - Optional. Get all PaySplits attached to a specific procedure.
|
|
14
|
+
* @param {number} [params.Offset] - Optional. Pagination offset for results.
|
|
15
|
+
* @returns {Promise<PaySplits[]>} - A list of paysplits.
|
|
16
|
+
*/
|
|
17
|
+
async getPaySplits({ PatNum, PayNum, ProcNum, Offset, } = {}) {
|
|
18
|
+
const params = {
|
|
19
|
+
PatNum,
|
|
20
|
+
PayNum,
|
|
21
|
+
ProcNum,
|
|
22
|
+
Offset,
|
|
23
|
+
};
|
|
24
|
+
return this.httpClient.get("/paysplits", params);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = PaySplits;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import { ProcedureCode, GetProcedureCodeParams } from "../types/procedureCodeTypes";
|
|
3
|
+
export default class ProcedureCodes {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(httpClient: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Fetch a single inssub by its ID.
|
|
8
|
+
* @param {number} CodeNum - The unique identifier for the inssub.
|
|
9
|
+
* @returns {Promise<ProcedureCode>} - The inssub object.
|
|
10
|
+
* @throws {Error} - If `InsSubNum` is not provided.
|
|
11
|
+
*/
|
|
12
|
+
getProcedureCode(CodeNum: number): Promise<ProcedureCode>;
|
|
13
|
+
/**
|
|
14
|
+
* Fetch multiple inssubs with optional filtering and pagination.
|
|
15
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
16
|
+
* @param {string} [params.DateTStamp] - String in "yyyy-MM-dd HH:mm:ss" format. Get ProcedureCodes altered on and after the specified date and time.
|
|
17
|
+
* @param {number} [params.Offset] - Pagination offset for results.
|
|
18
|
+
* @returns {Promise<ProcedureCode[]>} - A list of inssubs.
|
|
19
|
+
*/
|
|
20
|
+
getProcedureCodes({ DateTStamp, Offset, }?: GetProcedureCodeParams): Promise<ProcedureCode[]>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=procedureCodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"procedureCodes.d.ts","sourceRoot":"","sources":["../../src/api/procedureCodes.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,aAAa,EACb,sBAAsB,EACvB,MAAM,6BAA6B,CAAC;AAErC,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;OAKG;IACU,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAOtE;;;;;;QAMI;IACS,iBAAiB,CAAC,EAC7B,UAAU,EACV,MAAM,GACP,GAAE,sBAA2B,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;CAQ1D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class ProcedureCodes {
|
|
4
|
+
httpClient;
|
|
5
|
+
constructor(httpClient) {
|
|
6
|
+
this.httpClient = httpClient;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Fetch a single inssub by its ID.
|
|
10
|
+
* @param {number} CodeNum - The unique identifier for the inssub.
|
|
11
|
+
* @returns {Promise<ProcedureCode>} - The inssub object.
|
|
12
|
+
* @throws {Error} - If `InsSubNum` is not provided.
|
|
13
|
+
*/
|
|
14
|
+
async getProcedureCode(CodeNum) {
|
|
15
|
+
if (!CodeNum) {
|
|
16
|
+
throw new Error("CodeNum is required.");
|
|
17
|
+
}
|
|
18
|
+
return this.httpClient.get(`/procedurecodes/${CodeNum}`);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Fetch multiple inssubs with optional filtering and pagination.
|
|
22
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
23
|
+
* @param {string} [params.DateTStamp] - String in "yyyy-MM-dd HH:mm:ss" format. Get ProcedureCodes altered on and after the specified date and time.
|
|
24
|
+
* @param {number} [params.Offset] - Pagination offset for results.
|
|
25
|
+
* @returns {Promise<ProcedureCode[]>} - A list of inssubs.
|
|
26
|
+
*/
|
|
27
|
+
async getProcedureCodes({ DateTStamp, Offset, } = {}) {
|
|
28
|
+
const params = {
|
|
29
|
+
DateTStamp,
|
|
30
|
+
Offset,
|
|
31
|
+
};
|
|
32
|
+
return this.httpClient.get("/procedurecodes", params);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = ProcedureCodes;
|
package/dist/openDental.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import Schedules from "./api/schedules";
|
|
|
10
10
|
import Providers from "./api/providers";
|
|
11
11
|
import Operatories from "./api/operatories";
|
|
12
12
|
import Payments from "./api/payments";
|
|
13
|
+
import PaySplits from "./api/paySplits";
|
|
13
14
|
import Definitions from "./api/definitions";
|
|
14
15
|
import DiscountPlanSubs from "./api/discountPlanSubs";
|
|
15
16
|
import FamilyModules from "./api/familyModules";
|
|
@@ -22,6 +23,7 @@ import InsPlans from "./api/insPlans";
|
|
|
22
23
|
import Benefits from "./api/benefits";
|
|
23
24
|
import ClaimProcs from "./api/claimProcs";
|
|
24
25
|
import Adjustments from "./api/adjustments";
|
|
26
|
+
import ProcedureCodes from "./api/procedureCodes";
|
|
25
27
|
declare class OpenDental {
|
|
26
28
|
private static httpClient;
|
|
27
29
|
/**
|
|
@@ -124,6 +126,14 @@ declare class OpenDental {
|
|
|
124
126
|
* Create a new instance of the Adjustments API.
|
|
125
127
|
*/
|
|
126
128
|
static Adjustments(): Adjustments;
|
|
129
|
+
/**
|
|
130
|
+
* Create a new instance of the ProcedureCodes API.
|
|
131
|
+
*/
|
|
132
|
+
static ProcedureCodes(): ProcedureCodes;
|
|
133
|
+
/**
|
|
134
|
+
* Create a new instance of the PaySplits API.
|
|
135
|
+
*/
|
|
136
|
+
static PaySplits(): PaySplits;
|
|
127
137
|
}
|
|
128
138
|
export { OpenDental };
|
|
129
139
|
//# sourceMappingURL=openDental.d.ts.map
|
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;AAC9C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,WAAW,MAAM,mBAAmB,CAAC;
|
|
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;AAC9C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,iBAAiB,CA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,SAAS;IAOzB;;OAEG;WACa,SAAS;IAOzB;;OAEG;WACa,WAAW;IAO3B;;OAEG;WACa,QAAQ;IAOxB;;OAEG;WACW,WAAW;IAOzB;;OAEG;WACW,gBAAgB;IAO9B;;OAEG;WACW,aAAa;IAO3B;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;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;CAOxB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/openDental.js
CHANGED
|
@@ -17,6 +17,7 @@ const schedules_1 = __importDefault(require("./api/schedules"));
|
|
|
17
17
|
const providers_1 = __importDefault(require("./api/providers"));
|
|
18
18
|
const operatories_1 = __importDefault(require("./api/operatories"));
|
|
19
19
|
const payments_1 = __importDefault(require("./api/payments"));
|
|
20
|
+
const paySplits_1 = __importDefault(require("./api/paySplits"));
|
|
20
21
|
const definitions_1 = __importDefault(require("./api/definitions"));
|
|
21
22
|
const discountPlanSubs_1 = __importDefault(require("./api/discountPlanSubs"));
|
|
22
23
|
const familyModules_1 = __importDefault(require("./api/familyModules"));
|
|
@@ -29,6 +30,7 @@ const insPlans_1 = __importDefault(require("./api/insPlans"));
|
|
|
29
30
|
const benefits_1 = __importDefault(require("./api/benefits"));
|
|
30
31
|
const claimProcs_1 = __importDefault(require("./api/claimProcs"));
|
|
31
32
|
const adjustments_1 = __importDefault(require("./api/adjustments"));
|
|
33
|
+
const procedureCodes_1 = __importDefault(require("./api/procedureCodes"));
|
|
32
34
|
class OpenDental {
|
|
33
35
|
static httpClient;
|
|
34
36
|
/**
|
|
@@ -258,5 +260,23 @@ class OpenDental {
|
|
|
258
260
|
}
|
|
259
261
|
return new adjustments_1.default(this.httpClient);
|
|
260
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Create a new instance of the ProcedureCodes API.
|
|
265
|
+
*/
|
|
266
|
+
static ProcedureCodes() {
|
|
267
|
+
if (!this.httpClient) {
|
|
268
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
269
|
+
}
|
|
270
|
+
return new procedureCodes_1.default(this.httpClient);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Create a new instance of the PaySplits API.
|
|
274
|
+
*/
|
|
275
|
+
static PaySplits() {
|
|
276
|
+
if (!this.httpClient) {
|
|
277
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
278
|
+
}
|
|
279
|
+
return new paySplits_1.default(this.httpClient);
|
|
280
|
+
}
|
|
261
281
|
}
|
|
262
282
|
exports.OpenDental = OpenDental;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a payment split in Open Dental
|
|
3
|
+
* @see https://www.opendental.com/site/apipaysplits.html
|
|
4
|
+
*/
|
|
5
|
+
export interface PaySplit {
|
|
6
|
+
SplitNum?: number;
|
|
7
|
+
SplitAmt?: number;
|
|
8
|
+
PatNum?: number;
|
|
9
|
+
PayNum?: number;
|
|
10
|
+
ProvNum?: number;
|
|
11
|
+
PayPlanNum?: number;
|
|
12
|
+
DatePay?: string;
|
|
13
|
+
ProcNum?: number;
|
|
14
|
+
DateEntry?: string;
|
|
15
|
+
UnearnedType?: number;
|
|
16
|
+
unearnedType?: string;
|
|
17
|
+
ClinicNum?: number;
|
|
18
|
+
SecDateTEdit?: string;
|
|
19
|
+
AdjNum?: number;
|
|
20
|
+
PayPlanChargeNum?: number;
|
|
21
|
+
PayPlanDebitType?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parameters for GET Pay Splits.
|
|
25
|
+
* @see https://www.opendental.com/site/apipaysplits.html
|
|
26
|
+
*/
|
|
27
|
+
export interface GetPaySplitsParams {
|
|
28
|
+
PatNum?: number;
|
|
29
|
+
PayNum?: number;
|
|
30
|
+
ProcNum?: number;
|
|
31
|
+
Offset?: number;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=paySplitTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paySplitTypes.d.ts","sourceRoot":"","sources":["../../src/types/paySplitTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paymentTypes.d.ts","sourceRoot":"","sources":["../../src/types/paymentTypes.ts"],"names":[],"mappings":"AAAA
|
|
1
|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IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAG,iBAAiB,GAAG,eAAe,CAAC;CACtD"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a procedure code in the Open Dental system.
|
|
3
|
+
* @see https://www.opendental.com/site/apiprocedurecodes.html
|
|
4
|
+
*/
|
|
5
|
+
export interface ProcedureCode {
|
|
6
|
+
CodeNum?: number;
|
|
7
|
+
ProcCode?: string;
|
|
8
|
+
Descript?: string;
|
|
9
|
+
AbbrDesc?: string;
|
|
10
|
+
ProcTime?: string;
|
|
11
|
+
ProcCat?: number;
|
|
12
|
+
procCat?: string;
|
|
13
|
+
TreatArea?: string;
|
|
14
|
+
NoBillIns?: number;
|
|
15
|
+
IsProsth?: "true" | "false";
|
|
16
|
+
DefaultNote?: string;
|
|
17
|
+
IsHygiene?: "true" | "false";
|
|
18
|
+
AlternateCode1?: string;
|
|
19
|
+
MedicalCode?: string;
|
|
20
|
+
IsTaxed?: "true" | "false";
|
|
21
|
+
PaintType?: string;
|
|
22
|
+
LaymanTerm?: string;
|
|
23
|
+
IsCanadianLab?: "true" | "false";
|
|
24
|
+
BaseUnits?: number;
|
|
25
|
+
SubstitutionCode?: string;
|
|
26
|
+
SubstOnlyIf?: string;
|
|
27
|
+
DateTStamp?: string;
|
|
28
|
+
DrugNDC?: string;
|
|
29
|
+
RevenueCodeDefault?: string;
|
|
30
|
+
ProvNumDefault?: number;
|
|
31
|
+
CanadaTimeUnits?: number;
|
|
32
|
+
IsRadiology?: "true" | "false";
|
|
33
|
+
DefaultClaimNote?: string;
|
|
34
|
+
DefaultTPNote?: string;
|
|
35
|
+
PaintText?: string;
|
|
36
|
+
AreaAlsoToothRange?: "true" | "false";
|
|
37
|
+
DiagnosticCodes?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Gets a list of ProcedureCodes
|
|
41
|
+
* @see https://www.opendental.com/site/apiprocedurecodes.html
|
|
42
|
+
*/
|
|
43
|
+
export interface GetProcedureCodeParams {
|
|
44
|
+
DateTStamp?: string;
|
|
45
|
+
Offset?: number;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=procedureCodeTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"procedureCodeTypes.d.ts","sourceRoot":"","sources":["../../src/types/procedureCodeTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rinse-dental/open-dental",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "A TypeScript library for easily accessing Open Dental APIs.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"url": "git+https://github.com/getrinsed/open-dental.git"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"axios": "^1.
|
|
19
|
-
"moment-timezone": "^0.5.
|
|
18
|
+
"axios": "^1.8.4",
|
|
19
|
+
"moment-timezone": "^0.5.48"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/jest": "^29.5.14",
|
package/release.sh
CHANGED
|
@@ -40,6 +40,7 @@ git push origin "$NEW_TAG"
|
|
|
40
40
|
gh release create "$NEW_TAG" --title "Release $NEW_TAG" --notes "$COMMIT_MSG"
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
#example ./release.sh "
|
|
44
|
-
#example ./release.sh "Added
|
|
45
|
-
#example ./release.sh "Some commit message" major
|
|
43
|
+
#example ./release.sh "added adjustments to index" patch
|
|
44
|
+
#example ./release.sh "Added procedure codes" minor
|
|
45
|
+
#example ./release.sh "Some commit message" major
|
|
46
|
+
#npm token: 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
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import {
|
|
3
|
+
PaySplit,
|
|
4
|
+
GetPaySplitsParams,
|
|
5
|
+
} from "../types/paySplitTypes";
|
|
6
|
+
|
|
7
|
+
export default class PaySplits {
|
|
8
|
+
private httpClient: HttpClient;
|
|
9
|
+
|
|
10
|
+
constructor(httpClient: HttpClient) {
|
|
11
|
+
this.httpClient = httpClient;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Fetch multiple payments with optional filtering and pagination.
|
|
16
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
17
|
+
* @param {number} [params.PatNum] - Optional. Get all PaySplits for a single patient.
|
|
18
|
+
* @param {number} [params.PayNum] - Optional. Get all PaySplits for a single payment.
|
|
19
|
+
* @param {number} [params.ProcNum] - Optional. Get all PaySplits attached to a specific procedure.
|
|
20
|
+
* @param {number} [params.Offset] - Optional. Pagination offset for results.
|
|
21
|
+
* @returns {Promise<PaySplits[]>} - A list of paysplits.
|
|
22
|
+
*/
|
|
23
|
+
public async getPaySplits({
|
|
24
|
+
PatNum,
|
|
25
|
+
PayNum,
|
|
26
|
+
ProcNum,
|
|
27
|
+
Offset,
|
|
28
|
+
}: GetPaySplitsParams = {}): Promise<PaySplits[]> {
|
|
29
|
+
const params = {
|
|
30
|
+
PatNum,
|
|
31
|
+
PayNum,
|
|
32
|
+
ProcNum,
|
|
33
|
+
Offset,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return this.httpClient.get<PaySplits[]>("/paysplits", params);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import {
|
|
3
|
+
ProcedureCode,
|
|
4
|
+
GetProcedureCodeParams,
|
|
5
|
+
} from "../types/procedureCodeTypes";
|
|
6
|
+
|
|
7
|
+
export default class ProcedureCodes {
|
|
8
|
+
private httpClient: HttpClient;
|
|
9
|
+
|
|
10
|
+
constructor(httpClient: HttpClient) {
|
|
11
|
+
this.httpClient = httpClient;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Fetch a single inssub by its ID.
|
|
16
|
+
* @param {number} CodeNum - The unique identifier for the inssub.
|
|
17
|
+
* @returns {Promise<ProcedureCode>} - The inssub object.
|
|
18
|
+
* @throws {Error} - If `InsSubNum` is not provided.
|
|
19
|
+
*/
|
|
20
|
+
public async getProcedureCode(CodeNum: number): Promise<ProcedureCode> {
|
|
21
|
+
if (!CodeNum) {
|
|
22
|
+
throw new Error("CodeNum is required.");
|
|
23
|
+
}
|
|
24
|
+
return this.httpClient.get<ProcedureCode>(`/procedurecodes/${CodeNum}`);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Fetch multiple inssubs with optional filtering and pagination.
|
|
29
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
30
|
+
* @param {string} [params.DateTStamp] - String in "yyyy-MM-dd HH:mm:ss" format. Get ProcedureCodes altered on and after the specified date and time.
|
|
31
|
+
* @param {number} [params.Offset] - Pagination offset for results.
|
|
32
|
+
* @returns {Promise<ProcedureCode[]>} - A list of inssubs.
|
|
33
|
+
*/
|
|
34
|
+
public async getProcedureCodes({
|
|
35
|
+
DateTStamp,
|
|
36
|
+
Offset,
|
|
37
|
+
}: GetProcedureCodeParams = {}): Promise<ProcedureCode[]> {
|
|
38
|
+
const params = {
|
|
39
|
+
DateTStamp,
|
|
40
|
+
Offset,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return this.httpClient.get<ProcedureCode[]>("/procedurecodes", params);
|
|
44
|
+
}
|
|
45
|
+
}
|
package/src/openDental.ts
CHANGED
|
@@ -11,6 +11,7 @@ import Schedules from "./api/schedules";
|
|
|
11
11
|
import Providers from "./api/providers";
|
|
12
12
|
import Operatories from "./api/operatories";
|
|
13
13
|
import Payments from "./api/payments";
|
|
14
|
+
import PaySplits from "./api/paySplits";
|
|
14
15
|
import Definitions from "./api/definitions";
|
|
15
16
|
import DiscountPlanSubs from "./api/discountPlanSubs";
|
|
16
17
|
import FamilyModules from "./api/familyModules";
|
|
@@ -23,6 +24,7 @@ import InsPlans from "./api/insPlans";
|
|
|
23
24
|
import Benefits from "./api/benefits";
|
|
24
25
|
import ClaimProcs from "./api/claimProcs";
|
|
25
26
|
import Adjustments from "./api/adjustments";
|
|
27
|
+
import ProcedureCodes from "./api/procedureCodes";
|
|
26
28
|
|
|
27
29
|
class OpenDental {
|
|
28
30
|
private static httpClient: HttpClient;
|
|
@@ -281,6 +283,27 @@ class OpenDental {
|
|
|
281
283
|
}
|
|
282
284
|
return new Adjustments(this.httpClient);
|
|
283
285
|
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Create a new instance of the ProcedureCodes API.
|
|
289
|
+
*/
|
|
290
|
+
public static ProcedureCodes() {
|
|
291
|
+
if (!this.httpClient) {
|
|
292
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
293
|
+
}
|
|
294
|
+
return new ProcedureCodes(this.httpClient);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Create a new instance of the PaySplits API.
|
|
299
|
+
*/
|
|
300
|
+
public static PaySplits() {
|
|
301
|
+
if (!this.httpClient) {
|
|
302
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
303
|
+
}
|
|
304
|
+
return new PaySplits(this.httpClient);
|
|
305
|
+
}
|
|
306
|
+
|
|
284
307
|
}
|
|
285
308
|
|
|
286
309
|
export { OpenDental };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a payment split in Open Dental
|
|
3
|
+
* @see https://www.opendental.com/site/apipaysplits.html
|
|
4
|
+
*/
|
|
5
|
+
export interface PaySplit {
|
|
6
|
+
SplitNum?: number; //
|
|
7
|
+
SplitAmt?: number; //
|
|
8
|
+
PatNum?: number; //
|
|
9
|
+
PayNum?: number; //
|
|
10
|
+
ProvNum?: number; //
|
|
11
|
+
PayPlanNum?: number; //
|
|
12
|
+
DatePay?: string; //String in "yyyy-MM-dd" format.
|
|
13
|
+
ProcNum?: number; //
|
|
14
|
+
DateEntry?: string; //String in "yyyy-MM-dd" format.
|
|
15
|
+
UnearnedType?: number; //
|
|
16
|
+
unearnedType?: string; //
|
|
17
|
+
ClinicNum?: number; //
|
|
18
|
+
SecDateTEdit?: string; //String in "yyyy-MM-dd" format.
|
|
19
|
+
AdjNum?: number; //
|
|
20
|
+
PayPlanChargeNum?: number; //
|
|
21
|
+
PayPlanDebitType?: string; //
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Parameters for GET Pay Splits.
|
|
26
|
+
* @see https://www.opendental.com/site/apipaysplits.html
|
|
27
|
+
*/
|
|
28
|
+
export interface GetPaySplitsParams {
|
|
29
|
+
PatNum?: number; //Optional. Get all PaySplits for a single patient.
|
|
30
|
+
PayNum?: number; //Optional. Get all PaySplits for a single payment.
|
|
31
|
+
ProcNum?: number; //Optional. Get all PaySplits attached to a specific procedure.
|
|
32
|
+
Offset?: number; // Pagination offset for results
|
|
33
|
+
}
|
|
34
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a procedure code in the Open Dental system.
|
|
3
|
+
* @see https://www.opendental.com/site/apiprocedurecodes.html
|
|
4
|
+
*/
|
|
5
|
+
export interface ProcedureCode {
|
|
6
|
+
CodeNum?: number; //PK
|
|
7
|
+
ProcCode?: string; //
|
|
8
|
+
Descript?: string; //
|
|
9
|
+
AbbrDesc?: string; //
|
|
10
|
+
ProcTime?: string; //
|
|
11
|
+
ProcCat?: number; //
|
|
12
|
+
procCat?: string; //
|
|
13
|
+
TreatArea?: string; //
|
|
14
|
+
NoBillIns?: number; //
|
|
15
|
+
IsProsth?: "true" | "false"; //
|
|
16
|
+
DefaultNote?: string; //
|
|
17
|
+
IsHygiene?: "true" | "false"; //
|
|
18
|
+
AlternateCode1?: string; //
|
|
19
|
+
MedicalCode?: string; //
|
|
20
|
+
IsTaxed?: "true" | "false"; //
|
|
21
|
+
PaintType?: string; //
|
|
22
|
+
LaymanTerm?: string; //
|
|
23
|
+
IsCanadianLab?: "true" | "false"; //
|
|
24
|
+
BaseUnits?: number; //
|
|
25
|
+
SubstitutionCode?: string; //
|
|
26
|
+
SubstOnlyIf?: string; //
|
|
27
|
+
DateTStamp?: string; //String in "yyyy-MM-dd HH:mm:ss" format.
|
|
28
|
+
DrugNDC?: string; //
|
|
29
|
+
RevenueCodeDefault?: string; //
|
|
30
|
+
ProvNumDefault?: number; //
|
|
31
|
+
CanadaTimeUnits?: number; //
|
|
32
|
+
IsRadiology?: "true" | "false"; //
|
|
33
|
+
DefaultClaimNote?: string; //
|
|
34
|
+
DefaultTPNote?: string; //
|
|
35
|
+
PaintText?: string; //
|
|
36
|
+
AreaAlsoToothRange?: "true" | "false"; //
|
|
37
|
+
DiagnosticCodes?: string; //
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Gets a list of ProcedureCodes
|
|
42
|
+
* @see https://www.opendental.com/site/apiprocedurecodes.html
|
|
43
|
+
*/
|
|
44
|
+
export interface GetProcedureCodeParams {
|
|
45
|
+
DateTStamp?: string; //String in "yyyy-MM-dd HH:mm:ss" format. Get ProcedureCodes altered on and after the specified date and time.
|
|
46
|
+
Offset?: number; // Pagination offset for results
|
|
47
|
+
}
|
|
48
|
+
|