@rinse-dental/open-dental 0.1.7 → 1.0.1

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 (52) hide show
  1. package/deploy_notes.txt +6 -2
  2. package/dist/api/definitions.d.ts +16 -0
  3. package/dist/api/definitions.d.ts.map +1 -0
  4. package/dist/api/definitions.js +25 -0
  5. package/dist/api/discountPlanSubs.d.ts +46 -0
  6. package/dist/api/discountPlanSubs.d.ts.map +1 -0
  7. package/dist/api/discountPlanSubs.js +69 -0
  8. package/dist/api/index.d.ts +6 -1
  9. package/dist/api/index.d.ts.map +1 -1
  10. package/dist/api/index.js +12 -2
  11. package/dist/api/operatories.d.ts +4 -4
  12. package/dist/api/operatories.js +4 -4
  13. package/dist/api/patFields.d.ts +3 -3
  14. package/dist/api/patFields.js +3 -3
  15. package/dist/api/payments.d.ts +49 -0
  16. package/dist/api/payments.d.ts.map +1 -0
  17. package/dist/api/payments.js +69 -0
  18. package/dist/api/providers.d.ts +38 -38
  19. package/dist/api/providers.js +38 -38
  20. package/dist/api/schedules.d.ts +4 -4
  21. package/dist/api/schedules.js +4 -4
  22. package/dist/api/treatplans.d.ts +9 -9
  23. package/dist/api/treatplans.d.ts.map +1 -1
  24. package/dist/api/treatplans.js +9 -9
  25. package/dist/openDental.d.ts +17 -2
  26. package/dist/openDental.d.ts.map +1 -1
  27. package/dist/openDental.js +32 -2
  28. package/dist/types/definitionTypes.d.ts +23 -0
  29. package/dist/types/definitionTypes.d.ts.map +1 -0
  30. package/dist/types/definitionTypes.js +2 -0
  31. package/dist/types/discountPlanSubTypes.d.ts +43 -0
  32. package/dist/types/discountPlanSubTypes.d.ts.map +1 -0
  33. package/dist/types/discountPlanSubTypes.js +2 -0
  34. package/dist/types/paymentTypes.d.ts +67 -0
  35. package/dist/types/paymentTypes.d.ts.map +1 -0
  36. package/dist/types/paymentTypes.js +2 -0
  37. package/dist/types/scheduleTypes.d.ts +2 -2
  38. package/package.json +3 -3
  39. package/src/api/definitions.ts +35 -0
  40. package/src/api/discountPlanSubs.ts +86 -0
  41. package/src/api/index.ts +6 -1
  42. package/src/api/operatories.ts +4 -4
  43. package/src/api/patFields.ts +3 -3
  44. package/src/api/payments.ts +86 -0
  45. package/src/api/providers.ts +38 -38
  46. package/src/api/schedules.ts +4 -4
  47. package/src/api/treatplans.ts +9 -10
  48. package/src/openDental.ts +34 -2
  49. package/src/types/definitionTypes.ts +24 -0
  50. package/src/types/discountPlanSubTypes.ts +46 -0
  51. package/src/types/paymentTypes.ts +70 -0
  52. package/src/types/scheduleTypes.ts +10 -10
