@rinse-dental/open-dental 0.0.6 → 0.1.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.
Files changed (48) hide show
  1. package/dist/api/appointments.d.ts +196 -0
  2. package/dist/api/appointments.d.ts.map +1 -0
  3. package/dist/api/appointments.js +253 -8
  4. package/dist/api/commlogs.d.ts +28 -0
  5. package/dist/api/commlogs.d.ts.map +1 -0
  6. package/dist/api/commlogs.js +48 -0
  7. package/dist/api/index.d.ts +3 -0
  8. package/dist/api/index.d.ts.map +1 -0
  9. package/dist/api/patients.d.ts +113 -0
  10. package/dist/api/patients.d.ts.map +1 -0
  11. package/dist/api/patients.js +149 -6
  12. package/dist/api/procedureLog.d.ts +117 -0
  13. package/dist/api/procedureLog.d.ts.map +1 -0
  14. package/dist/api/procedureLog.js +177 -0
  15. package/dist/index.d.ts +2 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/openDental.d.ts +19 -0
  18. package/dist/openDental.d.ts.map +1 -0
  19. package/dist/types/appointmentType.d.ts +226 -0
  20. package/dist/types/appointmentType.d.ts.map +1 -0
  21. package/dist/types/commlogType.d.ts +28 -0
  22. package/dist/types/commlogType.d.ts.map +1 -0
  23. package/dist/types/commlogType.js +2 -0
  24. package/dist/types/patientTypes.d.ts +205 -0
  25. package/dist/types/patientTypes.d.ts.map +1 -0
  26. package/dist/types/patientTypes.js +2 -0
  27. package/dist/types/procedurelogTypes.d.ts +108 -0
  28. package/dist/types/procedurelogTypes.d.ts.map +1 -0
  29. package/dist/types/procedurelogTypes.js +3 -0
  30. package/dist/utils/errorHandler.d.ts +1 -0
  31. package/dist/utils/errorHandler.d.ts.map +1 -0
  32. package/dist/utils/httpClient.d.ts +46 -0
  33. package/dist/utils/httpClient.d.ts.map +1 -0
  34. package/dist/utils/httpClient.js +25 -33
  35. package/package.json +1 -1
  36. package/src/api/appointments.ts +323 -26
  37. package/src/api/commlogs.ts +63 -0
  38. package/src/api/patients.ts +192 -13
  39. package/src/api/procedureLog.ts +230 -0
  40. package/src/openDental.ts +4 -4
  41. package/src/types/appointmentType.ts +249 -0
  42. package/src/types/commlogType.ts +28 -0
  43. package/src/types/patientTypes.ts +209 -0
  44. package/src/types/procedurelogTypes.ts +119 -0
  45. package/src/utils/httpClient.ts +27 -31
  46. package/tsconfig.json +4 -1
  47. package/src/utils/types.ts +0 -134
  48. /package/dist/{utils/types.js → types/appointmentType.js} +0 -0
