@rinse-dental/open-dental 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy_notes.txt +0 -0
- package/dist/api/appointments.d.ts +1 -1
- package/dist/api/appointments.d.ts.map +1 -1
- package/dist/api/chartModules.d.ts +14 -0
- package/dist/api/chartModules.d.ts.map +1 -0
- package/dist/api/chartModules.js +21 -0
- package/dist/api/commlogs.d.ts +1 -1
- package/dist/api/commlogs.d.ts.map +1 -1
- package/dist/api/index.d.ts +7 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +15 -4
- package/dist/api/patFields.d.ts +53 -0
- package/dist/api/patFields.d.ts.map +1 -0
- package/dist/api/patFields.js +87 -0
- package/dist/api/patients.d.ts +20 -1
- package/dist/api/patients.d.ts.map +1 -1
- package/dist/api/patients.js +34 -0
- package/dist/api/recalls.d.ts +84 -0
- package/dist/api/recalls.d.ts.map +1 -0
- package/dist/api/recalls.js +120 -0
- package/dist/api/treatplans.d.ts +53 -0
- package/dist/api/treatplans.d.ts.map +1 -0
- package/dist/api/treatplans.js +77 -0
- package/dist/openDental.d.ts +33 -3
- package/dist/openDental.d.ts.map +1 -1
- package/dist/openDental.js +64 -4
- package/dist/types/{appointmentType.d.ts → appointmentTypes.d.ts} +1 -1
- package/dist/types/appointmentTypes.d.ts.map +1 -0
- package/dist/types/chartModuleTypes.d.ts +21 -0
- package/dist/types/chartModuleTypes.d.ts.map +1 -0
- package/dist/types/{commlogType.d.ts → commlogTypes.d.ts} +1 -1
- package/dist/types/commlogTypes.d.ts.map +1 -0
- package/dist/types/commlogTypes.js +2 -0
- package/dist/types/patFieldTypes.d.ts +23 -0
- package/dist/types/patFieldTypes.d.ts.map +1 -0
- package/dist/types/patFieldTypes.js +2 -0
- package/dist/types/recallTypes.d.ts +98 -0
- package/dist/types/recallTypes.d.ts.map +1 -0
- package/dist/types/recallTypes.js +2 -0
- package/dist/types/treatPlanTypes.d.ts +72 -0
- package/dist/types/treatPlanTypes.d.ts.map +1 -0
- package/dist/types/treatPlanTypes.js +2 -0
- package/package.json +1 -1
- package/src/api/appointments.ts +1 -2
- package/src/api/chartModules.ts +25 -0
- package/src/api/commlogs.ts +1 -1
- package/src/api/index.ts +7 -2
- package/src/api/patFields.ts +112 -0
- package/src/api/patients.ts +50 -1
- package/src/api/recalls.ts +148 -0
- package/src/api/treatplans.ts +97 -0
- package/src/openDental.ts +73 -4
- package/src/types/chartModuleTypes.ts +29 -0
- package/src/types/patFieldTypes.ts +24 -0
- package/src/types/recallTypes.ts +102 -0
- package/src/types/treatPlanTypes.ts +75 -0
- package/dist/types/appointmentType.d.ts.map +0 -1
- package/dist/types/commlogType.d.ts.map +0 -1
- /package/dist/types/{appointmentType.js → appointmentTypes.js} +0 -0
- /package/dist/types/{commlogType.js → chartModuleTypes.js} +0 -0
- /package/src/types/{appointmentType.ts → appointmentTypes.ts} +0 -0
- /package/src/types/{commlogType.ts → commlogTypes.ts} +0 -0
package/deploy_notes.txt
ADDED
|
File without changes
|
|
@@ -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/
|
|
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,
|
|
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,2BAA2B,CAAC;AAEnC,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;OAKG;IACU,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAOnE;;;;;;;;;;;;;OAaG;IACU,eAAe,CAAC,EACzB,MAAM,EACN,SAAS,EACT,EAAE,EACF,IAAI,EACJ,SAAS,EACT,OAAO,EACP,SAAS,EACT,UAAU,EACV,MAAM,GACP,GAAE,oBAAyB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAgBrD;;;;;;;OAOG;IACU,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAO/E;;;;;;;;;;OAUG;IACU,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAI1E;;;;;;;;;;;OAWG;IACU,gBAAgB,CAAC,MAAM,EAAE,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;
|
package/dist/api/commlogs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import HttpClient from "../utils/httpClient";
|
|
2
|
-
import { CommLog, CreateCommLogParams } from "../types/
|
|
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,
|
|
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"}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
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";
|
|
3
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -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"}
|
package/dist/api/index.js
CHANGED
|
@@ -3,10 +3,21 @@ 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.
|
|
7
|
-
var patients_1 = require("./patients");
|
|
8
|
-
Object.defineProperty(exports, "Patients", { enumerable: true, get: function () { return __importDefault(patients_1).default; } });
|
|
6
|
+
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
|
-
|
|
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; } });
|
|
12
23
|
// 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;
|
package/dist/api/patients.d.ts
CHANGED
|
@@ -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":"
|
|
1
|
+
{"version":3,"file":"patients.d.ts","sourceRoot":"","sources":["../../src/api/patients.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,QAAQ;IAC3B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;OAKG;IACU,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQzD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACY,WAAW,CAAC,EACvB,KAAK,EACL,KAAK,EACL,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"}
|
package/dist/api/patients.js
CHANGED
|
@@ -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,53 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import { TreatmentPlan, GetTreatmentPlanParams, CreateTreatmentPlanParams, UpdateTreatmentPlanParams, SaveTreatmentPlanParams } from "../types/treatPlanTypes";
|
|
3
|
+
export default class TreatmentPlans {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(httpClient: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Get a list of TreatPlans that meet a set of search criteria.
|
|
8
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
9
|
+
* @param {string} [params.PatNum] - patient.PatNum.
|
|
10
|
+
* @param {string} [params.SecDateTEdit] - Only include TreatPlans with a SecDateTEdit altered after the specified date and time. String in "yyyy-MM-dd HH:mm:ss" format.
|
|
11
|
+
* @param {"Saved" | "Active" | "Inactive"} [params.TPStatus] - Either "Saved", "Active", or "Inactive". Default all.
|
|
12
|
+
* @returns {Promise<TreatmentPlan[]>} - An array of recall list objects.
|
|
13
|
+
*/
|
|
14
|
+
getTreatmentPlans({ PatNum, SecDateTEdit, TPStatus, }?: GetTreatmentPlanParams): Promise<TreatmentPlan[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a new TreatPlan.
|
|
17
|
+
* @param {Object} data - Data for the new appointment.
|
|
18
|
+
* @param {number} data.PatNum - Required. FK to patient.PatNum.
|
|
19
|
+
* @param {string} [data.Heading] - Optional. Defaults to the heading of the supplied Treatment Plan.
|
|
20
|
+
* @param {string} [data.Note] - Optional: An administrative note for staff use.
|
|
21
|
+
* @param {"Insurance" | "Discount"} [params.TPType] - Optional. Either "Insurance" or "Discount". If the patient is subscribed to a Discount Plan, this will default to "Discount". Otherwise, defaults to "Insurance".
|
|
22
|
+
* @returns {Promise<TreatmentPlan>} - The created recall object.
|
|
23
|
+
* @throws {Error} - If required fields are missing.
|
|
24
|
+
*/
|
|
25
|
+
createTreatmentPlan(data: CreateTreatmentPlanParams): Promise<TreatmentPlan>;
|
|
26
|
+
/**
|
|
27
|
+
* Creates an unsigned Saved TreatPlan from an existing Active or Inactive TreatPlan.
|
|
28
|
+
* @param {Object} data - Data for the new appointment.
|
|
29
|
+
* @param {number} data.TreatPlanNum - Required.
|
|
30
|
+
* @param {string} [data.Heading] - Optional. Defaults to the heading of the supplied Treatment Plan.
|
|
31
|
+
* @param {string} [data.UserNumPresenter=0] - Optional. FK to userod.UserNum. Default 0.
|
|
32
|
+
* @returns {Promise<TreatmentPlan>} - The created recall object.
|
|
33
|
+
* @throws {Error} - If required fields are missing.
|
|
34
|
+
*/
|
|
35
|
+
saveTreatmentPlan(data: SaveTreatmentPlanParams): Promise<TreatmentPlan>;
|
|
36
|
+
/**
|
|
37
|
+
* Create a new TreatPlan.
|
|
38
|
+
* @param {Object} data - Data for the new appointment.
|
|
39
|
+
* @param {number} data.TreatPlanNum - Required.
|
|
40
|
+
* @param {string} [data.Heading] - The heading that shows at the top of the treatment plan.
|
|
41
|
+
* @param {string} [data.Note] - Optional: An administrative note for staff use.
|
|
42
|
+
* @param {number} [data.ResponsParty] - FK to patient.PatNum. The patient responsible for approving the treatment.
|
|
43
|
+
* @param {"Insurance" | "Discount"} [params.TPType] - Optional. Either "Insurance" or "Discount". If the patient is subscribed to a Discount Plan, this will default to "Discount". Otherwise, defaults to "Insurance".
|
|
44
|
+
* @param {string} [data.SignatureText] - The typed name of the person who signed the patient signature.
|
|
45
|
+
* @param {string} [data.SignaturePracticeText] - The typed name of the person who signed the patient signature.
|
|
46
|
+
* @param {"true" | "false"} [data.isSigned] - The typed name of the person who signed the patient signature.
|
|
47
|
+
* @param {"true" | "false"} [data.isSignedPractice] - Either "true" or "false". True updates the treatplan SignaturePractice, digitally signs for the practice, and overwrites existing signature. False clears the exisiting treatplan SignaturePractice.
|
|
48
|
+
* @returns {Promise<TreatmentPlan>} - The created recall object.
|
|
49
|
+
* @throws {Error} - If required fields are missing.
|
|
50
|
+
*/
|
|
51
|
+
updateTreatmentPlan(data: UpdateTreatmentPlanParams): Promise<TreatmentPlan>;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=treatplans.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treatplans.d.ts","sourceRoot":"","sources":["../../src/api/treatplans.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACH,aAAa,EACb,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EAC1B,MAAM,yBAAyB,CAAC;AAGjC,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,OAAO,CAAC,UAAU,CAAa;gBAEjB,UAAU,EAAE,UAAU;IAIlC;;;;;;;OAOG;IACU,iBAAiB,CAAC,EAC3B,MAAM,EACN,YAAY,EACZ,QAAQ,GACX,GAAE,sBAA2B,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAUxD;;;;;;;;;MASE;IACU,mBAAmB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;IAQzF;;;;;;;;OAQG;IACU,iBAAiB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,aAAa,CAAC;IAQrF;;;;;;;;;;;;;;OAcG;IACU,mBAAmB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;CAO5F"}
|