@rinse-dental/open-dental 0.1.1 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/deploy_notes.txt +21 -0
  2. package/dist/api/appointments.d.ts +1 -1
  3. package/dist/api/appointments.d.ts.map +1 -1
  4. package/dist/api/chartModules.d.ts +14 -0
  5. package/dist/api/chartModules.d.ts.map +1 -0
  6. package/dist/api/chartModules.js +21 -0
  7. package/dist/api/commlogs.d.ts +1 -1
  8. package/dist/api/commlogs.d.ts.map +1 -1
  9. package/dist/api/index.d.ts +8 -1
  10. package/dist/api/index.d.ts.map +1 -1
  11. package/dist/api/index.js +17 -4
  12. package/dist/api/patFields.d.ts +53 -0
  13. package/dist/api/patFields.d.ts.map +1 -0
  14. package/dist/api/patFields.js +87 -0
  15. package/dist/api/patients.d.ts +20 -1
  16. package/dist/api/patients.d.ts.map +1 -1
  17. package/dist/api/patients.js +34 -0
  18. package/dist/api/recalls.d.ts +84 -0
  19. package/dist/api/recalls.d.ts.map +1 -0
  20. package/dist/api/recalls.js +120 -0
  21. package/dist/api/schedules.d.ts +29 -0
  22. package/dist/api/schedules.d.ts.map +1 -0
  23. package/dist/api/schedules.js +47 -0
  24. package/dist/api/treatplans.d.ts +53 -0
  25. package/dist/api/treatplans.d.ts.map +1 -0
  26. package/dist/api/treatplans.js +77 -0
  27. package/dist/openDental.d.ts +38 -3
  28. package/dist/openDental.d.ts.map +1 -1
  29. package/dist/openDental.js +74 -4
  30. package/dist/types/{appointmentType.d.ts → appointmentTypes.d.ts} +1 -1
  31. package/dist/types/appointmentTypes.d.ts.map +1 -0
  32. package/dist/types/chartModuleTypes.d.ts +21 -0
  33. package/dist/types/chartModuleTypes.d.ts.map +1 -0
  34. package/dist/types/{commlogType.d.ts → commlogTypes.d.ts} +1 -1
  35. package/dist/types/commlogTypes.d.ts.map +1 -0
  36. package/dist/types/commlogTypes.js +2 -0
  37. package/dist/types/patFieldTypes.d.ts +23 -0
  38. package/dist/types/patFieldTypes.d.ts.map +1 -0
  39. package/dist/types/patFieldTypes.js +2 -0
  40. package/dist/types/recallTypes.d.ts +98 -0
  41. package/dist/types/recallTypes.d.ts.map +1 -0
  42. package/dist/types/recallTypes.js +2 -0
  43. package/dist/types/scheduleTypes.d.ts +28 -0
  44. package/dist/types/scheduleTypes.d.ts.map +1 -0
  45. package/dist/types/scheduleTypes.js +2 -0
  46. package/dist/types/treatPlanTypes.d.ts +72 -0
  47. package/dist/types/treatPlanTypes.d.ts.map +1 -0
  48. package/dist/types/treatPlanTypes.js +2 -0
  49. package/package.json +1 -1
  50. package/src/api/appointments.ts +1 -2
  51. package/src/api/chartModules.ts +25 -0
  52. package/src/api/commlogs.ts +1 -1
  53. package/src/api/index.ts +8 -2
  54. package/src/api/patFields.ts +112 -0
  55. package/src/api/patients.ts +50 -1
  56. package/src/api/recalls.ts +148 -0
  57. package/src/api/schedules.ts +65 -0
  58. package/src/api/treatplans.ts +97 -0
  59. package/src/openDental.ts +85 -4
  60. package/src/types/chartModuleTypes.ts +29 -0
  61. package/src/types/patFieldTypes.ts +24 -0
  62. package/src/types/recallTypes.ts +102 -0
  63. package/src/types/scheduleTypes.ts +28 -0
  64. package/src/types/treatPlanTypes.ts +75 -0
  65. package/dist/types/appointmentType.d.ts.map +0 -1
  66. package/dist/types/commlogType.d.ts.map +0 -1
  67. /package/dist/types/{appointmentType.js → appointmentTypes.js} +0 -0
  68. /package/dist/types/{commlogType.js → chartModuleTypes.js} +0 -0
  69. /package/src/types/{appointmentType.ts → appointmentTypes.ts} +0 -0
  70. /package/src/types/{commlogType.ts → commlogTypes.ts} +0 -0
@@ -0,0 +1,21 @@
1
+ npm run build
2
+ npm version patch //patch, minor, major
3
+ npm pack
4
+ git add .
5
+ git commit -m "notes"
6
+ git push origin main
7
+ git tag //confirm tag
8
+ git push origin vX.Y.Z
9
+ gh release create vX.Y.Z --title "Release vX.Y.Z" --notes ""
10
+
11
+ if the tag doesn't exist locally:
12
+ git tag vX.Y.Z
13
+ git push origin vX.Y.Z
14
+ gh release create vX.Y.Z --title "Release vX.Y.Z" --notes ""
15
+
16
+
17
+
18
+
19
+
20
+ npm install /Users/casey/Dev/rinse-dental/open-dental/rinse-dental-open-dental-0.1.2.tgz
21
+ "@rinse-dental/open-dental":"^0.1.2",
@@ -1,5 +1,5 @@
1
1
  import HttpClient from "../utils/httpClient";