@@ -0,0 +1,249 @@
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; // Server timestamp of the appointment; returned by some endpoints
8
+ AptNum?: number; // Unique identifier for the appointment
9
+ PatNum?: number; // Unique identifier for the patient
10
+ AptStatus?: AptStatus; // Status of the appointment (Scheduled, Complete, etc.)
11
+ Pattern?: string; // Time pattern in 5-minute increments, e.g., "/XX/" for 20 minutes
12
+ Confirmed?: number; // Confirmation status code
13
+ confirmed?: string; // Description of the confirmation status
14
+ TimeLocked?: "true" | "false"; // Indicates if the appointment time is locked
15
+ Op?: number; // Operatory number
16
+ Note?: string; // Notes for the appointment
17
+ ProvNum?: number; // Provider number associated with the appointment
18
+ provAbbr?: string; // Abbreviation of the provider's name
19
+ ProvHyg?: number; // Hygienist provider number
20
+ AptDateTime?: string; // Appointment start time in "yyyy-MM-dd HH:mm:ss" format
21
+ NextAptNum?: number; // Appointment number of the next scheduled appointment
22
+ UnschedStatus?: number; // Status of an unscheduled appointment
23
+ unschedStatus?: string; // Description of the unscheduled status
24
+ IsNewPatient?: "true" | "false"; // Indicates if the appointment is for a new patient
25
+ ProcDescript?: string; // Description of procedures linked to the appointment
26
+ ClinicNum?: number; // Clinic number, optional if not using clinics
27
+ IsHygiene?: "true" | "false"; // Indicates if the appointment is for hygiene
28
+ DateTStamp?: string; // Timestamp of the last update in "yyyy-MM-dd HH:mm:ss" format
29
+ DateTimeArrived?: string; // Time the patient arrived, if available
30
+ DateTimeSeated?: string; // Time the patient was seated, if available
31
+ DateTimeDismissed?: string; // Time the patient was dismissed, if available
32
+ InsPlan1?: number; // Primary insurance plan number
33
+ InsPlan2?: number; // Secondary insurance plan number
34
+ DateTimeAskedToArrive?: string; // Requested arrival time in "yyyy-MM-dd HH:mm:ss" format
35
+ colorOverride?: string; // Custom color in "R,G,B" format
36
+ AppointmentTypeNum?: number; // Appointment type number
37
+ eServiceLogType?: string; //Used only for GET WebSched; eServiceLogType field as either "Recall", "NewPat", "ExistingPat", or "ASAP"
38
+ SecDateTEntry?: string; // Secondary date entry timestamp
39
+ Priority?: Priority; // Priority of the appointment (Normal, ASAP)
40
+ PatternSecondary?: string; // Secondary time pattern in 5-minute increments
41
+ ItemOrderPlanned?: number; // Order of the item in planned appointments
42
+ }
43
+
44
+ /**
45
+ * Parameters for GET Appointments.
46
+ * @see https://www.opendental.com/site/apiappointments.html
47
+ */
48
+ export interface GetAppointmentParams {
49
+ PatNum?: number; // Filter by patient number
50
+ AptStatus?: AptStatus; // Filter by appointment status
51
+ Op?: number; // Filter by operatory number
52
+ date?: string; // Search for a specific day in "yyyy-MM-dd" format
53
+ dateStart?: string; // Start date for date range in "yyyy-MM-dd" format
54
+ dateEnd?: string; // End date for date range in "yyyy-MM-dd" format
55
+ ClinicNum?: number; // Filter by clinic number
56
+ DateTStamp?: string; // Return only appointments updated after this timestamp
57
+ Offset?: number; // Pagination offset for results
58
+ }
59
+
60
+ /**
61
+ * Parameters for GET ASAP Appointments.
62
+ * @see https://www.opendental.com/site/apiappointments.html
63
+ */
64
+ export interface GetASAPParams {
65
+ ClinicNum?: number; // Required if clinics are enabled
66
+ ProvNum?: number; // Optional provider number
67
+ }
68
+
69
+ /**
70
+ * Parameters for GET Slots.
71
+ * @see https://www.opendental.com/site/apiappointments.html
72
+ */
73
+ export interface GetSlotsParams {
74
+ date?: string; // Search for a specific day in "yyyy-MM-dd" format
75
+ dateStart?: string; // Start date for date range in "yyyy-MM-dd" format
76
+ dateEnd?: string; // End date for date range in "yyyy-MM-dd" format
77
+ lengthMinutes?: number; // Minimum length of the slot in minutes
78
+ ProvNum?: number; // Provider number
79
+ OpNum?: number; // Operatory number
80
+ }
81
+
82
+ /**
83
+ * Parameters for GET SlotsWebSched.
84
+ * @see https://www.opendental.com/site/apiappointments.html
85
+ */
86
+ export interface GetSlotsWebSchedParams {
87
+ date?: string; // Search for a specific day in "yyyy-MM-dd" format
88
+ dateStart?: string; // Start date for date range in "yyyy-MM-dd" format
89
+ dateEnd?: string; // End date for date range in "yyyy-MM-dd" format
90
+ ClinicNum: number; // Required if clinics are enabled
91
+ defNumApptType?: number; // Appointment type definition number
92
+ isNewPatient?: 'true' | 'false'; // Indicate if the appointment is for a new patient
93
+ }
94
+
95
+ /**
96
+ * Represents an appointment slot object, used to return GET Slots and GET SlotsWebSched.
97
+ * @see https://www.opendental.com/site/apiappointments.html
98
+ */
99
+ export interface AppointmentSlot {
100
+ DateTimeStart?: string; // Start time of the slot in "yyyy-MM-dd HH:mm:ss" format
101
+ DateTimeEnd?: string; // End time of the slot in "yyyy-MM-dd HH:mm:ss" format
102
+ ProvNum?: number; // Provider number associated with the slot
103
+ OpNum?: number; // Operatory number associated with the slot
104
+ }
105
+
106
+ /**
107
+ * Parameters for GET WebSched Appointments. Returns an abridged appointment object.
108
+ * @see https://www.opendental.com/site/apiappointments.html
109
+ */
110
+ export interface GetWebSchedAppointmentsParams {
111
+ date?: string; // Search for a specific day in "yyyy-MM-dd" format
112
+ dateStart?: string; // Start date for date range in "yyyy-MM-dd" format
113
+ dateEnd?: string; // End date for date range in "yyyy-MM-dd" format
114
+ DateTStamp?: string; // Return only appointments updated after this timestamp
115
+ ClinicNum?: number; // Filter by clinic number
116
+ }
117
+
118
+ /**
119
+ * Parameters for creating a new appointment.
120
+ * @see https://www.opendental.com/site/apiappointments.html
121
+ */
122
+ export interface CreateNewAppointmentParams {
123
+ PatNum: number; // Required: Patient number
124
+ Op: number; // Required: Operatory number
125
+ AptDateTime: string; // Required: Appointment start time in "yyyy-MM-dd HH:mm:ss" format
126
+ AptStatus?: AptStatus; // Optional: Appointment status
127
+ Pattern?: string; // Optional: Time pattern
128
+ Confirmed?: number; // Optional: Confirmation status
129
+ Note?: string; // Optional: Notes for the appointment
130
+ ProvNum?: number; // Optional: Provider number
131
+ ProvHyg?: number; // Optional: Hygienist provider number
132
+ ClinicNum?: number; // Optional: Clinic number
133
+ IsHygiene?: 'true' | 'false'; // Optional: Indicates a hygiene appointment. Default false.
134
+ IsNewPatient?: 'true' | 'false'; // Optional: Indicates a new patient appointment. Default false.
135
+ Priority?: Priority; // Optional: Appointment priority. Default "Normal".
136
+ AppointmentTypeNum?: number; // Optional: Appointment type number
137
+ colorOverride?: string; // Optional: Custom color in "R,G,B" format
138
+ PatternSecondary?: string; // Optional: Secondary time pattern
139
+ }
140
+
141
+ /**
142
+ * Parameters for creating a planned appointment.
143
+ * @see https://www.opendental.com/site/apiappointments.html
144
+ */
145
+ export interface CreatePlannedAppointmentParams {
146
+ PatNum: number; // Required: Patient number
147
+ AppointmentTypeNum?: number; // Optional: Appointment type number
148
+ procNums?: number[]; // Optional: Array of procedure numbers
149
+ Pattern?: string; // Optional: Time pattern
150
+ Confirmed?: number; // Optional: Confirmation status
151
+ Note?: string; // Optional: Notes for the appointment
152
+ ProvNum?: number; // Optional: Provider number
153
+ ProvHyg?: number; // Optional: Hygienist provider number
154
+ ClinicNum?: number; // Optional: Clinic number
155
+ IsHygiene?: 'true' | 'false'; // Optional: Indicates a hygiene appointment
156
+ IsNewPatient?: 'true' | 'false'; // Optional: Indicates a new patient appointment
157
+ Priority?: Priority; // Optional: Appointment priority
158
+ PatternSecondary?: string; // Optional: Secondary time pattern
159
+ }
160
+
161
+ /**
162
+ * Parameters for scheduling a planned appointment.
163
+ * @see https://www.opendental.com/site/apiappointments.html
164
+ */
165
+ export interface SchedulePlannedAppointmentParams {
166
+ AptNum: number; // Required: Appointment number with Planned status
167
+ AptDateTime: string; // Required: Appointment start time in "yyyy-MM-dd HH:mm:ss" format
168
+ ProvNum: number; // Required: Provider number
169
+ Op: number; // Required: Operatory number
170
+ Confirmed?: number; // Optional: Confirmation status
171
+ Note?: string; // Optional: Notes for the appointment
172
+ }
173
+
174
+ /**
175
+ * Parameters for scheduling a WebSched appointment.
176
+ * @see https://www.opendental.com/site/apiappointments.html
177
+ */
178
+ export interface ScheduleWebSchedAppointmentParams {
179
+ PatNum: number; // Required: Patient number
180
+ DateTimeStart: string; // Required: Start time of the appointment
181
+ DateTimeEnd: string; // Required: End time of the appointment
182
+ ProvNum: number; // Required: Provider number
183
+ OpNum: number; // Required: Operatory number
184
+ defNumApptType: number; // Required: Appointment type definition number
185
+ }
186
+
187
+ /**
188
+ * Parameters for updating an appointment.
189
+ * @see https://www.opendental.com/site/apiappointments.html
190
+ */
191
+ export interface UpdateAppointmentParams {
192
+ AptNum: number; //Required in the URL.
193
+ AptStatus?: AptStatus; // Optional: Updated appointment status
194
+ Pattern?: string; // Optional: Updated time pattern
195
+ Confirmed?: number; // Optional: Updated confirmation status
196
+ Op?: number; // Optional: Updated operatory number
197
+ Note?: string; // Optional: Updated notes
198
+ ProvNum?: number; // Optional: Updated provider number
199
+ ProvHyg?: number; // Optional: Updated hygienist provider number
200
+ AptDateTime?: string; // Optional: Updated start time
201
+ ClinicNum?: number; // Optional: Updated clinic number
202
+ IsHygiene?: 'true' | 'false'; // Optional: Indicates a hygiene appointment
203
+ IsNewPatient?: 'true' | 'false'; // Optional: Indicates a new patient appointment
204
+ Priority?: Priority; // Optional: Updated priority
205
+ AppointmentTypeNum?: number; // Optional: Updated appointment type number
206
+ UnschedStatus?: number; // Optional: Unscheduled status
207
+ colorOverride?: string; // Optional: Updated custom color in "R,G,B" format
208
+ PatternSecondary?: string; // Optional: Updated secondary time pattern
209
+ }
210
+
211
+ /**
212
+ * 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.
213
+ * @see https://www.opendental.com/site/apiappointments.html
214
+ */
215
+ export interface BreakAppointmentParams {
216
+ AptNum: number; //Required in the URL.
217
+ sendToUnscheduledList: 'true' | 'false'; // Required: Indicates if the appointment should go to the unscheduled list
218
+ breakType?: 'Missed' | 'Cancelled'; // Optional: Reason for breaking the appointment
219
+ }
220
+
221
+ /**
222
+ * Parameters for confirming an appointment.
223
+ * @see https://www.opendental.com/site/apiappointments.html
224
+ */
225
+ export interface ConfirmAppointmentParams {
226
+ AptNum: number; //Required in the URL.
227
+ confirmVal?: 'None' | 'Sent' | 'Confirmed' | 'Not Accepted' | 'Failed'; // Optional: Confirmation value
228
+ defNum?: number; // Optional: Confirmation definition number
229
+ }
230
+
231
+ /**
232
+ * Appointment status options.
233
+ * @see https://www.opendental.com/site/apiappointments.html
234
+ */
235
+ export type AptStatus =
236
+ | "Scheduled"
237
+ | "Complete"
238
+ | "UnschedList"
239
+ | "ASAP"
240
+ | "Broken"
241
+ | "Planned"
242
+ | "PtNote"
243
+ | "PtNoteCompleted";
244
+
245
+ /**
246
+ * Appointment priority options.
247
+ */
248
+ export type Priority = "Normal" | "ASAP";
249
+
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Represents a communication log in the Open Dental system.
3
+ * @see https://www.opendental.com/site/apicommlogs.html
4
+ */
5
+ export interface CommLog {
6
+ CommLogNum?: number; // Unique identifier for the communication log
7
+ PatNum?: number; // Unique identifier for the patient
8
+ CommDateTime?: string; // Date and time of the communication in "yyyy-MM-dd HH:mm:ss" format
9
+ Mode_?: "None" | "Email" | "Mail" | "Phone" | "In Person" | "Text" | "Email and Text" | "Phone and Text"; // Mode of communication
10
+ Note?: string; // Detailed note about the communication
11
+ CommType?: number; // Type of communication: definition.DefNum where definition.Category=25
12
+ commType?: string; // Optional: Human-readable description of the communication type
13
+ SentOrReceived?: "Sent" | "Received" | "Neither"; // Optional: Direction of communication
14
+ }
15
+
16
+ /**
17
+ * Parameters for creating a new communication log.
18
+ * @see https://www.opendental.com/site/apicommlogs.html
19
+ */
20
+ export interface CreateCommLogParams {
21
+ PatNum: number; // Required: Unique identifier for the patient
22
+ CommDateTime: string; // Required: Date and time of the communication in "yyyy-MM-dd HH:mm:ss" format
23
+ Mode_: "None" | "Email" | "Mail" | "Phone" | "In Person" | "Text" | "Email and Text" | "Phone and Text"; // Required: Mode of communication
24
+ Note: string; // Required: Detailed note about the communication
25
+ CommType?: number; // Optional: Type of communication: definition.DefNum where definition.Category=25
26
+ commType?: string; // Optional: Human-readable description of the communication type
27
+ SentOrReceived?: "Sent" | "Received" | "Neither"; // Optional: Direction of communication
28
+ }
@@ -0,0 +1,209 @@
1
+ /**
2
+ * Parameters for fetching multiple patients.
3
+ * @see https://www.opendental.com/site/apipatients.html
4
+ */
5
+ export interface GetPatientsParams {
6
+ LName?: string; //Supports partial string matching and is case-insensitive.
7
+ FName?: string; //Supports partial string matching and is case-insensitive.
8
+ Phone?: string; // phone number
9
+ Address?: string; // Primary address
10
+ hideInactive?: 'true' | 'false';
11
+ City?: string; // City
12
+ State?: string; // State
13
+ SSN?: string; // Social Security Number
14
+ ChartNumber?: string; // Chart number
15
+ guarOnly?: 'true' | 'false';
16
+ showArchived?: 'true' | 'false';
17
+ Birthdate?: string; //In "yyyy-mm-dd" format.
18
+ SiteNum?: number;
19
+ SubscriberId?: string;
20
+ Email?: string; // Email address
21
+ Country?: string;
22
+ ClinicNum?: number; //comma separated list
23
+ clinicAbbr?: string; // Clinic abbreviation
24
+ invoiceNumber?: string;
25
+ Offset?: number; // Pagination offset
26
+ }
27
+
28
+ /**
29
+ * Parameters for fetching comprehensive patient data.
30
+ * @see https://www.opendental.com/site/apipatients.html
31
+ */
32
+ export interface GetPatientsSimpleParams extends GetPatientsParams {
33
+ LName?: string; //Supports partial string matching and is case-insensitive.
34
+ FName?: string; //Supports partial string matching and is case-insensitive.
35
+ Birthdate?: string; //In "yyyy-mm-dd" format.
36
+ ClinicNum?: number; //A single ClinicNum. Leave blank if not using clinics or want results for all clinics.
37
+ PatStatus?: 'Patient' | 'NonPatient' | 'Inactive' | 'Archived' | 'Deceased' | 'Prospective'; // Patient status
38
+ DateTStamp?: string; //In "yyyy-mm-dd HH:mm:ss" format.
39
+ PriProv?: number; // Primary provider ID
40
+ Gender?: 'Male' | 'Female' | 'Unknown' | 'Other'; // Gender
41
+ Position?: 'Single' | 'Married' | 'Child' | 'Widowed' | 'Divorced'; // Marital status
42
+ Guarantor?: number; // Guarantor's PatNum
43
+ SuperFamily?: number; // Super family number
44
+ Offset?: number; // Pagination offset
45
+ }
46
+
47
+ /**
48
+ * Parameters for creating a new patient.
49
+ * Required fields depend on Open Dental's configuration.
50
+ * @see https://www.opendental.com/site/apipatients.html
51
+ */
52
+ export interface CreatePatientParams {
53
+ LName: string; // Last name
54
+ FName: string; // First name
55
+ MiddleI?: string; // Middle initial
56
+ Preferred?: string; // Preferred name
57
+ PatStatus?: 'Patient' | 'NonPatient' | 'Inactive' | 'Archived' | 'Deceased' | 'Prospective'; // Patient status, Default is Patient.
58
+ Gender?: 'Male' | 'Female' | 'Unknown' | 'Other'; // Gender
59
+ Position?: 'Single' | 'Married' | 'Child' | 'Widowed' | 'Divorced'; // Marital status
60
+ Birthdate?: string; // Date of birth in 'yyyy-MM-dd' format
61
+ SSN?: string; // In the USA, 9 digits, no dashes. Any punctuation or format for other countries.
62
+ Address?: string; // Primary address
63
+ Address2?: string; // Secondary address
64
+ City?: string; // City
65
+ State?: string; // State
66
+ Zip?: string; // Postal code. Must be in format 12345, 12345-1234, or 123456789 (US) or A0A 0A0 (Canada, added in version 23.2.5).
67
+ HmPhone?: string; // Home phone number including any punctuation.
68
+ WkPhone?: string; // Work phone number including any punctuation.
69
+ WirelessPhone?: string; // Mobile phone number including any punctuation.
70
+ Guarantor?: number; // Head of household's PatNum. Only this or SuperFamily in a single request. Default is patient's PatNum.
71
+ Email?: string; // Email address
72
+ PriProv?: number; // Primary provider number
73
+ SecProv?: number; // Secondary provider number
74
+ BillingType?: string; // Billing type description
75
+ FamFinUrgNote?: string; // Family financial urgent note
76
+ ChartNumber?: string; // Chart number
77
+ DateFirstVisit?: string; // Date of first visit in 'yyyy-MM-dd' format
78
+ ClinicNum?: number; // Clinic number
79
+ Ward?: string; // Ward, hospital feature must be enabled
80
+ PreferConfirmMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall'; // Preferred confirmation method
81
+ PreferContactMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall' | 'Mail'; // Preferred contact method
82
+ PreferRecallMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall' | 'Mail'; // Preferred recall method
83
+ Language?: string; // Language code (ISO 639-2 format)
84
+ AdmitDate?: string; // Admission date in 'yyyy-MM-dd' format, hospital feature must be enabled
85
+ SuperFamily?: number; // Head of SuperFamily's PatNum. Default is 0. Only this or Guarantor in a single request. Creates a new SuperFamily if one does not exist. Does not honor any Super Family preferences.
86
+ TxtMsgOk?: 'Unknown' | 'Yes' | 'No'; // Text message consent
87
+ }
88
+
89
+ export interface UpdatePatientParams {
90
+ LName?: string; // Last name
91
+ FName?: string; // First name
92
+ MiddleI?: string; // Middle initial
93
+ Preferred?: string; // Preferred name
94
+ PatStatus?: 'Patient' | 'NonPatient' | 'Inactive' | 'Archived' | 'Deceased' | 'Prospective'; // Patient status, Default is Patient.
95
+ Gender?: 'Male' | 'Female' | 'Unknown' | 'Other'; // Gender
96
+ Position?: 'Single' | 'Married' | 'Child' | 'Widowed' | 'Divorced'; // Marital status
97
+ Birthdate?: string; // Date of birth in 'yyyy-MM-dd' format
98
+ SSN?: string; // In the USA, 9 digits, no dashes. Any punctuation or format for other countries.
99
+ Address?: string; // Primary address
100
+ Address2?: string; // Secondary address
101
+ City?: string; // City
102
+ State?: string; // State
103
+ Zip?: string; // Postal code. Must be in format 12345, 12345-1234, or 123456789 (US) or A0A 0A0 (Canada, added in version 23.2.5).
104
+ HmPhone?: string; // Home phone number including any punctuation.
105
+ WkPhone?: string; // Work phone number including any punctuation.
106
+ WirelessPhone?: string; // Mobile phone number including any punctuation.
107
+ Guarantor?: number; // Head of household's PatNum. Only this or SuperFamily in a single request. Default is patient's PatNum.
108
+ Email?: string; // Email address
109
+ PriProv?: number; // Primary provider number
110
+ SecProv?: number; // Secondary provider number
111
+ BillingType?: string; // Billing type description
112
+ FamFinUrgNote?: string; // Family financial urgent note
113
+ ChartNumber?: string; // Chart number
114
+ DateFirstVisit?: string; // Date of first visit in 'yyyy-MM-dd' format
115
+ ClinicNum?: number; // Clinic number
116
+ Ward?: string; // Ward, hospital feature must be enabled
117
+ PreferConfirmMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall'; // Preferred confirmation method
118
+ PreferContactMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall' | 'Mail'; // Preferred contact method
119
+ PreferRecallMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall' | 'Mail'; // Preferred recall method
120
+ Language?: string; // Language code (ISO 639-2 format)
121
+ AdmitDate?: string; // Admission date in 'yyyy-MM-dd' format, hospital feature must be enabled
122
+ SuperFamily?: number; // Head of SuperFamily's PatNum. Default is 0. Only this or Guarantor in a single request. Creates a new SuperFamily if one does not exist. Does not honor any Super Family preferences.
123
+ TxtMsgOk?: 'Unknown' | 'Yes' | 'No'; // Text message consent
124
+ }
125
+
126
+ /**
127
+ * Represents a patient in the Open Dental system.
128
+ * @see https://www.opendental.com/site/apipatients.html
129
+ */
130
+ export interface Patient {
131
+ serverDateTime?: string; // Server datetime of API return
132
+ PatNum?: number; // Unique patient identifier
133
+ LName?: string; // Last name
134
+ FName?: string; // First name
135
+ MiddleI?: string; // Middle initial
136
+ Preferred?: string; // Preferred name
137
+ PatStatus?: 'Patient' | 'NonPatient' | 'Inactive' | 'Archived' | 'Deceased' | 'Prospective'; // Patient status
138
+ Gender?: 'Male' | 'Female' | 'Unknown' | 'Other'; // Gender
139
+ Position?: 'Single' | 'Married' | 'Child' | 'Widowed' | 'Divorced'; // Marital status
140
+ Birthdate?: string; // Date of birth in 'yyyy-MM-dd' format
141
+ SSN?: string; // Social Security Number
142
+ Address?: string; // Primary address
143
+ Address2?: string; // Secondary address
144
+ City?: string; // City
145
+ State?: string; // State
146
+ Zip?: string; // ZIP code
147
+ HmPhone?: string; // Home phone number
148
+ WkPhone?: string; // Work phone number
149
+ WirelessPhone?: string; // Mobile phone number
150
+ Guarantor?: number; // Guarantor's PatNum
151
+ Email?: string; // Email address
152
+ EstBalance?: number; // Estimated balance
153
+ PriProv?: number; // Primary provider number
154
+ priProvAbbr?: string; // Primary provider abbreviation
155
+ SecProv?: number; // Secondary provider number
156
+ secProvAbbr?: string; // Secondary provider abbreviation
157
+ BillingType?: string; // Billing type description
158
+ ImageFolder?: string; // Image folder name
159
+ FamFinUrgNote?: string; // Family financial urgent note
160
+ ChartNumber?: string; // Chart number
161
+ MedicaidID?: string; // Medicaid ID
162
+ BalTotal?: number; // Total balance
163
+ DateFirstVisit?: string; // Date of first visit in 'yyyy-MM-dd' format
164
+ ClinicNum?: number; // Clinic number
165
+ clinicAbbr?: string; // Clinic abbreviation
166
+ Ward?: string; // Ward
167
+ PreferConfirmMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall'; // Preferred confirmation method
168
+ PreferContactMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall' | 'Mail'; // Preferred contact method
169
+ PreferRecallMethod?: 'None' | 'Email' | 'TextMessage' | 'PhoneCall' | 'Mail'; // Preferred recall method
170
+ Language?: string; // Language code (ISO 639-2 format)
171
+ AdmitDate?: string; // Admission date in 'yyyy-MM-dd' format
172
+ siteDesc?: string; // Site description
173
+ DateTStamp?: string; // Timestamp of the last update in 'yyyy-MM-dd HH:mm:ss' format
174
+ SuperFamily?: number; // Super family number
175
+ TxtMsgOk?: 'Unknown' | 'Yes' | 'No'; // Text message consent
176
+ SecDateEntry?: string; // Secondary date entry in 'yyyy-MM-dd' format
177
+ }
178
+
179
+ /**
180
+ * Simplified representation of a patient in the Open Dental system.
181
+ * @see https://www.opendental.com/site/apipatients.html
182
+ */
183
+ export interface PatientSummary {
184
+ PatNum?: number; // Unique patient identifier
185
+ LName?: string; // Last name
186
+ FName?: string; // First name
187
+ MiddleI?: string; // Middle initial
188
+ Preferred?: string; // Preferred name
189
+ PatStatus?: 'Patient' | 'NonPatient' | 'Inactive' | 'Archived' | 'Deceased' | 'Prospective'; // Patient status
190
+ Gender?: 'Male' | 'Female' | 'Unknown' | 'Other'; // Gender
191
+ Birthdate?: string; // Date of birth in 'yyyy-MM-dd' format
192
+ SSN?: string; // Social Security Number
193
+ Address?: string; // Primary address
194
+ Address2?: string; // Secondary address
195
+ City?: string; // City
196
+ State?: string; // State
197
+ Zip?: string; // ZIP code
198
+ HmPhone?: string; // Home phone number
199
+ WkPhone?: string; // Work phone number
200
+ WirelessPhone?: string; // Mobile phone number
201
+ Email?: string; // Email address
202
+ priProvAbbr?: string; // Primary provider abbreviation
203
+ secProvAbbr?: string; // Secondary provider abbreviation
204
+ BillingType?: string; // Billing type description
205
+ ChartNumber?: string; // Chart number
206
+ ClinicNum?: number; // Clinic number
207
+ clinicAbbr?: string; // Clinic abbreviation
208
+ TxtMsgOk?: 'Unknown' | 'Yes' | 'No'; // Text message consent
209
+ }
@@ -0,0 +1,119 @@
1
+ //NEED TO COMPLETE FOR PUT/POST/DELETE GROUP NOTES AND INSURANCE HISTORY
2
+
3
+ /**
4
+ * Represents a procedure log entry in the Open Dental system.
5
+ * @see https://www.opendental.com/site/apiprocedurelogs.html
6
+ */
7
+ export interface ProcedureLog {
8
+ ProcNum?: number; // Unique procedure identifier
9
+ PatNum?: number; // Unique patient identifier
10
+ AptNum?: number; // Associated appointment number
11
+ ProcDate?: string; // Procedure date in "yyyy-MM-dd" format
12
+ ProcFee?: number; // Fee for the procedure
13
+ Surf?: Surf; // Tooth surface
14
+ ToothNum?: string; // Tooth number
15
+ ToothRange?: string; // Tooth range
16
+ Priority?: number; // Priority code
17
+ priority?: string; // Priority description
18
+ ProcStatus?: 'TP' | 'C' | 'EO' | 'R' | 'D' | 'E'; // Procedure status?: Treatment Planned (TP), Complete (C), etc.
19
+ ProvNum?: number;
20
+ provAbbr?: string;
21
+ Dx?: string; // Diagnosis code
22
+ dxName?: string; // Diagnosis name
23
+ PlannedAptNum?: number; // Planned appointment number
24
+ Prosthesis?: string; // Type of prosthesis
25
+ DateOriginalProsth?: string //Date in yyyy-MM-dd format
26
+ ClinicNum?: number; // Clinic number
27
+ CodeNum?: number; // Procedure code number
28
+ procCode?: string; // D code
29
+ descript?: string; // Procedure code description
30
+ ProcTime?: string; // Time taken for the procedure
31
+ UnitQty?: number; // Quantity of units
32
+ DateTStamp?: string; // Timestamp of the last update in "yyyy-MM-dd HH:mm:ss" format
33
+ IsDateProsthEst?: 'true' | 'false' ; //
34
+ serverDateTime?: string;
35
+ }
36
+
37
+ /**
38
+ * Create procedure log parameters.
39
+ * @see https://www.opendental.com/site/apiprocedurelogs.html
40
+ */
41
+ export interface createProcedureLogParams {
42
+ PatNum: number; // Unique patient identifier
43
+ ProcDate: string; // Procedure date in "yyyy-MM-dd" format
44
+ ProcStatus: 'TP' | 'C' | 'EO'; // Procedure status?: Treatment Planned (TP), Complete (C), etc.
45
+ procCode: string; // D code
46
+ AptNum?: number; // Associated appointment number
47
+ ProcFee?: number; // Fee for the procedure
48
+ Surf?: Surf; // Tooth surface
49
+ ToothNum?: string; // Tooth number
50
+ ToothRange?: string; // Tooth range
51
+ Priority?: number; //Optional. Definition.DefNum where definition.Category=20. Default is the first definition in that Category. If Priority is used, then priority will be set automatically.
52
+ priority?: string; // Priority description
53
+ ProvNum?: number;
54
+ Dx?: string; // Optional. Definition.DefNum where definition.Category=16. Default is the first definition in that Category. If Dx is used, then dxName will be set automatically.
55
+ dxName?: string; // Diagnosis name
56
+ PlannedAptNum?: number; // Planned appointment number
57
+ ClinicNum?: number; // Clinic number
58
+ }
59
+
60
+ /**
61
+ * Update procedure log parameters.
62
+ * @see https://www.opendental.com/site/apiprocedurelogs.html
63
+ */
64
+ export interface updateProcedureLogParams {
65
+ ProcNum: number;
66
+ AptNum?: number; // Associated appointment number
67
+ ProcDate?: string; // Procedure date in "yyyy-MM-dd" format
68
+ ProcFee?: number; // Fee for the procedure
69
+ Priority?: number; //Optional. Definition.DefNum where definition.Category=20. Default is the first definition in that Category. If Priority is used, then priority will be set automatically.
70
+ ProcStatus?: 'TP' | 'C' | 'EO'; // Procedure status?: Treatment Planned (TP), Complete (C), etc.
71
+ ProvNum?: number;
72
+ Dx?: string; // Optional. Definition.DefNum where definition.Category=16. Default is the first definition in that Category. If Dx is used, then dxName will be set automatically.
73
+ PlannedAptNum?: number; // Planned appointment number
74
+ ClinicNum?: number; // Clinic number
75
+ procCode?: string; // D code
76
+ ToothNum?: string; // Tooth number
77
+ Surf?: Surf; // Tooth surface
78
+ ToothRange?: string; // Tooth rang
79
+ }
80
+
81
+ /**
82
+ * Insurance History object in Open Dental.
83
+ * @see https://www.opendental.com/site/apiprocedurelogs.html
84
+ */
85
+ export interface InsuranceHistory {
86
+ insHistPrefName?: string;
87
+ procDate?: string; // in "yyyy-MM-dd" format
88
+ ProcNum?: number; //FK to procedurelog entry
89
+ }
90
+
91
+ /**
92
+ * get Insurance History parameters.
93
+ * @see https://www.opendental.com/site/apiprocedurelogs.html
94
+ */
95
+ export interface getInsuranceHistoryParams {
96
+ PatNum: number; //Required. FK to patient.PatNum.
97
+ InsSubNum: number; // Required. FK to inssub.InsSubNum.
98
+ }
99
+
100
+ /**
101
+ * post Insurance History parameters.
102
+ * @see https://www.opendental.com/site/apiprocedurelogs.html
103
+ */
104
+ export interface postInsuranceHistoryParams {
105
+ PatNum: number; //Required. FK to patient.PatNum.
106
+ InsSubNum: number; // Required. FK to inssub.InsSubNum.
107
+ insHistPrefName: "InsHistBWCodes" | "InsHistPanoCodes" | "InsHistExamCodes" | "InsHistProphyCodes" | "InsHistPerioURCodes" | "InsHistPerioULCodes" | "InsHistPerioLRCodes" | "InsHistPerioLLCodes" | "InsHistPerioMaintCodes" | "InsHistDebridementCodes"; // Required. String. The PrefName of the Insurance History category. Either "InsHistBWCodes", "InsHistPanoCodes", "InsHistExamCodes", "InsHistProphyCodes", "InsHistPerioURCodes", "InsHistPerioULCodes", "InsHistPerioLRCodes", "InsHistPerioLLCodes", "InsHistPerioMaintCodes", or "InsHistDebridementCodes". Case sensitive.
108
+ ProcDate: string; //String in "yyyy-MM-dd" format. The date the procedure was completed.
109
+ }
110
+
111
+ /**
112
+ * 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).
113
+ * @see https://www.opendental.com/site/apiappointments.html
114
+ */
115
+ export type Surf =
116
+ "B/F" | "V" | "M" | "O/I" | "D" | "L" |
117
+ "UL" | "UR" | "LR" | "LL" |
118
+ "1" | "2" | "3" | "4" | "5" | "6" |
119
+ "U" | "L";