@rinse-dental/open-dental 0.1.0 → 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 +2 -1
- package/dist/api/appointments.d.ts.map +1 -0
- 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 +28 -0
- package/dist/api/commlogs.d.ts.map +1 -0
- package/dist/api/commlogs.js +48 -0
- package/dist/api/index.d.ts +8 -1
- package/dist/api/index.d.ts.map +1 -0
- 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 +21 -1
- package/dist/api/patients.d.ts.map +1 -0
- package/dist/api/patients.js +34 -0
- package/dist/api/procedureLog.d.ts +1 -0
- package/dist/api/procedureLog.d.ts.map +1 -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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/openDental.d.ts +34 -3
- package/dist/openDental.d.ts.map +1 -0
- package/dist/openDental.js +64 -4
- package/dist/types/{appointmentType.d.ts → appointmentTypes.d.ts} +1 -0
- 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/commlogTypes.d.ts +28 -0
- 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/patientTypes.d.ts +1 -0
- package/dist/types/patientTypes.d.ts.map +1 -0
- package/dist/types/procedurelogTypes.d.ts +1 -0
- package/dist/types/procedurelogTypes.d.ts.map +1 -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/dist/utils/errorHandler.d.ts +1 -0
- package/dist/utils/errorHandler.d.ts.map +1 -0
- package/dist/utils/httpClient.d.ts +1 -0
- package/dist/utils/httpClient.d.ts.map +1 -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 +63 -0
- 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/commlogTypes.ts +28 -0
- package/src/types/patFieldTypes.ts +24 -0
- package/src/types/recallTypes.ts +102 -0
- package/src/types/treatPlanTypes.ts +75 -0
- package/tsconfig.json +3 -1
- /package/dist/types/{appointmentType.js → appointmentTypes.js} +0 -0
- /package/dist/{utils/types.js → types/chartModuleTypes.js} +0 -0
- /package/src/types/{appointmentType.ts → appointmentTypes.ts} +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GET Recalls object.
|
|
3
|
+
* @see https://www.opendental.com/site/apirecalls.html
|
|
4
|
+
*/
|
|
5
|
+
export interface Recall {
|
|
6
|
+
RecallNum?: number;
|
|
7
|
+
PatNum?: number;
|
|
8
|
+
DateDue?: string;
|
|
9
|
+
DatePrevious?: string;
|
|
10
|
+
RecallInterval?: string;
|
|
11
|
+
RecallStatus?: number;
|
|
12
|
+
recallStatus?: string;
|
|
13
|
+
Note?: string;
|
|
14
|
+
IsDisabled?: "true" | "false";
|
|
15
|
+
DateTStamp?: string;
|
|
16
|
+
RecallTypeNum?: number;
|
|
17
|
+
DisableUntilBalance?: number;
|
|
18
|
+
DisableUntilDate?: string;
|
|
19
|
+
DateScheduled?: string;
|
|
20
|
+
Priority?: "Normal" | "ASAP";
|
|
21
|
+
TimePatternOverride?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* GET Recall List params.
|
|
25
|
+
* @see https://www.opendental.com/site/apirecalls.html
|
|
26
|
+
*/
|
|
27
|
+
export interface RecallListParams {
|
|
28
|
+
DateStart?: string;
|
|
29
|
+
DateEnd?: number;
|
|
30
|
+
ProvNum?: string;
|
|
31
|
+
ClinicNum?: string;
|
|
32
|
+
RecallType?: string;
|
|
33
|
+
IncludeReminded?: string;
|
|
34
|
+
Offset?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* GET Recall List object.
|
|
38
|
+
* @see https://www.opendental.com/site/apirecalls.html
|
|
39
|
+
*/
|
|
40
|
+
export interface RecallList {
|
|
41
|
+
DueDate?: string;
|
|
42
|
+
PatNum?: number;
|
|
43
|
+
Patient?: string;
|
|
44
|
+
Age?: string;
|
|
45
|
+
Type?: string;
|
|
46
|
+
Interval?: string;
|
|
47
|
+
NumRemind?: string;
|
|
48
|
+
LastReminder?: string;
|
|
49
|
+
Contact?: string;
|
|
50
|
+
Status?: string;
|
|
51
|
+
ClinicNum?: number;
|
|
52
|
+
Note?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* CREATE Recall params. Creates a recall object.
|
|
56
|
+
* @see https://www.opendental.com/site/apirecalls.html
|
|
57
|
+
*/
|
|
58
|
+
export interface CreateRecallParams {
|
|
59
|
+
PatNum: number;
|
|
60
|
+
RecallTypeNum: number;
|
|
61
|
+
DateDue?: string;
|
|
62
|
+
RecallInterval?: string;
|
|
63
|
+
RecallStatus?: number;
|
|
64
|
+
Note?: string;
|
|
65
|
+
IsDisabled?: "true" | "false";
|
|
66
|
+
DisableUntilBalance?: number;
|
|
67
|
+
DisableUntilDate?: string;
|
|
68
|
+
Priority?: "Normal" | "ASAP";
|
|
69
|
+
TimePatternOverride?: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* EDIT Recall params. Updates a recall object.
|
|
73
|
+
* @see https://www.opendental.com/site/apirecalls.html
|
|
74
|
+
*/
|
|
75
|
+
export interface UpdateRecallParams {
|
|
76
|
+
RecallNum: number;
|
|
77
|
+
DateDue?: string;
|
|
78
|
+
RecallInterval?: string;
|
|
79
|
+
RecallStatus?: number;
|
|
80
|
+
Note?: string;
|
|
81
|
+
IsDisabled?: "true" | "false";
|
|
82
|
+
DisableUntilBalance?: number;
|
|
83
|
+
DisableUntilDate?: string;
|
|
84
|
+
Priority?: "Normal" | "ASAP";
|
|
85
|
+
TimePatternOverride?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* EDIT Recall Status params and object.
|
|
89
|
+
* @see https://www.opendental.com/site/apirecalls.html
|
|
90
|
+
*/
|
|
91
|
+
export interface UpdateRecallStatusParams {
|
|
92
|
+
PatNum: number;
|
|
93
|
+
recallType: string;
|
|
94
|
+
RecallStatus?: number;
|
|
95
|
+
commlogMode?: "None" | "Email" | "Mail" | "Phone" | "InPerson" | "Text" | "EmailAndText" | "PhoneAndText";
|
|
96
|
+
commlogNote?: string;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=recallTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recallTypes.d.ts","sourceRoot":"","sources":["../../src/types/recallTypes.ts"],"names":[],"mappings":"AAAA;;;KAGK;AACH,MAAM,WAAW,MAAM;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,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E,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GET TreatPlans object.
|
|
3
|
+
* @see https://www.opendental.com/site/apitreatplans.html
|
|
4
|
+
*/
|
|
5
|
+
export interface TreatmentPlan {
|
|
6
|
+
TreatPlanNum?: number;
|
|
7
|
+
PatNum?: number;
|
|
8
|
+
DateTP?: string;
|
|
9
|
+
Heading?: string;
|
|
10
|
+
Note?: string;
|
|
11
|
+
SigIsTopaz?: "true" | "false";
|
|
12
|
+
ResponsParty?: number;
|
|
13
|
+
DocNum?: number;
|
|
14
|
+
TPStatus?: string;
|
|
15
|
+
SecUserNumEntry?: number;
|
|
16
|
+
SecDateEntry?: string;
|
|
17
|
+
SecDateTEdit?: string;
|
|
18
|
+
UserNumPresenter?: number;
|
|
19
|
+
TPType?: "Insurance" | "Discount";
|
|
20
|
+
DateTSigned?: string;
|
|
21
|
+
DateTPracticeSigned?: string;
|
|
22
|
+
SignatureText?: string;
|
|
23
|
+
SignaturePracticeText?: string;
|
|
24
|
+
isSigned?: "true" | "false";
|
|
25
|
+
isSignedPractice?: "true" | "false";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get TreatPlans Params. Returns TreatPlan object
|
|
29
|
+
* @see https://www.opendental.com/site/apitreatplans.html
|
|
30
|
+
*/
|
|
31
|
+
export interface GetTreatmentPlanParams {
|
|
32
|
+
PatNum?: number;
|
|
33
|
+
SecDateTEdit?: string;
|
|
34
|
+
TPStatus?: "Saved" | "Active" | "Inactive";
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* POST TreatPlans Params. Returns TreatPlan object
|
|
38
|
+
* @see https://www.opendental.com/site/apitreatplans.html
|
|
39
|
+
*/
|
|
40
|
+
export interface CreateTreatmentPlanParams {
|
|
41
|
+
PatNum: number;
|
|
42
|
+
Heading?: string;
|
|
43
|
+
Note?: string;
|
|
44
|
+
TPType?: "Insurance" | "Discount";
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* POST Save TreatPlans Params. Returns TreatPlan object.
|
|
48
|
+
* Creates an unsigned Saved TreatPlan from an existing Active or Inactive TreatPlan.
|
|
49
|
+
* @see https://www.opendental.com/site/apitreatplans.html
|
|
50
|
+
*/
|
|
51
|
+
export interface SaveTreatmentPlanParams {
|
|
52
|
+
TreatPlanNum: number;
|
|
53
|
+
Heading?: string;
|
|
54
|
+
UserNumPresenter?: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* PUT TreatPlans object.
|
|
58
|
+
* @see https://www.opendental.com/site/apitreatplans.html
|
|
59
|
+
*/
|
|
60
|
+
export interface UpdateTreatmentPlanParams {
|
|
61
|
+
TreatPlanNum: number;
|
|
62
|
+
DateTP?: string;
|
|
63
|
+
Heading?: string;
|
|
64
|
+
Note?: string;
|
|
65
|
+
ResponsParty?: number;
|
|
66
|
+
TPType?: "Insurance" | "Discount";
|
|
67
|
+
SignatureText?: string;
|
|
68
|
+
SignaturePracticeText?: string;
|
|
69
|
+
isSigned?: "true" | "false";
|
|
70
|
+
isSignedPractice?: "true" | "false";
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=treatPlanTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treatPlanTypes.d.ts","sourceRoot":"","sources":["../../src/types/treatPlanTypes.ts"],"names":[],"mappings":"AAAA;;;EAGE;AACF,MAAM,WAAW,aAAa;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,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,WAAW,GAAG,UAAU,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=errorHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../src/utils/errorHandler.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpClient.d.ts","sourceRoot":"","sources":["../../src/utils/httpClient.ts"],"names":[],"mappings":"AAEA,cAAM,UAAU;IACd,OAAO,CAAC,MAAM,CAAgB;gBAElB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAU9C;;;;;OAKG;IACU,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAI7D;;;;;OAKG;IACU,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAI3D;;;;;OAKG;IACU,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAI1D;;;;OAIG;IACU,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAI/C;;;;;OAKG;YACW,aAAa;IAS3B;;;;OAIG;IACH,OAAO,CAAC,WAAW;CA4BpB;AAED,eAAe,UAAU,CAAC"}
|
package/package.json
CHANGED
package/src/api/appointments.ts
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
UpdateAppointmentParams,
|
|
15
15
|
BreakAppointmentParams,
|
|
16
16
|
ConfirmAppointmentParams,
|
|
17
|
-
} from "../types/
|
|
17
|
+
} from "../types/appointmentTypes";
|
|
18
18
|
|
|
19
19
|
export default class Appointments {
|
|
20
20
|
private httpClient: HttpClient;
|
|
@@ -333,5 +333,4 @@ public async getAppointments({
|
|
|
333
333
|
|
|
334
334
|
return this.httpClient.put<void>(`/appointments/${data.AptNum}/confirm`, data);
|
|
335
335
|
}
|
|
336
|
-
|
|
337
336
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import {
|
|
3
|
+
PlannedAppointment,
|
|
4
|
+
} from "../types/chartModuleTypes"
|
|
5
|
+
|
|
6
|
+
export default class ChartModules {
|
|
7
|
+
private httpClient: HttpClient;
|
|
8
|
+
|
|
9
|
+
constructor(httpClient: HttpClient) {
|
|
10
|
+
this.httpClient = httpClient;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Gets Planned Appointments for a patient, similarly to how it shows in the Chart Module's Planned Appointments tab.
|
|
15
|
+
* @param {number} PatNum - The unique identifier for the patient.
|
|
16
|
+
* @returns {Promise<PlannedAppointment>} - The planned appts object.
|
|
17
|
+
* @throws {Error} - If `PatNum` is not provided.
|
|
18
|
+
*/
|
|
19
|
+
public async getPlannedAppts(PatNum: number): Promise<PlannedAppointment> {
|
|
20
|
+
if (!PatNum) {
|
|
21
|
+
throw new Error("PatNum is required.");
|
|
22
|
+
}
|
|
23
|
+
return this.httpClient.get<PlannedAppointment>(`/chartmodules/${PatNum}/PlannedAppts`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import { CommLog, CreateCommLogParams } from "../types/commlogTypes";
|
|
3
|
+
|
|
4
|
+
export default class CommLogs {
|
|
5
|
+
private httpClient: HttpClient;
|
|
6
|
+
|
|
7
|
+
constructor(httpClient: HttpClient) {
|
|
8
|
+
this.httpClient = httpClient;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Fetch communication logs for a specific patient.
|
|
13
|
+
* @param {number} PatNum - Required: The unique identifier for the patient.
|
|
14
|
+
* @returns {Promise<CommLog[]>} - A list of communication logs for the patient.
|
|
15
|
+
* @throws {Error} - If `PatNum` is not provided or the API returns an error.
|
|
16
|
+
*/
|
|
17
|
+
public async getCommLogs(PatNum: number): Promise<CommLog[]> {
|
|
18
|
+
if (!PatNum || typeof PatNum !== "number") {
|
|
19
|
+
throw new Error("Invalid parameter: PatNum must be a valid number.");
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return this.httpClient.get<CommLog[]>("/commlogs", { PatNum });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Create a new communication log.
|
|
27
|
+
* @param {CreateCommLogParams} params - The details of the communication log to create.
|
|
28
|
+
* @param {number} params.PatNum - Required: The unique identifier for the patient.
|
|
29
|
+
* @param {string} params.CommDateTime - Required: Date and time of the communication in "yyyy-MM-dd HH:mm:ss" format.
|
|
30
|
+
* @param {"None" | "Email" | "Mail" | "Phone" | "In Person" | "Text" | "Email and Text" | "Phone and Text"} params.Mode_ - Required: Mode of communication.
|
|
31
|
+
* @param {string} params.Note - Required: Detailed note about the communication.
|
|
32
|
+
* @param {number} [params.CommType] - Optional: Type of communication: definition.DefNum where definition.Category=25.
|
|
33
|
+
* @param {string} [params.commType] - Optional: Human-readable description of the communication type.
|
|
34
|
+
* @param {"Sent" | "Received" | "Neither"} [params.SentOrReceived] - Optional: Direction of communication.
|
|
35
|
+
* @returns {Promise<CommLog>} - The created communication log.
|
|
36
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
37
|
+
*/
|
|
38
|
+
public async createCommLog({
|
|
39
|
+
PatNum,
|
|
40
|
+
CommDateTime,
|
|
41
|
+
Mode_,
|
|
42
|
+
Note,
|
|
43
|
+
CommType,
|
|
44
|
+
commType,
|
|
45
|
+
SentOrReceived,
|
|
46
|
+
}: CreateCommLogParams): Promise<CommLog> {
|
|
47
|
+
if (!PatNum || !CommDateTime || !Mode_ || !Note) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
"Invalid data: PatNum, CommDateTime, Mode_, and Note are required."
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return this.httpClient.post<CommLog>("/commlogs", {
|
|
54
|
+
PatNum,
|
|
55
|
+
CommDateTime,
|
|
56
|
+
Mode_,
|
|
57
|
+
Note,
|
|
58
|
+
CommType,
|
|
59
|
+
commType,
|
|
60
|
+
SentOrReceived,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
package/src/api/index.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
export { default as Patients } from "./patients";
|
|
2
1
|
export { default as Appointments } from "./appointments";
|
|
3
|
-
|
|
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";
|
|
4
9
|
// Add other APIs as needed
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import {
|
|
3
|
+
PatField,
|
|
4
|
+
GetPatFieldsParams,
|
|
5
|
+
AddUpdatePatFieldParams,
|
|
6
|
+
} from "../types/patFieldTypes";
|
|
7
|
+
|
|
8
|
+
export default class PatFields {
|
|
9
|
+
private httpClient: HttpClient;
|
|
10
|
+
|
|
11
|
+
constructor(httpClient: HttpClient) {
|
|
12
|
+
this.httpClient = httpClient;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Fetch a single patfield by its ID.
|
|
17
|
+
* @param {number} PatFieldNum - The ID of the patfield.
|
|
18
|
+
* @returns {Promise<PatField>} - The patient data.
|
|
19
|
+
* @throws {Error} - If `PatNum` is not valid or the API returns an error.
|
|
20
|
+
*/
|
|
21
|
+
public async getPatField(PatFieldNum: number): Promise<PatField> {
|
|
22
|
+
if (!PatFieldNum || typeof PatFieldNum !== "number") {
|
|
23
|
+
throw new Error("Invalid parameter: PatNum must be a valid number.");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return await this.httpClient.get<PatField>(`/patfields/${PatFieldNum}`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Fetch multiple patients with optional filtering and pagination.
|
|
31
|
+
* @param {Object} params - Filtering and pagination parameters.
|
|
32
|
+
* @param {string} [params.PatNum] - Filter by last name (case-insensitive, partial match).
|
|
33
|
+
* @param {string} [params.FieldName] - Filter by last name (case-insensitive, partial match).
|
|
34
|
+
* @param {string} [params.SecDateTEdit] - Filter by last name (case-insensitive, partial match).
|
|
35
|
+
* @returns {Promise<PatField[]>} - A list of summarized patient data.
|
|
36
|
+
* @throws {Error} - If the API returns an error.
|
|
37
|
+
*/
|
|
38
|
+
public async getPatFields({
|
|
39
|
+
PatNum,
|
|
40
|
+
FieldName,
|
|
41
|
+
SecDateTEdit,
|
|
42
|
+
}: GetPatFieldsParams = {}): Promise<PatField[]> {
|
|
43
|
+
|
|
44
|
+
return await this.httpClient.get<PatField[]>("/patfields", {
|
|
45
|
+
PatNum,
|
|
46
|
+
FieldName,
|
|
47
|
+
SecDateTEdit,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Creates a patfield. Cannot create PatFields associated with hidden PatFieldDefs.
|
|
53
|
+
* @param {Object} data - The data for the new patfield.
|
|
54
|
+
* @param {number} data.PatNum - Required: The patient's PatNum.
|
|
55
|
+
* @param {string} data.FieldName - Required: FK to PatFieldDef.FieldName. Case sensitive.
|
|
56
|
+
* @param {string} data.FieldValue - Required: See the top of this page for more information. Relies on PatFieldDef.FieldType.
|
|
57
|
+
* @returns {Promise<PatField>} - The created PatField.
|
|
58
|
+
* @throws {Error} - If the data is invalid or the API returns an error.
|
|
59
|
+
*/
|
|
60
|
+
public async createPatField({
|
|
61
|
+
PatNum,
|
|
62
|
+
FieldName,
|
|
63
|
+
FieldValue,
|
|
64
|
+
}: AddUpdatePatFieldParams): Promise<PatField> {
|
|
65
|
+
if (!PatNum || !FieldName || !FieldValue) {
|
|
66
|
+
throw new Error("Invalid data: All fields are required.");
|
|
67
|
+
}
|
|
68
|
+
return await this.httpClient.post<PatField>("/patfields", {
|
|
69
|
+
PatNum,
|
|
70
|
+
FieldName,
|
|
71
|
+
FieldValue,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Updates an existing patfield.
|
|
77
|
+
* @param {Object} data - The data for the updated patfield.
|
|
78
|
+
* @param {number} data.PatNum - Required: The patient's PatNum.
|
|
79
|
+
* @param {string} data.FieldName - Required: FK to PatFieldDef.FieldName. Case sensitive.
|
|
80
|
+
* @param {string} data.FieldValue - Required: See the top of this page for more information. Relies on PatFieldDef.FieldType.
|
|
81
|
+
* @returns {Promise<PatField>} - The updated PatField.
|
|
82
|
+
* @throws {Error} - If the data is invalid or the API returns an error.
|
|
83
|
+
*/
|
|
84
|
+
public async editPatField({
|
|
85
|
+
PatNum,
|
|
86
|
+
FieldName,
|
|
87
|
+
FieldValue,
|
|
88
|
+
}: AddUpdatePatFieldParams): Promise<PatField> {
|
|
89
|
+
if (!PatNum || !FieldName || !FieldValue) {
|
|
90
|
+
throw new Error("Invalid data: All fields are required.");
|
|
91
|
+
}
|
|
92
|
+
return await this.httpClient.put<PatField>("/patfields", {
|
|
93
|
+
PatNum,
|
|
94
|
+
FieldName,
|
|
95
|
+
FieldValue,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Delete a single patfield by its ID.
|
|
101
|
+
* @param {number} PatFieldNum - The ID of the patField.
|
|
102
|
+
* @returns {Promise<{ status: number }>} - The API response containing the status code.
|
|
103
|
+
* @throws {Error} - If `PatFieldNum` is not valid or the API returns an error.
|
|
104
|
+
*/
|
|
105
|
+
public async deletePatField(PatFieldNum: number): Promise<{ status: number }> {
|
|
106
|
+
if (!PatFieldNum || typeof PatFieldNum !== "number") {
|
|
107
|
+
throw new Error("Invalid parameter: PatNum must be a valid number.");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return await this.httpClient.delete<{ status: number }>(`/patfields/${PatFieldNum}`);
|
|
111
|
+
}
|
|
112
|
+
}
|
package/src/api/patients.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import axios from "axios";
|
|
2
1
|
import HttpClient from "../utils/httpClient";
|
|
3
2
|
import {
|
|
4
3
|
Patient,
|
|
5
4
|
PatientSummary,
|
|
6
5
|
GetPatientsParams,
|
|
6
|
+
GetPatientsSimpleParams,
|
|
7
7
|
CreatePatientParams,
|
|
8
8
|
UpdatePatientParams,
|
|
9
9
|
} from "../types/patientTypes";
|
|
@@ -103,6 +103,55 @@ export default class Patients {
|
|
|
103
103
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
/**
|
|
107
|
+
* Fetch multiple patients with optional filtering and pagination.
|
|
108
|
+
* @param {Object} params - Filtering and pagination parameters.
|
|
109
|
+
* @param {string} [params.LName] - Filter by last name (case-insensitive, partial match).
|
|
110
|
+
* @param {string} [params.FName] - Filter by first name (case-insensitive, partial match).
|
|
111
|
+
* @param {string} [params.Birthdate] - Filter by birthdate in "yyyy-MM-dd" format.
|
|
112
|
+
* @param {number} [params.ClinicNum] - Filter by clinic number (comma-separated list).
|
|
113
|
+
* @param {"Patient" | "NonPatient" | "Inactive" | "Archived" | "Deceased" | "Prospective".} [params.PatStatus] - Filter by Patient Status.
|
|
114
|
+
* @param {string} [params.DateTStamp] - In "yyyy-mm-dd HH:mm:ss" format.
|
|
115
|
+
* @param {number} [params.PriProv] - A single ProvNum. Leave blank if you want results for all primary providers.
|
|
116
|
+
* @param {"Male" | "Female" | "Unknown" | "Other"} [params.Gender] - Either "Male", "Female", "Unknown", or "Other".
|
|
117
|
+
* @param {"Single" | "Married" | "Child" | "Widowed" | "Divorced"} [params.Position] - Either "Single", "Married", "Child", "Widowed", or "Divorced".
|
|
118
|
+
* @param {number} [params.Guarantor] - A single PatNum. The person responsible for the account.
|
|
119
|
+
* @param {number} [params.SuperFamily] - A single PatNum. The head of a SuperFamily.
|
|
120
|
+
* @param {number} [params.Offset] - Pagination offset.
|
|
121
|
+
* @returns {Promise<Patient[]>} - A list of summarized patient data.
|
|
122
|
+
* @throws {Error} - If the API returns an error.
|
|
123
|
+
*/
|
|
124
|
+
public async getPatientsSimple({
|
|
125
|
+
LName,
|
|
126
|
+
FName,
|
|
127
|
+
Birthdate,
|
|
128
|
+
ClinicNum,
|
|
129
|
+
PatStatus,
|
|
130
|
+
DateTStamp,
|
|
131
|
+
PriProv,
|
|
132
|
+
Gender,
|
|
133
|
+
Position,
|
|
134
|
+
Guarantor,
|
|
135
|
+
SuperFamily,
|
|
136
|
+
Offset,
|
|
137
|
+
}: GetPatientsSimpleParams = {}): Promise<Patient[]> {
|
|
138
|
+
|
|
139
|
+
return await this.httpClient.get<Patient[]>("/patients/Simple", {
|
|
140
|
+
LName,
|
|
141
|
+
FName,
|
|
142
|
+
Birthdate,
|
|
143
|
+
ClinicNum,
|
|
144
|
+
PatStatus,
|
|
145
|
+
DateTStamp,
|
|
146
|
+
PriProv,
|
|
147
|
+
Gender,
|
|
148
|
+
Position,
|
|
149
|
+
Guarantor,
|
|
150
|
+
SuperFamily,
|
|
151
|
+
Offset,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
106
155
|
/**
|
|
107
156
|
* Create a new patient.
|
|
108
157
|
* @param {Object} data - The data for the new patient.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import {
|
|
3
|
+
Recall,
|
|
4
|
+
RecallListParams,
|
|
5
|
+
RecallList,
|
|
6
|
+
CreateRecallParams,
|
|
7
|
+
UpdateRecallParams,
|
|
8
|
+
UpdateRecallStatusParams
|
|
9
|
+
} from "../types/recallTypes";
|
|
10
|
+
|
|
11
|
+
export default class Recalls {
|
|
12
|
+
private httpClient: HttpClient;
|
|
13
|
+
|
|
14
|
+
constructor(httpClient: HttpClient) {
|
|
15
|
+
this.httpClient = httpClient;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Gets a list of recalls.
|
|
20
|
+
* @param {number} PatNum - Optional search by PatNum.
|
|
21
|
+
* @returns {Promise<Recall>} - An array of recall objects.
|
|
22
|
+
*/
|
|
23
|
+
public async getRecalls(PatNum: number): Promise<Recall> {
|
|
24
|
+
if (!PatNum) {
|
|
25
|
+
return this.httpClient.get<Recall>(`/recalls`);
|
|
26
|
+
} else {
|
|
27
|
+
return this.httpClient.get<Recall>(`/recalls?PatNum=${PatNum}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Gets the Recall List similar to how it's shown in the Appointment Module when you click on Lists and select Recall List.
|
|
33
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
34
|
+
* @param {string} [params.DateStart] - Due date range. String in "yyyy-mm-dd" format. Default is based on RecallDaysPast preference.
|
|
35
|
+
* @param {string} [params.DateEnd] - Due date range. String in "yyyy-mm-dd" format. Default is based on RecallDaysFuture preference.
|
|
36
|
+
* @param {number} [params.ProvNum] - Provider. Default is all providers. Will consider PriProv and SecProv.
|
|
37
|
+
* @param {number} [params.ClinicNum] - Clinic. Default is all clinics. Use 0 for "Unassigned".
|
|
38
|
+
* @param {string} [params.RecallType] - Typically either "Prophy" or "Perio". Default is all RecallTypes stored in the preference.
|
|
39
|
+
* @param {"true" | "false"} [params.IncludeReminded] - Show patients that have already received reminders. Either "true" or "false". Default is false.
|
|
40
|
+
* @returns {Promise<RecallList[]>} - An array of recall list objects.
|
|
41
|
+
*/
|
|
42
|
+
public async getRecallList({
|
|
43
|
+
DateStart,
|
|
44
|
+
DateEnd,
|
|
45
|
+
ProvNum,
|
|
46
|
+
ClinicNum,
|
|
47
|
+
RecallType,
|
|
48
|
+
IncludeReminded,
|
|
49
|
+
Offset,
|
|
50
|
+
}: RecallListParams = {}): Promise<RecallList[]> {
|
|
51
|
+
const params = {
|
|
52
|
+
DateStart,
|
|
53
|
+
DateEnd,
|
|
54
|
+
ProvNum,
|
|
55
|
+
ClinicNum,
|
|
56
|
+
RecallType,
|
|
57
|
+
IncludeReminded,
|
|
58
|
+
Offset,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return this.httpClient.get<RecallList[]>("/recalls/List", params);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Create a new recall.
|
|
66
|
+
* @param {Object} data - Data for the new appointment.
|
|
67
|
+
* @param {number} data.PatNum - Required. FK to patient.PatNum.
|
|
68
|
+
* @param {number} data.RecallTypeNum - Required. FK to recalltype.RecallTypeNum. A patient may only have one recall for each RecallType.
|
|
69
|
+
* @param {string} [data.DateDue] - Optional. This is the date that is actually used when doing reports for recall. String in "yyyy-MM-dd" format.
|
|
70
|
+
* @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
|
|
71
|
+
* @param {number} [data.RecallStatus=0] - Optional. FK to definition.DefNum where definition.Category=13. Default 0.
|
|
72
|
+
* @param {string} [data.Note] - Optional: An administrative note for staff use.
|
|
73
|
+
* @param {"true" | "false"} [params.IsDisabled="false"] - Optional. Either "true" or "false". Default "false".
|
|
74
|
+
* @param {number} [data.DisableUntilBalance] - Optional: Hygienist provider number. Default is 0.
|
|
75
|
+
* @param {string} [data.DisableUntilDate] - Optional. Recall will be disabled until this date. String in "yyyy-MM-dd" format.
|
|
76
|
+
* @param {"Normal" | "ASAP"} [data.Priority="Normal"] - Optional. Either "Normal" or "ASAP". Default "Normal".
|
|
77
|
+
* @param {string} [data.TimePatternOverride] - Optional. Used to override recalltype.DefaultInterval. Time pattern in 5 minute increments. A string consisting of 'X' and '/' characters only.
|
|
78
|
+
* @returns {Promise<Recall>} - The created recall object.
|
|
79
|
+
* @throws {Error} - If required fields are missing.
|
|
80
|
+
*/
|
|
81
|
+
public async createRecall(data: CreateRecallParams): Promise<Recall> {
|
|
82
|
+
if (!data.PatNum || !data.RecallTypeNum) {
|
|
83
|
+
throw new Error("PatNum and RecallTypeNum are required.");
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return this.httpClient.post<Recall>("/recalls", data);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Edit a recall.
|
|
91
|
+
* @param {Object} data - Data for the new appointment.
|
|
92
|
+
* @param {number} data.RecallNum - Required. Primary key of recall to edit.
|
|
93
|
+
* @param {string} [data.DateDue] - Optional. This is the date that is actually used when doing reports for recall. String in "yyyy-MM-dd" format.
|
|
94
|
+
* @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
|
|
95
|
+
* @param {number} [data.RecallStatus=0] - Optional. FK to definition.DefNum where definition.Category=13. Default 0.
|
|
96
|
+
* @param {string} [data.Note] - Optional: An administrative note for staff use.
|
|
97
|
+
* @param {"true" | "false"} [params.IsDisabled="false"] - Optional. Either "true" or "false". Default "false".
|
|
98
|
+
* @param {number} [data.DisableUntilBalance] - Optional: Hygienist provider number. Default is 0.
|
|
99
|
+
* @param {string} [data.DisableUntilDate] - Optional. Recall will be disabled until this date. String in "yyyy-MM-dd" format.
|
|
100
|
+
* @param {"Normal" | "ASAP"} [data.Priority="Normal"] - Optional. Either "Normal" or "ASAP". Default "Normal".
|
|
101
|
+
* @param {string} [data.TimePatternOverride] - Optional. Used to override recalltype.DefaultInterval. Time pattern in 5 minute increments. A string consisting of 'X' and '/' characters only.
|
|
102
|
+
* @returns {Promise<Recall>} - The created recall object.
|
|
103
|
+
* @throws {Error} - If required fields are missing.
|
|
104
|
+
*/
|
|
105
|
+
public async updateRecall(data: UpdateRecallParams): Promise<Recall> {
|
|
106
|
+
if (!data.RecallNum) {
|
|
107
|
+
throw new Error("RecallNum is required.");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return this.httpClient.put<Recall>("/recalls", data);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Update recall status.
|
|
115
|
+
* @param {Object} data - Data for the new appointment.
|
|
116
|
+
* @param {number} data.PatNum - Required. FK to patient.PatNum.
|
|
117
|
+
* @param {string} data.recallType - Required. Typically either "Prophy" or "Perio". RecallType is dependent upon Setup Recall and Recall Types.
|
|
118
|
+
* @param {number} [data.RecallStatus=0] - Optional. FK to definition.DefNum where definition.Category=13. Default 0.
|
|
119
|
+
* @param {"None" | "Email" | "Mail" | "Phone" | "InPerson" | "Text" | "EmailAndText" | "PhoneAndText"} [data.commlogMode] - Optional: An administrative note for staff use.
|
|
120
|
+
* @param {string} [data.commlogNote] - Optional. This text will be used instead of the default commlog.Note.
|
|
121
|
+
* @returns {Promise<EditRecallStatusParams>} - The created recall object.
|
|
122
|
+
* @throws {Error} - If required fields are missing.
|
|
123
|
+
*/
|
|
124
|
+
public async updateRecallStatus(data: UpdateRecallStatusParams): Promise<UpdateRecallStatusParams> {
|
|
125
|
+
if (!data.PatNum || !data.recallType) {
|
|
126
|
+
throw new Error("PatNum and RecallNum are required.");
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return this.httpClient.put<UpdateRecallStatusParams>("/recalls/Status", data);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Switches a Recall's type similiar to clicking the 'Set Perio' or 'Set Prophy' button found in the Recall window.
|
|
134
|
+
* @param {Object} data - Data for the new appointment.
|
|
135
|
+
* @param {number} data.PatNum - Patient to switch recall type.
|
|
136
|
+
* @returns {Promise<{ status: number }>} - The API response containing the status code.
|
|
137
|
+
* @throws {Error} - If required fields are missing.
|
|
138
|
+
*/
|
|
139
|
+
public async switchRecallType(data: { PatNum: number }): Promise<{ status: number }> {
|
|
140
|
+
if (!data.PatNum) {
|
|
141
|
+
throw new Error("PatNum is required.");
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return this.httpClient.put<{ status: number }>("/recalls/SwitchType", data);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
}
|