@rinse-dental/open-dental 0.0.6 → 0.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/appointments.d.ts +195 -0
- package/dist/api/appointments.js +253 -8
- package/dist/api/index.d.ts +2 -0
- package/dist/api/patients.d.ts +112 -0
- package/dist/api/patients.js +149 -6
- package/dist/api/procedureLog.d.ts +116 -0
- package/dist/api/procedureLog.js +177 -0
- package/dist/index.d.ts +1 -0
- package/dist/openDental.d.ts +18 -0
- package/dist/types/appointmentType.d.ts +225 -0
- package/dist/types/appointmentType.js +2 -0
- package/dist/types/patientTypes.d.ts +204 -0
- package/dist/types/patientTypes.js +2 -0
- package/dist/types/procedurelogTypes.d.ts +107 -0
- package/dist/types/procedurelogTypes.js +3 -0
- package/dist/utils/errorHandler.d.ts +0 -0
- package/dist/utils/httpClient.d.ts +45 -0
- package/dist/utils/httpClient.js +25 -33
- package/package.json +1 -1
- package/src/api/appointments.ts +323 -26
- package/src/api/patients.ts +192 -13
- package/src/api/procedureLog.ts +230 -0
- package/src/openDental.ts +4 -4
- package/src/types/appointmentType.ts +249 -0
- package/src/types/patientTypes.ts +209 -0
- package/src/types/procedurelogTypes.ts +119 -0
- package/src/utils/httpClient.ts +27 -31
- package/tsconfig.json +2 -1
- package/src/utils/types.ts +0 -134
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents an appointment in the Open Dental system.
|
|
3
|
+
* Used in multiple appointment-related endpoints.
|
|
4
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
5
|
+
*/
|
|
6
|
+
export interface Appointment {
|
|
7
|
+
serverDateTime?: string;
|
|
8
|
+
AptNum?: number;
|
|
9
|
+
PatNum?: number;
|
|
10
|
+
AptStatus?: AptStatus;
|
|
11
|
+
Pattern?: string;
|
|
12
|
+
Confirmed?: number;
|
|
13
|
+
confirmed?: string;
|
|
14
|
+
TimeLocked?: "true" | "false";
|
|
15
|
+
Op?: number;
|
|
16
|
+
Note?: string;
|
|
17
|
+
ProvNum?: number;
|
|
18
|
+
provAbbr?: string;
|
|
19
|
+
ProvHyg?: number;
|
|
20
|
+
AptDateTime?: string;
|
|
21
|
+
NextAptNum?: number;
|
|
22
|
+
UnschedStatus?: number;
|
|
23
|
+
unschedStatus?: string;
|
|
24
|
+
IsNewPatient?: "true" | "false";
|
|
25
|
+
ProcDescript?: string;
|
|
26
|
+
ClinicNum?: number;
|
|
27
|
+
IsHygiene?: "true" | "false";
|
|
28
|
+
DateTStamp?: string;
|
|
29
|
+
DateTimeArrived?: string;
|
|
30
|
+
DateTimeSeated?: string;
|
|
31
|
+
DateTimeDismissed?: string;
|
|
32
|
+
InsPlan1?: number;
|
|
33
|
+
InsPlan2?: number;
|
|
34
|
+
DateTimeAskedToArrive?: string;
|
|
35
|
+
colorOverride?: string;
|
|
36
|
+
AppointmentTypeNum?: number;
|
|
37
|
+
eServiceLogType?: string;
|
|
38
|
+
SecDateTEntry?: string;
|
|
39
|
+
Priority?: Priority;
|
|
40
|
+
PatternSecondary?: string;
|
|
41
|
+
ItemOrderPlanned?: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Parameters for GET Appointments.
|
|
45
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
46
|
+
*/
|
|
47
|
+
export interface GetAppointmentParams {
|
|
48
|
+
PatNum?: number;
|
|
49
|
+
AptStatus?: AptStatus;
|
|
50
|
+
Op?: number;
|
|
51
|
+
date?: string;
|
|
52
|
+
dateStart?: string;
|
|
53
|
+
dateEnd?: string;
|
|
54
|
+
ClinicNum?: number;
|
|
55
|
+
DateTStamp?: string;
|
|
56
|
+
Offset?: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Parameters for GET ASAP Appointments.
|
|
60
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
61
|
+
*/
|
|
62
|
+
export interface GetASAPParams {
|
|
63
|
+
ClinicNum?: number;
|
|
64
|
+
ProvNum?: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Parameters for GET Slots.
|
|
68
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
69
|
+
*/
|
|
70
|
+
export interface GetSlotsParams {
|
|
71
|
+
date?: string;
|
|
72
|
+
dateStart?: string;
|
|
73
|
+
dateEnd?: string;
|
|
74
|
+
lengthMinutes?: number;
|
|
75
|
+
ProvNum?: number;
|
|
76
|
+
OpNum?: number;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Parameters for GET SlotsWebSched.
|
|
80
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
81
|
+
*/
|
|
82
|
+
export interface GetSlotsWebSchedParams {
|
|
83
|
+
date?: string;
|
|
84
|
+
dateStart?: string;
|
|
85
|
+
dateEnd?: string;
|
|
86
|
+
ClinicNum: number;
|
|
87
|
+
defNumApptType?: number;
|
|
88
|
+
isNewPatient?: 'true' | 'false';
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Represents an appointment slot object, used to return GET Slots and GET SlotsWebSched.
|
|
92
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
93
|
+
*/
|
|
94
|
+
export interface AppointmentSlot {
|
|
95
|
+
DateTimeStart?: string;
|
|
96
|
+
DateTimeEnd?: string;
|
|
97
|
+
ProvNum?: number;
|
|
98
|
+
OpNum?: number;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Parameters for GET WebSched Appointments. Returns an abridged appointment object.
|
|
102
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
103
|
+
*/
|
|
104
|
+
export interface GetWebSchedAppointmentsParams {
|
|
105
|
+
date?: string;
|
|
106
|
+
dateStart?: string;
|
|
107
|
+
dateEnd?: string;
|
|
108
|
+
DateTStamp?: string;
|
|
109
|
+
ClinicNum?: number;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Parameters for creating a new appointment.
|
|
113
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
114
|
+
*/
|
|
115
|
+
export interface CreateNewAppointmentParams {
|
|
116
|
+
PatNum: number;
|
|
117
|
+
Op: number;
|
|
118
|
+
AptDateTime: string;
|
|
119
|
+
AptStatus?: AptStatus;
|
|
120
|
+
Pattern?: string;
|
|
121
|
+
Confirmed?: number;
|
|
122
|
+
Note?: string;
|
|
123
|
+
ProvNum?: number;
|
|
124
|
+
ProvHyg?: number;
|
|
125
|
+
ClinicNum?: number;
|
|
126
|
+
IsHygiene?: 'true' | 'false';
|
|
127
|
+
IsNewPatient?: 'true' | 'false';
|
|
128
|
+
Priority?: Priority;
|
|
129
|
+
AppointmentTypeNum?: number;
|
|
130
|
+
colorOverride?: string;
|
|
131
|
+
PatternSecondary?: string;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Parameters for creating a planned appointment.
|
|
135
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
136
|
+
*/
|
|
137
|
+
export interface CreatePlannedAppointmentParams {
|
|
138
|
+
PatNum: number;
|
|
139
|
+
AppointmentTypeNum?: number;
|
|
140
|
+
procNums?: number[];
|
|
141
|
+
Pattern?: string;
|
|
142
|
+
Confirmed?: number;
|
|
143
|
+
Note?: string;
|
|
144
|
+
ProvNum?: number;
|
|
145
|
+
ProvHyg?: number;
|
|
146
|
+
ClinicNum?: number;
|
|
147
|
+
IsHygiene?: 'true' | 'false';
|
|
148
|
+
IsNewPatient?: 'true' | 'false';
|
|
149
|
+
Priority?: Priority;
|
|
150
|
+
PatternSecondary?: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Parameters for scheduling a planned appointment.
|
|
154
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
155
|
+
*/
|
|
156
|
+
export interface SchedulePlannedAppointmentParams {
|
|
157
|
+
AptNum: number;
|
|
158
|
+
AptDateTime: string;
|
|
159
|
+
ProvNum: number;
|
|
160
|
+
Op: number;
|
|
161
|
+
Confirmed?: number;
|
|
162
|
+
Note?: string;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Parameters for scheduling a WebSched appointment.
|
|
166
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
167
|
+
*/
|
|
168
|
+
export interface ScheduleWebSchedAppointmentParams {
|
|
169
|
+
PatNum: number;
|
|
170
|
+
DateTimeStart: string;
|
|
171
|
+
DateTimeEnd: string;
|
|
172
|
+
ProvNum: number;
|
|
173
|
+
OpNum: number;
|
|
174
|
+
defNumApptType: number;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Parameters for updating an appointment.
|
|
178
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
179
|
+
*/
|
|
180
|
+
export interface UpdateAppointmentParams {
|
|
181
|
+
AptNum: number;
|
|
182
|
+
AptStatus?: AptStatus;
|
|
183
|
+
Pattern?: string;
|
|
184
|
+
Confirmed?: number;
|
|
185
|
+
Op?: number;
|
|
186
|
+
Note?: string;
|
|
187
|
+
ProvNum?: number;
|
|
188
|
+
ProvHyg?: number;
|
|
189
|
+
AptDateTime?: string;
|
|
190
|
+
ClinicNum?: number;
|
|
191
|
+
IsHygiene?: 'true' | 'false';
|
|
192
|
+
IsNewPatient?: 'true' | 'false';
|
|
193
|
+
Priority?: Priority;
|
|
194
|
+
AppointmentTypeNum?: number;
|
|
195
|
+
UnschedStatus?: number;
|
|
196
|
+
colorOverride?: string;
|
|
197
|
+
PatternSecondary?: string;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Breaks an appointment. Only appointments with an AptStatus of Scheduled can be broken. Creates a CommLog entry if the office has that preference turned on. To reschedule a broken appointment, use Appointments PUT (update) to update the Status, AptDateTime, and Op of the broken appointment.
|
|
201
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
202
|
+
*/
|
|
203
|
+
export interface BreakAppointmentParams {
|
|
204
|
+
AptNum: number;
|
|
205
|
+
sendToUnscheduledList: 'true' | 'false';
|
|
206
|
+
breakType?: 'Missed' | 'Cancelled';
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Parameters for confirming an appointment.
|
|
210
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
211
|
+
*/
|
|
212
|
+
export interface ConfirmAppointmentParams {
|
|
213
|
+
AptNum: number;
|
|
214
|
+
confirmVal?: 'None' | 'Sent' | 'Confirmed' | 'Not Accepted' | 'Failed';
|
|
215
|
+
defNum?: number;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Appointment status options.
|
|
219
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
220
|
+
*/
|
|
221
|
+
export type AptStatus = "Scheduled" | "Complete" | "UnschedList" | "ASAP" | "Broken" | "Planned" | "PtNote" | "PtNoteCompleted";
|
|
222
|
+
/**
|
|
223
|
+
* Appointment priority options.
|
|
224
|
+
*/
|
|
225
|
+
export type Priority = "Normal" | "ASAP";
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameters for fetching multiple patients.
|
|
3
|
+
* @see https://www.opendental.com/site/apipatients.html
|
|
4
|
+
*/
|
|
5
|
+
export interface GetPatientsParams {
|
|
6
|
+
LName?: string;
|
|
7
|
+
FName?: string;
|
|
8
|
+
Phone?: string;
|
|
9
|
+
Address?: string;
|
|
10
|
+
hideInactive?: 'true' | 'false';
|
|
11
|
+
City?: string;
|
|
12
|
+
State?: string;
|
|
13
|
+
SSN?: string;
|
|
14
|
+
ChartNumber?: string;
|
|
15
|
+
guarOnly?: 'true' | 'false';
|
|
16
|
+
showArchived?: 'true' | 'false';
|
|
17
|
+
Birthdate?: string;
|
|
18
|
+
SiteNum?: number;
|
|
19
|
+
SubscriberId?: string;
|
|
20
|
+
Email?: string;
|
|
21
|
+
Country?: string;
|
|
22
|
+
ClinicNum?: number;
|
|
23
|
+
clinicAbbr?: string;
|
|
24
|
+
invoiceNumber?: string;
|
|
25
|
+
Offset?: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Parameters for fetching comprehensive patient data.
|
|
29
|
+
* @see https://www.opendental.com/site/apipatients.html
|
|
30
|
+
*/
|
|
31
|
+
export interface GetPatientsSimpleParams extends GetPatientsParams {
|
|
32
|
+
LName?: string;
|
|
33
|
+
FName?: string;
|
|
34
|
+
Birthdate?: string;
|
|
35
|
+
ClinicNum?: number;
|
|
36
|
+
PatStatus?: 'Patient' | 'NonPatient' | 'Inactive' | 'Archived' | 'Deceased' | 'Prospective';
|
|
37
|
+
DateTStamp?: string;
|
|
38
|
+
PriProv?: number;
|
|
39
|
+
Gender?: 'Male' | 'Female' | 'Unknown' | 'Other';
|
|
40
|
+
Position?: 'Single' | 'Married' | 'Child' | 'Widowed' | 'Divorced';
|
|
41
|
+
Guarantor?: number;
|
|
42
|
+
SuperFamily?: number;
|
|
43
|
+
Offset?: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Parameters for creating a new patient.
|
|
47
|
+
* Required fields depend on Open Dental's configuration.
|
|
48
|
+
* @see https://www.opendental.com/site/apipatients.html
|
|
49
|
+
*/
|
|
50
|
+
export interface CreatePatientParams {
|
|
51
|
+
LName: string;
|
|
52
|
+
FName: string;
|
|
53
|
+
MiddleI?: string;
|
|
54
|
+
Preferred?: string;
|
|
55
|
+
PatStatus?: 'Patient' | 'NonPatient' | 'Inactive' | 'Archived' | 'Deceased' | 'Prospective';
|
|
56
|
+
Gender?: 'Male' | 'Female' | 'Unknown' | 'Other';
|
|
57
|
+
Position?: 'Single' | 'Married' | 'Child' | 'Widowed' | 'Divorced';
|
|
58
|
+
Birthdate?: string;
|
|
59
|
+
SSN?: string;
|
|
60
|
+
Address?: string;
|
|
61
|
+
Address2?: string;
|
|
62
|
+
City?: string;
|
|
63
|
+
State?: string;
|
|
64
|
+
Zip?: string;
|
|
65
|
+
HmPhone?: string;
|
|
66
|
+
WkPhone?: string;
|
|
67
|
+
WirelessPhone?: string;
|
|
68
|
+
Guarantor?: number;
|
|
69
|
+
Email?: string;
|
|
70
|
+
PriProv?: number;
|
|
71
|
+
SecProv?: number;
|
|
72
|
+
BillingType?: string;
|
|
73
|
+
FamFinUrgNote?: string;
|
|
74
|
+
ChartNumber?: string;
|
|
75
|
+
DateFirstVisit?: string;
|
|
76
|
+
ClinicNum?: number;
|
|
77
|
+
Ward?: string;
|
|
78
|
+
PreferConfirmMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall';
|
|
79
|
+
PreferContactMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall' | 'Mail';
|
|
80
|
+
PreferRecallMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall' | 'Mail';
|
|
81
|
+
Language?: string;
|
|
82
|
+
AdmitDate?: string;
|
|
83
|
+
SuperFamily?: number;
|
|
84
|
+
TxtMsgOk?: 'Unknown' | 'Yes' | 'No';
|
|
85
|
+
}
|
|
86
|
+
export interface UpdatePatientParams {
|
|
87
|
+
LName?: string;
|
|
88
|
+
FName?: string;
|
|
89
|
+
MiddleI?: string;
|
|
90
|
+
Preferred?: string;
|
|
91
|
+
PatStatus?: 'Patient' | 'NonPatient' | 'Inactive' | 'Archived' | 'Deceased' | 'Prospective';
|
|
92
|
+
Gender?: 'Male' | 'Female' | 'Unknown' | 'Other';
|
|
93
|
+
Position?: 'Single' | 'Married' | 'Child' | 'Widowed' | 'Divorced';
|
|
94
|
+
Birthdate?: string;
|
|
95
|
+
SSN?: string;
|
|
96
|
+
Address?: string;
|
|
97
|
+
Address2?: string;
|
|
98
|
+
City?: string;
|
|
99
|
+
State?: string;
|
|
100
|
+
Zip?: string;
|
|
101
|
+
HmPhone?: string;
|
|
102
|
+
WkPhone?: string;
|
|
103
|
+
WirelessPhone?: string;
|
|
104
|
+
Guarantor?: number;
|
|
105
|
+
Email?: string;
|
|
106
|
+
PriProv?: number;
|
|
107
|
+
SecProv?: number;
|
|
108
|
+
BillingType?: string;
|
|
109
|
+
FamFinUrgNote?: string;
|
|
110
|
+
ChartNumber?: string;
|
|
111
|
+
DateFirstVisit?: string;
|
|
112
|
+
ClinicNum?: number;
|
|
113
|
+
Ward?: string;
|
|
114
|
+
PreferConfirmMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall';
|
|
115
|
+
PreferContactMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall' | 'Mail';
|
|
116
|
+
PreferRecallMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall' | 'Mail';
|
|
117
|
+
Language?: string;
|
|
118
|
+
AdmitDate?: string;
|
|
119
|
+
SuperFamily?: number;
|
|
120
|
+
TxtMsgOk?: 'Unknown' | 'Yes' | 'No';
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Represents a patient in the Open Dental system.
|
|
124
|
+
* @see https://www.opendental.com/site/apipatients.html
|
|
125
|
+
*/
|
|
126
|
+
export interface Patient {
|
|
127
|
+
serverDateTime?: string;
|
|
128
|
+
PatNum?: number;
|
|
129
|
+
LName?: string;
|
|
130
|
+
FName?: string;
|
|
131
|
+
MiddleI?: string;
|
|
132
|
+
Preferred?: string;
|
|
133
|
+
PatStatus?: 'Patient' | 'NonPatient' | 'Inactive' | 'Archived' | 'Deceased' | 'Prospective';
|
|
134
|
+
Gender?: 'Male' | 'Female' | 'Unknown' | 'Other';
|
|
135
|
+
Position?: 'Single' | 'Married' | 'Child' | 'Widowed' | 'Divorced';
|
|
136
|
+
Birthdate?: string;
|
|
137
|
+
SSN?: string;
|
|
138
|
+
Address?: string;
|
|
139
|
+
Address2?: string;
|
|
140
|
+
City?: string;
|
|
141
|
+
State?: string;
|
|
142
|
+
Zip?: string;
|
|
143
|
+
HmPhone?: string;
|
|
144
|
+
WkPhone?: string;
|
|
145
|
+
WirelessPhone?: string;
|
|
146
|
+
Guarantor?: number;
|
|
147
|
+
Email?: string;
|
|
148
|
+
EstBalance?: number;
|
|
149
|
+
PriProv?: number;
|
|
150
|
+
priProvAbbr?: string;
|
|
151
|
+
SecProv?: number;
|
|
152
|
+
secProvAbbr?: string;
|
|
153
|
+
BillingType?: string;
|
|
154
|
+
ImageFolder?: string;
|
|
155
|
+
FamFinUrgNote?: string;
|
|
156
|
+
ChartNumber?: string;
|
|
157
|
+
MedicaidID?: string;
|
|
158
|
+
BalTotal?: number;
|
|
159
|
+
DateFirstVisit?: string;
|
|
160
|
+
ClinicNum?: number;
|
|
161
|
+
clinicAbbr?: string;
|
|
162
|
+
Ward?: string;
|
|
163
|
+
PreferConfirmMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall';
|
|
164
|
+
PreferContactMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall' | 'Mail';
|
|
165
|
+
PreferRecallMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall' | 'Mail';
|
|
166
|
+
Language?: string;
|
|
167
|
+
AdmitDate?: string;
|
|
168
|
+
siteDesc?: string;
|
|
169
|
+
DateTStamp?: string;
|
|
170
|
+
SuperFamily?: number;
|
|
171
|
+
TxtMsgOk?: 'Unknown' | 'Yes' | 'No';
|
|
172
|
+
SecDateEntry?: string;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Simplified representation of a patient in the Open Dental system.
|
|
176
|
+
* @see https://www.opendental.com/site/apipatients.html
|
|
177
|
+
*/
|
|
178
|
+
export interface PatientSummary {
|
|
179
|
+
PatNum?: number;
|
|
180
|
+
LName?: string;
|
|
181
|
+
FName?: string;
|
|
182
|
+
MiddleI?: string;
|
|
183
|
+
Preferred?: string;
|
|
184
|
+
PatStatus?: 'Patient' | 'NonPatient' | 'Inactive' | 'Archived' | 'Deceased' | 'Prospective';
|
|
185
|
+
Gender?: 'Male' | 'Female' | 'Unknown' | 'Other';
|
|
186
|
+
Birthdate?: string;
|
|
187
|
+
SSN?: string;
|
|
188
|
+
Address?: string;
|
|
189
|
+
Address2?: string;
|
|
190
|
+
City?: string;
|
|
191
|
+
State?: string;
|
|
192
|
+
Zip?: string;
|
|
193
|
+
HmPhone?: string;
|
|
194
|
+
WkPhone?: string;
|
|
195
|
+
WirelessPhone?: string;
|
|
196
|
+
Email?: string;
|
|
197
|
+
priProvAbbr?: string;
|
|
198
|
+
secProvAbbr?: string;
|
|
199
|
+
BillingType?: string;
|
|
200
|
+
ChartNumber?: string;
|
|
201
|
+
ClinicNum?: number;
|
|
202
|
+
clinicAbbr?: string;
|
|
203
|
+
TxtMsgOk?: 'Unknown' | 'Yes' | 'No';
|
|
204
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a procedure log entry in the Open Dental system.
|
|
3
|
+
* @see https://www.opendental.com/site/apiprocedurelogs.html
|
|
4
|
+
*/
|
|
5
|
+
export interface ProcedureLog {
|
|
6
|
+
ProcNum?: number;
|
|
7
|
+
PatNum?: number;
|
|
8
|
+
AptNum?: number;
|
|
9
|
+
ProcDate?: string;
|
|
10
|
+
ProcFee?: number;
|
|
11
|
+
Surf?: Surf;
|
|
12
|
+
ToothNum?: string;
|
|
13
|
+
ToothRange?: string;
|
|
14
|
+
Priority?: number;
|
|
15
|
+
priority?: string;
|
|
16
|
+
ProcStatus?: 'TP' | 'C' | 'EO' | 'R' | 'D' | 'E';
|
|
17
|
+
ProvNum?: number;
|
|
18
|
+
provAbbr?: string;
|
|
19
|
+
Dx?: string;
|
|
20
|
+
dxName?: string;
|
|
21
|
+
PlannedAptNum?: number;
|
|
22
|
+
Prosthesis?: string;
|
|
23
|
+
DateOriginalProsth?: string;
|
|
24
|
+
ClinicNum?: number;
|
|
25
|
+
CodeNum?: number;
|
|
26
|
+
procCode?: string;
|
|
27
|
+
descript?: string;
|
|
28
|
+
ProcTime?: string;
|
|
29
|
+
UnitQty?: number;
|
|
30
|
+
DateTStamp?: string;
|
|
31
|
+
IsDateProsthEst?: 'true' | 'false';
|
|
32
|
+
serverDateTime?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Create procedure log parameters.
|
|
36
|
+
* @see https://www.opendental.com/site/apiprocedurelogs.html
|
|
37
|
+
*/
|
|
38
|
+
export interface createProcedureLogParams {
|
|
39
|
+
PatNum: number;
|
|
40
|
+
ProcDate: string;
|
|
41
|
+
ProcStatus: 'TP' | 'C' | 'EO';
|
|
42
|
+
procCode: string;
|
|
43
|
+
AptNum?: number;
|
|
44
|
+
ProcFee?: number;
|
|
45
|
+
Surf?: Surf;
|
|
46
|
+
ToothNum?: string;
|
|
47
|
+
ToothRange?: string;
|
|
48
|
+
Priority?: number;
|
|
49
|
+
priority?: string;
|
|
50
|
+
ProvNum?: number;
|
|
51
|
+
Dx?: string;
|
|
52
|
+
dxName?: string;
|
|
53
|
+
PlannedAptNum?: number;
|
|
54
|
+
ClinicNum?: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Update procedure log parameters.
|
|
58
|
+
* @see https://www.opendental.com/site/apiprocedurelogs.html
|
|
59
|
+
*/
|
|
60
|
+
export interface updateProcedureLogParams {
|
|
61
|
+
ProcNum: number;
|
|
62
|
+
AptNum?: number;
|
|
63
|
+
ProcDate?: string;
|
|
64
|
+
ProcFee?: number;
|
|
65
|
+
Priority?: number;
|
|
66
|
+
ProcStatus?: 'TP' | 'C' | 'EO';
|
|
67
|
+
ProvNum?: number;
|
|
68
|
+
Dx?: string;
|
|
69
|
+
PlannedAptNum?: number;
|
|
70
|
+
ClinicNum?: number;
|
|
71
|
+
procCode?: string;
|
|
72
|
+
ToothNum?: string;
|
|
73
|
+
Surf?: Surf;
|
|
74
|
+
ToothRange?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Insurance History object in Open Dental.
|
|
78
|
+
* @see https://www.opendental.com/site/apiprocedurelogs.html
|
|
79
|
+
*/
|
|
80
|
+
export interface InsuranceHistory {
|
|
81
|
+
insHistPrefName?: string;
|
|
82
|
+
procDate?: string;
|
|
83
|
+
ProcNum?: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* get Insurance History parameters.
|
|
87
|
+
* @see https://www.opendental.com/site/apiprocedurelogs.html
|
|
88
|
+
*/
|
|
89
|
+
export interface getInsuranceHistoryParams {
|
|
90
|
+
PatNum: number;
|
|
91
|
+
InsSubNum: number;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* post Insurance History parameters.
|
|
95
|
+
* @see https://www.opendental.com/site/apiprocedurelogs.html
|
|
96
|
+
*/
|
|
97
|
+
export interface postInsuranceHistoryParams {
|
|
98
|
+
PatNum: number;
|
|
99
|
+
InsSubNum: number;
|
|
100
|
+
insHistPrefName: "InsHistBWCodes" | "InsHistPanoCodes" | "InsHistExamCodes" | "InsHistProphyCodes" | "InsHistPerioURCodes" | "InsHistPerioULCodes" | "InsHistPerioLRCodes" | "InsHistPerioLLCodes" | "InsHistPerioMaintCodes" | "InsHistDebridementCodes";
|
|
101
|
+
ProcDate: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Surf: Required for the treatment areas of some procCodes. Can be tooth Surfaces (B/F,V,M,O/I,D,L), mouth Quadrants (UL,UR,LR,LL), Sextants (1,2,3,4,5,6), or Arches (U or L).
|
|
105
|
+
* @see https://www.opendental.com/site/apiappointments.html
|
|
106
|
+
*/
|
|
107
|
+
export type Surf = "B/F" | "V" | "M" | "O/I" | "D" | "L" | "UL" | "UR" | "LR" | "LL" | "1" | "2" | "3" | "4" | "5" | "6" | "U" | "L";
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
declare class HttpClient {
|
|
2
|
+
private client;
|
|
3
|
+
constructor(baseURL: string, authToken: string);
|
|
4
|
+
/**
|
|
5
|
+
* GET request
|
|
6
|
+
* @param {string} url - The endpoint URL
|
|
7
|
+
* @param {object} [params] - Optional query parameters
|
|
8
|
+
* @returns {Promise<T>} - The API response
|
|
9
|
+
*/
|
|
10
|
+
get<T>(url: string, params?: object): Promise<T>;
|
|
11
|
+
/**
|
|
12
|
+
* POST request
|
|
13
|
+
* @param {string} url - The endpoint URL
|
|
14
|
+
* @param {object} data - The payload to send
|
|
15
|
+
* @returns {Promise<T>} - The API response
|
|
16
|
+
*/
|
|
17
|
+
post<T>(url: string, data: object): Promise<T>;
|
|
18
|
+
/**
|
|
19
|
+
* PUT request
|
|
20
|
+
* @param {string} url - The endpoint URL
|
|
21
|
+
* @param {object} data - The payload to update
|
|
22
|
+
* @returns {Promise<T>} - The API response
|
|
23
|
+
*/
|
|
24
|
+
put<T>(url: string, data: object): Promise<T>;
|
|
25
|
+
/**
|
|
26
|
+
* DELETE request
|
|
27
|
+
* @param {string} url - The endpoint URL
|
|
28
|
+
* @returns {Promise<T>} - The API response
|
|
29
|
+
*/
|
|
30
|
+
delete<T>(url: string): Promise<T>;
|
|
31
|
+
/**
|
|
32
|
+
* Handles requests and errors consistently across methods.
|
|
33
|
+
* @param {Function} requestFn - The Axios request function to execute.
|
|
34
|
+
* @returns {Promise<T>} - The API response or an error message.
|
|
35
|
+
* @throws {Error} - Throws an error with a formatted message.
|
|
36
|
+
*/
|
|
37
|
+
private handleRequest;
|
|
38
|
+
/**
|
|
39
|
+
* Error handler to provide detailed error information.
|
|
40
|
+
* @param {unknown} error - The error object from Axios or another source.
|
|
41
|
+
* @throws {Error} - A formatted error with API details or a general message.
|
|
42
|
+
*/
|
|
43
|
+
private handleError;
|
|
44
|
+
}
|
|
45
|
+
export default HttpClient;
|