@rinse-dental/open-dental 2.2.0 → 2.3.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.
@@ -18,4 +18,6 @@ export { default as Fees } from "./fees";
18
18
  export { default as Diseases } from "./diseases";
19
19
  export { default as Allergies } from "./allergies";
20
20
  export { default as MedicationPats } from "./medicationPats";
21
+ export { default as ProcTPs } from "./procTPs";
22
+ export { default as ProcNotes } from "./procNotes";
21
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,I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AAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC"}
package/dist/api/index.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.MedicationPats = exports.Allergies = exports.Diseases = exports.Fees = exports.DiscountPlans = exports.DiscountPlanSubs = exports.Definitions = exports.Payments = exports.Operatories = exports.Providers = exports.Schedules = exports.TreatmentPlanAttaches = exports.TreatmentPlans = exports.Recalls = exports.ProcedureLogs = exports.Patients = exports.PatFields = exports.CommLogs = exports.ChartModules = exports.Appointments = void 0;
6
+ exports.ProcNotes = exports.ProcTPs = exports.MedicationPats = exports.Allergies = exports.Diseases = exports.Fees = exports.DiscountPlans = exports.DiscountPlanSubs = exports.Definitions = exports.Payments = exports.Operatories = exports.Providers = exports.Schedules = exports.TreatmentPlanAttaches = exports.TreatmentPlans = exports.Recalls = exports.ProcedureLogs = exports.Patients = exports.PatFields = exports.CommLogs = exports.ChartModules = exports.Appointments = void 0;
7
7
  var appointments_1 = require("./appointments");
8
8
  Object.defineProperty(exports, "Appointments", { enumerable: true, get: function () { return __importDefault(appointments_1).default; } });
9
9
  var chartModules_1 = require("./chartModules");
@@ -44,4 +44,8 @@ var allergies_1 = require("./allergies");
44
44
  Object.defineProperty(exports, "Allergies", { enumerable: true, get: function () { return __importDefault(allergies_1).default; } });
45
45
  var medicationPats_1 = require("./medicationPats");
46
46
  Object.defineProperty(exports, "MedicationPats", { enumerable: true, get: function () { return __importDefault(medicationPats_1).default; } });
47
+ var procTPs_1 = require("./procTPs");
48
+ Object.defineProperty(exports, "ProcTPs", { enumerable: true, get: function () { return __importDefault(procTPs_1).default; } });
49
+ var procNotes_1 = require("./procNotes");
50
+ Object.defineProperty(exports, "ProcNotes", { enumerable: true, get: function () { return __importDefault(procNotes_1).default; } });
47
51
  // Add other APIs as needed