@@ -23,7 +23,7 @@ class Providers {
23
23
  * @param {number} [params.ClinicNum] - Get providers by ClinicNum
24
24
  * @param {string} [params.DateTStamp] - Get providers altered after the specified date and time
25
25
  * @param {string} [params.Offset] - Pagination
26
- * @returns {Promise<Provider[]>} - A list of summarized patient data.
26
+ * @returns {Promise<Provider[]>} - A list of providers.
27
27
  * @throws {Error} - If the API returns an error.
28
28
  */
29
29
  async getProviders({ ClinicNum, DateTStamp, Offset, } = {}) {
@@ -35,25 +35,25 @@ class Providers {
35
35
  }
36
36
  /**
37
37
  * Creates a provider. Cannot create PatFields associated with hidden PatFieldDefs.
38
- * @param {Object} data - The data for the new patfield.
38
+ * @param {Object} data - The data for the new provider.
39
39
  * @param {string} data.Abbr - Required.
40
- * @param {string} data.LName - Optional.
41
- * @param {string} data.FName - Optional.
42
- * @param {string} data.MI - Optional.
43
- * @param {string} data.Suffix - Optional.
44
- * @param {number} data.FeeSched - Optional.
45
- * @param {number} data.Specialty - Optional.
46
- * @param {string} data.SSN - Optional.
47
- * @param {'true' | 'false'} data.IsSecondary - Optional.
48
- * @param {'true' | 'false'} data.IsHidden - Optional.
49
- * @param {'true' | 'false'} data.UsingTIN - Optional.
50
- * @param {'true' | 'false'} data.SigOnFile - Optional.
51
- * @param {'true' | 'false'} data.IsNotPerson - Optional.
52
- * @param {'true' | 'false'} data.IsHiddenReport - Optional.
53
- * @param {string} data.Birthdate - Optional.
54
- * @param {string} data.SchedNote - Optional.
55
- * @param {string} data.PreferredName - Optional.
56
- * @returns {Promise<Provider>} - The created PatField.
40
+ * @param {string} [data.LName] - Optional.
41
+ * @param {string} [data.FName] - Optional.
42
+ * @param {string} [data.MI] - Optional.
43
+ * @param {string} [data.Suffix] - Optional.
44
+ * @param {number} [data.FeeSched] - Optional.
45
+ * @param {number} [data.Specialty] - Optional.
46
+ * @param {string} [data.SSN] - Optional.
47
+ * @param {'true' | 'false'} [data.IsSecondary] - Optional.
48
+ * @param {'true' | 'false'} [data.IsHidden] - Optional.
49
+ * @param {'true' | 'false'} [data.UsingTIN] - Optional.
50
+ * @param {'true' | 'false'} [data.SigOnFile] - Optional.
51
+ * @param {'true' | 'false'} [data.IsNotPerson] - Optional.
52
+ * @param {'true' | 'false'} [data.IsHiddenReport] - Optional.
53
+ * @param {string} [data.Birthdate] - Optional.
54
+ * @param {string} [data.SchedNote] - Optional.
55
+ * @param {string} [data.PreferredName] - Optional.
56
+ * @returns {Promise<Provider>} - The created provider.
57
57
  * @throws {Error} - If the data is invalid or the API returns an error.
58
58
  */
59
59
  async createProvider({ Abbr, LName, FName, MI, Suffix, FeeSched, Specialty, SSN, IsSecondary, IsHidden, UsingTIN, SigOnFile, IsNotPerson, IsHiddenReport, Birthdate, SchedNote, PreferredName, }) {
@@ -83,25 +83,25 @@ class Providers {
83
83
  /**
84
84
  * Update a provider.
85
85
  * @param {number} ProvNum - The ID of the provider.
86
- * @param {Object} data - The data for the new patfield.
87
- * @param {string} data.Abbr - Optional but must not be blank.
88
- * @param {string} data.LName - Optional.
89
- * @param {string} data.FName - Optional.
90
- * @param {string} data.MI - Optional.
91
- * @param {string} data.Suffix - Optional.
92
- * @param {number} data.FeeSched - Optional.
93
- * @param {number} data.Specialty - Optional.
94
- * @param {string} data.SSN - Optional.
95
- * @param {'true' | 'false'} data.IsSecondary - Optional.
96
- * @param {'true' | 'false'} data.IsHidden - Optional.
97
- * @param {'true' | 'false'} data.UsingTIN - Optional.
98
- * @param {'true' | 'false'} data.SigOnFile - Optional.
99
- * @param {'true' | 'false'} data.IsNotPerson - Optional.
100
- * @param {'true' | 'false'} data.IsHiddenReport - Optional.
101
- * @param {string} data.Birthdate - Optional.
102
- * @param {string} data.SchedNote - Optional.
103
- * @param {string} data.PreferredName - Optional.
104
- * @returns {Promise<Provider>} - The created PatField.
86
+ * @param {Object} data - The data for a provider.
87
+ * @param {string} [data.Abbr] - Optional but must not be blank.
88
+ * @param {string} [data.LName] - Optional.
89
+ * @param {string} [data.FName] - Optional.
90
+ * @param {string} [data.MI] - Optional.
91
+ * @param {string} [data.Suffix] - Optional.
92
+ * @param {number} [data.FeeSched] - Optional.
93
+ * @param {number} [data.Specialty] - Optional.
94
+ * @param {string} [data.SSN] - Optional.
95
+ * @param {'true' | 'false'} [data.IsSecondary] - Optional.
96
+ * @param {'true' | 'false'} [data.IsHidden] - Optional.
97
+ * @param {'true' | 'false'} [data.UsingTIN] - Optional.
98
+ * @param {'true' | 'false'} [data.SigOnFile] - Optional.
99
+ * @param {'true' | 'false'} [data.IsNotPerson] - Optional.
100
+ * @param {'true' | 'false'} [data.IsHiddenReport] - Optional.
101
+ * @param {string} [data.Birthdate] - Optional.
102
+ * @param {string} [data.SchedNote] - Optional.
103
+ * @param {string} [data.PreferredName] - Optional.
104
+ * @returns {Promise<Provider>} - The updated Provider.
105
105
  * @throws {Error} - If the data is invalid or the API returns an error.
106
106
  */
107
107
  async updateProvider({ ProvNum, Abbr, LName, FName, MI, Suffix, Specialty, SSN, NationalProvID, StateLicense, UsingTIN, SigOnFile, PreferredName, }) {
@@ -5,13 +5,13 @@ export default class Schedules {
5
5
  constructor(httpClient: HttpClient);
6
6
  /**
7
7
  * Fetch a single Schedule by its ID.
8
- * @param {number} ScheduleNum - The ID of the patfield.
9
- * @returns {Promise<Schedule>} - The patient data.
8
+ * @param {number} ScheduleNum - The ID of a schedule.
9
+ * @returns {Promise<Schedule>} - The schedule data.
10
10
  * @throws {Error} - If `PatNum` is not valid or the API returns an error.
11
11
  */
12
12
  getSchedule(ScheduleNum: number): Promise<Schedule>;
13
13
  /**
14
- * Fetch multiple patients with optional filtering and pagination.
14
+ * Fetch multiple schedules with optional filtering and pagination.
15
15
  * @param {Object} params - Filtering and pagination parameters.
16
16
  * @param {string} [params.date] - Optional: For a single day. Today's date by default.
17
17
  * @param {string} [params.dateStart] - Optional: For a single day. Today's date by default.
@@ -21,7 +21,7 @@ export default class Schedules {
21
21
  * @param {number} [params.ProvNum] - FK to provider.ProvNum.
22
22
  * @param {number} [params.EmployeeNum] - FK to employee.EmployeeNum.
23
23
  * @param {number} [params.Offset] - Pagination offset.
24
- * @returns {Promise<Schedule[]>} - A list of summarized patient data.
24
+ * @returns {Promise<Schedule[]>} - A list of schedules.
25
25
  * @throws {Error} - If the API returns an error.
26
26
  */
27
27
  getSchedules({ date, dateStart, dateEnd, SchedType, BlockoutDefNum, ProvNum, EmployeeNum, Offset, }?: GetSchedulesParams): Promise<Schedule[]>;
@@ -7,8 +7,8 @@ class Schedules {
7
7
  }
8
8
  /**
9
9
  * Fetch a single Schedule by its ID.
10
- * @param {number} ScheduleNum - The ID of the patfield.
11
- * @returns {Promise<Schedule>} - The patient data.
10
+ * @param {number} ScheduleNum - The ID of a schedule.
11
+ * @returns {Promise<Schedule>} - The schedule data.
12
12
  * @throws {Error} - If `PatNum` is not valid or the API returns an error.
13
13
  */
14
14
  async getSchedule(ScheduleNum) {
@@ -18,7 +18,7 @@ class Schedules {
18
18
  return await this.httpClient.get(`/schedules/${ScheduleNum}`);
19
19
  }
20
20
  /**
21
- * Fetch multiple patients with optional filtering and pagination.
21
+ * Fetch multiple schedules with optional filtering and pagination.
22
22
  * @param {Object} params - Filtering and pagination parameters.
23
23
  * @param {string} [params.date] - Optional: For a single day. Today's date by default.
24
24
  * @param {string} [params.dateStart] - Optional: For a single day. Today's date by default.
@@ -28,7 +28,7 @@ class Schedules {
28
28
  * @param {number} [params.ProvNum] - FK to provider.ProvNum.
29
29
  * @param {number} [params.EmployeeNum] - FK to employee.EmployeeNum.
30
30
  * @param {number} [params.Offset] - Pagination offset.
31
- * @returns {Promise<Schedule[]>} - A list of summarized patient data.
31
+ * @returns {Promise<Schedule[]>} - A list of schedules.
32
32
  * @throws {Error} - If the API returns an error.
33
33
  */
34
34
  async getSchedules({ date, dateStart, dateEnd, SchedType, BlockoutDefNum, ProvNum, EmployeeNum, Offset, } = {}) {
@@ -9,35 +9,35 @@ export default class TreatmentPlans {
9
9
  * @param {string} [params.PatNum] - patient.PatNum.
10
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
11
  * @param {"Saved" | "Active" | "Inactive"} [params.TPStatus] - Either "Saved", "Active", or "Inactive". Default all.
12
- * @returns {Promise<TreatmentPlan[]>} - An array of recall list objects.
12
+ * @returns {Promise<TreatmentPlan[]>} - An array of treatplan objects.
13
13
  */
14
14
  getTreatmentPlans({ PatNum, SecDateTEdit, TPStatus, }?: GetTreatmentPlanParams): Promise<TreatmentPlan[]>;
15
15
  /**
16
16
  * Create a new TreatPlan.
17
- * @param {Object} data - Data for the new appointment.
17
+ * @param {Object} data - Data for the new treatment plan.
18
18
  * @param {number} data.PatNum - Required. FK to patient.PatNum.
19
19
  * @param {string} [data.Heading] - Optional. Defaults to the heading of the supplied Treatment Plan.
20
20
  * @param {string} [data.Note] - Optional: An administrative note for staff use.
21
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.
22
+ * @returns {Promise<TreatmentPlan>} - The created treatment plan object.
23
23
  * @throws {Error} - If required fields are missing.
24
24
  */
25
25
  createTreatmentPlan(data: CreateTreatmentPlanParams): Promise<TreatmentPlan>;
26
26
  /**
27
27
  * Creates an unsigned Saved TreatPlan from an existing Active or Inactive TreatPlan.
28
- * @param {Object} data - Data for the new appointment.
28
+ * @param {Object} data - Data for saved treatment plan.
29
29
  * @param {number} data.TreatPlanNum - Required.
30
30
  * @param {string} [data.Heading] - Optional. Defaults to the heading of the supplied Treatment Plan.
31
31
  * @param {string} [data.UserNumPresenter=0] - Optional. FK to userod.UserNum. Default 0.
32
- * @returns {Promise<TreatmentPlan>} - The created recall object.
32
+ * @returns {Promise<TreatmentPlan>} - The saved treatment plan object.
33
33
  * @throws {Error} - If required fields are missing.
34
34
  */
35
35
  saveTreatmentPlan(data: SaveTreatmentPlanParams): Promise<TreatmentPlan>;
36
36
  /**
37
- * Create a new TreatPlan.
38
- * @param {Object} data - Data for the new appointment.
37
+ * Update a TreatPlan.
38
+ * @param {Object} data - Data for the treatplan.
39
39
  * @param {number} data.TreatPlanNum - Required.
40
- * @param {string} [data.Heading] - The heading that shows at the top of the treatment plan.
40
+ * @param {string} [data.Heading] - Optional. The heading that shows at the top of the treatment plan.
41
41
  * @param {string} [data.Note] - Optional: An administrative note for staff use.
42
42
  * @param {number} [data.ResponsParty] - FK to patient.PatNum. The patient responsible for approving the treatment.
43
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".
@@ -45,7 +45,7 @@ export default class TreatmentPlans {
45
45
  * @param {string} [data.SignaturePracticeText] - The typed name of the person who signed the patient signature.
46
46
  * @param {"true" | "false"} [data.isSigned] - The typed name of the person who signed the patient signature.
47
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.
48
+ * @returns {Promise<TreatmentPlan>} - The updated treatplan object.
49
49
  * @throws {Error} - If required fields are missing.
50
50
  */
51
51
  updateTreatmentPlan(data: UpdateTreatmentPlanParams): Promise<TreatmentPlan>;
@@ -1 +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"}
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;AAEjC,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"}
@@ -11,7 +11,7 @@ class TreatmentPlans {
11
11
  * @param {string} [params.PatNum] - patient.PatNum.
12
12
  * @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.
13
13
  * @param {"Saved" | "Active" | "Inactive"} [params.TPStatus] - Either "Saved", "Active", or "Inactive". Default all.
14
- * @returns {Promise<TreatmentPlan[]>} - An array of recall list objects.
14
+ * @returns {Promise<TreatmentPlan[]>} - An array of treatplan objects.
15
15
  */
16
16
  async getTreatmentPlans({ PatNum, SecDateTEdit, TPStatus, } = {}) {
17
17
  const params = {
@@ -23,12 +23,12 @@ class TreatmentPlans {
23
23
  }
24
24
  /**
25
25
  * Create a new TreatPlan.
26
- * @param {Object} data - Data for the new appointment.
26
+ * @param {Object} data - Data for the new treatment plan.
27
27
  * @param {number} data.PatNum - Required. FK to patient.PatNum.
28
28
  * @param {string} [data.Heading] - Optional. Defaults to the heading of the supplied Treatment Plan.
29
29
  * @param {string} [data.Note] - Optional: An administrative note for staff use.
30
30
  * @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".
31
- * @returns {Promise<TreatmentPlan>} - The created recall object.
31
+ * @returns {Promise<TreatmentPlan>} - The created treatment plan object.
32
32
  * @throws {Error} - If required fields are missing.
33
33
  */
34
34
  async createTreatmentPlan(data) {
@@ -39,11 +39,11 @@ class TreatmentPlans {
39
39
  }
40
40
  /**
41
41
  * Creates an unsigned Saved TreatPlan from an existing Active or Inactive TreatPlan.
42
- * @param {Object} data - Data for the new appointment.
42
+ * @param {Object} data - Data for saved treatment plan.
43
43
  * @param {number} data.TreatPlanNum - Required.
44
44
  * @param {string} [data.Heading] - Optional. Defaults to the heading of the supplied Treatment Plan.
45
45
  * @param {string} [data.UserNumPresenter=0] - Optional. FK to userod.UserNum. Default 0.
46
- * @returns {Promise<TreatmentPlan>} - The created recall object.
46
+ * @returns {Promise<TreatmentPlan>} - The saved treatment plan object.
47
47
  * @throws {Error} - If required fields are missing.
48
48
  */
49
49
  async saveTreatmentPlan(data) {
@@ -53,10 +53,10 @@ class TreatmentPlans {
53
53
  return this.httpClient.post("/treatplans/Saved", data);
54
54
  }
55
55
  /**
56
- * Create a new TreatPlan.
57
- * @param {Object} data - Data for the new appointment.
56
+ * Update a TreatPlan.
57
+ * @param {Object} data - Data for the treatplan.
58
58
  * @param {number} data.TreatPlanNum - Required.
59
- * @param {string} [data.Heading] - The heading that shows at the top of the treatment plan.
59
+ * @param {string} [data.Heading] - Optional. The heading that shows at the top of the treatment plan.
60
60
  * @param {string} [data.Note] - Optional: An administrative note for staff use.
61
61
  * @param {number} [data.ResponsParty] - FK to patient.PatNum. The patient responsible for approving the treatment.
62
62
  * @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".
@@ -64,7 +64,7 @@ class TreatmentPlans {
64
64
  * @param {string} [data.SignaturePracticeText] - The typed name of the person who signed the patient signature.
65
65
  * @param {"true" | "false"} [data.isSigned] - The typed name of the person who signed the patient signature.
66
66
  * @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.
67
- * @returns {Promise<TreatmentPlan>} - The created recall object.
67
+ * @returns {Promise<TreatmentPlan>} - The updated treatplan object.
68
68
  * @throws {Error} - If required fields are missing.
69
69
  */
70
70
  async updateTreatmentPlan(data) {
@@ -9,6 +9,9 @@ import TreatmentPlans from "./api/treatplans";
9
9
  import Schedules from "./api/schedules";
10
10
  import Providers from "./api/providers";
11
11
  import Operatories from "./api/operatories";
12
+ import Payments from "./api/payments";
13
+ import Definitions from "./api/definitions";
14
+ import DiscountPlanSubs from "./api/discountPlanSubs";
12
15
  declare class OpenDental {
13
16
  private static httpClient;
14
17
  /**
@@ -52,13 +55,25 @@ declare class OpenDental {
52
55
  */
53
56
  static Schedules(): Schedules;
54
57
  /**
55
- * Create a new instance of the Schedules API.
58
+ * Create a new instance of the Providers API.
56
59
  */
57
60
  static Providers(): Providers;
58
61
  /**
59
- * Create a new instance of the Schedules API.
62
+ * Create a new instance of the Operatories API.
60
63
  */
61
64
  static Operatories(): Operatories;
65
+ /**
66
+ * Create a new instance of the Payments API.
67
+ */
68
+ static Payments(): Payments;
69
+ /**
70
+ * Create a new instance of the Definitions API.
71
+ */
72
+ static Definitions(): Definitions;
73
+ /**
74
+ * Create a new instance of the DiscountPlanSubs API.
75
+ */
76
+ static DiscountPlanSubs(): DiscountPlanSubs;
62
77
  }
63
78
  export { OpenDental };
64
79
  //# sourceMappingURL=openDental.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openDental.d.ts","sourceRoot":"","sources":["../src/openDental.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,SAAS,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U,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAWlE;;OAEG;WACa,YAAY;IAQ5B;;OAEG;WACa,QAAQ;IAOxB;;OAEG;WACW,YAAY;IAO1B;;SAEK;WACS,SAAS;IAOvB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,aAAa;IAO3B;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,cAAc;IAO5B;;OAEG;WACa,SAAS;IAOzB;;OAEG;WACa,SAAS;IAOzB;;OAEG;WACa,WAAW;IAO3B;;OAEG;WACa,QAAQ;IAOxB;;OAEG;WACW,WAAW;IAMzB;;OAEG;WACW,gBAAgB;CAM/B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -16,6 +16,9 @@ const treatplans_1 = __importDefault(require("./api/treatplans"));
16
16
  const schedules_1 = __importDefault(require("./api/schedules"));
17
17
  const providers_1 = __importDefault(require("./api/providers"));
18
18
  const operatories_1 = __importDefault(require("./api/operatories"));
19
+ const payments_1 = __importDefault(require("./api/payments"));
20
+ const definitions_1 = __importDefault(require("./api/definitions"));
21
+ const discountPlanSubs_1 = __importDefault(require("./api/discountPlanSubs"));
19
22
  class OpenDental {
20
23
  static httpClient;
21
24
  /**
@@ -111,7 +114,7 @@ class OpenDental {
111
114
  return new schedules_1.default(this.httpClient);
112
115
  }
113
116
  /**
114
- * Create a new instance of the Schedules API.
117
+ * Create a new instance of the Providers API.
115
118
  */
116
119
  static Providers() {
117
120
  if (!this.httpClient) {
@@ -120,7 +123,7 @@ class OpenDental {
120
123
  return new providers_1.default(this.httpClient);
121
124
  }
122
125
  /**
123
- * Create a new instance of the Schedules API.
126
+ * Create a new instance of the Operatories API.
124
127
  */
125
128
  static Operatories() {
126
129
  if (!this.httpClient) {
@@ -128,5 +131,32 @@ class OpenDental {
128
131
  }
129
132
  return new operatories_1.default(this.httpClient);
130
133
  }
134
+ /**
135
+ * Create a new instance of the Payments API.
136
+ */
137
+ static Payments() {
138
+ if (!this.httpClient) {
139
+ throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
140
+ }
141
+ return new payments_1.default(this.httpClient);
142
+ }
143
+ /**
144
+ * Create a new instance of the Definitions API.
145
+ */
146
+ static Definitions() {
147
+ if (!this.httpClient) {
148
+ throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
149
+ }
150
+ return new definitions_1.default(this.httpClient);
151
+ }
152
+ /**
153
+ * Create a new instance of the DiscountPlanSubs API.
154
+ */
155
+ static DiscountPlanSubs() {
156
+ if (!this.httpClient) {
157
+ throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
158
+ }
159
+ return new discountPlanSubs_1.default(this.httpClient);
160
+ }
131
161
  }
132
162
  exports.OpenDental = OpenDental;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Represents a definition in the Open Dental system.
3
+ * Used in multiple definition-related endpoints.
4
+ * @see https://www.opendental.com/site/apidefinitions.html
5
+ */
6
+ export interface Definition {
7
+ DefNum?: number;
8
+ ItemName?: string;
9
+ ItemValue?: string;
10
+ Category?: number;
11
+ category?: string;
12
+ isHidden?: 'true' | 'false';
13
+ }
14
+ /**
15
+ * Parameters for GET Definitions.
16
+ * @see https://www.opendental.com/site/apidefinitions.html
17
+ */
18
+ export interface GetDefinitionsParams {
19
+ Category?: number;
20
+ includeHidden?: 'true' | 'false';
21
+ Offset?: number;
22
+ }
23
+ //# sourceMappingURL=definitionTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitionTypes.d.ts","sourceRoot":"","sources":["../../src/types/definitionTypes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Represents a subscription to a discount plan in the Open Dental system.
3
+ * @see https://www.opendental.com/site/apidiscountplansubs.html
4
+ */
5
+ export interface DiscountPlanSub {
6
+ DiscountSubNum?: number;
7
+ DiscountPlanNum?: number;
8
+ PatNum?: number;
9
+ DateEffective?: string;
10
+ DateTerm?: string;
11
+ SubNote?: string;
12
+ }
13
+ /**
14
+ * Parameters for GET discount plan subs.
15
+ * @see https://www.opendental.com/site/apidiscountplansubs.html
16
+ */
17
+ export interface GetDiscountPlanSubsParams {
18
+ PatNum?: number;
19
+ Offset?: number;
20
+ }
21
+ /**
22
+ * Parameters for creating a discount plan sub.
23
+ * @see https://www.opendental.com/site/apidiscountplansubs.html
24
+ */
25
+ export interface CreateDiscountPlanSubParams {
26
+ PatNum: number;
27
+ DiscountPlanNum: number;
28
+ DateEffective?: string;
29
+ DateTerm?: string;
30
+ SubNote?: string;
31
+ }
32
+ /**
33
+ * Parameters for updating a discount plan sub.
34
+ * @see https://www.opendental.com/site/apidiscountplansubs.html
35
+ */
36
+ export interface UpdateDiscountPlanSubParams {
37
+ DiscountSubNum: number;
38
+ PatNum: string;
39
+ DateEffective?: string;
40
+ DateTerm?: string;
41
+ SubNote?: string;
42
+ }
43
+ //# sourceMappingURL=discountPlanSubTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discountPlanSubTypes.d.ts","sourceRoot":"","sources":["../../src/types/discountPlanSubTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Represents an appointment in the Open Dental system.
3
+ * Used in multiple appointment-related endpoints.
4
+ * @see https://www.opendental.com/site/apipayments.html
5
+ */
6
+ export interface Payment {
7
+ PayNum?: number;
8
+ PayType?: number;
9
+ payType?: string;
10
+ PayDate?: string;
11
+ PayAmt?: string;
12
+ CheckNum?: string;
13
+ BankBranch?: string;
14
+ PayNote?: string;
15
+ PatNum?: number;
16
+ ClinicNum?: string;
17
+ DateEntry?: string;
18
+ DepositNum?: number;
19
+ Receipt?: string;
20
+ IsRecurringCC?: 'true' | 'false';
21
+ PaymentSource?: string;
22
+ ProcessStatus?: string;
23
+ RecurringChargeDate?: string;
24
+ IsCcCompleted?: 'true' | 'false';
25
+ serverDateTime?: string;
26
+ }
27
+ /**
28
+ * Parameters for GET Payments.
29
+ * @see https://www.opendental.com/site/apipayments.html
30
+ */
31
+ export interface GetPaymentsParams {
32
+ PayType?: number;
33
+ PatNum?: number;
34
+ DateEntry?: string;
35
+ Offset?: number;
36
+ }
37
+ /**
38
+ * Parameters for creating a payment.
39
+ * @see https://www.opendental.com/site/apipayments.html
40
+ */
41
+ export interface CreatePaymentParams {
42
+ PatNum: number;
43
+ PayAmt: string;
44
+ PayType?: number;
45
+ PayDate?: string;
46
+ CheckNum?: string;
47
+ PayNote?: string;
48
+ BankBranch?: string;
49
+ ClinicNum?: string;
50
+ isPatientPreferred?: 'true' | 'false';
51
+ isPrepayment?: 'true' | 'false';
52
+ procNums?: number[];
53
+ payPlanNum?: number;
54
+ }
55
+ /**
56
+ * Parameters for updating a payment.
57
+ * @see https://www.opendental.com/site/apipayments.html
58
+ */
59
+ export interface UpdatePaymentParams {
60
+ PayNum: number;
61
+ PayType?: number;
62
+ CheckNum?: string;
63
+ BankBranch?: string;
64
+ PayNote?: string;
65
+ ProcessStatus?: 'OnlineProcessed' | 'OnlinePending';
66
+ }
67
+ //# sourceMappingURL=paymentTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paymentTypes.d.ts","sourceRoot":"","sources":["../../src/types/paymentTypes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAA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AC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAG,iBAAiB,GAAG,eAAe,CAAC;CACtD"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,7 +8,7 @@ export interface Schedule {
8
8
  StartTime?: string;
9
9
  StopTime?: string;
10
10
  SchedType?: "Practice" | "Provider" | "Blockout" | "Employee" | "WebSchedASAP";
11
- ProvNum?: number;
11
+ ProvNum?: string;
12
12
  BlockoutType?: string;
13
13
  blockoutType?: string;
14
14
  Note?: string;
@@ -16,7 +16,7 @@ export interface Schedule {
16
16
  EmployeeNum?: string;
17
17
  }
18
18
  /**
19
- * Parameters for fetching multiple patients.
19
+ * Parameters for fetching schedule records;
20
20
  * @see https://www.opendental.com/site/apischedules.html
21
21
  */
22
22
  export interface GetSchedulesParams {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rinse-dental/open-dental",
3
- "version": "0.1.7",
3
+ "version": "1.0.1",
4
4
  "description": "A TypeScript library for easily accessing Open Dental APIs.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,8 +15,8 @@
15
15
  "url": "git+https://github.com/getrinsed/open-dental.git"
16
16
  },
17
17
  "dependencies": {
18
- "axios": "^1.7.7",
19
- "moment-timezone": "^0.5.46"
18
+ "axios": "^1.7.9",
19
+ "moment-timezone": "^0.5.47"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/jest": "^29.5.14",
@@ -0,0 +1,35 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import {
3
+ Definition,
4
+ GetDefinitionsParams,
5
+ } from "../types/definitionTypes";
6
+
7
+ export default class Definitions {
8
+ private httpClient: HttpClient;
9
+
10
+ constructor(httpClient: HttpClient) {
11
+ this.httpClient = httpClient;
12
+ }
13
+
14
+ /**
15
+ * Fetch multiple definitions with optional filtering and pagination.
16
+ * @param {Object} params - The parameters for filtering and pagination.
17
+ * @param {number} [params.Category] - Filter by category.
18
+ * @param {"true" | "false"} [data.includeHidden="false"] - Optional parameter that defaults to false.
19
+ * @param {number} [params.Offset] - Pagination offset for results.
20
+ * @returns {Promise<Definition[]>} - A list of definitions.
21
+ */
22
+ public async getDefinitions({
23
+ Category,
24
+ includeHidden,
25
+ Offset,
26
+ }: GetDefinitionsParams = {}): Promise<Definition[]> {
27
+ const params = {
28
+ Category,
29
+ includeHidden,
30
+ Offset,
31
+ };
32
+
33
+ return this.httpClient.get<Definition[]>("/definitions", params);
34
+ }
35
+ }