@rinse-dental/open-dental 1.8.0 → 2.0.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/.vscode/settings.json +0 -3
- package/dist/api/appointments.d.ts +2 -1
- package/dist/api/appointments.d.ts.map +1 -1
- package/dist/api/appointments.js +3 -1
- package/dist/api/discountPlanSubs.d.ts +1 -1
- package/dist/api/discountPlanSubs.d.ts.map +1 -1
- package/dist/api/discountPlanSubs.js +1 -1
- package/dist/api/discountPlans.d.ts +62 -0
- package/dist/api/discountPlans.d.ts.map +1 -0
- package/dist/api/discountPlans.js +113 -0
- package/dist/api/fees.d.ts +18 -0
- package/dist/api/fees.d.ts.map +1 -0
- package/dist/api/fees.js +29 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +7 -1
- package/dist/api/treatplanattaches.d.ts +34 -0
- package/dist/api/treatplanattaches.d.ts.map +1 -0
- package/dist/api/treatplanattaches.js +52 -0
- package/dist/openDental.d.ts +15 -0
- package/dist/openDental.d.ts.map +1 -1
- package/dist/openDental.js +30 -0
- package/dist/types/DiscountPlanTypes.d.ts +67 -0
- package/dist/types/DiscountPlanTypes.d.ts.map +1 -0
- package/dist/types/DiscountPlanTypes.js +2 -0
- package/dist/types/appointmentTypes.d.ts +1 -0
- package/dist/types/appointmentTypes.d.ts.map +1 -1
- package/dist/types/feeTypes.d.ts +46 -0
- package/dist/types/feeTypes.d.ts.map +1 -0
- package/dist/types/feeTypes.js +2 -0
- package/dist/types/treatPlanAttachTypes.d.ts +37 -0
- package/dist/types/treatPlanAttachTypes.d.ts.map +1 -0
- package/dist/types/treatPlanAttachTypes.js +2 -0
- package/package.json +3 -3
- package/release.sh +3 -1
- package/src/api/appointments.ts +3 -0
- package/src/api/discountPlanSubs.ts +1 -2
- package/src/api/discountPlans.ts +159 -0
- package/src/api/fees.ts +43 -0
- package/src/api/index.ts +3 -0
- package/src/api/treatplanattaches.ts +67 -0
- package/src/openDental.ts +33 -0
- package/src/types/DiscountPlanTypes.ts +70 -0
- package/src/types/appointmentTypes.ts +1 -0
- package/src/types/feeTypes.ts +49 -0
- package/src/types/treatPlanAttachTypes.ts +39 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a discount plan in the Open Dental system.
|
|
3
|
+
* @see https://www.opendental.com/site/apidiscountplans.html
|
|
4
|
+
*/
|
|
5
|
+
export interface DiscountPlan {
|
|
6
|
+
DiscountPlanNum?: number;
|
|
7
|
+
Description?: string;
|
|
8
|
+
FeeSchedNum?: number;
|
|
9
|
+
DefNum?: number;
|
|
10
|
+
IsHidden?: 'true' | 'false';
|
|
11
|
+
PlanNote?: string;
|
|
12
|
+
ExamFreqLimit?: number;
|
|
13
|
+
XrayFreqLimit?: number;
|
|
14
|
+
ProphyFreqLimit?: number;
|
|
15
|
+
FluorideFreqLimit?: number;
|
|
16
|
+
PerioFreqLimit?: number;
|
|
17
|
+
LimitedExamFreqLimit?: number;
|
|
18
|
+
PAFreqLimit?: number;
|
|
19
|
+
AnnualMax?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Parameters for GET discount plans.
|
|
23
|
+
* @see https://www.opendental.com/site/apidiscountplans.html
|
|
24
|
+
*/
|
|
25
|
+
export interface GetDiscountPlansParams {
|
|
26
|
+
Offset?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Parameters for creating a discount plan.
|
|
30
|
+
* @see https://www.opendental.com/site/apidiscountplans.html
|
|
31
|
+
*/
|
|
32
|
+
export interface CreateDiscountPlanParams {
|
|
33
|
+
Description: string;
|
|
34
|
+
FeeSchedNum: number;
|
|
35
|
+
DefNum: number;
|
|
36
|
+
IsHidden?: 'true' | 'false';
|
|
37
|
+
PlanNote?: string;
|
|
38
|
+
ExamFreqLimit?: number;
|
|
39
|
+
XrayFreqLimit?: number;
|
|
40
|
+
ProphyFreqLimit?: number;
|
|
41
|
+
FluorideFreqLimit?: number;
|
|
42
|
+
PerioFreqLimit?: number;
|
|
43
|
+
LimitedExamFreqLimit?: number;
|
|
44
|
+
PAFreqLimit?: number;
|
|
45
|
+
AnnualMax?: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Parameters for updating a discount plan.
|
|
49
|
+
* @see https://www.opendental.com/site/apidiscountplans.html
|
|
50
|
+
*/
|
|
51
|
+
export interface UpdateDiscountPlanParams {
|
|
52
|
+
DiscountPlanNum: number;
|
|
53
|
+
Description?: string;
|
|
54
|
+
FeeSchedNum?: number;
|
|
55
|
+
DefNum?: number;
|
|
56
|
+
IsHidden?: 'true' | 'false';
|
|
57
|
+
PlanNote?: string;
|
|
58
|
+
ExamFreqLimit?: number;
|
|
59
|
+
XrayFreqLimit?: number;
|
|
60
|
+
ProphyFreqLimit?: number;
|
|
61
|
+
FluorideFreqLimit?: number;
|
|
62
|
+
PerioFreqLimit?: number;
|
|
63
|
+
LimitedExamFreqLimit?: number;
|
|
64
|
+
PAFreqLimit?: number;
|
|
65
|
+
AnnualMax?: number;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=DiscountPlanTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiscountPlanTypes.d.ts","sourceRoot":"","sources":["../../src/types/DiscountPlanTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAA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MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC;IACxC,SAAS,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,QAAQ,CAAC;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GACjB,WAAW,GACX,UAAU,GACV,aAAa,GACb,MAAM,GACN,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,iBAAiB,CAAC;AAEtB;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a fees in Open Dental
|
|
3
|
+
* @see https://www.opendental.com/site/apifees.html
|
|
4
|
+
*/
|
|
5
|
+
export interface Fee {
|
|
6
|
+
FeeNum?: number;
|
|
7
|
+
Amount?: number;
|
|
8
|
+
FeeSched?: number;
|
|
9
|
+
CodeNum?: number;
|
|
10
|
+
ClinicNum?: number;
|
|
11
|
+
ProvNum?: number;
|
|
12
|
+
SecUserNumEntry?: number;
|
|
13
|
+
SecDateEntry?: string;
|
|
14
|
+
SecDateTEdit?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Parameters for GET Fees.
|
|
18
|
+
* @see https://www.opendental.com/site/apifees.html
|
|
19
|
+
*/
|
|
20
|
+
export interface GetFeesParams {
|
|
21
|
+
FeeSched?: number;
|
|
22
|
+
CodeNum?: number;
|
|
23
|
+
ClinicNum?: number;
|
|
24
|
+
ProvNum?: number;
|
|
25
|
+
Offset?: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Parameters for Create Fee.
|
|
29
|
+
* @see https://www.opendental.com/site/apifees.html
|
|
30
|
+
*/
|
|
31
|
+
export interface CreateFeeParams {
|
|
32
|
+
Amount: number;
|
|
33
|
+
FeeSched: number;
|
|
34
|
+
CodeNum: number;
|
|
35
|
+
ClinicNum?: number;
|
|
36
|
+
ProvNum?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Parameters for Update Fee.
|
|
40
|
+
* @see https://www.opendental.com/site/apifees.html
|
|
41
|
+
*/
|
|
42
|
+
export interface UpdateFeeParams {
|
|
43
|
+
FeeSched: number;
|
|
44
|
+
Amount?: number;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=feeTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feeTypes.d.ts","sourceRoot":"","sources":["../../src/types/feeTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,GAAG;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TreatPlanAttaches object.
|
|
3
|
+
* @see https://www.opendental.com/site/apitreatplanattaches.html
|
|
4
|
+
*/
|
|
5
|
+
export interface TreatPlanAttach {
|
|
6
|
+
TreatPlanAttachNum?: number;
|
|
7
|
+
TreatPlanNum?: number;
|
|
8
|
+
ProcNum?: number;
|
|
9
|
+
Priority?: number;
|
|
10
|
+
priority?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get TreatPlanAttaches Params. Returns TreatPlanAttaches object
|
|
14
|
+
* @see https://www.opendental.com/site/apitreatplanattaches.html
|
|
15
|
+
*/
|
|
16
|
+
export interface GetTreatPlanAttachesParams {
|
|
17
|
+
TreatPlanNum?: number;
|
|
18
|
+
Offset?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* POST TreatPlanAttaches Params. Returns TreatPlanAttaches object
|
|
22
|
+
* @see https://www.opendental.com/site/apitreatplanattaches.html
|
|
23
|
+
*/
|
|
24
|
+
export interface CreateTreatPlanAttachesParams {
|
|
25
|
+
TreatPlanNum: number;
|
|
26
|
+
ProcNum: number;
|
|
27
|
+
Priority?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* PUT TreatPlanAttaches Params. Returns TreatPlanAttaches object.
|
|
31
|
+
* @see https://www.opendental.com/site/apitreatplanattaches.html
|
|
32
|
+
*/
|
|
33
|
+
export interface UpdateTreatPlanAttachesParams {
|
|
34
|
+
TreatPlanAttachNum: number;
|
|
35
|
+
Priority: number;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=treatPlanAttachTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treatPlanAttachTypes.d.ts","sourceRoot":"","sources":["../../src/types/treatPlanAttachTypes.ts"],"names":[],"mappings":"AAAA;;;EAGE;AACF,MAAM,WAAW,eAAe;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;EAGE;AACF,MAAM,WAAW,6BAA6B;IAC1C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;CACpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rinse-dental/open-dental",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
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.
|
|
18
|
+
"axios": "^1.10.0",
|
|
19
|
+
"moment-timezone": "^0.6.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/jest": "^29.5.14",
|
package/release.sh
CHANGED
|
@@ -43,4 +43,6 @@ gh release create "$NEW_TAG" --title "Release $NEW_TAG" --notes "$COMMIT_MSG"
|
|
|
43
43
|
#example ./release.sh "updated axios error return" patch
|
|
44
44
|
#example ./release.sh "Added procedure codes" minor
|
|
45
45
|
#example ./release.sh "Some commit message" major
|
|
46
|
-
#npm token: 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
|
|
46
|
+
#npm token: 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
|
|
47
|
+
|
|
48
|
+
#./release.sh "corrected appointment endpoints" minor
|
package/src/api/appointments.ts
CHANGED
|
@@ -47,6 +47,7 @@ export default class Appointments {
|
|
|
47
47
|
* @param {string} [params.dateEnd] - End date for date range in "yyyy-MM-dd" format.
|
|
48
48
|
* @param {number} [params.ClinicNum] - Filter by clinic number.
|
|
49
49
|
* @param {string} [params.DateTStamp] - Return only appointments updated after this timestamp.
|
|
50
|
+
* @param {string} [params.AppointmentTypeNum] - Returns only appointments matching appointmenttype.AppointmentTypeNum.
|
|
50
51
|
* @param {number} [params.Offset] - Pagination offset for results.
|
|
51
52
|
* @returns {Promise<Appointment[]>} - A list of appointments.
|
|
52
53
|
*/
|
|
@@ -59,6 +60,7 @@ public async getAppointments({
|
|
|
59
60
|
dateEnd,
|
|
60
61
|
ClinicNum,
|
|
61
62
|
DateTStamp,
|
|
63
|
+
AppointmentTypeNum,
|
|
62
64
|
Offset,
|
|
63
65
|
}: GetAppointmentParams = {}): Promise<Appointment[]> {
|
|
64
66
|
const params = {
|
|
@@ -70,6 +72,7 @@ public async getAppointments({
|
|
|
70
72
|
dateEnd,
|
|
71
73
|
ClinicNum,
|
|
72
74
|
DateTStamp,
|
|
75
|
+
AppointmentTypeNum,
|
|
73
76
|
Offset,
|
|
74
77
|
};
|
|
75
78
|
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
CreateDiscountPlanSubParams,
|
|
6
6
|
UpdateDiscountPlanSubParams,
|
|
7
7
|
} from "../types/discountPlanSubTypes";
|
|
8
|
-
import { createProcedureLogParams } from "../types/procedurelogTypes";
|
|
9
8
|
|
|
10
9
|
export default class DiscountPlanSubs {
|
|
11
10
|
private httpClient: HttpClient;
|
|
@@ -15,7 +14,7 @@ export default class DiscountPlanSubs {
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
|
-
* Fetch
|
|
17
|
+
* Fetch patient's discountplansubs with optional filtering and pagination.
|
|
19
18
|
* @param {Object} params - The parameters for filtering and pagination.
|
|
20
19
|
* @param {number} [params.PatNum] - Filter by patient.
|
|
21
20
|
* @returns {Promise<DiscountPlanSub>} - A list of discountplansubs.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import {
|
|
3
|
+
DiscountPlan,
|
|
4
|
+
GetDiscountPlansParams,
|
|
5
|
+
CreateDiscountPlanParams,
|
|
6
|
+
UpdateDiscountPlanParams,
|
|
7
|
+
} from "../types/DiscountPlanTypes";
|
|
8
|
+
|
|
9
|
+
export default class DiscountPlans {
|
|
10
|
+
private httpClient: HttpClient;
|
|
11
|
+
|
|
12
|
+
constructor(httpClient: HttpClient) {
|
|
13
|
+
this.httpClient = httpClient;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Fetch a single discountplan by its ID.
|
|
18
|
+
* @param {number} DiscountPlanNum - The ID of the DiscountPlanNum.
|
|
19
|
+
* @returns {Promise<DiscountPlan>} - The DiscountPlan data.
|
|
20
|
+
* @throws {Error} - If `DiscountPlan` is not valid or the API returns an error.
|
|
21
|
+
*/
|
|
22
|
+
public async getDiscountPlan(DiscountPlanNum: number): Promise<DiscountPlan> {
|
|
23
|
+
if (!DiscountPlanNum || typeof DiscountPlanNum !== "number") {
|
|
24
|
+
throw new Error("Invalid parameter: DiscountPlanNum must be a valid number.");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return await this.httpClient.get<DiscountPlan>(`/discountplans/${DiscountPlanNum}`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Fetch multiple discountplans with optional filtering and pagination.
|
|
32
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
33
|
+
* @param {number} [params.Offset] - Optional. Pagination.
|
|
34
|
+
* @returns {Promise<DiscountPlan>} - A list of discountplansubs.
|
|
35
|
+
*/
|
|
36
|
+
public async getDiscountPlans({
|
|
37
|
+
Offset,
|
|
38
|
+
}: GetDiscountPlansParams = {}): Promise<DiscountPlan> {
|
|
39
|
+
const params = {
|
|
40
|
+
Offset,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return this.httpClient.get<DiscountPlan>("/discountplans", params);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Create a new discount plan.
|
|
48
|
+
* @param {Object} data - The details of discount plan to create.
|
|
49
|
+
* @param {string} data.Description - Required. Description of this Discount Plan.
|
|
50
|
+
* @param {number} data.FeeSchedNum - Required. FK to feesched.FeeSchedNum.
|
|
51
|
+
* @param {number} data.DefNum - Required. definition.DefNum where definition.Category=1 and definition.ItemValue=dp.
|
|
52
|
+
* @param {"true" | "false"} [data.IsHidden] - Optional. Hides a Discount Plan. Default "false".
|
|
53
|
+
* @param {string} [data.PlanNote] - Optional. Note on a Discount Plan.
|
|
54
|
+
* @param {number} [data.ExamFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's Exam category. Default -1.
|
|
55
|
+
* @param {number} [data.XrayFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's X-Ray category. Default -1.
|
|
56
|
+
* @param {number} [data.ProphyFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's Prophy category. Default -1.
|
|
57
|
+
* @param {number} [data.FluorideFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's Fluoride category. Default -1.
|
|
58
|
+
* @param {number} [data.PerioFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's Perio category. Default -1.
|
|
59
|
+
* @param {number} [data.LimitedExamFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's Limited Exam category. Default -1.
|
|
60
|
+
* @param {number} [data.PAFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's Periapical X-Ray category. Default -1.
|
|
61
|
+
* @param {number} [data.AnnualMax] - Optional. Annual discount maximum for frequency limitations. Default -1, indicates no annual max limitation.
|
|
62
|
+
* @returns {Promise<DiscountPlan>} - The new discount plan.
|
|
63
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
64
|
+
*/
|
|
65
|
+
public async createDiscountPlan({
|
|
66
|
+
Description,
|
|
67
|
+
FeeSchedNum,
|
|
68
|
+
DefNum,
|
|
69
|
+
IsHidden,
|
|
70
|
+
PlanNote,
|
|
71
|
+
ExamFreqLimit,
|
|
72
|
+
XrayFreqLimit,
|
|
73
|
+
ProphyFreqLimit,
|
|
74
|
+
FluorideFreqLimit,
|
|
75
|
+
PerioFreqLimit,
|
|
76
|
+
LimitedExamFreqLimit,
|
|
77
|
+
PAFreqLimit,
|
|
78
|
+
AnnualMax,
|
|
79
|
+
} : CreateDiscountPlanParams): Promise<DiscountPlan> {
|
|
80
|
+
if (!Description || !FeeSchedNum || !DefNum) {
|
|
81
|
+
throw new Error("Invalid data: Description, FeeSchedNum and DefNum are required.");
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return this.httpClient.post<DiscountPlan>("/discountplans", {
|
|
85
|
+
Description,
|
|
86
|
+
FeeSchedNum,
|
|
87
|
+
DefNum,
|
|
88
|
+
IsHidden,
|
|
89
|
+
PlanNote,
|
|
90
|
+
ExamFreqLimit,
|
|
91
|
+
XrayFreqLimit,
|
|
92
|
+
ProphyFreqLimit,
|
|
93
|
+
FluorideFreqLimit,
|
|
94
|
+
PerioFreqLimit,
|
|
95
|
+
LimitedExamFreqLimit,
|
|
96
|
+
PAFreqLimit,
|
|
97
|
+
AnnualMax,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Update a discount plan sub.
|
|
104
|
+
* @param {Object} data - The details of discount plan to update.
|
|
105
|
+
* @param {string} data.DiscountPlanNum - Required. Primary key of the Discount Plan.
|
|
106
|
+
* @param {string} [data.Description] - Optional. Description of this Discount Plan.
|
|
107
|
+
* @param {number} [data.FeeSchedNum] - Optional. FK to feesched.FeeSchedNum.
|
|
108
|
+
* @param {number} [data.DefNum] - Optional. definition.DefNum where definition.Category=1 and definition.ItemValue=dp.
|
|
109
|
+
* @param {"true" | "false"} [data.IsHidden] - Optional. Hides a Discount Plan. Default "false".
|
|
110
|
+
* @param {string} [data.PlanNote] - Optional. Note on a Discount Plan.
|
|
111
|
+
* @param {number} [data.ExamFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's Exam category. Default -1.
|
|
112
|
+
* @param {number} [data.XrayFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's X-Ray category. Default -1.
|
|
113
|
+
* @param {number} [data.ProphyFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's Prophy category. Default -1.
|
|
114
|
+
* @param {number} [data.FluorideFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's Fluoride category. Default -1.
|
|
115
|
+
* @param {number} [data.PerioFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's Perio category. Default -1.
|
|
116
|
+
* @param {number} [data.LimitedExamFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's Limited Exam category. Default -1.
|
|
117
|
+
* @param {number} [data.PAFreqLimit] - Optional: Number of procedures allowed for a Discount Plan's Periapical X-Ray category. Default -1.
|
|
118
|
+
* @param {number} [data.AnnualMax] - Optional. Annual discount maximum for frequency limitations. Default -1, indicates no annual max limitation.
|
|
119
|
+
* @returns {Promise<DiscountPlan>} - The new discount plan.
|
|
120
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
121
|
+
*/
|
|
122
|
+
public async updateDiscountPlan({
|
|
123
|
+
DiscountPlanNum,
|
|
124
|
+
Description,
|
|
125
|
+
FeeSchedNum,
|
|
126
|
+
DefNum,
|
|
127
|
+
IsHidden,
|
|
128
|
+
PlanNote,
|
|
129
|
+
ExamFreqLimit,
|
|
130
|
+
XrayFreqLimit,
|
|
131
|
+
ProphyFreqLimit,
|
|
132
|
+
FluorideFreqLimit,
|
|
133
|
+
PerioFreqLimit,
|
|
134
|
+
LimitedExamFreqLimit,
|
|
135
|
+
PAFreqLimit,
|
|
136
|
+
AnnualMax,
|
|
137
|
+
} : UpdateDiscountPlanParams): Promise<DiscountPlan> {
|
|
138
|
+
if (!DiscountPlanNum) {
|
|
139
|
+
throw new Error("Invalid data: DiscountPlanNum is required.");
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return this.httpClient.put<DiscountPlan>(`/discountplans/${DiscountPlanNum}`, {
|
|
143
|
+
DiscountPlanNum,
|
|
144
|
+
Description,
|
|
145
|
+
FeeSchedNum,
|
|
146
|
+
DefNum,
|
|
147
|
+
IsHidden,
|
|
148
|
+
PlanNote,
|
|
149
|
+
ExamFreqLimit,
|
|
150
|
+
XrayFreqLimit,
|
|
151
|
+
ProphyFreqLimit,
|
|
152
|
+
FluorideFreqLimit,
|
|
153
|
+
PerioFreqLimit,
|
|
154
|
+
LimitedExamFreqLimit,
|
|
155
|
+
PAFreqLimit,
|
|
156
|
+
AnnualMax,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
package/src/api/fees.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import {
|
|
3
|
+
Fee,
|
|
4
|
+
GetFeesParams,
|
|
5
|
+
CreateFeeParams,
|
|
6
|
+
UpdateFeeParams,
|
|
7
|
+
} from "../types/feeTypes";
|
|
8
|
+
|
|
9
|
+
export default class Fees {
|
|
10
|
+
private httpClient: HttpClient;
|
|
11
|
+
|
|
12
|
+
constructor(httpClient: HttpClient) {
|
|
13
|
+
this.httpClient = httpClient;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Fetch multiple fees with optional filtering and pagination.
|
|
18
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
19
|
+
* @param {number} [params.FeeSched] - Optional. Get all Fees for a FeeSched.
|
|
20
|
+
* @param {number} [params.CodeNum] - Optional. Get all Fees for a single CodeNum.
|
|
21
|
+
* @param {number} [params.ClinicNum] - Optional. Get all Fees attached to a specific ClinicNum.
|
|
22
|
+
* @param {number} [params.ProvNum] - Optional. Get all Fees attached to a specific ProvNum.
|
|
23
|
+
* @param {number} [params.Offset] - Optional. Pagination offset for results.
|
|
24
|
+
* @returns {Promise<Fee[]>} - A list of fees.
|
|
25
|
+
*/
|
|
26
|
+
public async getFees({
|
|
27
|
+
FeeSched,
|
|
28
|
+
CodeNum,
|
|
29
|
+
ClinicNum,
|
|
30
|
+
ProvNum,
|
|
31
|
+
Offset,
|
|
32
|
+
}: GetFeesParams = {}): Promise<Fee[]> {
|
|
33
|
+
const params = {
|
|
34
|
+
FeeSched,
|
|
35
|
+
CodeNum,
|
|
36
|
+
ClinicNum,
|
|
37
|
+
ProvNum,
|
|
38
|
+
Offset,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return this.httpClient.get<Fee[]>("/fees", params);
|
|
42
|
+
}
|
|
43
|
+
}
|
package/src/api/index.ts
CHANGED
|
@@ -6,10 +6,13 @@ export { default as Patients } from "./patients";
|
|
|
6
6
|
export { default as ProcedureLogs } from "./procedureLog";
|
|
7
7
|
export { default as Recalls } from "./recalls";
|
|
8
8
|
export { default as TreatmentPlans } from "./treatplans";
|
|
9
|
+
export { default as TreatmentPlanAttaches } from "./treatplanattaches";
|
|
9
10
|
export { default as Schedules } from "./schedules";
|
|
10
11
|
export { default as Providers } from "./providers";
|
|
11
12
|
export { default as Operatories } from "./operatories";
|
|
12
13
|
export { default as Payments } from "./payments";
|
|
13
14
|
export { default as Definitions } from "./definitions";
|
|
14
15
|
export { default as DiscountPlanSubs } from "./discountPlanSubs";
|
|
16
|
+
export { default as DiscountPlans } from "./discountPlans";
|
|
17
|
+
export { default as Fees } from "./fees";
|
|
15
18
|
// Add other APIs as needed
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import {
|
|
3
|
+
TreatPlanAttach,
|
|
4
|
+
GetTreatPlanAttachesParams,
|
|
5
|
+
CreateTreatPlanAttachesParams,
|
|
6
|
+
UpdateTreatPlanAttachesParams,
|
|
7
|
+
} from "../types/treatPlanAttachTypes";
|
|
8
|
+
|
|
9
|
+
export default class TreatPlanAttaches {
|
|
10
|
+
private httpClient: HttpClient;
|
|
11
|
+
|
|
12
|
+
constructor(httpClient: HttpClient) {
|
|
13
|
+
this.httpClient = httpClient;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Get a list of TreatPlanAttaches that meet a set of search criteria.
|
|
18
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
19
|
+
* @param {string} params.TreatPlanNum - treatplan.TreatPlanNum
|
|
20
|
+
* @param {number} [params.Offset] - Pagination offset. Default 0
|
|
21
|
+
* @returns {Promise<TreatPlanAttach[]>} - An array of TreatPlanAttach objects.
|
|
22
|
+
*/
|
|
23
|
+
public async getTreatPlanAttaches({
|
|
24
|
+
TreatPlanNum,
|
|
25
|
+
Offset,
|
|
26
|
+
}: GetTreatPlanAttachesParams = {}): Promise<TreatPlanAttach[]> {
|
|
27
|
+
const params = {
|
|
28
|
+
TreatPlanNum,
|
|
29
|
+
Offset,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return this.httpClient.get<TreatPlanAttach[]>("/treatplanattaches", params);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Create a new TreatPlanAttaches.
|
|
37
|
+
* @param {Object} data - Data for the new TreatPlanAttaches object.
|
|
38
|
+
* @param {number} data.TreatPlanNum - Required. FK to treatplan.TreatPlanNum.
|
|
39
|
+
* @param {number} data.ProcNum - Required. FK to procedurelog.ProcNum.
|
|
40
|
+
* @param {string} [data.Priority] - Optional. definition.DefNum where definition.Category=20. Default 0.
|
|
41
|
+
* @returns {Promise<TreatPlanAttach>} - The created TreatPlanAttaches object.
|
|
42
|
+
* @throws {Error} - If required fields are missing.
|
|
43
|
+
*/
|
|
44
|
+
public async createTreatmentPlan(data: CreateTreatPlanAttachesParams): Promise<TreatPlanAttach> {
|
|
45
|
+
if (!data.TreatPlanNum || !data.ProcNum) {
|
|
46
|
+
throw new Error("TreatPlanNum and ProcNum are required.");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return this.httpClient.post<TreatPlanAttach>("/treatplanattaches", data);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Update a TreatPlanAttaches.
|
|
54
|
+
* @param {Object} data - Data for the treatplan.
|
|
55
|
+
* @param {number} data.TreatPlanAttachNum - Required in URL, Primary key.
|
|
56
|
+
* @param {string} data.Priority - Required. definition.DefNum where definition.Category=20.
|
|
57
|
+
* @returns {Promise<TreatPlanAttach>} - The updated TreatPlanAttaches object.
|
|
58
|
+
* @throws {Error} - If required fields are missing.
|
|
59
|
+
*/
|
|
60
|
+
public async updateTreatmentPlan(data: UpdateTreatPlanAttachesParams): Promise<TreatPlanAttach> {
|
|
61
|
+
if (!data.TreatPlanAttachNum || !data.Priority) {
|
|
62
|
+
throw new Error("TreatPlanAttachNum and Priority are required.");
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return this.httpClient.put<TreatPlanAttach>(`/treatplanattaches/${data.TreatPlanAttachNum}`, data);
|
|
66
|
+
}
|
|
67
|
+
}
|
package/src/openDental.ts
CHANGED
|
@@ -7,12 +7,14 @@ import Patients from "./api/patients";
|
|
|
7
7
|
import ProcedureLogs from "./api/procedureLog";
|
|
8
8
|
import Recalls from "./api/recalls";
|
|
9
9
|
import TreatmentPlans from "./api/treatplans";
|
|
10
|
+
import TreatmentPlanAttaches from "./api/treatplanattaches";
|
|
10
11
|
import Schedules from "./api/schedules";
|
|
11
12
|
import Providers from "./api/providers";
|
|
12
13
|
import Operatories from "./api/operatories";
|
|
13
14
|
import Payments from "./api/payments";
|
|
14
15
|
import PaySplits from "./api/paySplits";
|
|
15
16
|
import Definitions from "./api/definitions";
|
|
17
|
+
import DiscountPlans from "./api/discountPlans";
|
|
16
18
|
import DiscountPlanSubs from "./api/discountPlanSubs";
|
|
17
19
|
import FamilyModules from "./api/familyModules";
|
|
18
20
|
import InsSubs from "./api/insSubs";
|
|
@@ -25,6 +27,7 @@ import Benefits from "./api/benefits";
|
|
|
25
27
|
import ClaimProcs from "./api/claimProcs";
|
|
26
28
|
import Adjustments from "./api/adjustments";
|
|
27
29
|
import ProcedureCodes from "./api/procedureCodes";
|
|
30
|
+
import Fees from "./api/fees";
|
|
28
31
|
|
|
29
32
|
class OpenDental {
|
|
30
33
|
private static httpClient: HttpClient;
|
|
@@ -124,6 +127,16 @@ class OpenDental {
|
|
|
124
127
|
return new TreatmentPlans(this.httpClient);
|
|
125
128
|
}
|
|
126
129
|
|
|
130
|
+
/**
|
|
131
|
+
* Create a new instance of the TreatmentPlanAttaches API.
|
|
132
|
+
*/
|
|
133
|
+
public static TreatmentPlanAttaches() {
|
|
134
|
+
if (!this.httpClient) {
|
|
135
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
136
|
+
}
|
|
137
|
+
return new TreatmentPlanAttaches(this.httpClient);
|
|
138
|
+
}
|
|
139
|
+
|
|
127
140
|
/**
|
|
128
141
|
* Create a new instance of the Schedules API.
|
|
129
142
|
*/
|
|
@@ -174,6 +187,16 @@ class OpenDental {
|
|
|
174
187
|
return new Definitions(this.httpClient);
|
|
175
188
|
}
|
|
176
189
|
|
|
190
|
+
/**
|
|
191
|
+
* Create a new instance of the DiscountPlans API.
|
|
192
|
+
*/
|
|
193
|
+
public static DiscountPlans() {
|
|
194
|
+
if (!this.httpClient) {
|
|
195
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
196
|
+
}
|
|
197
|
+
return new DiscountPlans(this.httpClient);
|
|
198
|
+
}
|
|
199
|
+
|
|
177
200
|
/**
|
|
178
201
|
* Create a new instance of the DiscountPlanSubs API.
|
|
179
202
|
*/
|
|
@@ -304,6 +327,16 @@ class OpenDental {
|
|
|
304
327
|
return new PaySplits(this.httpClient);
|
|
305
328
|
}
|
|
306
329
|
|
|
330
|
+
/**
|
|
331
|
+
* Create a new instance of the Fees API.
|
|
332
|
+
*/
|
|
333
|
+
public static Fees() {
|
|
334
|
+
if (!this.httpClient) {
|
|
335
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
336
|
+
}
|
|
337
|
+
return new Fees(this.httpClient);
|
|
338
|
+
}
|
|
339
|
+
|
|
307
340
|
}
|
|
308
341
|
|
|
309
342
|
export { OpenDental };
|