@@ -0,0 +1,28 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import { ProcNote, GetProcNotesParams, CreateProcNoteParams } from "../types/procNoteTypes";
3
+ export default class ProcNotes {
4
+ private httpClient;
5
+ constructor(httpClient: HttpClient);
6
+ /**
7
+ * Fetch multiple ProcNotes with optional filtering and pagination.
8
+ * @param {Object} params - The parameters for filtering and pagination.
9
+ * @param {number} [params.PatNum] - Optional. FK to patient.PatNum.
10
+ * @param {number} [params.ProcNum] - Optional. FK to procedure.ProcNum.
11
+ * @param {number} [params.Offset] - Optional. Pagination offset for results.
12
+ * @returns {Promise<ProcNote[]>} - A list of ProcNotes.
13
+ */
14
+ getFees({ PatNum, ProcNum, Offset, }?: GetProcNotesParams): Promise<ProcNote[]>;
15
+ /**
16
+ * Creates a ProcNote
17
+ * @param {Object} data - The details of ProcNote to create.
18
+ * @param {number} data.PatNum - Required. FK to patient.PatNum.
19
+ * @param {number} data.ProcNum - Required. ProcNum of the procedure.
20
+ * @param {string} data.Note - Required. The actual note.
21
+ * @param {"true" | "false"} [data.isSigned] - Optional. Either "true" or "false". If "true", will digitally sign the procnote. Default "false".
22
+ * @param {"true" | "false"} [data.doAppendNote] - Optional. Either "true" or "false". If "true", will prepend the Note field with the most recent procnote.Note value followed by two newlines. Default "false".
23
+ * @returns {Promise<ProcNote>} - The created refattaches.
24
+ * @throws {Error} - If required fields are missing or the API returns an error.
25
+ */
26
+ createProcNote({ PatNum, ProcNum, Note, isSigned, doAppendNote, }: CreateProcNoteParams): Promise<ProcNote>;
27
+ }
28
+ //# sourceMappingURL=procNotes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"procNotes.d.ts","sourceRoot":"","sources":["../../src/api/procNotes.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIpC;;;;;;;OAOG;IACU,OAAO,CAAC,EACjB,MAAM,EACN,OAAO,EACP,MAAM,GACP,GAAE,kBAAuB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAUlD;;;;;;;;;;SAUK;IACU,cAAc,CAAC,EAC1B,MAAM,EACN,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,YAAY,GACb,EAAG,oBAAoB,GAAG,OAAO,CAAC,QAAQ,CAAC;CAa7C"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class ProcNotes {
4
+ httpClient;
5
+ constructor(httpClient) {
6
+ this.httpClient = httpClient;
7
+ }
8
+ /**
9
+ * Fetch multiple ProcNotes with optional filtering and pagination.
10
+ * @param {Object} params - The parameters for filtering and pagination.
11
+ * @param {number} [params.PatNum] - Optional. FK to patient.PatNum.
12
+ * @param {number} [params.ProcNum] - Optional. FK to procedure.ProcNum.
13
+ * @param {number} [params.Offset] - Optional. Pagination offset for results.
14
+ * @returns {Promise<ProcNote[]>} - A list of ProcNotes.
15
+ */
16
+ async getFees({ PatNum, ProcNum, Offset, } = {}) {
17
+ const params = {
18
+ PatNum,
19
+ ProcNum,
20
+ Offset,
21
+ };
22
+ return this.httpClient.get("/procnotes", params);
23
+ }
24
+ /**
25
+ * Creates a ProcNote
26
+ * @param {Object} data - The details of ProcNote to create.
27
+ * @param {number} data.PatNum - Required. FK to patient.PatNum.
28
+ * @param {number} data.ProcNum - Required. ProcNum of the procedure.
29
+ * @param {string} data.Note - Required. The actual note.
30
+ * @param {"true" | "false"} [data.isSigned] - Optional. Either "true" or "false". If "true", will digitally sign the procnote. Default "false".
31
+ * @param {"true" | "false"} [data.doAppendNote] - Optional. Either "true" or "false". If "true", will prepend the Note field with the most recent procnote.Note value followed by two newlines. Default "false".
32
+ * @returns {Promise<ProcNote>} - The created refattaches.
33
+ * @throws {Error} - If required fields are missing or the API returns an error.
34
+ */
35
+ async createProcNote({ PatNum, ProcNum, Note, isSigned, doAppendNote, }) {
36
+ if (!PatNum || !ProcNum || !Note) {
37
+ throw new Error("Invalid data: PatNum, ProcNum, and Note are required.");
38
+ }
39
+ return this.httpClient.post("/procnotes", {
40
+ PatNum,
41
+ ProcNum,
42
+ Note,
43
+ isSigned,
44
+ doAppendNote,
45
+ });
46
+ }
47
+ }
48
+ exports.default = ProcNotes;
@@ -30,6 +30,8 @@ import Fees from "./api/fees";
30
30
  import Diseases from "./api/diseases";
31
31
  import Allergies from "./api/allergies";
32
32
  import MedicationPats from "./api/medicationPats";
33
+ import ProcTPs from "./api/procTPs";
34
+ import ProcNotes from "./api/procNotes";
33
35
  declare class OpenDental {
34
36
  private static httpClient;
35
37
  /**
@@ -164,6 +166,14 @@ declare class OpenDental {
164
166
  * Create a new instance of the MedicationPats API.
165
167
  */
166
168
  static MedicationPats(): MedicationPats;
169
+ /**
170
+ * Create a new instance of the ProcTPs API.
171
+ */
172
+ static ProcTPs(): ProcTPs;
173
+ /**
174
+ * Create a new instance of the ProcNotes API.
175
+ */
176
+ static ProcNotes(): ProcNotes;
167
177
  }
168
178
  export { OpenDental };
169
179
  //# sourceMappingURL=openDental.d.ts.map
@@ -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,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,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,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,WAAW,MAA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8 @@ const fees_1 = __importDefault(require("./api/fees"));
37
37
  const diseases_1 = __importDefault(require("./api/diseases"));
38
38
  const allergies_1 = __importDefault(require("./api/allergies"));
39
39
  const medicationPats_1 = __importDefault(require("./api/medicationPats"));
40
+ const procTPs_1 = __importDefault(require("./api/procTPs"));
41
+ const procNotes_1 = __importDefault(require("./api/procNotes"));
40
42
  class OpenDental {
41
43
  static httpClient;
42
44
  /**
@@ -338,5 +340,23 @@ class OpenDental {
338
340
  }
339
341
  return new medicationPats_1.default(this.httpClient);
340
342
  }
343
+ /**
344
+ * Create a new instance of the ProcTPs API.
345
+ */
346
+ static ProcTPs() {
347
+ if (!this.httpClient) {
348
+ throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
349
+ }
350
+ return new procTPs_1.default(this.httpClient);
351
+ }
352
+ /**
353
+ * Create a new instance of the ProcNotes API.
354
+ */
355
+ static ProcNotes() {
356
+ if (!this.httpClient) {
357
+ throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
358
+ }
359
+ return new procNotes_1.default(this.httpClient);
360
+ }
341
361
  }
