@rinse-dental/open-dental 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/discountPlanSubs.d.ts +4 -4
- package/dist/api/discountPlanSubs.d.ts.map +1 -1
- package/dist/api/discountPlanSubs.js +11 -6
- package/dist/api/familyModules.d.ts +17 -0
- package/dist/api/familyModules.d.ts.map +1 -0
- package/dist/api/familyModules.js +24 -0
- package/dist/api/insSubs.d.ts +64 -0
- package/dist/api/insSubs.d.ts.map +1 -0
- package/dist/api/insSubs.js +114 -0
- package/dist/api/patFields.js +1 -1
- package/dist/api/patPlans.d.ts +48 -0
- package/dist/api/patPlans.d.ts.map +1 -0
- package/dist/api/patPlans.js +83 -0
- package/dist/api/procedureLog.d.ts +54 -39
- package/dist/api/procedureLog.d.ts.map +1 -1
- package/dist/api/procedureLog.js +76 -39
- package/dist/openDental.d.ts +10 -0
- package/dist/openDental.d.ts.map +1 -1
- package/dist/openDental.js +20 -0
- package/dist/types/familyModuleTypes.d.ts +33 -0
- package/dist/types/familyModuleTypes.d.ts.map +1 -0
- package/dist/types/familyModuleTypes.js +2 -0
- package/dist/types/insSubTypes.d.ts +62 -0
- package/dist/types/insSubTypes.d.ts.map +1 -0
- package/dist/types/insSubTypes.js +2 -0
- package/dist/types/patPlanTypes.d.ts +52 -0
- package/dist/types/patPlanTypes.d.ts.map +1 -0
- package/dist/types/patPlanTypes.js +2 -0
- package/dist/types/procedurelogTypes.d.ts +12 -0
- package/dist/types/procedurelogTypes.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/discountPlanSubs.ts +17 -6
- package/src/api/familyModules.ts +28 -0
- package/src/api/insSubs.ts +155 -0
- package/src/api/patFields.ts +1 -1
- package/src/api/patPlans.ts +113 -0
- package/src/api/procedureLog.ts +96 -39
- package/src/openDental.ts +23 -0
- package/src/types/familyModuleTypes.ts +33 -0
- package/src/types/insSubTypes.ts +65 -0
- package/src/types/patPlanTypes.ts +55 -0
- package/src/types/procedurelogTypes.ts +41 -28
package/dist/api/procedureLog.js
CHANGED
|
@@ -17,16 +17,38 @@ class ProcedureLogs {
|
|
|
17
17
|
}
|
|
18
18
|
return this.httpClient.get(`/procedurelogs/${ProcNum}`);
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Fetch multiple procedurelogs with optional filtering and pagination.
|
|
22
|
+
* @param {Object} params - Filtering and pagination parameters.
|
|
23
|
+
* @param {number} [params.PatNum] - Get procedurelogs by PatNum
|
|
24
|
+
* @param {number} [params.AptNum] - Get procedurelogs by AptNum
|
|
25
|
+
* @param {number} [params.PlannedAptNum] - Get procedurelogs by PlannedAptNum
|
|
26
|
+
* @param {number} [params.ClinicNum] - Get procedurelogs by ClinicNum
|
|
27
|
+
* @param {string} [params.DateTStamp] - Get procedurelogs altered after the specified date and time
|
|
28
|
+
* @param {string} [params.Offset] - Pagination
|
|
29
|
+
* @returns {Promise<ProcedureLog[]>} - A list of procedurelogs.
|
|
30
|
+
* @throws {Error} - If the API returns an error.
|
|
31
|
+
*/
|
|
32
|
+
async getProcedureLogs({ PatNum, AptNum, PlannedAptNum, ClinicNum, DateTStamp, Offset, } = {}) {
|
|
33
|
+
return await this.httpClient.get("/procedurelogs", {
|
|
34
|
+
PatNum,
|
|
35
|
+
AptNum,
|
|
36
|
+
PlannedAptNum,
|
|
37
|
+
ClinicNum,
|
|
38
|
+
DateTStamp,
|
|
39
|
+
Offset,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
20
42
|
/**
|
|
21
43
|
* Create a new procedure log entry.
|
|
22
|
-
* @param {Object}
|
|
23
|
-
* @param {number}
|
|
24
|
-
* @param {string}
|
|
25
|
-
* @param {'TP' | 'C' | 'EO'}
|
|
26
|
-
* @param {string}
|
|
27
|
-
* @param {number} [
|
|
28
|
-
* @param {number} [
|
|
29
|
-
* @param {Surf} [Surf] - Optional: Tooth surface or treatment area. Options include:
|
|
44
|
+
* @param {Object} data - The details of the procedure log to create.
|
|
45
|
+
* @param {number} data.PatNum - Required: Patient number.
|
|
46
|
+
* @param {string} data.ProcDate - Required: Procedure date in "yyyy-MM-dd" format.
|
|
47
|
+
* @param {'TP' | 'C' | 'EO'} data.ProcStatus - Required: Procedure status.
|
|
48
|
+
* @param {string} data.procCode - Required: Procedure code (D code).
|
|
49
|
+
* @param {number} [data.AptNum] - Optional: Associated appointment number.
|
|
50
|
+
* @param {number} [data.ProcFee] - Optional: Fee for the procedure.
|
|
51
|
+
* @param {Surf} [data.Surf] - Optional: Tooth surface or treatment area. Options include:
|
|
30
52
|
* - "B/F" (Buccal/Facial)
|
|
31
53
|
* - "V" (Vestibular)
|
|
32
54
|
* - "M" (Mesial)
|
|
@@ -45,17 +67,19 @@ class ProcedureLogs {
|
|
|
45
67
|
* - "6" (Sextant 6)
|
|
46
68
|
* - "U" (Upper Arch)
|
|
47
69
|
* - "L" (Lower Arch)
|
|
48
|
-
* @param {string} [
|
|
49
|
-
* @param {string} [
|
|
50
|
-
* @param {number} [
|
|
51
|
-
* @param {number} [
|
|
52
|
-
* @param {string} [
|
|
53
|
-
* @param {number} [
|
|
54
|
-
* @param {number} [
|
|
70
|
+
* @param {string} [data.ToothNum] - Optional: Tooth number.
|
|
71
|
+
* @param {string} [data.ToothRange] - Optional: Tooth range.
|
|
72
|
+
* @param {number} [data.Priority] - Optional: Priority code.
|
|
73
|
+
* @param {number} [data.ProvNum] - Optional: Provider number.
|
|
74
|
+
* @param {string} [data.Dx] - Optional: Diagnosis code.
|
|
75
|
+
* @param {number} [data.PlannedAptNum] - Optional: Planned appointment number.
|
|
76
|
+
* @param {number} [data.ClinicNum] - Optional: Clinic number.
|
|
55
77
|
* @returns {Promise<ProcedureLog>} - The created procedure log.
|
|
56
78
|
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
57
79
|
*/
|
|
58
|
-
async createProcedureLog({ PatNum, ProcDate, ProcStatus, procCode,
|
|
80
|
+
async createProcedureLog({ PatNum, ProcDate, ProcStatus, procCode, AptNum, ProcFee, Surf, ToothNum, ToothRange, Priority, priority, ProvNum, Dx, dxName, PlannedAptNum, ClinicNum,
|
|
81
|
+
//...optionalData
|
|
82
|
+
}) {
|
|
59
83
|
if (!PatNum || !ProcDate || !ProcStatus || !procCode) {
|
|
60
84
|
throw new Error("Invalid data: PatNum, ProcDate, ProcStatus, and procCode are required.");
|
|
61
85
|
}
|
|
@@ -64,20 +88,31 @@ class ProcedureLogs {
|
|
|
64
88
|
ProcDate,
|
|
65
89
|
ProcStatus,
|
|
66
90
|
procCode,
|
|
67
|
-
|
|
91
|
+
AptNum,
|
|
92
|
+
ProcFee,
|
|
93
|
+
Surf,
|
|
94
|
+
ToothNum,
|
|
95
|
+
ToothRange,
|
|
96
|
+
Priority,
|
|
97
|
+
priority,
|
|
98
|
+
ProvNum,
|
|
99
|
+
Dx,
|
|
100
|
+
dxName,
|
|
101
|
+
PlannedAptNum,
|
|
102
|
+
ClinicNum,
|
|
68
103
|
});
|
|
69
104
|
}
|
|
70
105
|
/**
|
|
71
106
|
* Update an existing procedure log entry.
|
|
72
|
-
* @param {
|
|
73
|
-
* @param {
|
|
74
|
-
* @param {string} [
|
|
75
|
-
* @param {number} [
|
|
76
|
-
* @param {number} [
|
|
77
|
-
* @param {number} [
|
|
78
|
-
* @param {'TP' | 'C' | 'EO'} [
|
|
79
|
-
* @param {string} [
|
|
80
|
-
* @param {Surf} [Surf] - Optional: Tooth surface or treatment area. Options include:
|
|
107
|
+
* @param {Object} data - The updated details of the procedure log.
|
|
108
|
+
* @param {number} data.ProcNum - Required: The unique identifier of the procedure log to update.
|
|
109
|
+
* @param {string} [data.ProcDate] - Optional: Updated procedure date in "yyyy-MM-dd" format.
|
|
110
|
+
* @param {number} [data.AptNum] - Optional: Updated associated appointment number.
|
|
111
|
+
* @param {number} [data.ProcFee] - Optional: Updated fee for the procedure.
|
|
112
|
+
* @param {number} [data.Priority] - Optional: Updated priority code.
|
|
113
|
+
* @param {'TP' | 'C' | 'EO'} [data.ProcStatus] - Optional: Updated procedure status.
|
|
114
|
+
* @param {string} [data.procCode] - Optional: Updated procedure code (D code).
|
|
115
|
+
* @param {Surf} [data.Surf] - Optional: Tooth surface or treatment area. Options include:
|
|
81
116
|
* - "B/F" (Buccal/Facial)
|
|
82
117
|
* - "V" (Vestibular)
|
|
83
118
|
* - "M" (Mesial)
|
|
@@ -96,16 +131,16 @@ class ProcedureLogs {
|
|
|
96
131
|
* - "6" (Sextant 6)
|
|
97
132
|
* - "U" (Upper Arch)
|
|
98
133
|
* - "L" (Lower Arch)
|
|
99
|
-
* @param {string} [
|
|
100
|
-
* @param {string} [
|
|
101
|
-
* @param {number} [
|
|
102
|
-
* @param {string} [
|
|
103
|
-
* @param {number} [
|
|
104
|
-
* @param {number} [
|
|
134
|
+
* @param {string} [data.ToothNum] - Optional: Updated tooth number.
|
|
135
|
+
* @param {string} [data.ToothRange] - Optional: Updated tooth range.
|
|
136
|
+
* @param {number} [data.ProvNum] - Optional: Updated provider number.
|
|
137
|
+
* @param {string} [data.Dx] - Optional: Updated diagnosis code.
|
|
138
|
+
* @param {number} [data.PlannedAptNum] - Optional: Updated planned appointment number.
|
|
139
|
+
* @param {number} [data.ClinicNum] - Optional: Updated clinic number.
|
|
105
140
|
* @returns {Promise<ProcedureLog>} - The updated procedure log.
|
|
106
141
|
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
107
142
|
*/
|
|
108
|
-
async updateProcedureLog(ProcNum,
|
|
143
|
+
async updateProcedureLog({ ProcNum, ProcDate, AptNum, ProcFee, Priority, ProcStatus, procCode, Surf, ToothNum, ToothRange, ProvNum, Dx, PlannedAptNum, ClinicNum, }) {
|
|
109
144
|
if (!ProcNum || typeof ProcNum !== "number") {
|
|
110
145
|
throw new Error("Invalid parameter: ProcNum must be a valid number.");
|
|
111
146
|
}
|
|
@@ -139,8 +174,9 @@ class ProcedureLogs {
|
|
|
139
174
|
}
|
|
140
175
|
/**
|
|
141
176
|
* Fetch insurance history for a patient.
|
|
142
|
-
* @param {
|
|
143
|
-
* @param {number}
|
|
177
|
+
* @param {Object} params - the params to filter
|
|
178
|
+
* @param {number} params.PatNum - Required: The patient number.
|
|
179
|
+
* @param {number} params.InsSubNum - Required: The insurance subscription number.
|
|
144
180
|
* @returns {Promise<InsuranceHistory[]>} - The insurance history details.
|
|
145
181
|
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
146
182
|
*/
|
|
@@ -155,10 +191,11 @@ class ProcedureLogs {
|
|
|
155
191
|
}
|
|
156
192
|
/**
|
|
157
193
|
* Add an insurance history entry.
|
|
158
|
-
* @param {
|
|
159
|
-
* @param {number}
|
|
160
|
-
* @param {
|
|
161
|
-
* @param {
|
|
194
|
+
* @param {Object} data - the insurance history object to create.
|
|
195
|
+
* @param {number} data.PatNum - Required: The patient number.
|
|
196
|
+
* @param {number} data.InsSubNum - Required: The insurance subscription number.
|
|
197
|
+
* @param {"InsHistBWCodes" | "InsHistPanoCodes" | "InsHistExamCodes" | "InsHistProphyCodes" | "InsHistPerioURCodes" | "InsHistPerioULCodes" | "InsHistPerioLRCodes" | "InsHistPerioLLCodes" | "InsHistPerioMaintCodes" | "InsHistDebridementCodes"} data.insHistPrefName - Required: The insurance history category name.
|
|
198
|
+
* @param {string} data.ProcDate - Required: Procedure date in "yyyy-MM-dd" format.
|
|
162
199
|
* @returns {Promise<InsuranceHistory>} - The created insurance history entry.
|
|
163
200
|
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
164
201
|
*/
|
package/dist/openDental.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ import Operatories from "./api/operatories";
|
|
|
12
12
|
import Payments from "./api/payments";
|
|
13
13
|
import Definitions from "./api/definitions";
|
|
14
14
|
import DiscountPlanSubs from "./api/discountPlanSubs";
|
|
15
|
+
import FamilyModules from "./api/familyModules";
|
|
16
|
+
import InsSubs from "./api/insSubs";
|
|
15
17
|
declare class OpenDental {
|
|
16
18
|
private static httpClient;
|
|
17
19
|
/**
|
|
@@ -74,6 +76,14 @@ declare class OpenDental {
|
|
|
74
76
|
* Create a new instance of the DiscountPlanSubs API.
|
|
75
77
|
*/
|
|
76
78
|
static DiscountPlanSubs(): DiscountPlanSubs;
|
|
79
|
+
/**
|
|
80
|
+
* Create a new instance of the FamilyModules API.
|
|
81
|
+
*/
|
|
82
|
+
static FamilyModules(): FamilyModules;
|
|
83
|
+
/**
|
|
84
|
+
* Create a new instance of the InsSub API.
|
|
85
|
+
*/
|
|
86
|
+
static InsSubs(): InsSubs;
|
|
77
87
|
}
|
|
78
88
|
export { OpenDental };
|
|
79
89
|
//# 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;
|
|
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;AAEpC,cAAM,UAAU;IACd,OAAO,CAAC,MAAM,CAAC,UAAU,CAAa;IAEtC;;OAEG;WACW,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAWlE;;OAEG;WACa,YAAY;IAQ5B;;OAEG;WACa,QAAQ;IAOxB;;OAEG;WACW,YAAY;IAO1B;;SAEK;WACS,SAAS;IAOvB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,aAAa;IAO3B;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,cAAc;IAO5B;;OAEG;WACa,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;CAMtB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/openDental.js
CHANGED
|
@@ -19,6 +19,8 @@ const operatories_1 = __importDefault(require("./api/operatories"));
|
|
|
19
19
|
const payments_1 = __importDefault(require("./api/payments"));
|
|
20
20
|
const definitions_1 = __importDefault(require("./api/definitions"));
|
|
21
21
|
const discountPlanSubs_1 = __importDefault(require("./api/discountPlanSubs"));
|
|
22
|
+
const familyModules_1 = __importDefault(require("./api/familyModules"));
|
|
23
|
+
const insSubs_1 = __importDefault(require("./api/insSubs"));
|
|
22
24
|
class OpenDental {
|
|
23
25
|
static httpClient;
|
|
24
26
|
/**
|
|
@@ -158,5 +160,23 @@ class OpenDental {
|
|
|
158
160
|
}
|
|
159
161
|
return new discountPlanSubs_1.default(this.httpClient);
|
|
160
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Create a new instance of the FamilyModules API.
|
|
165
|
+
*/
|
|
166
|
+
static FamilyModules() {
|
|
167
|
+
if (!this.httpClient) {
|
|
168
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
169
|
+
}
|
|
170
|
+
return new familyModules_1.default(this.httpClient);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Create a new instance of the InsSub API.
|
|
174
|
+
*/
|
|
175
|
+
static InsSubs() {
|
|
176
|
+
if (!this.httpClient) {
|
|
177
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
178
|
+
}
|
|
179
|
+
return new insSubs_1.default(this.httpClient);
|
|
180
|
+
}
|
|
161
181
|
}
|
|
162
182
|
exports.OpenDental = OpenDental;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the insurance information for a patient similar to how it shows in the Family Module in Open Dental.
|
|
3
|
+
* @see https://www.opendental.com/site/apifamilymodules.html
|
|
4
|
+
*/
|
|
5
|
+
export interface Insurance {
|
|
6
|
+
PatNum?: number;
|
|
7
|
+
InsSubNum?: number;
|
|
8
|
+
Subscriber?: number;
|
|
9
|
+
subscriber?: string;
|
|
10
|
+
SubscriberID?: string;
|
|
11
|
+
SubscNote?: string;
|
|
12
|
+
PatPlanNum?: number;
|
|
13
|
+
Ordinal?: number;
|
|
14
|
+
ordinal?: string;
|
|
15
|
+
IsPending?: 'true' | 'false';
|
|
16
|
+
Relationship?: string;
|
|
17
|
+
PatID?: string;
|
|
18
|
+
CarrierNum?: number;
|
|
19
|
+
CarrierName?: string;
|
|
20
|
+
PlanNum?: number;
|
|
21
|
+
GroupName?: string;
|
|
22
|
+
GroupNum?: string;
|
|
23
|
+
PlanNote?: string;
|
|
24
|
+
FeeSched?: number;
|
|
25
|
+
feeSchedule?: string;
|
|
26
|
+
PlanType?: string;
|
|
27
|
+
planType?: string;
|
|
28
|
+
CopayFeeSched?: number;
|
|
29
|
+
EmployerNum?: number;
|
|
30
|
+
employer?: string;
|
|
31
|
+
IsMedical?: 'true' | 'false';
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=familyModuleTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"familyModuleTypes.d.ts","sourceRoot":"","sources":["../../src/types/familyModuleTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,SAAS;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC9B"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents an InsSub in the Open Dental system. Links an InsPlan to a Subscriber (patient.PatNum). Also, see PatPlans to indicate coverage.
|
|
3
|
+
* @see https://www.opendental.com/site/apiinssubs.html
|
|
4
|
+
*/
|
|
5
|
+
export interface InsSub {
|
|
6
|
+
InsSubNum?: number;
|
|
7
|
+
PlanNum?: number;
|
|
8
|
+
Subscriber?: number;
|
|
9
|
+
DateEffective?: string;
|
|
10
|
+
DateTerm?: string;
|
|
11
|
+
SubscriberID?: string;
|
|
12
|
+
BenefitNotes?: string;
|
|
13
|
+
ReleaseInfo?: "true" | "false";
|
|
14
|
+
AssignBen?: "true" | "false";
|
|
15
|
+
SubscNote?: string;
|
|
16
|
+
SecDateTEdit?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Gets all InsSubs based on provided parameters. If no parameter is given, it will get all InsSubs ordered by InsSubNum.
|
|
20
|
+
* @see https://www.opendental.com/site/apiinssubs.html
|
|
21
|
+
*/
|
|
22
|
+
export interface GetInsSubsParams {
|
|
23
|
+
PlanNum?: number;
|
|
24
|
+
Subscriber?: number;
|
|
25
|
+
SecDateTEdit?: string;
|
|
26
|
+
Offset?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Parameters for creating an InsSub. This does not create a new insurance plan or change benefits.
|
|
30
|
+
* @see https://www.opendental.com/site/apiinssubs.html
|
|
31
|
+
*/
|
|
32
|
+
export interface CreateInsSubParams {
|
|
33
|
+
PlanNum: number;
|
|
34
|
+
Subscriber: number;
|
|
35
|
+
SubscriberID: string;
|
|
36
|
+
DateEffective?: string;
|
|
37
|
+
DateTerm?: string;
|
|
38
|
+
BenefitNotes?: string;
|
|
39
|
+
ReleaseInfo?: "true" | "false";
|
|
40
|
+
AssignBen?: "true" | "false";
|
|
41
|
+
SubscNote?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Parameters for updating an InsSub. This can be used to assign a different PlanNum or Subscriber to this InsSub.
|
|
45
|
+
* None of these changes affect the InsSubNum, so all the PatPlans (coverage) for family members will continue to point to this InsSub and will be untouched.
|
|
46
|
+
* You can obtain the InsSubNum from FamilyModules GET Insurance.
|
|
47
|
+
* SecDateTEdit is updated automatically and cannot be set by developers.
|
|
48
|
+
* @see https://www.opendental.com/site/apiinssubs.html
|
|
49
|
+
*/
|
|
50
|
+
export interface UpdateInsSubParams {
|
|
51
|
+
InsSubNum: number;
|
|
52
|
+
PlanNum?: number;
|
|
53
|
+
Subscriber?: number;
|
|
54
|
+
SubscriberID: string;
|
|
55
|
+
DateEffective?: string;
|
|
56
|
+
DateTerm?: string;
|
|
57
|
+
BenefitNotes?: string;
|
|
58
|
+
ReleaseInfo?: "true" | "false";
|
|
59
|
+
AssignBen?: "true" | "false";
|
|
60
|
+
SubscNote?: string;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=insSubTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insSubTypes.d.ts","sourceRoot":"","sources":["../../src/types/insSubTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,MAAM;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,U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M,GAAG,OAAO,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A PatPlan row in the database indicates coverage aka eligibility.
|
|
3
|
+
* If there is no patplan row, then the patient does not have coverage.
|
|
4
|
+
* So eligibility can be set by adding or removing PatPlan rows.
|
|
5
|
+
* @see https://www.opendental.com/site/apipatplans.html
|
|
6
|
+
*/
|
|
7
|
+
export interface PatPlan {
|
|
8
|
+
PatPlanNum?: number;
|
|
9
|
+
PatNum?: number;
|
|
10
|
+
Ordinal?: number;
|
|
11
|
+
IsPending?: "true" | "false";
|
|
12
|
+
Relationship?: "Self" | "Spouse" | "Child" | "Employee" | "HandicapDep" | "SignifOther" | "InjuredPlantiff" | "LifePartner" | "Dependent";
|
|
13
|
+
PatID?: string;
|
|
14
|
+
InsSubNum?: number;
|
|
15
|
+
OrthoAutoFeeBilledOverride?: string;
|
|
16
|
+
OrthoAutoNextClaimDate?: string;
|
|
17
|
+
SecDateTEntry?: string;
|
|
18
|
+
SecDateTEdit?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Gets a list of PatPlans that meet a set of search criteria.
|
|
22
|
+
* @see https://www.opendental.com/site/apipatplans.html
|
|
23
|
+
*/
|
|
24
|
+
export interface GetPatPlansParams {
|
|
25
|
+
PatNum?: number;
|
|
26
|
+
InsSubNum?: number;
|
|
27
|
+
Offset?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Parameters for creating an PatPlan. This adds a PatPlan row to the database.
|
|
31
|
+
* @see https://www.opendental.com/site/apipatplans.html
|
|
32
|
+
*/
|
|
33
|
+
export interface CreatePatPlanParams {
|
|
34
|
+
PatNum: number;
|
|
35
|
+
InsSubNum: number;
|
|
36
|
+
Ordinal?: number;
|
|
37
|
+
Relationship?: "Self" | "Spouse" | "Child" | "Employee" | "HandicapDep" | "SignifOther" | "InjuredPlantiff" | "LifePartner" | "Dependent";
|
|
38
|
+
PatID?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Parameters for updating an PatPlan.
|
|
42
|
+
* This updates an existing PatPlan row in the database. PatNum cannot be updated. Instead, drop the PatPlan and then recreate it.
|
|
43
|
+
* @see https://www.opendental.com/site/apipatplans.html
|
|
44
|
+
*/
|
|
45
|
+
export interface UpdatePatPlanParams {
|
|
46
|
+
PatPlanNum: number;
|
|
47
|
+
InsSubNum?: number;
|
|
48
|
+
Ordinal?: number;
|
|
49
|
+
Relationship?: "Self" | "Spouse" | "Child" | "Employee" | "HandicapDep" | "SignifOther" | "InjuredPlantiff" | "LifePartner" | "Dependent";
|
|
50
|
+
PatID?: string;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=patPlanTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patPlanTypes.d.ts","sourceRoot":"","sources":["../../src/types/patPlanTypes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,GAAG,aAAa,GAAG,iBAAiB,GAAG,aAAa,GAAG,WAAW,CAAC;IAC1I,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,GAAG,aAAa,GAAG,iBAAiB,GAAG,aAAa,GAAG,WAAW,CAAC;IAC1I,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,GAAG,aAAa,GAAG,iBAAiB,GAAG,aAAa,GAAG,WAAW,CAAC;IAC1I,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -31,6 +31,18 @@ export interface ProcedureLog {
|
|
|
31
31
|
IsDateProsthEst?: 'true' | 'false';
|
|
32
32
|
serverDateTime?: string;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Parameters for GET Multiple ProcedureLogs.
|
|
36
|
+
* @see https://www.opendental.com/site/apiprocedurelogs.html
|
|
37
|
+
*/
|
|
38
|
+
export interface GetProcedureLogParams {
|
|
39
|
+
PatNum?: number;
|
|
40
|
+
AptNum?: number;
|
|
41
|
+
PlannedAptNum?: number;
|
|
42
|
+
ClinicNum?: number;
|
|
43
|
+
DateTStamp?: string;
|
|
44
|
+
Offset?: number;
|
|
45
|
+
}
|
|
34
46
|
/**
|
|
35
47
|
* Create procedure log parameters.
|
|
36
48
|
* @see https://www.opendental.com/site/apiprocedurelogs.html
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"procedurelogTypes.d.ts","sourceRoot":"","sources":["../../src/types/procedurelogTypes.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,WAAW,YAAY;
|
|
1
|
+
{"version":3,"file":"procedurelogTypes.d.ts","sourceRoot":"","sources":["../../src/types/procedurelogTypes.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC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C"}
|
package/package.json
CHANGED
|
@@ -15,11 +15,11 @@ export default class DiscountPlanSubs {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Fetch multiple
|
|
18
|
+
* Fetch multiple discountplansubs with optional filtering and pagination.
|
|
19
19
|
* @param {Object} params - The parameters for filtering and pagination.
|
|
20
20
|
* @param {number} [params.PatNum] - Filter by patient.
|
|
21
21
|
* @param {number} [params.Offset] - Pagination offset for results.
|
|
22
|
-
* @returns {Promise<DiscountPlanSub[]>} - A list of
|
|
22
|
+
* @returns {Promise<DiscountPlanSub[]>} - A list of discountplansubs.
|
|
23
23
|
*/
|
|
24
24
|
public async getDiscountPlanSubs({
|
|
25
25
|
PatNum,
|
|
@@ -75,17 +75,28 @@ export default class DiscountPlanSubs {
|
|
|
75
75
|
* @returns {Promise<DiscountPlanSub>} - The updated discount plan sub.
|
|
76
76
|
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
77
77
|
*/
|
|
78
|
-
public async updateDiscountPlanSub(
|
|
79
|
-
|
|
78
|
+
public async updateDiscountPlanSub({
|
|
79
|
+
DiscountSubNum,
|
|
80
|
+
PatNum,
|
|
81
|
+
DateEffective,
|
|
82
|
+
DateTerm,
|
|
83
|
+
SubNote,
|
|
84
|
+
}: UpdateDiscountPlanSubParams): Promise<DiscountPlanSub> {
|
|
85
|
+
if (!DiscountSubNum || !PatNum) {
|
|
80
86
|
throw new Error("Invalid data: DiscountSubNum and PatNum are required.");
|
|
81
87
|
}
|
|
82
88
|
|
|
83
|
-
return this.httpClient.put<DiscountPlanSub>(`/discountplansubs/${
|
|
89
|
+
return this.httpClient.put<DiscountPlanSub>(`/discountplansubs/${DiscountSubNum}`, {
|
|
90
|
+
PatNum,
|
|
91
|
+
DateEffective,
|
|
92
|
+
DateTerm,
|
|
93
|
+
SubNote,
|
|
94
|
+
});
|
|
84
95
|
}
|
|
85
96
|
|
|
86
97
|
/**
|
|
87
98
|
* Delete a discount plan sub entry.
|
|
88
|
-
* @param {number}
|
|
99
|
+
* @param {number} DiscountSubNum - Required: The unique identifier of the discount plan sub to delete.
|
|
89
100
|
* @returns {Promise<void>} - Resolves when the discount plan sub is deleted.
|
|
90
101
|
* @throws {Error} - If `DiscountSubNum` is not valid or the API returns an error.
|
|
91
102
|
*/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import {
|
|
3
|
+
Insurance
|
|
4
|
+
} from "../types/familyModuleTypes";
|
|
5
|
+
|
|
6
|
+
export default class FamilyModules {
|
|
7
|
+
private httpClient: HttpClient;
|
|
8
|
+
|
|
9
|
+
constructor(httpClient: HttpClient) {
|
|
10
|
+
this.httpClient = httpClient;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Gets the insurance information for a patient similarly to how it shows in the Family Module.
|
|
15
|
+
* Will typically return between 0 and 2 rows, one row for each insurance for the patient.
|
|
16
|
+
* Use another API method or a query to get additional details in each table.
|
|
17
|
+
* This area of the Family Module UI also shows discount plans, which are obtained through DiscountPlanSubs GET.
|
|
18
|
+
* @param {number} PatNum - FK to patient.PatNum
|
|
19
|
+
* @returns {Promise<Insurance>} - The appointment object.
|
|
20
|
+
* @throws {Error} - If `AptNum` is not provided.
|
|
21
|
+
*/
|
|
22
|
+
public async getInsurance(PatNum: number): Promise<Insurance> {
|
|
23
|
+
if (!PatNum) {
|
|
24
|
+
throw new Error("PatNum is required.");
|
|
25
|
+
}
|
|
26
|
+
return this.httpClient.get<Insurance>(`/familymodules/${PatNum}/Insurance`);
|
|
27
|
+
}
|
|
28
|
+
}
|