2
- import { Appointment, AppointmentSlot, GetAppointmentParams, GetASAPParams, GetSlotsParams, GetSlotsWebSchedParams, GetWebSchedAppointmentsParams, CreateNewAppointmentParams, CreatePlannedAppointmentParams, SchedulePlannedAppointmentParams, ScheduleWebSchedAppointmentParams, UpdateAppointmentParams, BreakAppointmentParams, ConfirmAppointmentParams } from "../types/appointmentType";
2
+ import { Appointment, AppointmentSlot, GetAppointmentParams, GetASAPParams, GetSlotsParams, GetSlotsWebSchedParams, GetWebSchedAppointmentsParams, CreateNewAppointmentParams, CreatePlannedAppointmentParams, SchedulePlannedAppointmentParams, ScheduleWebSchedAppointmentParams, UpdateAppointmentParams, BreakAppointmentParams, ConfirmAppointmentParams } from "../types/appointmentTypes";
3
3
  export default class Appointments {
4
4
  private httpClient;
5
5
  constructor(httpClient: HttpClient);
@@ -1 +1 @@
1
- {"version":3,"file":"appointments.d.ts","sourceRoot":"","sources":["../../src/api/appointments.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,sBAAsB,EACtB,6BAA6B,EAC7B,0BAA0B,EAC1B,8BAA8B,EAC9B,gCAAgC,EAChC,iCAAiC,EACjC,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;O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sBAAsB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAOzF;;;;;;;;;OASG;IACU,uBAAuB,CAClC,MAAM,CAAC,EAAE,6BAA6B,GACrC,OAAO,CAAC,WAAW,EAAE,CAAC;IAIzB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACY,oBAAoB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,WAAW,CAAC;IAS3F;;;;;;;;;;;;;;;;;;OAkBG;IACU,wBAAwB,CAAC,IAAI,EAAE,8BAA8B,GAAG,OAAO,CAAC,WAAW,CAAC;IASjG;;;;;;;;;;;OAWG;IACU,0BAA0B,CACrC,IAAI,EAAE,gCAAgC,GACrC,OAAO,CAAC,WAAW,CAAC;IAQvB;;;;;;;;;;;OAWG;IACU,2BAA2B,CACtC,IAAI,EAAE,iCAAiC,GACtC,OAAO,CAAC,WAAW,CAAC;IAiBvB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACU,iBAAiB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC;IAQnF;;;;;;;;;OASG;IACU,gBAAgB,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ1E;;;;;;OAMG;IACU,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ/E;;;;;;;;OAQG;IACU,kBAAkB,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;CAO/E"}
@@ -0,0 +1,14 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import { PlannedAppointment } from "../types/chartModuleTypes";
3
+ export default class ChartModules {
4
+ private httpClient;
5
+ constructor(httpClient: HttpClient);
6
+ /**
7
+ * Gets Planned Appointments for a patient, similarly to how it shows in the Chart Module's Planned Appointments tab.
8
+ * @param {number} PatNum - The unique identifier for the patient.
9
+ * @returns {Promise<PlannedAppointment>} - The planned appts object.
10
+ * @throws {Error} - If `PatNum` is not provided.
11
+ */
12
+ getPlannedAppts(PatNum: number): Promise<PlannedAppointment>;
13
+ }
14
+ //# sourceMappingURL=chartModules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartModules.d.ts","sourceRoot":"","sources":["../../src/api/chartModules.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAElC,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;OAKG;IACU,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAM1E"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class ChartModules {
4
+ httpClient;
5
+ constructor(httpClient) {
6
+ this.httpClient = httpClient;
7
+ }
8
+ /**
9
+ * Gets Planned Appointments for a patient, similarly to how it shows in the Chart Module's Planned Appointments tab.
10
+ * @param {number} PatNum - The unique identifier for the patient.
11
+ * @returns {Promise<PlannedAppointment>} - The planned appts object.
12
+ * @throws {Error} - If `PatNum` is not provided.
13
+ */
14
+ async getPlannedAppts(PatNum) {
15
+ if (!PatNum) {
16
+ throw new Error("PatNum is required.");
17
+ }
18
+ return this.httpClient.get(`/chartmodules/${PatNum}/PlannedAppts`);
19
+ }
20
+ }
21
+ exports.default = ChartModules;
@@ -1,5 +1,5 @@
1
1
  import HttpClient from "../utils/httpClient";
2
- import { CommLog, CreateCommLogParams } from "../types/commlogType";
2
+ import { CommLog, CreateCommLogParams } from "../types/commlogTypes";
3
3
  export default class CommLogs {
4
4
  private httpClient;
5
5
  constructor(httpClient: HttpClient);
@@ -1 +1 @@
1
- {"version":3,"file":"commlogs.d.ts","sourceRoot":"","sources":["../../src/api/commlogs.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,QAAQ;IAC3B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;OAKG;IACU,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAQ5D;;;;;;;;;;;;OAYG;IACU,aAAa,CAAC,EACzB,MAAM,EACN,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,cAAc,GACf,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;CAiB1C"}
1
+ {"version":3,"file":"commlogs.d.ts","sourceRoot":"","sources":["../../src/api/commlogs.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAErE,MAAM,CAAC,OAAO,OAAO,QAAQ;IAC3B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;OAKG;IACU,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAQ5D;;;;;;;;;;;;OAYG;IACU,aAAa,CAAC,EACzB,MAAM,EACN,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,cAAc,GACf,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;CAiB1C"}
@@ -1,3 +1,10 @@
1
- export { default as Patients } from "./patients";
2
1
  export { default as Appointments } from "./appointments";
2
+ export { default as ChartModules } from "./chartModules";
3
+ export { default as CommLogs } from "./commlogs";
4
+ export { default as PatFields } from "./patFields";
5
+ export { default as Patients } from "./patients";
6
+ export { default as ProcedureLogs } from "./procedureLog";
7
+ export { default as Recalls } from "./recalls";
8
+ export { default as TreatmentPlans } from "./treatplans";
9
+ export { default as Schedule } from "./schedules";
3
10
  //# 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,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
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,QAAQ,EAAE,MAAM,aAAa,CAAC"}
package/dist/api/index.js CHANGED
@@ -3,10 +3,23 @@ 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.Appointments = exports.Patients = void 0;
7
- var patients_1 = require("./patients");
8
- Object.defineProperty(exports, "Patients", { enumerable: true, get: function () { return __importDefault(patients_1).default; } });
6
+ exports.Schedule = exports.TreatmentPlans = exports.Recalls = exports.ProcedureLogs = exports.Patients = exports.PatFields = exports.CommLogs = exports.ChartModules = exports.Appointments = void 0;
9
7
  var appointments_1 = require("./appointments");
10
8
  Object.defineProperty(exports, "Appointments", { enumerable: true, get: function () { return __importDefault(appointments_1).default; } });
11
- //export { default as ProcedureLogs } from "./procedureLogs";
9
+ var chartModules_1 = require("./chartModules");
10
+ Object.defineProperty(exports, "ChartModules", { enumerable: true, get: function () { return __importDefault(chartModules_1).default; } });
11
+ var commlogs_1 = require("./commlogs");
12
+ Object.defineProperty(exports, "CommLogs", { enumerable: true, get: function () { return __importDefault(commlogs_1).default; } });
13
+ var patFields_1 = require("./patFields");
14
+ Object.defineProperty(exports, "PatFields", { enumerable: true, get: function () { return __importDefault(patFields_1).default; } });
15
+ var patients_1 = require("./patients");
16
+ Object.defineProperty(exports, "Patients", { enumerable: true, get: function () { return __importDefault(patients_1).default; } });
17
+ var procedureLog_1 = require("./procedureLog");
18
+ Object.defineProperty(exports, "ProcedureLogs", { enumerable: true, get: function () { return __importDefault(procedureLog_1).default; } });
19
+ var recalls_1 = require("./recalls");
20
+ Object.defineProperty(exports, "Recalls", { enumerable: true, get: function () { return __importDefault(recalls_1).default; } });
21
+ var treatplans_1 = require("./treatplans");
22
+ Object.defineProperty(exports, "TreatmentPlans", { enumerable: true, get: function () { return __importDefault(treatplans_1).default; } });
23
+ var schedules_1 = require("./schedules");
24
+ Object.defineProperty(exports, "Schedule", { enumerable: true, get: function () { return __importDefault(schedules_1).default; } });
12
25
  // Add other APIs as needed
@@ -0,0 +1,53 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import { PatField, GetPatFieldsParams, AddUpdatePatFieldParams } from "../types/patFieldTypes";
3
+ export default class PatFields {
4
+ private httpClient;
5
+ constructor(httpClient: HttpClient);
6
+ /**
7
+ * Fetch a single patfield by its ID.
8
+ * @param {number} PatFieldNum - The ID of the patfield.
9
+ * @returns {Promise<PatField>} - The patient data.
10
+ * @throws {Error} - If `PatNum` is not valid or the API returns an error.
11
+ */
12
+ getPatField(PatFieldNum: number): Promise<PatField>;
13
+ /**
14
+ * Fetch multiple patients with optional filtering and pagination.
15
+ * @param {Object} params - Filtering and pagination parameters.
16
+ * @param {string} [params.PatNum] - Filter by last name (case-insensitive, partial match).
17
+ * @param {string} [params.FieldName] - Filter by last name (case-insensitive, partial match).
18
+ * @param {string} [params.SecDateTEdit] - Filter by last name (case-insensitive, partial match).
19
+ * @returns {Promise<PatField[]>} - A list of summarized patient data.
20
+ * @throws {Error} - If the API returns an error.
21
+ */
22
+ getPatFields({ PatNum, FieldName, SecDateTEdit, }?: GetPatFieldsParams): Promise<PatField[]>;
23
+ /**
24
+ * Creates a patfield. Cannot create PatFields associated with hidden PatFieldDefs.
25
+ * @param {Object} data - The data for the new patfield.
26
+ * @param {number} data.PatNum - Required: The patient's PatNum.
27
+ * @param {string} data.FieldName - Required: FK to PatFieldDef.FieldName. Case sensitive.
28
+ * @param {string} data.FieldValue - Required: See the top of this page for more information. Relies on PatFieldDef.FieldType.
29
+ * @returns {Promise<PatField>} - The created PatField.
30
+ * @throws {Error} - If the data is invalid or the API returns an error.
31
+ */
32
+ createPatField({ PatNum, FieldName, FieldValue, }: AddUpdatePatFieldParams): Promise<PatField>;
33
+ /**
34
+ * Updates an existing patfield.
35
+ * @param {Object} data - The data for the updated patfield.
36
+ * @param {number} data.PatNum - Required: The patient's PatNum.
37
+ * @param {string} data.FieldName - Required: FK to PatFieldDef.FieldName. Case sensitive.
38
+ * @param {string} data.FieldValue - Required: See the top of this page for more information. Relies on PatFieldDef.FieldType.
39
+ * @returns {Promise<PatField>} - The updated PatField.
40
+ * @throws {Error} - If the data is invalid or the API returns an error.
41
+ */
42
+ editPatField({ PatNum, FieldName, FieldValue, }: AddUpdatePatFieldParams): Promise<PatField>;
43
+ /**
44
+ * Delete a single patfield by its ID.
45
+ * @param {number} PatFieldNum - The ID of the patField.
46
+ * @returns {Promise<{ status: number }>} - The API response containing the status code.
47
+ * @throws {Error} - If `PatFieldNum` is not valid or the API returns an error.
48
+ */
49
+ deletePatField(PatFieldNum: number): Promise<{
50
+ status: number;
51
+ }>;
52
+ }
53
+ //# sourceMappingURL=patFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patFields.d.ts","sourceRoot":"","sources":["../../src/api/patFields.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACH,QAAQ,EACR,kBAAkB,EAClB,uBAAuB,EAC1B,MAAM,wBAAwB,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;OAKG;IACU,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAQhE;;;;;;;;OAQG;IACY,YAAY,CAAC,EACxB,MAAM,EACN,SAAS,EACT,YAAY,GACb,GAAE,kBAAuB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAShD;;;;;;;;OAQG;IACU,cAAc,CAAC,EACxB,MAAM,EACN,SAAS,EACT,UAAU,GACX,EAAE,uBAAuB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAWhD;;;;;;;;OAQG;IACU,YAAY,CAAC,EACtB,MAAM,EACN,SAAS,EACT,UAAU,GACX,EAAE,uBAAuB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAWhD;;;;;OAKG;IACU,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAOhF"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class PatFields {
4
+ httpClient;
5
+ constructor(httpClient) {
6
+ this.httpClient = httpClient;
7
+ }
8
+ /**
9
+ * Fetch a single patfield by its ID.
10
+ * @param {number} PatFieldNum - The ID of the patfield.
11
+ * @returns {Promise<PatField>} - The patient data.
12
+ * @throws {Error} - If `PatNum` is not valid or the API returns an error.
13
+ */
14
+ async getPatField(PatFieldNum) {
15
+ if (!PatFieldNum || typeof PatFieldNum !== "number") {
16
+ throw new Error("Invalid parameter: PatNum must be a valid number.");
17
+ }
18
+ return await this.httpClient.get(`/patfields/${PatFieldNum}`);
19
+ }
20
+ /**
21
+ * Fetch multiple patients with optional filtering and pagination.
22
+ * @param {Object} params - Filtering and pagination parameters.
23
+ * @param {string} [params.PatNum] - Filter by last name (case-insensitive, partial match).
24
+ * @param {string} [params.FieldName] - Filter by last name (case-insensitive, partial match).
25
+ * @param {string} [params.SecDateTEdit] - Filter by last name (case-insensitive, partial match).
26
+ * @returns {Promise<PatField[]>} - A list of summarized patient data.
27
+ * @throws {Error} - If the API returns an error.
28
+ */
29
+ async getPatFields({ PatNum, FieldName, SecDateTEdit, } = {}) {
30
+ return await this.httpClient.get("/patfields", {
31
+ PatNum,
32
+ FieldName,
33
+ SecDateTEdit,
34
+ });
35
+ }
36
+ /**
37
+ * Creates a patfield. Cannot create PatFields associated with hidden PatFieldDefs.
38
+ * @param {Object} data - The data for the new patfield.
39
+ * @param {number} data.PatNum - Required: The patient's PatNum.
40
+ * @param {string} data.FieldName - Required: FK to PatFieldDef.FieldName. Case sensitive.
41
+ * @param {string} data.FieldValue - Required: See the top of this page for more information. Relies on PatFieldDef.FieldType.
42
+ * @returns {Promise<PatField>} - The created PatField.
43
+ * @throws {Error} - If the data is invalid or the API returns an error.
44
+ */
45
+ async createPatField({ PatNum, FieldName, FieldValue, }) {
46
+ if (!PatNum || !FieldName || !FieldValue) {
47
+ throw new Error("Invalid data: All fields are required.");
48
+ }
49
+ return await this.httpClient.post("/patfields", {
50
+ PatNum,
51
+ FieldName,
52
+ FieldValue,
53
+ });
54
+ }
55
+ /**
56
+ * Updates an existing patfield.
57
+ * @param {Object} data - The data for the updated patfield.
58
+ * @param {number} data.PatNum - Required: The patient's PatNum.
59
+ * @param {string} data.FieldName - Required: FK to PatFieldDef.FieldName. Case sensitive.
60
+ * @param {string} data.FieldValue - Required: See the top of this page for more information. Relies on PatFieldDef.FieldType.
61
+ * @returns {Promise<PatField>} - The updated PatField.
62
+ * @throws {Error} - If the data is invalid or the API returns an error.
63
+ */
64
+ async editPatField({ PatNum, FieldName, FieldValue, }) {
65
+ if (!PatNum || !FieldName || !FieldValue) {
66
+ throw new Error("Invalid data: All fields are required.");
67
+ }
68
+ return await this.httpClient.put("/patfields", {
69
+ PatNum,
70
+ FieldName,
71
+ FieldValue,
72
+ });
73
+ }
74
+ /**
75
+ * Delete a single patfield by its ID.
76
+ * @param {number} PatFieldNum - The ID of the patField.
77
+ * @returns {Promise<{ status: number }>} - The API response containing the status code.
78
+ * @throws {Error} - If `PatFieldNum` is not valid or the API returns an error.
79
+ */
80
+ async deletePatField(PatFieldNum) {
81
+ if (!PatFieldNum || typeof PatFieldNum !== "number") {
82
+ throw new Error("Invalid parameter: PatNum must be a valid number.");
83
+ }
84
+ return await this.httpClient.delete(`/patfields/${PatFieldNum}`);
85
+ }
86
+ }
87
+ exports.default = PatFields;
@@ -1,5 +1,5 @@
1
1
  import HttpClient from "../utils/httpClient";
2
- import { Patient, PatientSummary, GetPatientsParams, CreatePatientParams, UpdatePatientParams } from "../types/patientTypes";
2
+ import { Patient, PatientSummary, GetPatientsParams, GetPatientsSimpleParams, CreatePatientParams, UpdatePatientParams } from "../types/patientTypes";
3
3
  export default class Patients {
4
4
  private httpClient;
5
5
  constructor(httpClient: HttpClient);
@@ -37,6 +37,25 @@ export default class Patients {
37
37
  * @throws {Error} - If the API returns an error.
38
38
  */
39
39
  getPatients({ LName, FName, Phone, Address, hideInactive, City, State, SSN, ChartNumber, guarOnly, showArchived, Birthdate, SiteNum, SubscriberId, Email, Country, ClinicNum, clinicAbbr, invoiceNumber, Offset, }?: GetPatientsParams): Promise<PatientSummary[]>;
40
+ /**
41
+ * Fetch multiple patients with optional filtering and pagination.
42
+ * @param {Object} params - Filtering and pagination parameters.
43
+ * @param {string} [params.LName] - Filter by last name (case-insensitive, partial match).
44
+ * @param {string} [params.FName] - Filter by first name (case-insensitive, partial match).
45
+ * @param {string} [params.Birthdate] - Filter by birthdate in "yyyy-MM-dd" format.
46
+ * @param {number} [params.ClinicNum] - Filter by clinic number (comma-separated list).
47
+ * @param {"Patient" | "NonPatient" | "Inactive" | "Archived" | "Deceased" | "Prospective".} [params.PatStatus] - Filter by Patient Status.
48
+ * @param {string} [params.DateTStamp] - In "yyyy-mm-dd HH:mm:ss" format.
49
+ * @param {number} [params.PriProv] - A single ProvNum. Leave blank if you want results for all primary providers.
50
+ * @param {"Male" | "Female" | "Unknown" | "Other"} [params.Gender] - Either "Male", "Female", "Unknown", or "Other".
51
+ * @param {"Single" | "Married" | "Child" | "Widowed" | "Divorced"} [params.Position] - Either "Single", "Married", "Child", "Widowed", or "Divorced".
52
+ * @param {number} [params.Guarantor] - A single PatNum. The person responsible for the account.
53
+ * @param {number} [params.SuperFamily] - A single PatNum. The head of a SuperFamily.
54
+ * @param {number} [params.Offset] - Pagination offset.
55
+ * @returns {Promise<Patient[]>} - A list of summarized patient data.
56
+ * @throws {Error} - If the API returns an error.
57
+ */
58
+ getPatientsSimple({ LName, FName, Birthdate, ClinicNum, PatStatus, DateTStamp, PriProv, Gender, Position, Guarantor, SuperFamily, Offset, }?: GetPatientsSimpleParams): Promise<Patient[]>;
40
59
  /**
41
60
  * Create a new patient.
42
61
  * @param {Object} data - The data for the new patient.
@@ -1 +1 @@
1
- {"version":3,"file":"patients.d.ts","sourceRoot":"","sources":["../../src/api/patients.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,QAAQ;IAC3B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;I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,KAAK,EACL,OAAO,EACP,YAAY,EACZ,IAAI,EACJ,KAAK,EACL,GAAG,EACH,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,OAAO,EACP,YAAY,EACZ,KAAK,EACL,OAAO,EACP,SAAS,EACT,UAAU,EACV,aAAa,EACb,MAAM,GACP,GAAE,iBAAsB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IA2BvD;;;;;;;;;;;;;;;;;OAiBG;IACU,iBAAiB,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,EACP,MAAM,EACN,QAAQ,EACR,SAAS,EACT,WAAW,EACX,MAAM,GACP,GAAE,uBAA4B,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAkBpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACU,aAAa,CAAC,EACzB,KAAK,EACL,KAAK,EACL,GAAG,YAAY,EAChB,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAW1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwCE;IACY,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;CAcxF"}
@@ -67,6 +67,40 @@ class Patients {
67
67
  Offset,
68
68
  });
69
69
  }
70
+ /**
71
+ * Fetch multiple patients with optional filtering and pagination.
72
+ * @param {Object} params - Filtering and pagination parameters.
73
+ * @param {string} [params.LName] - Filter by last name (case-insensitive, partial match).
74
+ * @param {string} [params.FName] - Filter by first name (case-insensitive, partial match).
75
+ * @param {string} [params.Birthdate] - Filter by birthdate in "yyyy-MM-dd" format.
76
+ * @param {number} [params.ClinicNum] - Filter by clinic number (comma-separated list).
77
+ * @param {"Patient" | "NonPatient" | "Inactive" | "Archived" | "Deceased" | "Prospective".} [params.PatStatus] - Filter by Patient Status.
78
+ * @param {string} [params.DateTStamp] - In "yyyy-mm-dd HH:mm:ss" format.
79
+ * @param {number} [params.PriProv] - A single ProvNum. Leave blank if you want results for all primary providers.
80
+ * @param {"Male" | "Female" | "Unknown" | "Other"} [params.Gender] - Either "Male", "Female", "Unknown", or "Other".
81
+ * @param {"Single" | "Married" | "Child" | "Widowed" | "Divorced"} [params.Position] - Either "Single", "Married", "Child", "Widowed", or "Divorced".
82
+ * @param {number} [params.Guarantor] - A single PatNum. The person responsible for the account.
83
+ * @param {number} [params.SuperFamily] - A single PatNum. The head of a SuperFamily.
84
+ * @param {number} [params.Offset] - Pagination offset.
85
+ * @returns {Promise<Patient[]>} - A list of summarized patient data.
86
+ * @throws {Error} - If the API returns an error.
87
+ */
88
+ async getPatientsSimple({ LName, FName, Birthdate, ClinicNum, PatStatus, DateTStamp, PriProv, Gender, Position, Guarantor, SuperFamily, Offset, } = {}) {
89
+ return await this.httpClient.get("/patients/Simple", {
90
+ LName,
91
+ FName,
92
+ Birthdate,
93
+ ClinicNum,
94
+ PatStatus,
95
+ DateTStamp,
96
+ PriProv,
97
+ Gender,
98
+ Position,
99
+ Guarantor,
100
+ SuperFamily,
101
+ Offset,
102
+ });
103
+ }
70
104
  /**
71
105
  * Create a new patient.
72
106
  * @param {Object} data - The data for the new patient.
@@ -0,0 +1,84 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import { Recall, RecallListParams, RecallList, CreateRecallParams, UpdateRecallParams, UpdateRecallStatusParams } from "../types/recallTypes";
3
+ export default class Recalls {
4
+ private httpClient;
5
+ constructor(httpClient: HttpClient);
6
+ /**
7
+ * Gets a list of recalls.
8
+ * @param {number} PatNum - Optional search by PatNum.
9
+ * @returns {Promise<Recall>} - An array of recall objects.
10
+ */
11
+ getRecalls(PatNum: number): Promise<Recall>;
12
+ /**
13
+ * Gets the Recall List similar to how it's shown in the Appointment Module when you click on Lists and select Recall List.
14
+ * @param {Object} params - The parameters for filtering and pagination.
15
+ * @param {string} [params.DateStart] - Due date range. String in "yyyy-mm-dd" format. Default is based on RecallDaysPast preference.
16
+ * @param {string} [params.DateEnd] - Due date range. String in "yyyy-mm-dd" format. Default is based on RecallDaysFuture preference.
17
+ * @param {number} [params.ProvNum] - Provider. Default is all providers. Will consider PriProv and SecProv.
18
+ * @param {number} [params.ClinicNum] - Clinic. Default is all clinics. Use 0 for "Unassigned".
19
+ * @param {string} [params.RecallType] - Typically either "Prophy" or "Perio". Default is all RecallTypes stored in the preference.
20
+ * @param {"true" | "false"} [params.IncludeReminded] - Show patients that have already received reminders. Either "true" or "false". Default is false.
21
+ * @returns {Promise<RecallList[]>} - An array of recall list objects.
22
+ */
23
+ getRecallList({ DateStart, DateEnd, ProvNum, ClinicNum, RecallType, IncludeReminded, Offset, }?: RecallListParams): Promise<RecallList[]>;
24
+ /**
25
+ * Create a new recall.
26
+ * @param {Object} data - Data for the new appointment.
27
+ * @param {number} data.PatNum - Required. FK to patient.PatNum.
28
+ * @param {number} data.RecallTypeNum - Required. FK to recalltype.RecallTypeNum. A patient may only have one recall for each RecallType.
29
+ * @param {string} [data.DateDue] - Optional. This is the date that is actually used when doing reports for recall. String in "yyyy-MM-dd" format.
30
+ * @param {string} [data.RecallInterval] - Optional.The interval between recalls. String that contains a digit followed by 'y' for years, 'm' for months, 'w' for weeks, or 'd' for
31
+ * @param {number} [data.RecallStatus=0] - Optional. FK to definition.DefNum where definition.Category=13. Default 0.
32
+ * @param {string} [data.Note] - Optional: An administrative note for staff use.
33
+ * @param {"true" | "false"} [params.IsDisabled="false"] - Optional. Either "true" or "false". Default "false".
34
+ * @param {number} [data.DisableUntilBalance] - Optional: Hygienist provider number. Default is 0.
35
+ * @param {string} [data.DisableUntilDate] - Optional. Recall will be disabled until this date. String in "yyyy-MM-dd" format.
36
+ * @param {"Normal" | "ASAP"} [data.Priority="Normal"] - Optional. Either "Normal" or "ASAP". Default "Normal".
37
+ * @param {string} [data.TimePatternOverride] - Optional. Used to override recalltype.DefaultInterval. Time pattern in 5 minute increments. A string consisting of 'X' and '/' characters only.
38
+ * @returns {Promise<Recall>} - The created recall object.
39
+ * @throws {Error} - If required fields are missing.
40
+ */
41
+ createRecall(data: CreateRecallParams): Promise<Recall>;
42
+ /**
43
+ * Edit a recall.
44
+ * @param {Object} data - Data for the new appointment.
45
+ * @param {number} data.RecallNum - Required. Primary key of recall to edit.
46
+ * @param {string} [data.DateDue] - Optional. This is the date that is actually used when doing reports for recall. String in "yyyy-MM-dd" format.
47
+ * @param {string} [data.RecallInterval] - Optional.The interval between recalls. String that contains a digit followed by 'y' for years, 'm' for months, 'w' for weeks, or 'd' for
48
+ * @param {number} [data.RecallStatus=0] - Optional. FK to definition.DefNum where definition.Category=13. Default 0.
49
+ * @param {string} [data.Note] - Optional: An administrative note for staff use.
50
+ * @param {"true" | "false"} [params.IsDisabled="false"] - Optional. Either "true" or "false". Default "false".
51
+ * @param {number} [data.DisableUntilBalance] - Optional: Hygienist provider number. Default is 0.
52
+ * @param {string} [data.DisableUntilDate] - Optional. Recall will be disabled until this date. String in "yyyy-MM-dd" format.
53
+ * @param {"Normal" | "ASAP"} [data.Priority="Normal"] - Optional. Either "Normal" or "ASAP". Default "Normal".
54
+ * @param {string} [data.TimePatternOverride] - Optional. Used to override recalltype.DefaultInterval. Time pattern in 5 minute increments. A string consisting of 'X' and '/' characters only.
55
+ * @returns {Promise<Recall>} - The created recall object.
56
+ * @throws {Error} - If required fields are missing.
57
+ */
58
+ updateRecall(data: UpdateRecallParams): Promise<Recall>;
59
+ /**
60
+ * Update recall status.
61
+ * @param {Object} data - Data for the new appointment.
62
+ * @param {number} data.PatNum - Required. FK to patient.PatNum.
63
+ * @param {string} data.recallType - Required. Typically either "Prophy" or "Perio". RecallType is dependent upon Setup Recall and Recall Types.
64
+ * @param {number} [data.RecallStatus=0] - Optional. FK to definition.DefNum where definition.Category=13. Default 0.
65
+ * @param {"None" | "Email" | "Mail" | "Phone" | "InPerson" | "Text" | "EmailAndText" | "PhoneAndText"} [data.commlogMode] - Optional: An administrative note for staff use.
66
+ * @param {string} [data.commlogNote] - Optional. This text will be used instead of the default commlog.Note.
67
+ * @returns {Promise<EditRecallStatusParams>} - The created recall object.
68
+ * @throws {Error} - If required fields are missing.
69
+ */
70
+ updateRecallStatus(data: UpdateRecallStatusParams): Promise<UpdateRecallStatusParams>;
71
+ /**
72
+ * Switches a Recall's type similiar to clicking the 'Set Perio' or 'Set Prophy' button found in the Recall window.
73
+ * @param {Object} data - Data for the new appointment.
74
+ * @param {number} data.PatNum - Patient to switch recall type.
75
+ * @returns {Promise<{ status: number }>} - The API response containing the status code.
76
+ * @throws {Error} - If required fields are missing.
77
+ */
78
+ switchRecallType(data: {
79
+ PatNum: number;
80
+ }): Promise<{
81
+ status: number;
82
+ }>;
83
+ }
84
+ //# sourceMappingURL=recalls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recalls.d.ts","sourceRoot":"","sources":["../../src/api/recalls.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACH,MAAM,EACN,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EAC3B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,OAAO,CAAC,UAAU,CAAa;gBAEjB,UAAU,EAAE,UAAU;IAIlC;;;;OAIG;IACU,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQxD;;;;;;;;;;OAUG;IACU,aAAa,CAAC,EACvB,SAAS,EACT,OAAO,EACP,OAAO,EACP,SAAS,EACT,UAAU,EACV,eAAe,EACf,MAAM,GACT,GAAE,gBAAqB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAchD;;;;;;;;;;;;;;;;OAgBG;IACU,YAAY,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;IAQpE;;;;;;;;;;;;;;;OAeG;IACU,YAAY,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;IAQpE;;;;;;;;;;MAUE;IACW,kBAAkB,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAQlG;;;;;;MAME;IACW,gBAAgB,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CASvF"}
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class Recalls {
4
+ httpClient;
5
+ constructor(httpClient) {
6
+ this.httpClient = httpClient;
7
+ }
8
+ /**
9
+ * Gets a list of recalls.
10
+ * @param {number} PatNum - Optional search by PatNum.
11
+ * @returns {Promise<Recall>} - An array of recall objects.
12
+ */
13
+ async getRecalls(PatNum) {
14
+ if (!PatNum) {
15
+ return this.httpClient.get(`/recalls`);
16
+ }
17
+ else {
18
+ return this.httpClient.get(`/recalls?PatNum=${PatNum}`);
19
+ }
20
+ }
21
+ /**
22
+ * Gets the Recall List similar to how it's shown in the Appointment Module when you click on Lists and select Recall List.
23
+ * @param {Object} params - The parameters for filtering and pagination.
24
+ * @param {string} [params.DateStart] - Due date range. String in "yyyy-mm-dd" format. Default is based on RecallDaysPast preference.
25
+ * @param {string} [params.DateEnd] - Due date range. String in "yyyy-mm-dd" format. Default is based on RecallDaysFuture preference.
26
+ * @param {number} [params.ProvNum] - Provider. Default is all providers. Will consider PriProv and SecProv.
27
+ * @param {number} [params.ClinicNum] - Clinic. Default is all clinics. Use 0 for "Unassigned".
28
+ * @param {string} [params.RecallType] - Typically either "Prophy" or "Perio". Default is all RecallTypes stored in the preference.
29
+ * @param {"true" | "false"} [params.IncludeReminded] - Show patients that have already received reminders. Either "true" or "false". Default is false.
30
+ * @returns {Promise<RecallList[]>} - An array of recall list objects.
31
+ */
32
+ async getRecallList({ DateStart, DateEnd, ProvNum, ClinicNum, RecallType, IncludeReminded, Offset, } = {}) {
33
+ const params = {
34
+ DateStart,
35
+ DateEnd,
36
+ ProvNum,
37
+ ClinicNum,
38
+ RecallType,
39
+ IncludeReminded,
40
+ Offset,
41
+ };
42
+ return this.httpClient.get("/recalls/List", params);
43
+ }
44
+ /**
45
+ * Create a new recall.
46
+ * @param {Object} data - Data for the new appointment.
47
+ * @param {number} data.PatNum - Required. FK to patient.PatNum.
48
+ * @param {number} data.RecallTypeNum - Required. FK to recalltype.RecallTypeNum. A patient may only have one recall for each RecallType.
49
+ * @param {string} [data.DateDue] - Optional. This is the date that is actually used when doing reports for recall. String in "yyyy-MM-dd" format.
50
+ * @param {string} [data.RecallInterval] - Optional.The interval between recalls. String that contains a digit followed by 'y' for years, 'm' for months, 'w' for weeks, or 'd' for
51
+ * @param {number} [data.RecallStatus=0] - Optional. FK to definition.DefNum where definition.Category=13. Default 0.
52
+ * @param {string} [data.Note] - Optional: An administrative note for staff use.
53
+ * @param {"true" | "false"} [params.IsDisabled="false"] - Optional. Either "true" or "false". Default "false".
54
+ * @param {number} [data.DisableUntilBalance] - Optional: Hygienist provider number. Default is 0.
55
+ * @param {string} [data.DisableUntilDate] - Optional. Recall will be disabled until this date. String in "yyyy-MM-dd" format.
56
+ * @param {"Normal" | "ASAP"} [data.Priority="Normal"] - Optional. Either "Normal" or "ASAP". Default "Normal".
57
+ * @param {string} [data.TimePatternOverride] - Optional. Used to override recalltype.DefaultInterval. Time pattern in 5 minute increments. A string consisting of 'X' and '/' characters only.
58
+ * @returns {Promise<Recall>} - The created recall object.
59
+ * @throws {Error} - If required fields are missing.
60
+ */
61
+ async createRecall(data) {
62
+ if (!data.PatNum || !data.RecallTypeNum) {
63
+ throw new Error("PatNum and RecallTypeNum are required.");
64
+ }
65
+ return this.httpClient.post("/recalls", data);
66
+ }
67
+ /**
68
+ * Edit a recall.
69
+ * @param {Object} data - Data for the new appointment.
70
+ * @param {number} data.RecallNum - Required. Primary key of recall to edit.
71
+ * @param {string} [data.DateDue] - Optional. This is the date that is actually used when doing reports for recall. String in "yyyy-MM-dd" format.
72
+ * @param {string} [data.RecallInterval] - Optional.The interval between recalls. String that contains a digit followed by 'y' for years, 'm' for months, 'w' for weeks, or 'd' for
73
+ * @param {number} [data.RecallStatus=0] - Optional. FK to definition.DefNum where definition.Category=13. Default 0.
74
+ * @param {string} [data.Note] - Optional: An administrative note for staff use.
75
+ * @param {"true" | "false"} [params.IsDisabled="false"] - Optional. Either "true" or "false". Default "false".
76
+ * @param {number} [data.DisableUntilBalance] - Optional: Hygienist provider number. Default is 0.
77
+ * @param {string} [data.DisableUntilDate] - Optional. Recall will be disabled until this date. String in "yyyy-MM-dd" format.
78
+ * @param {"Normal" | "ASAP"} [data.Priority="Normal"] - Optional. Either "Normal" or "ASAP". Default "Normal".
79
+ * @param {string} [data.TimePatternOverride] - Optional. Used to override recalltype.DefaultInterval. Time pattern in 5 minute increments. A string consisting of 'X' and '/' characters only.
80
+ * @returns {Promise<Recall>} - The created recall object.
81
+ * @throws {Error} - If required fields are missing.
82
+ */
83
+ async updateRecall(data) {
84
+ if (!data.RecallNum) {
85
+ throw new Error("RecallNum is required.");
86
+ }
87
+ return this.httpClient.put("/recalls", data);
88
+ }
89
+ /**
90
+ * Update recall status.
91
+ * @param {Object} data - Data for the new appointment.
92
+ * @param {number} data.PatNum - Required. FK to patient.PatNum.
93
+ * @param {string} data.recallType - Required. Typically either "Prophy" or "Perio". RecallType is dependent upon Setup Recall and Recall Types.
94
+ * @param {number} [data.RecallStatus=0] - Optional. FK to definition.DefNum where definition.Category=13. Default 0.
95
+ * @param {"None" | "Email" | "Mail" | "Phone" | "InPerson" | "Text" | "EmailAndText" | "PhoneAndText"} [data.commlogMode] - Optional: An administrative note for staff use.
96
+ * @param {string} [data.commlogNote] - Optional. This text will be used instead of the default commlog.Note.
97
+ * @returns {Promise<EditRecallStatusParams>} - The created recall object.
98
+ * @throws {Error} - If required fields are missing.
99
+ */
100
+ async updateRecallStatus(data) {
101
+ if (!data.PatNum || !data.recallType) {
102
+ throw new Error("PatNum and RecallNum are required.");
103
+ }
104
+ return this.httpClient.put("/recalls/Status", data);
105
+ }
106
+ /**
107
+ * Switches a Recall's type similiar to clicking the 'Set Perio' or 'Set Prophy' button found in the Recall window.
108
+ * @param {Object} data - Data for the new appointment.
109
+ * @param {number} data.PatNum - Patient to switch recall type.
110
+ * @returns {Promise<{ status: number }>} - The API response containing the status code.
111
+ * @throws {Error} - If required fields are missing.
112
+ */
113
+ async switchRecallType(data) {
114
+ if (!data.PatNum) {
115
+ throw new Error("PatNum is required.");
116
+ }
117
+ return this.httpClient.put("/recalls/SwitchType", data);
118
+ }
119
+ }
120
+ exports.default = Recalls;
@@ -0,0 +1,29 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import { Schedule, GetSchedulesParams } from "../types/scheduleTypes";
3
+ export default class Schedules {
4
+ private httpClient;
5
+ constructor(httpClient: HttpClient);
6
+ /**
7
+ * Fetch a single Schedule by its ID.
8
+ * @param {number} ScheduleNum - The ID of the patfield.
9
+ * @returns {Promise<Schedule>} - The patient data.
10
+ * @throws {Error} - If `PatNum` is not valid or the API returns an error.
11
+ */
12
+ getSchedule(ScheduleNum: number): Promise<Schedule>;
13
+ /**
14
+ * Fetch multiple patients with optional filtering and pagination.
15
+ * @param {Object} params - Filtering and pagination parameters.
16
+ * @param {string} [params.date] - Optional: For a single day. Today's date by default.
17
+ * @param {string} [params.dateStart] - Optional: For a single day. Today's date by default.
18
+ * @param {string} [params.dateEnd] - Optional: For a single day. Today's date by default.
19
+ * @param {'Practice' | 'Provider' | 'Blockout' | 'Employee' | 'WebSchedASAP'} [params.SchedType] - Optional: Either "Practice", "Provider", "Blockout", "Employee", or "WebSchedASAP".
20
+ * @param {number} [params.BlockoutDefNum] - Definition.DefNum where definition.Category=25.
21
+ * @param {number} [params.ProvNum] - FK to provider.ProvNum.
22
+ * @param {number} [params.EmployeeNum] - FK to employee.EmployeeNum.
23
+ * @param {number} [params.Offset] - Pagination offset.
24
+ * @returns {Promise<Schedule[]>} - A list of summarized patient data.
25
+ * @throws {Error} - If the API returns an error.
26
+ */
27
+ getSchedules({ date, dateStart, dateEnd, SchedType, BlockoutDefNum, ProvNum, EmployeeNum, Offset, }?: GetSchedulesParams): Promise<Schedule[]>;
28
+ }
29
+ //# sourceMappingURL=schedules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedules.d.ts","sourceRoot":"","sources":["../../src/api/schedules.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACH,QAAQ,EACR,kBAAkB,EACrB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;OAKG;IACU,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAQhE;;;;;;;;;;;;;OAaG;IACY,YAAY,CAAC,EACxB,IAAI,EACJ,SAAS,EACT,OAAO,EACP,SAAS,EACT,cAAc,EACd,OAAO,EACP,WAAW,EACX,MAAM,GAEP,GAAE,kBAAuB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;CAanD"}