342
362
  exports.OpenDental = OpenDental;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Represents a fees in Open Dental
2
+ * Represents a fee in Open Dental
3
3
  * @see https://www.opendental.com/site/apifees.html
4
4
  */
5
5
  export interface Fee {
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Represents a procNote in Open Dental
3
+ * @see https://www.opendental.com/site/apiprocnotes.html
4
+ */
5
+ export interface ProcNote {
6
+ ProcNoteNum?: number;
7
+ PatNum?: number;
8
+ ProcNum?: number;
9
+ EntryDateTime?: string;
10
+ UserNum?: number;
11
+ Note?: string;
12
+ SigIsTopaz?: "true" | "false";
13
+ isSigned?: "true" | "false";
14
+ }
15
+ /**
16
+ * Gets a list of procnotes ordered by most recent. When a procnote is edited in Open Dental, a new procnote is created. No existing procnote can EVER be edited or deleted.
17
+ * @see https://www.opendental.com/site/apiprocnotes.html
18
+ */
19
+ export interface GetProcNotesParams {
20
+ PatNum?: number;
21
+ ProcNum?: number;
22
+ Offset?: number;
23
+ }
24
+ /**
25
+ * Creates a new note that is associated with a procedure. If the Procedure Note contains 50 or more consecutive blank lines, they will be removed. The new procnote will always replace the existing procnote. Every change is recorded with an archived note history, which can be viewed in the Chart Module under Show Tab > Audit.
26
+ * To sign a procnote set isSigned to true. The signature that appears on the procnote will be shown as the following: "Digitally Signed by [API DeveloperName] Date Signed: ["MM/dd/yyyy HH:mm:ss tt"]". See API Implementation for more information on API Signatures.
27
+ * @see https://www.opendental.com/site/apiprocnotes.html
28
+ */
29
+ export interface CreateProcNoteParams {
30
+ PatNum: number;
31
+ ProcNum: number;
32
+ Note: string;
33
+ isSigned?: "true" | "false";
34
+ doAppendNote?: "true" | "false";
35
+ }
36
+ //# sourceMappingURL=procNoteTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"procNoteTypes.d.ts","sourceRoot":"","sources":["../../src/types/procNoteTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rinse-dental/open-dental",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "A TypeScript library for easily accessing Open Dental APIs.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/api/index.ts CHANGED
@@ -18,4 +18,6 @@ export { default as Fees } from "./fees";
18
18
  export { default as Diseases } from "./diseases";
19
19
  export { default as Allergies } from "./allergies";
20
20
  export { default as MedicationPats } from "./medicationPats";
21
+ export { default as ProcTPs } from "./procTPs";
22
+ export { default as ProcNotes } from "./procNotes";
21
23
  // Add other APIs as needed
@@ -0,0 +1,67 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import {
3
+ ProcNote,
4
+ GetProcNotesParams,
5
+ CreateProcNoteParams,
6
+ } from "../types/procNoteTypes";
7
+
8
+ export default class ProcNotes {
9
+ private httpClient: HttpClient;
10
+
11
+ constructor(httpClient: HttpClient) {
12
+ this.httpClient = httpClient;
13
+ }
14
+
15
+ /**
16
+ * Fetch multiple ProcNotes with optional filtering and pagination.
17
+ * @param {Object} params - The parameters for filtering and pagination.
18
+ * @param {number} [params.PatNum] - Optional. FK to patient.PatNum.
19
+ * @param {number} [params.ProcNum] - Optional. FK to procedure.ProcNum.
20
+ * @param {number} [params.Offset] - Optional. Pagination offset for results.
21
+ * @returns {Promise<ProcNote[]>} - A list of ProcNotes.
22
+ */
23
+ public async getFees({
24
+ PatNum,
25
+ ProcNum,
26
+ Offset,
27
+ }: GetProcNotesParams = {}): Promise<ProcNote[]> {
28
+ const params = {
29
+ PatNum,
30
+ ProcNum,
31
+ Offset,
32
+ };
33
+
34
+ return this.httpClient.get<ProcNote[]>("/procnotes", params);
35
+ }
36
+
37
+ /**
38
+ * Creates a ProcNote
39
+ * @param {Object} data - The details of ProcNote to create.
40
+ * @param {number} data.PatNum - Required. FK to patient.PatNum.
41
+ * @param {number} data.ProcNum - Required. ProcNum of the procedure.
42
+ * @param {string} data.Note - Required. The actual note.
43
+ * @param {"true" | "false"} [data.isSigned] - Optional. Either "true" or "false". If "true", will digitally sign the procnote. Default "false".
44
+ * @param {"true" | "false"} [data.doAppendNote] - Optional. Either "true" or "false". If "true", will prepend the Note field with the most recent procnote.Note value followed by two newlines. Default "false".
45
+ * @returns {Promise<ProcNote>} - The created refattaches.
46
+ * @throws {Error} - If required fields are missing or the API returns an error.
47
+ */
48
+ public async createProcNote({
49
+ PatNum,
50
+ ProcNum,
51
+ Note,
52
+ isSigned,
53
+ doAppendNote,
54
+ } : CreateProcNoteParams): Promise<ProcNote> {
55
+ if (!PatNum || !ProcNum || !Note) {
56
+ throw new Error("Invalid data: PatNum, ProcNum, and Note are required.");
57
+ }
58
+
59
+ return this.httpClient.post<ProcNote>("/procnotes", {
60
+ PatNum,
61
+ ProcNum,
62
+ Note,
63
+ isSigned,
64
+ doAppendNote,
65
+ });
66
+ }
67
+ }
package/src/openDental.ts CHANGED
@@ -31,6 +31,8 @@ import Fees from "./api/fees";
31
31
  import Diseases from "./api/diseases";
32
32
  import Allergies from "./api/allergies";
33
33
  import MedicationPats from "./api/medicationPats";
34
+ import ProcTPs from "./api/procTPs";
35
+ import ProcNotes from "./api/procNotes";
34
36
 
35
37
  class OpenDental {
36
38
  private static httpClient: HttpClient;
@@ -370,6 +372,26 @@ class OpenDental {
370
372
  return new MedicationPats(this.httpClient);
371
373
  }
372
374
 
375
+ /**
376
+ * Create a new instance of the ProcTPs API.
377
+ */
378
+ public static ProcTPs() {
379
+ if (!this.httpClient) {
380
+ throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
381
+ }
382
+ return new ProcTPs(this.httpClient);
383
+ }
384
+
385
+ /**
386
+ * Create a new instance of the ProcNotes API.
387
+ */
388
+ public static ProcNotes() {
389
+ if (!this.httpClient) {
390
+ throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
391
+ }
392
+ return new ProcNotes(this.httpClient);
393
+ }
394
+
373
395
  }
374
396
 
375
397
  export { OpenDental };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Represents a fees in Open Dental
2
+ * Represents a fee in Open Dental
3
3
  * @see https://www.opendental.com/site/apifees.html
4
4
  */
5
5
  export interface Fee {
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Represents a procNote in Open Dental
3
+ * @see https://www.opendental.com/site/apiprocnotes.html
4
+ */
5
+ export interface ProcNote {
6
+ ProcNoteNum?: number; //
7
+ PatNum?: number; //
8
+ ProcNum?: number; //
9
+ EntryDateTime?: string; //
10
+ UserNum?: number; //
11
+ Note?: string; //
12
+ SigIsTopaz?: "true" | "false"; //
13
+ isSigned?: "true" | "false"; //
14
+ }
15
+
16
+ /**
17
+ * Gets a list of procnotes ordered by most recent. When a procnote is edited in Open Dental, a new procnote is created. No existing procnote can EVER be edited or deleted.
18
+ * @see https://www.opendental.com/site/apiprocnotes.html
19
+ */
20
+ export interface GetProcNotesParams {
21
+ PatNum?: number; // Optional. FK to patient.PatNum.
22
+ ProcNum?: number; // Optional. FK to procedure.ProcNum.
23
+ Offset?: number; // Optional. Pagination.
24
+ }
25
+
26
+ /**
27
+ * Creates a new note that is associated with a procedure. If the Procedure Note contains 50 or more consecutive blank lines, they will be removed. The new procnote will always replace the existing procnote. Every change is recorded with an archived note history, which can be viewed in the Chart Module under Show Tab > Audit.
28
+ * To sign a procnote set isSigned to true. The signature that appears on the procnote will be shown as the following: "Digitally Signed by [API DeveloperName] Date Signed: ["MM/dd/yyyy HH:mm:ss tt"]". See API Implementation for more information on API Signatures.
29
+ * @see https://www.opendental.com/site/apiprocnotes.html
30
+ */
31
+ export interface CreateProcNoteParams {
32
+ PatNum: number; // Required. FK to patient.PatNum.
33
+ ProcNum: number; // Required. ProcNum of the procedure.
34
+ Note: string; // Required. The actual note.
35
+ isSigned?: "true" | "false"; // (added in version 24.2.29) Optional. Either "true" or "false". If "true", will digitally sign the procnote. Default "false".
36
+ doAppendNote?: "true" | "false"; // (added in version 24.2.29) Optional. Either "true" or "false". If "true", will prepend the Note field with the most recent procnote.Note value followed by two newlines. Default "false".
37
+ }
38
+