@rinse-dental/open-dental 2.1.3 → 2.2.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.
@@ -0,0 +1,112 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import {
3
+ ProcTP,
4
+ GetProcTPsParams,
5
+ updateProcTPParams,
6
+ } from "../types/procTPTypes";
7
+
8
+ export default class procTPs {
9
+ private httpClient: HttpClient;
10
+
11
+ constructor(httpClient: HttpClient) {
12
+ this.httpClient = httpClient;
13
+ }
14
+
15
+ /**
16
+ * Get a list of ProcTPs by the TreatPlanNum. Before calling this method, use TreatPlans GET to find the TreatPlanNum of an existing TreatPlan.
17
+ * @param {Object} params - The parameters for filtering and pagination.
18
+ * @param {number} params.TreatPlanNum - Required. FK to TreatPlan.TreatPlanNum.
19
+ * @param {number} [params.Offset] - Optional. Pagination offset for results.
20
+ * @returns {Promise<ProcTP[]>} - A list of procTPs.
21
+ */
22
+ public async getProcTPs({
23
+ TreatPlanNum,
24
+ Offset,
25
+ }: GetProcTPsParams = {}): Promise<ProcTP[]> {
26
+ const params = {
27
+ TreatPlanNum,
28
+ Offset,
29
+ };
30
+
31
+ return this.httpClient.get<ProcTP[]>("/proctps", params);
32
+ }
33
+
34
+ /**
35
+ * Update an existing procedure log entry.
36
+ * @param {Object} data - The updated details of the ProcTP.
37
+ * @param {number} data.ProcTPNum - Required: The unique identifier of the procTP to update.
38
+ * @param {number} [data.Priority] - Optional: definition.DefNum where definition.Category=20.
39
+ * @param {string} [data.ToothNumTP] - Optional: Updated tooth number.
40
+ * @param {Surf} [data.Surf] - Optional: Tooth surface or treatment area. Options include:
41
+ * - "B/F" (Buccal/Facial)
42
+ * - "V" (Vestibular)
43
+ * - "M" (Mesial)
44
+ * - "O/I" (Occlusal/Incisal)
45
+ * - "D" (Distal)
46
+ * - "L" (Lingual)
47
+ * - "UL" (Upper Left Quadrant)
48
+ * - "UR" (Upper Right Quadrant)
49
+ * - "LR" (Lower Right Quadrant)
50
+ * - "LL" (Lower Left Quadrant)
51
+ * - "1" (Sextant 1)
52
+ * - "2" (Sextant 2)
53
+ * - "3" (Sextant 3)
54
+ * - "4" (Sextant 4)
55
+ * - "5" (Sextant 5)
56
+ * - "6" (Sextant 6)
57
+ * - "U" (Upper Arch)
58
+ * - "L" (Lower Arch)
59
+ * @param {string} [data.ProcCode] - Optional: Updated procedure code (D code).
60
+ * @param {string} [data.Descript] - Optional: Description of procedure.
61
+ * @param {number} [data.FeeAmt] - Optional: The fee charged to the patient.
62
+ * @param {number} [data.PriInsAmt] - Optional: The amount primary insurance is expected to pay.
63
+ * @param {number} [data.SecInsAmt] - Optional: The amount secondary insurance is expected to pay.
64
+ * @param {number} [data.PatAmt] - Optional: The amount the patient is expected to pay.
65
+ * @param {number} [data.Discount] - Optional: The amount of discount. Used for PPOs and procedure level discounts.
66
+ * @param {string} [data.Prognosis] - Optional: Text for prognosis definition.
67
+ * @param {string} [data.Dx] - Optional: Updated diagnosis code.
68
+ * @param {string} [data.ProcAbbr] - Optional: The procedure code abbreviation.
69
+ * @param {number} [data.FeeAllowed] - Optional: Description of procedure.
70
+ * @returns {Promise<ProcTP>} - The updated ProcTP.
71
+ * @throws {Error} - If required fields are missing or the API returns an error.
72
+ */
73
+ public async updateProcTP(
74
+ {
75
+ ProcTPNum,
76
+ Priority,
77
+ ToothNumTP,
78
+ Surf,
79
+ ProcCode,
80
+ Descript,
81
+ FeeAmt,
82
+ PriInsAmt,
83
+ SecInsAmt,
84
+ PatAmt,
85
+ Discount,
86
+ Prognosis,
87
+ Dx,
88
+ ProcAbbr,
89
+ }: updateProcTPParams
90
+ ): Promise<ProcTP> {
91
+ if (!ProcTPNum || typeof ProcTPNum !== "number") {
92
+ throw new Error("Invalid parameter: ProcTPNum must be a valid number.");
93
+ }
94
+
95
+ return this.httpClient.put<ProcTP>(`/proctps/${ProcTPNum}`, {
96
+ Priority,
97
+ ToothNumTP,
98
+ Surf,
99
+ ProcCode,
100
+ Descript,
101
+ FeeAmt,
102
+ PriInsAmt,
103
+ SecInsAmt,
104
+ PatAmt,
105
+ Discount,
106
+ Prognosis,
107
+ Dx,
108
+ ProcAbbr,
109
+ });
110
+ }
111
+
112
+ }
@@ -35,9 +35,11 @@ export default class ProcedureLogs {
35
35
  * @param {Object} params - Filtering and pagination parameters.
36
36
  * @param {number} [params.PatNum] - Get procedurelogs by PatNum
37
37
  * @param {number} [params.AptNum] - Get procedurelogs by AptNum
38
- * @param {number} [params.PlannedAptNum] - Get procedurelogs by PlannedAptNum
39
- * @param {number} [params.ClinicNum] - Get procedurelogs by ClinicNum
40
- * @param {string} [params.DateTStamp] - Get procedurelogs altered after the specified date and time
38
+ * @param {'TP' | 'C' | 'EC' | 'EO' | 'R' | 'D' | 'Cn' | 'TPi'} [params.ProcStatus] - // Either "TP" (Treatment Plan), "C" (Complete), "EC" (Existing Current Provider), "EO" (Existing Other Provider), "R" (Referred Out), "D" (Deleted), "Cn" (Condition), or "TPi" (Treatment Plan inactive).
39
+ * @param {number} [params.PlannedAptNum] - FK to appointment.AptNum where appointment.AptStatus=Planned.
40
+ * @param {number} [params.ClinicNum] - FK to clinic.ClinicNum.
41
+ * @param {number} [params.CodeNum] - FK to procedurecode.CodeNum.
42
+ * @param {string} [params.DateTStamp] - Gets procedurelogs created on or after the specified date and time. String in "yyyy-MM-dd HH:mm:ss" format.
41
43
  * @param {string} [params.Offset] - Pagination
42
44
  * @returns {Promise<ProcedureLog[]>} - A list of procedurelogs.
43
45
  * @throws {Error} - If the API returns an error.
@@ -45,8 +47,10 @@ export default class ProcedureLogs {
45
47
  public async getProcedureLogs({
46
48
  PatNum,
47
49
  AptNum,
50
+ ProcStatus,
48
51
  PlannedAptNum,
49
52
  ClinicNum,
53
+ CodeNum,
50
54
  DateTStamp,
51
55
  Offset,
52
56
  }: GetProcedureLogParams = {}): Promise<ProcedureLog[]> {
@@ -54,8 +58,10 @@ export default class ProcedureLogs {
54
58
  return await this.httpClient.get<ProcedureLog[]>("/procedurelogs", {
55
59
  PatNum,
56
60
  AptNum,
61
+ ProcStatus,
57
62
  PlannedAptNum,
58
63
  ClinicNum,
64
+ CodeNum,
59
65
  DateTStamp,
60
66
  Offset,
61
67
  });
@@ -66,11 +72,28 @@ export default class ProcedureLogs {
66
72
  * @param {Object} data - The details of the procedure log to create.
67
73
  * @param {number} data.PatNum - Required: Patient number.
68
74
  * @param {string} data.ProcDate - Required: Procedure date in "yyyy-MM-dd" format.
69
- * @param {'TP' | 'C' | 'EO'} data.ProcStatus - Required: Procedure status.
70
- * @param {string} data.procCode - Required: Procedure code (D code).
71
- * @param {number} [data.AptNum] - Optional: Associated appointment number.
72
- * @param {number} [data.ProcFee] - Optional: Fee for the procedure.
73
- * @param {Surf} [data.Surf] - Optional: Tooth surface or treatment area. Options include:
75
+ * @param {'TP' | 'C' | 'EO' | 'EC' | 'R' | 'Cn'} data.ProcStatus - Required: Either "TP" (Treatment Plan), "C" (Complete), "EC" (Existing Current Provider), "EO" (Existing Other Provider), "R" (Referred Out), "D" (Deleted), or "Cn" (Condition).
76
+ * @param {number} [data.CodeNum] - This or procCode is Required. FK to procedurecode.CodeNum.
77
+ * @param {string} [data.procCode] - This or CodeNum is Required. This should be a valid D code, example: D0120. CodeNum is set automatically.
78
+ * @param {number} [data.AptNum] - Optional. FK to appointment.PatNum.
79
+ * @param {number} [data.ProcFee] - Optional. If none is given this will default to the procedurecodes default, with consideration of the patient's insurance.
80
+ * @param {number} [data.Priority] - 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.
81
+ * @param {number} [data.priority] - Optional. String version of Priority. If priority is used, then Priority will be set automatically.
82
+ * @param {number} [data.ProvNum] - Optional. Defaults to the PriProv of the appointment if given, otherwise it will check the patient's default provider. Failing either of the previous options, it will be set to the dental office's default provider. If ProvNum is used, then provAbbr will be set automatically.
83
+ * @param {number} [data.Dx] - 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.
84
+ * @param {string} [data.dxName] - Optional. String version of Dx. If dxName is used, then Dx will be set automatically.
85
+ * @param {number} [data.PlannedAptNum] - Optional. Only set if this procedure is on a planned appointment, otherwise it will be 0.
86
+ * @param {"Office" | "PatientsHome" | "InpatHospital" | "OutpatHospital" | "SkilledNursFac" | "CustodialCareFacility" | "OtherLocation" | "MobileUnit" | "School" | "MilitaryTreatFac" | "FederalHealthCenter" | "PublicHealthClinic" | "RuralHealthClinic" | "EmergencyRoomHospital" | "AmbulatorySurgicalCenter" | "TelehealthOutsideHome" | "TelehealthInHome" | "OutreachSiteOrStreet"} [data.PlaceService] - // Optional. Either "Office", "PatientsHome", "InpatHospital", "OutpatHospital", "SkilledNursFac", "CustodialCareFacility", "OtherLocation", "MobileUnit", "School", "MilitaryTreatFac", "FederalHealthCenter", "PublicHealthClinic", "RuralHealthClinic", "EmergencyRoomHospital", "AmbulatorySurgicalCenter", "TelehealthOutsideHome", "TelehealthInHome", or "OutreachSiteOrStreet". Public Health feature must be enabled. Defaults to DefaultProcedurePlaceService preference or clinic.DefaultPlaceService.
87
+ * @param {"" | "I" | "R"} [data.Prosthesis] - Optional. Either "No" (shows as ""), Initial "I", or Replacement "R". Cannot be set if procedurecode.IsProsth is false. Default is "No".
88
+ * @param {string} [data.DateOriginalProsth] - Optional. String in "yyyy-MM-dd" format. Cannot be set if procedurecode.IsProsth is false. Default is "0001-01-01"
89
+ * @param {string} [data.ClaimNote] - Optional. Note that goes out on e-claims. Default empty string.
90
+ * @param {number} [data.ClinicNum] - Optional. Defaults to the patient's clinic.
91
+ * @param {string} [data.DateTP] - Optional. The date the procedure was originally treatment planned. String in "yyyy-MM-dd" format.
92
+ * @param {string} [data.SiteNum] - Optional. FK to site.SiteNum. Public Health feature must be enabled.
93
+ * @param {string} [data.ProcTime] - Optional. Time of day the procedure started. String in "HH:mm:ss" format.
94
+ * @param {string} [data.ProcTimeEnd] - Optional. Time of day the procedure ended. Medical Insurance feature must be enabled. String in "HH:mm:ss" format.
95
+ * @param {string} [data.Prognosis] - Optional. FK to definition.DefNum where definition.Category=30.
96
+ * @param {Surf} [data.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).
74
97
  * - "B/F" (Buccal/Facial)
75
98
  * - "V" (Vestibular)
76
99
  * - "M" (Mesial)
@@ -89,13 +112,11 @@ export default class ProcedureLogs {
89
112
  * - "6" (Sextant 6)
90
113
  * - "U" (Upper Arch)
91
114
  * - "L" (Lower Arch)
92
- * @param {string} [data.ToothNum] - Optional: Tooth number.
93
- * @param {string} [data.ToothRange] - Optional: Tooth range.
94
- * @param {number} [data.Priority] - Optional: Priority code.
95
- * @param {number} [data.ProvNum] - Optional: Provider number.
96
- * @param {string} [data.Dx] - Optional: Diagnosis code.
97
- * @param {number} [data.PlannedAptNum] - Optional: Planned appointment number.
98
- * @param {number} [data.ClinicNum] - Optional: Clinic number.
115
+ * @param {string} [data.ToothNum] - Required by procCodes with a Surf or Tooth treatment area.
116
+ * @param {string} [data.ToothRange] - Required by procCodes with a ToothRange treatment area, or for Quadrants and Arches when AreaAlsoToothRange is true. A string of numbers separated by commas and/or hyphen separated ranges.
117
+ * @param {string} [data.BillingNote] - Optional. Note that shows in the Account Module. Default empty string.
118
+ * @param {number} [data.Discount] - Optional. The dollar amount of the discount. Default 0.0.
119
+ * @param {"true" | "false"} [data.IsDateProsthEst] - Optional. Either "true" or "false". Default "false".
99
120
  * @returns {Promise<ProcedureLog>} - The created procedure log.
100
121
  * @throws {Error} - If required fields are missing or the API returns an error.
101
122
  */
@@ -103,56 +124,96 @@ export default class ProcedureLogs {
103
124
  PatNum,
104
125
  ProcDate,
105
126
  ProcStatus,
127
+ CodeNum,
106
128
  procCode,
107
129
  AptNum,
108
130
  ProcFee,
109
- Surf,
110
- ToothNum,
111
- ToothRange,
112
131
  Priority,
113
132
  priority,
114
133
  ProvNum,
115
134
  Dx,
116
135
  dxName,
117
136
  PlannedAptNum,
137
+ PlaceService,
138
+ Prosthesis,
139
+ DateOriginalProsth,
140
+ ClaimNote,
118
141
  ClinicNum,
119
- //...optionalData
142
+ DateTP,
143
+ SiteNum,
144
+ ProcTime,
145
+ ProcTimeEnd,
146
+ Prognosis,
147
+ ToothNum,
148
+ Surf,
149
+ ToothRange,
150
+ BillingNote,
151
+ Discount,
152
+ IsDateProsthEst,
120
153
  }: createProcedureLogParams): Promise<ProcedureLog> {
121
- if (!PatNum || !ProcDate || !ProcStatus || !procCode) {
122
- throw new Error("Invalid data: PatNum, ProcDate, ProcStatus, and procCode are required.");
154
+ if (!PatNum || !ProcDate || !ProcStatus || (!procCode && !CodeNum)) {
155
+ throw new Error("Invalid data: PatNum, ProcDate, ProcStatus, and either procCode or CodeNum are required.");
123
156
  }
124
157
 
125
158
  return this.httpClient.post<ProcedureLog>("/procedurelogs", {
126
159
  PatNum,
127
160
  ProcDate,
128
161
  ProcStatus,
162
+ CodeNum,
129
163
  procCode,
130
164
  AptNum,
131
165
  ProcFee,
132
- Surf,
133
- ToothNum,
134
- ToothRange,
135
166
  Priority,
136
167
  priority,
137
168
  ProvNum,
138
169
  Dx,
139
170
  dxName,
140
171
  PlannedAptNum,
172
+ PlaceService,
173
+ Prosthesis,
174
+ DateOriginalProsth,
175
+ ClaimNote,
141
176
  ClinicNum,
177
+ DateTP,
178
+ SiteNum,
179
+ ProcTime,
180
+ ProcTimeEnd,
181
+ Prognosis,
182
+ ToothNum,
183
+ Surf,
184
+ ToothRange,
185
+ BillingNote,
186
+ Discount,
187
+ IsDateProsthEst,
142
188
  });
143
189
  }
144
190
 
145
191
  /**
146
- * Update an existing procedure log entry.
192
+ * Updates an existing procedure. When changing procCode, the treatment area of the current and passed in procedure codes must match. Attempting to pass in empty strings for ToothNum, Surf, and ToothRange will be silently ignored. The CodeNum, procCode, Discount, ToothNum, Surf, and ToothRange fields cannot be updated on procedures with a ProcStatus of C. If the procedurelog is associated with certain appointments, claims, or orthocases, then some fields cannot be updated. Procedure code default notes will not be used.
193
+ * ProcedureLogs associated with adjustments, appointments, payments, payplancharges, or paysplits are updated exactly as in Open Dental.
147
194
  * @param {Object} data - The updated details of the procedure log.
148
195
  * @param {number} data.ProcNum - Required: The unique identifier of the procedure log to update.
149
- * @param {string} [data.ProcDate] - Optional: Updated procedure date in "yyyy-MM-dd" format.
150
- * @param {number} [data.AptNum] - Optional: Updated associated appointment number.
151
- * @param {number} [data.ProcFee] - Optional: Updated fee for the procedure.
152
- * @param {number} [data.Priority] - Optional: Updated priority code.
153
- * @param {'TP' | 'C' | 'EO'} [data.ProcStatus] - Optional: Updated procedure status.
154
- * @param {string} [data.procCode] - Optional: Updated procedure code (D code).
155
- * @param {Surf} [data.Surf] - Optional: Tooth surface or treatment area. Options include:
196
+ * @param {string} data.ProcDate - Required: Procedure date in "yyyy-MM-dd" format.
197
+ * @param {'TP' | 'C' | 'EO' | 'EC' | 'R' | 'Cn'} data.ProcStatus - Required: Either "TP" (Treatment Plan), "C" (Complete), "EC" (Existing Current Provider), "EO" (Existing Other Provider), "R" (Referred Out), "D" (Deleted), or "Cn" (Condition).
198
+ * @param {number} [data.CodeNum] - This or procCode is Required. FK to procedurecode.CodeNum.
199
+ * @param {string} [data.procCode] - This or CodeNum is Required. This should be a valid D code, example: D0120. CodeNum is set automatically.
200
+ * @param {number} [data.AptNum] - Optional. FK to appointment.PatNum.
201
+ * @param {number} [data.ProcFee] - Optional. If none is given this will default to the procedurecodes default, with consideration of the patient's insurance.
202
+ * @param {number} [data.Priority] - 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.
203
+ * @param {number} [data.ProvNum] - Optional. Defaults to the PriProv of the appointment if given, otherwise it will check the patient's default provider. Failing either of the previous options, it will be set to the dental office's default provider. If ProvNum is used, then provAbbr will be set automatically.
204
+ * @param {number} [data.Dx] - 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.
205
+ * @param {number} [data.PlannedAptNum] - Optional. Only set if this procedure is on a planned appointment, otherwise it will be 0.
206
+ * @param {"Office" | "PatientsHome" | "InpatHospital" | "OutpatHospital" | "SkilledNursFac" | "CustodialCareFacility" | "OtherLocation" | "MobileUnit" | "School" | "MilitaryTreatFac" | "FederalHealthCenter" | "PublicHealthClinic" | "RuralHealthClinic" | "EmergencyRoomHospital" | "AmbulatorySurgicalCenter" | "TelehealthOutsideHome" | "TelehealthInHome" | "OutreachSiteOrStreet"} [data.PlaceService] - // Optional. Either "Office", "PatientsHome", "InpatHospital", "OutpatHospital", "SkilledNursFac", "CustodialCareFacility", "OtherLocation", "MobileUnit", "School", "MilitaryTreatFac", "FederalHealthCenter", "PublicHealthClinic", "RuralHealthClinic", "EmergencyRoomHospital", "AmbulatorySurgicalCenter", "TelehealthOutsideHome", "TelehealthInHome", or "OutreachSiteOrStreet". Public Health feature must be enabled. Defaults to DefaultProcedurePlaceService preference or clinic.DefaultPlaceService.
207
+ * @param {"" | "I" | "R"} [data.Prosthesis] - Optional. Either "No" (shows as ""), Initial "I", or Replacement "R". Cannot be set if procedurecode.IsProsth is false. Default is "No".
208
+ * @param {string} [data.DateOriginalProsth] - Optional. String in "yyyy-MM-dd" format. Cannot be set if procedurecode.IsProsth is false. Default is "0001-01-01"
209
+ * @param {string} [data.ClaimNote] - Optional. Note that goes out on e-claims. Default empty string.
210
+ * @param {number} [data.ClinicNum] - Optional. Defaults to the patient's clinic.
211
+ * @param {string} [data.DateTP] - Optional. The date the procedure was originally treatment planned. String in "yyyy-MM-dd" format.
212
+ * @param {string} [data.SiteNum] - Optional. FK to site.SiteNum. Public Health feature must be enabled.
213
+ * @param {string} [data.ProcTime] - Optional. Time of day the procedure started. String in "HH:mm:ss" format.
214
+ * @param {string} [data.ProcTimeEnd] - Optional. Time of day the procedure ended. Medical Insurance feature must be enabled. String in "HH:mm:ss" format.
215
+ * @param {string} [data.Prognosis] - Optional. FK to definition.DefNum where definition.Category=30.
216
+ * @param {Surf} [data.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).
156
217
  * - "B/F" (Buccal/Facial)
157
218
  * - "V" (Vestibular)
158
219
  * - "M" (Mesial)
@@ -171,12 +232,11 @@ export default class ProcedureLogs {
171
232
  * - "6" (Sextant 6)
172
233
  * - "U" (Upper Arch)
173
234
  * - "L" (Lower Arch)
174
- * @param {string} [data.ToothNum] - Optional: Updated tooth number.
175
- * @param {string} [data.ToothRange] - Optional: Updated tooth range.
176
- * @param {number} [data.ProvNum] - Optional: Updated provider number.
177
- * @param {string} [data.Dx] - Optional: Updated diagnosis code.
178
- * @param {number} [data.PlannedAptNum] - Optional: Updated planned appointment number.
179
- * @param {number} [data.ClinicNum] - Optional: Updated clinic number.
235
+ * @param {string} [data.ToothNum] - Required by procCodes with a Surf or Tooth treatment area.
236
+ * @param {string} [data.ToothRange] - Required by procCodes with a ToothRange treatment area, or for Quadrants and Arches when AreaAlsoToothRange is true. A string of numbers separated by commas and/or hyphen separated ranges.
237
+ * @param {string} [data.BillingNote] - Optional. Note that shows in the Account Module. Default empty string.
238
+ * @param {number} [data.Discount] - Optional. The dollar amount of the discount. Default 0.0.
239
+ * @param {"true" | "false"} [data.IsDateProsthEst] - Optional. Either "true" or "false". Default "false".
180
240
  * @returns {Promise<ProcedureLog>} - The updated procedure log.
181
241
  * @throws {Error} - If required fields are missing or the API returns an error.
182
242
  */
@@ -184,18 +244,31 @@ export default class ProcedureLogs {
184
244
  {
185
245
  ProcNum,
186
246
  ProcDate,
247
+ ProcStatus,
248
+ CodeNum,
249
+ procCode,
187
250
  AptNum,
188
251
  ProcFee,
189
252
  Priority,
190
- ProcStatus,
191
- procCode,
192
- Surf,
193
- ToothNum,
194
- ToothRange,
195
253
  ProvNum,
196
254
  Dx,
197
255
  PlannedAptNum,
256
+ PlaceService,
257
+ Prosthesis,
258
+ DateOriginalProsth,
259
+ ClaimNote,
198
260
  ClinicNum,
261
+ DateTP,
262
+ SiteNum,
263
+ ProcTime,
264
+ ProcTimeEnd,
265
+ Prognosis,
266
+ ToothNum,
267
+ Surf,
268
+ ToothRange,
269
+ BillingNote,
270
+ Discount,
271
+ IsDateProsthEst,
199
272
  }: updateProcedureLogParams
200
273
  ): Promise<ProcedureLog> {
201
274
  if (!ProcNum || typeof ProcNum !== "number") {
@@ -203,19 +276,33 @@ export default class ProcedureLogs {
203
276
  }
204
277
 
205
278
  return this.httpClient.put<ProcedureLog>(`/procedurelogs/${ProcNum}`, {
279
+ ProcNum,
206
280
  ProcDate,
281
+ ProcStatus,
282
+ CodeNum,
283
+ procCode,
207
284
  AptNum,
208
285
  ProcFee,
209
286
  Priority,
210
- ProcStatus,
211
- procCode,
212
- Surf,
213
- ToothNum,
214
- ToothRange,
215
287
  ProvNum,
216
288
  Dx,
217
289
  PlannedAptNum,
290
+ PlaceService,
291
+ Prosthesis,
292
+ DateOriginalProsth,
293
+ ClaimNote,
218
294
  ClinicNum,
295
+ DateTP,
296
+ SiteNum,
297
+ ProcTime,
298
+ ProcTimeEnd,
299
+ Prognosis,
300
+ ToothNum,
301
+ Surf,
302
+ ToothRange,
303
+ BillingNote,
304
+ Discount,
305
+ IsDateProsthEst,
219
306
  });
220
307
  }
221
308
 
@@ -1,7 +1,43 @@
1
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
2
+ * Gets the Progress Notes for a patient, similarly to how it shows in the Chart Module. Use another API method or a query to get specific details about each object.
3
+ * @see https://www.opendental.com/site/apichartmodules.html
4
+ */
5
+ export interface ProgNote {
6
+ ObjectType?: "Appointment" | "Commlog" | "Task" | "Email" | "LabCase" | "Rx" | "Sheet"; // The type of object being displayed?: number; // Appointment, Commlog, Task, Email, LabCase, Rx, or Sheet.
7
+ PrimaryKey?: number; // Primary Key corresponding to the objectType. Example: AptNum=34.
8
+ Date?: string; // Human readable date. Example 05/15/2021
9
+ Time?: string; // Human readable time. Example 1:20p
10
+ DateTime?: string; // Example 2021-12-21 10:00:00
11
+ Th?: string; // ToothNum for a Procedure, otherwise blank.
12
+ Surf?: string; // Tooth surface for the Procedure, otherwise blank.
13
+ Dx?: string; // Description of the Diagnosis.
14
+ Description?: string; // Description of the of the returned object.
15
+ Note?: string; // Additional notes for the returned object.
16
+ Stat?: string; // Status of the Procedure, otherwise blank. Example TP.
17
+ Prov?: string; // Example Doc1.
18
+ ProvNum?: string; // Example: 3
19
+ Amount?: string; // ProcFee for Procedure, otherwise blank. Example 53.50
20
+ ProcCode?: string; // ProcCode for Procedure, otherwise blank. Example D0220
21
+ User?: string; // Name of the user who created the Commlog, Email, or Rx. Otherwise blank.
22
+ Signed?: string; // Will be "Signed" if there is a signature on the Procedure or Sheet. Otherwise blank.
23
+ Length?: string; // Length of the appointment in HH:mm format. Example 0:30.
24
+ Abbr?: string; // Abbreviation of the Procedure, otherwise blank.
25
+ Clinic?: string; // Clinic abbreviation. Example: Metro Office.
26
+ ClinicNum?: string; // Example: 4
27
+ }
28
+
29
+ /**
30
+ * Gets Patient Info for a patient, similarly to how it shows in the Chart Module. Use another API method or a query to get specific details about returned elements.
31
+ * @see https://www.opendental.com/site/apichartmodules.html
32
+ */
33
+ export interface PatientInfo {
34
+ Field?: string; // One of the following: Age, ABC0, Billing Type, Referred From, Date First Visit, Prov. (Pri, Sec), Pri Ins, Sec Ins, Payor Types, Premedicate, Problems, Med Urgent, Medical Summary, Service Notes, Medications, Allergies, Pat Restrictions
35
+ Content?: string; // The field's value
36
+ }
37
+
38
+ /**
39
+ * Gets Planned Appointments for a patient, similarly to how it shows in the Chart Module's Planned Appointments tab.
40
+ * @see https://www.opendental.com/site/apichartmodules.html
5
41
  */
6
42
  export interface PlannedAppointment {
7
43
  AptNum?: number; // Unique identifier for the appointment
@@ -11,12 +47,12 @@ export interface PlannedAppointment {
11
47
  ProcDescript?: string; // Description of procedures linked to the appointment
12
48
  Note?: string; //Appointment Note.
13
49
  dateSched?: string; //DateTime of the linked scheduled appointment.
14
- AptStatus?: AptStatus; //appointment.AptStatus.
50
+ AptStatus?: AptStatus; // appointment.AptStatus.
15
51
  }
16
52
 
17
53
  /**
18
54
  * Appointment status options.
19
- * @see https://www.opendental.com/site/apiappointments.html
55
+ * @see https://www.opendental.com/site/apichartmodules.html
20
56
  */
21
57
  export type AptStatus =
22
58
  | "Scheduled"
@@ -0,0 +1,79 @@
1
+ //NEED TO COMPLETE FOR PUT/POST/DELETE GROUP NOTES AND INSURANCE HISTORY
2
+
3
+ /**
4
+ * ProcTPs are copies of procedures that are attached to Saved treatment plans.
5
+ * The ProcNumOrig points to the actual procedurelog row.
6
+ * For Active and Inactive treatment plans, use TreatPlanAttaches.
7
+ * See Treatment Plans for more information.
8
+ * @see https://www.opendental.com/site/apiproctps.html
9
+ */
10
+ export interface ProcTP {
11
+ ProcTPNum?: number,
12
+ TreatPlanNum?: number;
13
+ PatNum?: number; // Unique patient identifier
14
+ ProcNumOrig?: number; // Unique procedure identifier
15
+ ItemOrder?: number;
16
+ Priority?: number; // Priority code
17
+ priority?: string; // Priority description
18
+ ToothNumTP?: string; // Tooth number
19
+ Surf?: Surf; // Tooth surface
20
+ ProcCode?: string; // D code
21
+ Descript?: string; // Procedure code description
22
+ FeeAmt?: number; // Fee for the procedure
23
+ PriInsAmt?: number; // PriInsAmt for the procedure
24
+ SecInsAmt?: number; // SecInsAmt for the procedure
25
+ PatAmt?: number; // PatAmt for the procedure
26
+ Discount?: number; // Discount for the procedure
27
+ Prognosis?: string; // Type of prosthesis
28
+ Dx?: string; // Diagnosis code
29
+ ProcAbbr?: string;
30
+ SecUserNumEntry?: number;
31
+ SecDateEntry?: string;
32
+ FeeAllowed?: number; // Fee allowed for the procedure
33
+ TaxAmt?: number; // TaxAmt for the procedure
34
+ ProvNum?: number;
35
+ DateTP?: string;
36
+ ClinicNum?: number; // Clinic number
37
+ CatPercUCR?: number;
38
+ }
39
+
40
+ /**
41
+ * Parameters for GET Multiple ProcTPs.
42
+ * @see https://www.opendental.com/site/apiproctps.html
43
+ */
44
+ export interface GetProcTPsParams {
45
+ TreatPlanNum?: number; //FK to treatplan.TreatPlanNum.
46
+ Offset?: number; // Pagination offset for results
47
+ }
48
+
49
+ /**
50
+ * Updates a ProcTp. Only ProcTPs associated with an unsigned treatment plan can be updated.
51
+ * @see https://www.opendental.com/site/apiproctps.html
52
+ */
53
+ export interface updateProcTPParams {
54
+ ProcTPNum: number, //Required in the URL.
55
+ Priority?: number; // definition.DefNum where definition.Category=20.
56
+ ToothNumTP?: string; // The tooth number.
57
+ Surf?: Surf; // Tooth surfaces or area.
58
+ ProcCode?: string; // Not a foreign key. Simply display text.
59
+ Descript?: string; // Description of procedure.
60
+ FeeAmt?: number; // The fee charged to the patient.
61
+ PriInsAmt?: number; // The amount primary insurance is expected to pay.
62
+ SecInsAmt?: number; // The amount secondary insurance is expected to pay.
63
+ PatAmt?: number; // The amount the patient is expected to pay.
64
+ Discount?: number; // The amount of discount. Used for PPOs and procedure level discounts.
65
+ Prognosis?: string; // Text for prognosis definition.
66
+ Dx?: string; // Text for diagnosis definition.
67
+ ProcAbbr?: string; // The procedure code abbreviation.
68
+ FeeAllowed?: number; // The amount primary insurance allows.
69
+ }
70
+
71
+ /**
72
+ * 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).
73
+ * @see https://www.opendental.com/site/apiproctps.html
74
+ */
75
+ export type Surf =
76
+ "B/F" | "V" | "M" | "O/I" | "D" | "L" |
77
+ "UL" | "UR" | "LR" | "LL" |
78
+ "1" | "2" | "3" | "4" | "5" | "6" |
79
+ "U" | "L";