@rinse-dental/open-dental 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,62 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import { Benefit, GetBenefitsParams, CreateBenefitParams, UpdateBenefitParams } from "../types/benefitTypes";
3
+ export default class Benefits {
4
+ private httpClient;
5
+ constructor(httpClient: HttpClient);
6
+ /**
7
+ * Fetch multiple benefits with optional filtering and pagination.
8
+ * @param {Object} params - The parameters for filtering and pagination.
9
+ * @param {number} [params.PlanNum] - FK to InsPlan.PlanNum.
10
+ * @param {number} [params.PatPlanNum] - FK to PatPlan.PatPlanNum.
11
+ * @param {number} [params.Offset] - Pagination offset for results.
12
+ * @returns {Promise<Benefit[]>} - A list of benefits.
13
+ */
14
+ getBenefits({ PlanNum, PatPlanNum, Offset, }?: GetBenefitsParams): Promise<Benefit[]>;
15
+ /**
16
+ * This adds a Benefit row to the database.
17
+ * @param {Object} data - The details of the Benefit to create.
18
+ * @param {number} data.PlanNum - This or PatPlanNum is required. FK to InsPlan.PlanNum.
19
+ * @param {number} data.PatPlanNum - This or PlanNum is required. FK to PatPlan.PlanNum.
20
+ * @param {"ActiveCoverage" | "CoInsurance" | "Deductible" | "CoPayment" | "Exclusions" | "Limitations" | "WaitingPeriod"} data.BenefitType - Required. Either "ActiveCoverage", "CoInsurance", "Deductible", "CoPayment", "Exclusions", "Limitations", or "WaitingPeriod".
21
+ * @param {"None" | "Individual" | "Family"} data.CoverageLevel - Required. Either "None", "Individual", or "Family".
22
+ * @param {number} [data.CovCatNum] - Optional. FK to covcat.CovCatNum.
23
+ * @param {number} [data.Percent] - Optional. Only allowed if BenefitType is "CoInsurance". Must be a value between 0 and 100. Default -1 (Indicating empty).
24
+ * @param {number} [data.MonetaryAmt] - Optional. Only used if BenefitType is "CoPayment", "Limitations", or "Deductible". Default -1.0 (Indicating empty).
25
+ * @param {"None" | "ServiceYear" | "CalendarYear" | "Lifetime" | "Years" | "NumberInLast12Months"} [data.TimePeriod] - Optional. Either "None", "ServiceYear", "CalendarYear", "Lifetime", "Years", or "NumberInLast12Months". Default "CalendarYear".
26
+ * @param {"None" | "NumberOfServices" | "AgeLimit" | "Visits" | "Years" | "Months"} [data.QuantityQualifier] - Optional. Either "None", "NumberOfServices", "AgeLimit", "Visits", "Years", or "Months". Default "None". Must be "Months" or "Years" if BenefitType is "WaitingPeriod".
27
+ * @param {number} [data.Quantity] - Optional. Must be a value between 0 and 100. Default 0. Must be a value greater than 0 if QuantityQualifier is "AgeLimit".
28
+ * @param {number} [data.CodeNum] - Optional. FK to procedurecode.CodeNum. Only allowed if CovCatNum is 0. Will be used over procCode if both are specified. Default 0.
29
+ * @param {string} [data.procCode] - Optional. FK to procedurecode.ProcCode. Only allowed if CovCatNum is 0. Default empty string.
30
+ * @param {number} [data.CodeGroupNum] - Optional. (Added in version 23.2.62) FK to codegroup.CodeGroupNum. The group of procedure codes that apply to this Frequency Limitation benefit.
31
+ * @returns {Promise<Benefit>} - The created a benefit.
32
+ * @throws {Error} - If required fields are missing or the API returns an error.
33
+ */
34
+ createBenefit({ PlanNum, PatPlanNum, BenefitType, CoverageLevel, CovCatNum, Percent, MonetaryAmt, TimePeriod, QuantityQualifier, Quantity, CodeNum, procCode, CodeGroupNum, }: CreateBenefitParams): Promise<Benefit>;
35
+ /**
36
+ * Update a Benefit.
37
+ * @param {Object} data - The details of Benefit to update.
38
+ * @param {number} data.BenefitNum - Required. PK
39
+ * @param {number} [data.CovCatNum] - Optional. FK to covcat.CovCatNum.
40
+ * @param {"ActiveCoverage" | "CoInsurance" | "Deductible" | "CoPayment" | "Exclusions" | "Limitations" | "WaitingPeriod"} [data.BenefitType] - Optional. Either "ActiveCoverage", "CoInsurance", "Deductible", "CoPayment", "Exclusions", "Limitations", or "WaitingPeriod".
41
+ * @param {number} [data.Percent] - Optional. Only allowed if BenefitType is "CoInsurance". Must be a value between 0 and 100. Default -1 (Indicating empty).
42
+ * @param {number} [data.MonetaryAmt] - Optional. Only used if BenefitType is "CoPayment", "Limitations", or "Deductible". Default -1.0 (Indicating empty).
43
+ * @param {"None" | "ServiceYear" | "CalendarYear" | "Lifetime" | "Years" | "NumberInLast12Months"} [data.TimePeriod] - Optional. Either "None", "ServiceYear", "CalendarYear", "Lifetime", "Years", or "NumberInLast12Months". Default "CalendarYear".
44
+ * @param {"None" | "NumberOfServices" | "AgeLimit" | "Visits" | "Years" | "Months"} [data.QuantityQualifier] - Optional. Either "None", "NumberOfServices", "AgeLimit", "Visits", "Years", or "Months". Default "None". Must be "Months" or "Years" if BenefitType is "WaitingPeriod".
45
+ * @param {number} [data.Quantity] - Optional. Must be a value between 0 and 100. Default 0. Must be a value greater than 0 if QuantityQualifier is "AgeLimit".
46
+ * @param {number} [data.CodeNum] - Optional. FK to procedurecode.CodeNum. Only allowed if CovCatNum is 0. Will be used over procCode if both are specified.
47
+ * @param {string} [data.procCode] - Optional. FK to procedurecode.ProcCode. Only allowed if CovCatNum is 0.
48
+ * @param {"None" | "Individual" | "Family"} [data.CoverageLevel] - Optional. Either "None", "Individual", or "Family".
49
+ * @returns {Promise<Benefit>} - The updated Benefit.
50
+ * @throws {Error} - If required fields are missing or the API returns an error.
51
+ */
52
+ updateBenefit({ BenefitNum, CovCatNum, BenefitType, Percent, MonetaryAmt, TimePeriod, QuantityQualifier, Quantity, CodeNum, procCode, CoverageLevel, }: UpdateBenefitParams): Promise<Benefit>;
53
+ /**
54
+ * Delete a Benefit entry.
55
+ * This removes a Benefit row from the database.
56
+ * @param {number} BenefitNum - Required: The unique identifier of the Benefit to delete.
57
+ * @returns {Promise<void>} - Resolves when the Benefit is deleted.
58
+ * @throws {Error} - If `BenefitNum` is not valid or the API returns an error.
59
+ */
60
+ deletePatPlan(BenefitNum: number): Promise<void>;
61
+ }
62
+ //# sourceMappingURL=benefits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"benefits.d.ts","sourceRoot":"","sources":["../../src/api/benefits.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,OAAO,EACP,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,QAAQ;IAC3B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;;;QAOI;IACS,WAAW,CAAC,EACvB,OAAO,EACP,UAAU,EACV,MAAM,GACP,GAAE,iBAAsB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAU9C;;;;;;;;;;;;;;;;;;OAkBG;IACU,aAAa,CAAC,EACzB,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,OAAO,EACP,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,YAAY,GACb,EAAG,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAsB1C;;;;;;;;;;;;;;;;OAgBG;IACU,aAAa,CAAC,EACzB,UAAU,EACV,SAAS,EACT,WAAW,EACX,OAAO,EACP,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,aAAa,GACd,EAAG,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAmB1C;;;;;;OAMG;IACU,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAO9D"}
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class Benefits {
4
+ httpClient;
5
+ constructor(httpClient) {
6
+ this.httpClient = httpClient;
7
+ }
8
+ /**
9
+ * Fetch multiple benefits with optional filtering and pagination.
10
+ * @param {Object} params - The parameters for filtering and pagination.
11
+ * @param {number} [params.PlanNum] - FK to InsPlan.PlanNum.
12
+ * @param {number} [params.PatPlanNum] - FK to PatPlan.PatPlanNum.
13
+ * @param {number} [params.Offset] - Pagination offset for results.
14
+ * @returns {Promise<Benefit[]>} - A list of benefits.
15
+ */
16
+ async getBenefits({ PlanNum, PatPlanNum, Offset, } = {}) {
17
+ const params = {
18
+ PlanNum,
19
+ PatPlanNum,
20
+ Offset,
21
+ };
22
+ return this.httpClient.get("/benefits", params);
23
+ }
24
+ /**
25
+ * This adds a Benefit row to the database.
26
+ * @param {Object} data - The details of the Benefit to create.
27
+ * @param {number} data.PlanNum - This or PatPlanNum is required. FK to InsPlan.PlanNum.
28
+ * @param {number} data.PatPlanNum - This or PlanNum is required. FK to PatPlan.PlanNum.
29
+ * @param {"ActiveCoverage" | "CoInsurance" | "Deductible" | "CoPayment" | "Exclusions" | "Limitations" | "WaitingPeriod"} data.BenefitType - Required. Either "ActiveCoverage", "CoInsurance", "Deductible", "CoPayment", "Exclusions", "Limitations", or "WaitingPeriod".
30
+ * @param {"None" | "Individual" | "Family"} data.CoverageLevel - Required. Either "None", "Individual", or "Family".
31
+ * @param {number} [data.CovCatNum] - Optional. FK to covcat.CovCatNum.
32
+ * @param {number} [data.Percent] - Optional. Only allowed if BenefitType is "CoInsurance". Must be a value between 0 and 100. Default -1 (Indicating empty).
33
+ * @param {number} [data.MonetaryAmt] - Optional. Only used if BenefitType is "CoPayment", "Limitations", or "Deductible". Default -1.0 (Indicating empty).
34
+ * @param {"None" | "ServiceYear" | "CalendarYear" | "Lifetime" | "Years" | "NumberInLast12Months"} [data.TimePeriod] - Optional. Either "None", "ServiceYear", "CalendarYear", "Lifetime", "Years", or "NumberInLast12Months". Default "CalendarYear".
35
+ * @param {"None" | "NumberOfServices" | "AgeLimit" | "Visits" | "Years" | "Months"} [data.QuantityQualifier] - Optional. Either "None", "NumberOfServices", "AgeLimit", "Visits", "Years", or "Months". Default "None". Must be "Months" or "Years" if BenefitType is "WaitingPeriod".
36
+ * @param {number} [data.Quantity] - Optional. Must be a value between 0 and 100. Default 0. Must be a value greater than 0 if QuantityQualifier is "AgeLimit".
37
+ * @param {number} [data.CodeNum] - Optional. FK to procedurecode.CodeNum. Only allowed if CovCatNum is 0. Will be used over procCode if both are specified. Default 0.
38
+ * @param {string} [data.procCode] - Optional. FK to procedurecode.ProcCode. Only allowed if CovCatNum is 0. Default empty string.
39
+ * @param {number} [data.CodeGroupNum] - Optional. (Added in version 23.2.62) FK to codegroup.CodeGroupNum. The group of procedure codes that apply to this Frequency Limitation benefit.
40
+ * @returns {Promise<Benefit>} - The created a benefit.
41
+ * @throws {Error} - If required fields are missing or the API returns an error.
42
+ */
43
+ async createBenefit({ PlanNum, PatPlanNum, BenefitType, CoverageLevel, CovCatNum, Percent, MonetaryAmt, TimePeriod, QuantityQualifier, Quantity, CodeNum, procCode, CodeGroupNum, }) {
44
+ if (!BenefitType || !CoverageLevel) {
45
+ throw new Error("Invalid data: Either PlanNum or PatPlanNum and BenefitType and CoverageLevel are required.");
46
+ }
47
+ return this.httpClient.post("/benefits", {
48
+ PlanNum,
49
+ PatPlanNum,
50
+ BenefitType,
51
+ CoverageLevel,
52
+ CovCatNum,
53
+ Percent,
54
+ MonetaryAmt,
55
+ TimePeriod,
56
+ QuantityQualifier,
57
+ Quantity,
58
+ CodeNum,
59
+ procCode,
60
+ CodeGroupNum,
61
+ });
62
+ }
63
+ /**
64
+ * Update a Benefit.
65
+ * @param {Object} data - The details of Benefit to update.
66
+ * @param {number} data.BenefitNum - Required. PK
67
+ * @param {number} [data.CovCatNum] - Optional. FK to covcat.CovCatNum.
68
+ * @param {"ActiveCoverage" | "CoInsurance" | "Deductible" | "CoPayment" | "Exclusions" | "Limitations" | "WaitingPeriod"} [data.BenefitType] - Optional. Either "ActiveCoverage", "CoInsurance", "Deductible", "CoPayment", "Exclusions", "Limitations", or "WaitingPeriod".
69
+ * @param {number} [data.Percent] - Optional. Only allowed if BenefitType is "CoInsurance". Must be a value between 0 and 100. Default -1 (Indicating empty).
70
+ * @param {number} [data.MonetaryAmt] - Optional. Only used if BenefitType is "CoPayment", "Limitations", or "Deductible". Default -1.0 (Indicating empty).
71
+ * @param {"None" | "ServiceYear" | "CalendarYear" | "Lifetime" | "Years" | "NumberInLast12Months"} [data.TimePeriod] - Optional. Either "None", "ServiceYear", "CalendarYear", "Lifetime", "Years", or "NumberInLast12Months". Default "CalendarYear".
72
+ * @param {"None" | "NumberOfServices" | "AgeLimit" | "Visits" | "Years" | "Months"} [data.QuantityQualifier] - Optional. Either "None", "NumberOfServices", "AgeLimit", "Visits", "Years", or "Months". Default "None". Must be "Months" or "Years" if BenefitType is "WaitingPeriod".
73
+ * @param {number} [data.Quantity] - Optional. Must be a value between 0 and 100. Default 0. Must be a value greater than 0 if QuantityQualifier is "AgeLimit".
74
+ * @param {number} [data.CodeNum] - Optional. FK to procedurecode.CodeNum. Only allowed if CovCatNum is 0. Will be used over procCode if both are specified.
75
+ * @param {string} [data.procCode] - Optional. FK to procedurecode.ProcCode. Only allowed if CovCatNum is 0.
76
+ * @param {"None" | "Individual" | "Family"} [data.CoverageLevel] - Optional. Either "None", "Individual", or "Family".
77
+ * @returns {Promise<Benefit>} - The updated Benefit.
78
+ * @throws {Error} - If required fields are missing or the API returns an error.
79
+ */
80
+ async updateBenefit({ BenefitNum, CovCatNum, BenefitType, Percent, MonetaryAmt, TimePeriod, QuantityQualifier, Quantity, CodeNum, procCode, CoverageLevel, }) {
81
+ if (!BenefitNum || typeof BenefitNum !== "number") {
82
+ throw new Error("Invalid data: A Valid BenefitNum is required.");
83
+ }
84
+ return this.httpClient.put(`/benefits/${BenefitNum}`, {
85
+ CovCatNum,
86
+ BenefitType,
87
+ Percent,
88
+ MonetaryAmt,
89
+ TimePeriod,
90
+ QuantityQualifier,
91
+ Quantity,
92
+ CodeNum,
93
+ procCode,
94
+ CoverageLevel,
95
+ });
96
+ }
97
+ /**
98
+ * Delete a Benefit entry.
99
+ * This removes a Benefit row from the database.
100
+ * @param {number} BenefitNum - Required: The unique identifier of the Benefit to delete.
101
+ * @returns {Promise<void>} - Resolves when the Benefit is deleted.
102
+ * @throws {Error} - If `BenefitNum` is not valid or the API returns an error.
103
+ */
104
+ async deletePatPlan(BenefitNum) {
105
+ if (!BenefitNum || typeof BenefitNum !== "number") {
106
+ throw new Error("Invalid parameter: BenefitNum must be a valid number.");
107
+ }
108
+ return this.httpClient.delete(`/benefits/${BenefitNum}`);
109
+ }
110
+ }
111
+ exports.default = Benefits;
@@ -0,0 +1,19 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import { ClaimProc, GetClaimProcsParams } from "../types/claimProcTypes";
3
+ export default class ClaimProcs {
4
+ private httpClient;
5
+ constructor(httpClient: HttpClient);
6
+ /**
7
+ * Fetch multiple ClaimProcs with optional filtering and pagination.
8
+ * @param {Object} params - The parameters for filtering and pagination.
9
+ * @param {number} [params.ProcNum] - FK to procedurelog.ProcNum.
10
+ * @param {number} [params.ClaimNum] - FK to claim.ClaimNum.
11
+ * @param {number} [params.PatNum] - FK to patient.PatNum.
12
+ * @param {"NotReceived" | "Received" | "Preauth" | "Adjustment" | "Supplemental" | "CapClaim" | "Estimate" | "CapComplete" | "CapEstimate" | "InsHist"} [params.Status] - Either "NotReceived", "Received", "Preauth", "Adjustment", "Supplemental", "CapClaim", "Estimate",
13
+ * @param {number} [params.ClaimPaymentNum] - FK to claimpayment.ClaimPaymentNum.
14
+ * @param {number} [params.Offset] - Pagination offset for results.
15
+ * @returns {Promise<ClaimProc[]>} - A list of ClaimProcs.
16
+ */
17
+ getClaimProcs({ ProcNum, ClaimNum, PatNum, Status, ClaimPaymentNum, Offset, }?: GetClaimProcsParams): Promise<ClaimProc[]>;
18
+ }
19
+ //# sourceMappingURL=claimProcs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claimProcs.d.ts","sourceRoot":"","sources":["../../src/api/claimProcs.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,SAAS,EACT,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;;;;;;QAUI;IACS,aAAa,CAAC,EACzB,OAAO,EACP,QAAQ,EACR,MAAM,EACN,MAAM,EACN,eAAe,EACf,MAAM,GACP,GAAE,mBAAwB,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;CAYnD"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class ClaimProcs {
4
+ httpClient;
5
+ constructor(httpClient) {
6
+ this.httpClient = httpClient;
7
+ }
8
+ /**
9
+ * Fetch multiple ClaimProcs with optional filtering and pagination.
10
+ * @param {Object} params - The parameters for filtering and pagination.
11
+ * @param {number} [params.ProcNum] - FK to procedurelog.ProcNum.
12
+ * @param {number} [params.ClaimNum] - FK to claim.ClaimNum.
13
+ * @param {number} [params.PatNum] - FK to patient.PatNum.
14
+ * @param {"NotReceived" | "Received" | "Preauth" | "Adjustment" | "Supplemental" | "CapClaim" | "Estimate" | "CapComplete" | "CapEstimate" | "InsHist"} [params.Status] - Either "NotReceived", "Received", "Preauth", "Adjustment", "Supplemental", "CapClaim", "Estimate",
15
+ * @param {number} [params.ClaimPaymentNum] - FK to claimpayment.ClaimPaymentNum.
16
+ * @param {number} [params.Offset] - Pagination offset for results.
17
+ * @returns {Promise<ClaimProc[]>} - A list of ClaimProcs.
18
+ */
19
+ async getClaimProcs({ ProcNum, ClaimNum, PatNum, Status, ClaimPaymentNum, Offset, } = {}) {
20
+ const params = {
21
+ ProcNum,
22
+ ClaimNum,
23
+ PatNum,
24
+ Status,
25
+ ClaimPaymentNum,
26
+ Offset,
27
+ };
28
+ return this.httpClient.get("/claimprocs", params);
29
+ }
30
+ }
31
+ exports.default = ClaimProcs;
@@ -0,0 +1,62 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import { InsPlan, GetInsPlansParams, CreateInsPlanParams, UpdateInsPlanParams } from "../types/insPlanTypes";
3
+ export default class InsPlans {
4
+ private httpClient;
5
+ constructor(httpClient: HttpClient);
6
+ /**
7
+ * Fetch a single insplan by its ID.
8
+ * @param {number} PlanNum - The ID of the insplan.
9
+ * @returns {Promise<InsPlan>} - The insplan data.
10
+ * @throws {Error} - If `InsPlan` is not valid or the API returns an error.
11
+ */
12
+ getInsPlan(PlanNum: number): Promise<InsPlan>;
13
+ /**
14
+ * Fetch multiple insplans with optional filtering and pagination.
15
+ * @param {Object} params - The parameters for filtering and pagination.
16
+ * @param {"percentage" | "p" | "f" | "c" } [params.PlanType] - Must be one of the following: "percentage" (Percentage), "p" (PPO Percentage), "f" (Flat Copay), or "c" (Capitation). Percentage PlanTypes are stored as blank in the database.
17
+ * @param {number} [params.CarrierNum] - FK to carrier.CarrierNum.
18
+ * @param {number} [params.Offset] - Pagination offset for results.
19
+ * @returns {Promise<InsPlan[]>} - A list of InsPlans.
20
+ */
21
+ getInsPlans({ PlanType, CarrierNum, Offset, }?: GetInsPlansParams): Promise<InsPlan[]>;
22
+ /**
23
+ * This adds an InsPlan row to the database.
24
+ * @param {Object} data - The details of the insplan to create.
25
+ * @param {number} data.CarrierNum - Required. FK to carrier.CarrierNum.
26
+ * @param {string} [data.GroupName] - Optional. Typically the same as the employer. Used to identify difference in plans.
27
+ * @param {string} [data.GroupNum] - Optional. The carrier assigned identifier, unique for each plan.
28
+ * @param {string} [data.PlanNote] - Optional. Note for this plan. Same for all subscribers.
29
+ * @param {number} [data.FeeSched] - Optional. FK to feesched.FeeSchedNum. Default 0.
30
+ * @param {"" | "p" | "f" | "c"} [data.PlanType] - Optional. Either "" (Percentage), "p" (PPO Percentage), "f" (Flat Copay), or "c". Default is "" (Percentage).
31
+ * @param {number} [data.CopayFeeSched] - Optional. FK to feesched.FeeSchedNum when FeeSchedType is CoPay. Typically only used for capitation or copay plans. Default 0.
32
+ * @param {number} [data.EmployerNum] - Optional. FK to employer.EmployerNum. Default 0.
33
+ * @param {"true" | "false"} [data.CodeSubstNone] - Optional. Either "true" or "false". Set "true" if this Insurance Plan should ignore any Substitution Codes. Default "false".
34
+ * @param {"true" | "false"} [data.IsHidden] - ?: "true" | "false"; // Optional. Either "true" or "false". Default "false".
35
+ * @param {number} [data.MonthRenew] - Optional. The month, 1-12, when the insurance plan renews. It will renew on the first of the month. Default 0 to indicate calendar year.
36
+ * @param {"true" | "false"} [data.IsBlueBookEnabled] - Optional. Determines if the plan utilizes BlueBook or not. Cannot be set to true if PlanType is set to anything other than "" (Percentage). Defaults to true if AllowedFeeSchedsAutomate is set to BlueBook, otherwise defaults to false.
37
+ * @returns {Promise<InsPlan>} - The created insplan.
38
+ * @throws {Error} - If required fields are missing or the API returns an error.
39
+ */
40
+ createInsPlan({ CarrierNum, GroupName, GroupNum, PlanNote, FeeSched, PlanType, CopayFeeSched, EmployerNum, CodeSubstNone, IsHidden, MonthRenew, IsBlueBookEnabled, }: CreateInsPlanParams): Promise<InsPlan>;
41
+ /**
42
+ * Update a InsPlan.
43
+ * @param {Object} data - The details of InsPlan to update.
44
+ * @param {number} data.PlanNum - Required. Primary key.
45
+ * @param {string} [data.GroupName] - Optional. Typically the same as the employer. Used to identify difference in plans.
46
+ * @param {string} [data.GroupNum] - Optional. The carrier assigned identifier, unique for each plan.
47
+ * @param {string} [data.PlanNote] - Optional. Note for this plan. Same for all subscribers.
48
+ * @param {number} [data.FeeSched] - Optional. FK to feesched.FeeSchedNum. Default 0.
49
+ * @param {"" | "p" | "f" | "c"} [data.PlanType] - Optional. Either "" (Percentage), "p" (PPO Percentage), "f" (Flat Copay), or "c". Default is "" (Percentage).
50
+ * @param {number} [data.CopayFeeSched] - Optional. FK to feesched.FeeSchedNum when FeeSchedType is CoPay. Typically only used for capitation or copay plans. Default 0.
51
+ * @param {number} [data.EmployerNum] - Optional. FK to employer.EmployerNum. Default 0.
52
+ * @param {number} [data.CarrierNum] - Optional. FK to carrier.CarrierNum.
53
+ * @param {"true" | "false"} [data.CodeSubstNone] - Optional. Either "true" or "false". Set "true" if this Insurance Plan should ignore any Substitution Codes. Default "false".
54
+ * @param {"true" | "false"} [data.IsHidden] - ?: "true" | "false"; // Optional. Either "true" or "false". Default "false".
55
+ * @param {number} [data.MonthRenew] - Optional. The month, 1-12, when the insurance plan renews. It will renew on the first of the month. Default 0 to indicate calendar year.
56
+ * @param {"true" | "false"} [data.IsBlueBookEnabled] - Optional. Determines if the plan utilizes BlueBook or not. Cannot be set to true if PlanType is set to anything other than "" (Percentage). Defaults to true if AllowedFeeSchedsAutomate is set to BlueBook, otherwise defaults to false.
57
+ * @returns {Promise<InsPlan>} - The updated InsPlan.
58
+ * @throws {Error} - If required fields are missing or the API returns an error.
59
+ */
60
+ updateInsPlan({ PlanNum, GroupName, GroupNum, PlanNote, FeeSched, PlanType, CopayFeeSched, EmployerNum, CarrierNum, CodeSubstNone, IsHidden, MonthRenew, IsBlueBookEnabled, }: UpdateInsPlanParams): Promise<InsPlan>;
61
+ }
62
+ //# sourceMappingURL=insPlans.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insPlans.d.ts","sourceRoot":"","sources":["../../src/api/insPlans.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,OAAO,EACP,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,QAAQ;IAC3B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;OAKG;IACU,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAS1D;;;;;;;QAOI;IACS,WAAW,CAAC,EACvB,QAAQ,EACR,UAAU,EACV,MAAM,GACP,GAAE,iBAAsB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAU9C;;;;;;;;;;;;;;;;;OAiBG;IACU,aAAa,CAAC,EACzB,UAAU,EACV,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,WAAW,EACX,aAAa,EACb,QAAQ,EACR,UAAU,EACV,iBAAiB,GAClB,EAAG,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAqB1C;;;;;;;;;;;;;;;;;;OAkBG;IACU,aAAa,CAAC,EACzB,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,WAAW,EACX,UAAU,EACV,aAAa,EACb,QAAQ,EACR,UAAU,EACV,iBAAiB,GAClB,EAAG,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;CAoB3C"}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class InsPlans {
4
+ httpClient;
5
+ constructor(httpClient) {
6
+ this.httpClient = httpClient;
7
+ }
8
+ /**
9
+ * Fetch a single insplan by its ID.
10
+ * @param {number} PlanNum - The ID of the insplan.
11
+ * @returns {Promise<InsPlan>} - The insplan data.
12
+ * @throws {Error} - If `InsPlan` is not valid or the API returns an error.
13
+ */
14
+ async getInsPlan(PlanNum) {
15
+ if (!PlanNum || typeof PlanNum !== "number") {
16
+ throw new Error("Invalid parameter: PlanNum must be a valid number.");
17
+ }
18
+ return await this.httpClient.get(`/insplans/${PlanNum}`);
19
+ }
20
+ /**
21
+ * Fetch multiple insplans with optional filtering and pagination.
22
+ * @param {Object} params - The parameters for filtering and pagination.
23
+ * @param {"percentage" | "p" | "f" | "c" } [params.PlanType] - Must be one of the following: "percentage" (Percentage), "p" (PPO Percentage), "f" (Flat Copay), or "c" (Capitation). Percentage PlanTypes are stored as blank in the database.
24
+ * @param {number} [params.CarrierNum] - FK to carrier.CarrierNum.
25
+ * @param {number} [params.Offset] - Pagination offset for results.
26
+ * @returns {Promise<InsPlan[]>} - A list of InsPlans.
27
+ */
28
+ async getInsPlans({ PlanType, CarrierNum, Offset, } = {}) {
29
+ const params = {
30
+ PlanType,
31
+ CarrierNum,
32
+ Offset,
33
+ };
34
+ return this.httpClient.get("/insplans", params);
35
+ }
36
+ /**
37
+ * This adds an InsPlan row to the database.
38
+ * @param {Object} data - The details of the insplan to create.
39
+ * @param {number} data.CarrierNum - Required. FK to carrier.CarrierNum.
40
+ * @param {string} [data.GroupName] - Optional. Typically the same as the employer. Used to identify difference in plans.
41
+ * @param {string} [data.GroupNum] - Optional. The carrier assigned identifier, unique for each plan.
42
+ * @param {string} [data.PlanNote] - Optional. Note for this plan. Same for all subscribers.
43
+ * @param {number} [data.FeeSched] - Optional. FK to feesched.FeeSchedNum. Default 0.
44
+ * @param {"" | "p" | "f" | "c"} [data.PlanType] - Optional. Either "" (Percentage), "p" (PPO Percentage), "f" (Flat Copay), or "c". Default is "" (Percentage).
45
+ * @param {number} [data.CopayFeeSched] - Optional. FK to feesched.FeeSchedNum when FeeSchedType is CoPay. Typically only used for capitation or copay plans. Default 0.
46
+ * @param {number} [data.EmployerNum] - Optional. FK to employer.EmployerNum. Default 0.
47
+ * @param {"true" | "false"} [data.CodeSubstNone] - Optional. Either "true" or "false". Set "true" if this Insurance Plan should ignore any Substitution Codes. Default "false".
48
+ * @param {"true" | "false"} [data.IsHidden] - ?: "true" | "false"; // Optional. Either "true" or "false". Default "false".
49
+ * @param {number} [data.MonthRenew] - Optional. The month, 1-12, when the insurance plan renews. It will renew on the first of the month. Default 0 to indicate calendar year.
50
+ * @param {"true" | "false"} [data.IsBlueBookEnabled] - Optional. Determines if the plan utilizes BlueBook or not. Cannot be set to true if PlanType is set to anything other than "" (Percentage). Defaults to true if AllowedFeeSchedsAutomate is set to BlueBook, otherwise defaults to false.
51
+ * @returns {Promise<InsPlan>} - The created insplan.
52
+ * @throws {Error} - If required fields are missing or the API returns an error.
53
+ */
54
+ async createInsPlan({ CarrierNum, GroupName, GroupNum, PlanNote, FeeSched, PlanType, CopayFeeSched, EmployerNum, CodeSubstNone, IsHidden, MonthRenew, IsBlueBookEnabled, }) {
55
+ if (!CarrierNum) {
56
+ throw new Error("Invalid data: CarrierNum is required.");
57
+ }
58
+ return this.httpClient.post("/insplans", {
59
+ CarrierNum,
60
+ GroupName,
61
+ GroupNum,
62
+ PlanNote,
63
+ FeeSched,
64
+ PlanType,
65
+ CopayFeeSched,
66
+ EmployerNum,
67
+ CodeSubstNone,
68
+ IsHidden,
69
+ MonthRenew,
70
+ IsBlueBookEnabled,
71
+ });
72
+ }
73
+ /**
74
+ * Update a InsPlan.
75
+ * @param {Object} data - The details of InsPlan to update.
76
+ * @param {number} data.PlanNum - Required. Primary key.
77
+ * @param {string} [data.GroupName] - Optional. Typically the same as the employer. Used to identify difference in plans.
78
+ * @param {string} [data.GroupNum] - Optional. The carrier assigned identifier, unique for each plan.
79
+ * @param {string} [data.PlanNote] - Optional. Note for this plan. Same for all subscribers.
80
+ * @param {number} [data.FeeSched] - Optional. FK to feesched.FeeSchedNum. Default 0.
81
+ * @param {"" | "p" | "f" | "c"} [data.PlanType] - Optional. Either "" (Percentage), "p" (PPO Percentage), "f" (Flat Copay), or "c". Default is "" (Percentage).
82
+ * @param {number} [data.CopayFeeSched] - Optional. FK to feesched.FeeSchedNum when FeeSchedType is CoPay. Typically only used for capitation or copay plans. Default 0.
83
+ * @param {number} [data.EmployerNum] - Optional. FK to employer.EmployerNum. Default 0.
84
+ * @param {number} [data.CarrierNum] - Optional. FK to carrier.CarrierNum.
85
+ * @param {"true" | "false"} [data.CodeSubstNone] - Optional. Either "true" or "false". Set "true" if this Insurance Plan should ignore any Substitution Codes. Default "false".
86
+ * @param {"true" | "false"} [data.IsHidden] - ?: "true" | "false"; // Optional. Either "true" or "false". Default "false".
87
+ * @param {number} [data.MonthRenew] - Optional. The month, 1-12, when the insurance plan renews. It will renew on the first of the month. Default 0 to indicate calendar year.
88
+ * @param {"true" | "false"} [data.IsBlueBookEnabled] - Optional. Determines if the plan utilizes BlueBook or not. Cannot be set to true if PlanType is set to anything other than "" (Percentage). Defaults to true if AllowedFeeSchedsAutomate is set to BlueBook, otherwise defaults to false.
89
+ * @returns {Promise<InsPlan>} - The updated InsPlan.
90
+ * @throws {Error} - If required fields are missing or the API returns an error.
91
+ */
92
+ async updateInsPlan({ PlanNum, GroupName, GroupNum, PlanNote, FeeSched, PlanType, CopayFeeSched, EmployerNum, CarrierNum, CodeSubstNone, IsHidden, MonthRenew, IsBlueBookEnabled, }) {
93
+ if (!PlanNum || typeof PlanNum !== "number") {
94
+ throw new Error("Invalid data: A Valid PlanNum is required.");
95
+ }
96
+ return this.httpClient.put(`/insplans/${PlanNum}`, {
97
+ GroupName,
98
+ GroupNum,
99
+ PlanNote,
100
+ FeeSched,
101
+ PlanType,
102
+ CopayFeeSched,
103
+ EmployerNum,
104
+ CarrierNum,
105
+ CodeSubstNone,
106
+ IsHidden,
107
+ MonthRenew,
108
+ IsBlueBookEnabled,
109
+ });
110
+ }
111
+ }
112
+ exports.default = InsPlans;
@@ -37,10 +37,10 @@ export default class PatPlans {
37
37
  */
38
38
  updatePatPlan({ PatPlanNum, InsSubNum, Ordinal, Relationship, PatID, }: UpdatePatPlanParams): Promise<PatPlan>;
39
39
  /**
40
- * Delete an PatPlan entry.
40
+ * Delete a PatPlan entry.
41
41
  * This is called "Drop" in the Open Dental UI. This removes a PatPlan row from the database, indicating no coverage, but does not affect the InsPlan itself.
42
42
  * @param {number} PatPlanNum - Required: The unique identifier of the inssub to delete.
43
- * @returns {Promise<void>} - Resolves when the discount plan sub is deleted.
43
+ * @returns {Promise<void>} - Resolves when the PatPlan is deleted.
44
44
  * @throws {Error} - If `PatPlanNum` is not valid or the API returns an error.
45
45
  */
46
46
  deletePatPlan(PatPlanNum: number): Promise<void>;
@@ -67,10 +67,10 @@ class PatPlans {
67
67
  });
68
68
  }
69
69
  /**
70
- * Delete an PatPlan entry.
70
+ * Delete a PatPlan entry.
71
71
  * This is called "Drop" in the Open Dental UI. This removes a PatPlan row from the database, indicating no coverage, but does not affect the InsPlan itself.
72
72
  * @param {number} PatPlanNum - Required: The unique identifier of the inssub to delete.
73
- * @returns {Promise<void>} - Resolves when the discount plan sub is deleted.
73
+ * @returns {Promise<void>} - Resolves when the PatPlan is deleted.
74
74
  * @throws {Error} - If `PatPlanNum` is not valid or the API returns an error.
75
75
  */
76
76
  async deletePatPlan(PatPlanNum) {
@@ -18,6 +18,9 @@ import PatPlans from "./api/patPlans";
18
18
  import LabCases from "./api/labCases";
19
19
  import Referrals from "./api/referrals";
20
20
  import RefAttaches from "./api/refAttaches";
21
+ import InsPlans from "./api/insPlans";
22
+ import Benefits from "./api/benefits";
23
+ import ClaimProcs from "./api/claimProcs";
21
24
  declare class OpenDental {
22
25
  private static httpClient;
23
26
  /**
@@ -101,9 +104,21 @@ declare class OpenDental {
101
104
  */
102
105
  static Referrals(): Referrals;
103
106
  /**
104
- * Create a new instance of the LabCases API.
107
+ * Create a new instance of the RefAttaches API.
105
108
  */
106
109
  static RefAttaches(): RefAttaches;
110
+ /**
111
+ * Create a new instance of the InsPlans API.
112
+ */
113
+ static InsPlans(): InsPlans;
114
+ /**
115
+ * Create a new instance of the Benefits API.
116
+ */
117
+ static Benefits(): Benefits;
118
+ /**
119
+ * Create a new instance of the ClaimProcs API.
120
+ */
121
+ static ClaimProcs(): ClaimProcs;
107
122
  }
108
123
  export { OpenDental };
109
124
  //# 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,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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;IAOzB;;OAEG;WACW,gBAAgB;IAO9B;;OAEG;WACW,aAAa;IAO3B;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,WAAW;IAOzB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,UAAU;CAMzB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -25,6 +25,9 @@ const patPlans_1 = __importDefault(require("./api/patPlans"));
25
25
  const labCases_1 = __importDefault(require("./api/labCases"));
26
26
  const referrals_1 = __importDefault(require("./api/referrals"));
27
27
  const refAttaches_1 = __importDefault(require("./api/refAttaches"));
28
+ const insPlans_1 = __importDefault(require("./api/insPlans"));
29
+ const benefits_1 = __importDefault(require("./api/benefits"));
30
+ const claimProcs_1 = __importDefault(require("./api/claimProcs"));
28
31
  class OpenDental {
29
32
  static httpClient;
30
33
  /**
@@ -210,7 +213,7 @@ class OpenDental {
210
213
  return new referrals_1.default(this.httpClient);
211
214
  }
212
215
  /**
213
- * Create a new instance of the LabCases API.
216
+ * Create a new instance of the RefAttaches API.
214
217
  */
215
218
  static RefAttaches() {
216
219
  if (!this.httpClient) {
@@ -218,5 +221,32 @@ class OpenDental {
218
221
  }
219
222
  return new refAttaches_1.default(this.httpClient);
220
223
  }
224
+ /**
225
+ * Create a new instance of the InsPlans API.
226
+ */
227
+ static InsPlans() {
228
+ if (!this.httpClient) {
229
+ throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
230
+ }
231
+ return new insPlans_1.default(this.httpClient);
232
+ }
233
+ /**
234
+ * Create a new instance of the Benefits API.
235
+ */
236
+ static Benefits() {
237
+ if (!this.httpClient) {
238
+ throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
239
+ }
240
+ return new benefits_1.default(this.httpClient);
241
+ }
242
+ /**
243
+ * Create a new instance of the ClaimProcs API.
244
+ */
245
+ static ClaimProcs() {
246
+ if (!this.httpClient) {
247
+ throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
248
+ }
249
+ return new claimProcs_1.default(this.httpClient);
250
+ }
221
251
  }
222
252
  exports.OpenDental = OpenDental;
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @see https://www.opendental.com/site/apibenefits.html
3
+ */
4
+ export interface Benefit {
5
+ BenefitNum?: number;
6
+ PlanNum?: number;
7
+ PatPlanNum?: number;
8
+ CovCatNum?: number;
9
+ BenefitType?: "ActiveCoverage" | "CoInsurance" | "Deductible" | "CoPayment" | "Exclusions" | "Limitations" | "WaitingPeriod";
10
+ Percent?: number;
11
+ MonetaryAmt?: number;
12
+ TimePeriod?: "None" | "ServiceYear" | "CalendarYear" | "Lifetime" | "Years" | "NumberInLast12Months";
13
+ QuantityQualifier?: "None" | "NumberOfServices" | "AgeLimit" | "Visits" | "Years" | "Months";
14
+ Quantity?: number;
15
+ CodeNum?: number;
16
+ procCode?: string;
17
+ CoverageLevel?: "None" | "Individual" | "Family";
18
+ SecDateTEntry?: string;
19
+ SecDateTEdit?: string;
20
+ CodeGroupNum?: number;
21
+ }
22
+ /**
23
+ * Gets a list of PatPlans that meet a set of search criteria.
24
+ * @see https://www.opendental.com/site/apibenefits.html
25
+ */
26
+ export interface GetBenefitsParams {
27
+ PlanNum?: number;
28
+ PatPlanNum?: number;
29
+ Offset?: number;
30
+ }
31
+ /**
32
+ * Parameters for creating a new insplan.
33
+ * @see https://www.opendental.com/site/apibenefits.html
34
+ */
35
+ export interface CreateBenefitParams {
36
+ PlanNum?: number;
37
+ PatPlanNum?: number;
38
+ BenefitType: "ActiveCoverage" | "CoInsurance" | "Deductible" | "CoPayment" | "Exclusions" | "Limitations" | "WaitingPeriod";
39
+ CoverageLevel: "None" | "Individual" | "Family";
40
+ CovCatNum?: number;
41
+ Percent?: number;
42
+ MonetaryAmt?: number;
43
+ TimePeriod?: "None" | "ServiceYear" | "CalendarYear" | "Lifetime" | "Years" | "NumberInLast12Months";
44
+ QuantityQualifier?: "None" | "NumberOfServices" | "AgeLimit" | "Visits" | "Years" | "Months";
45
+ Quantity?: number;
46
+ CodeNum?: number;
47
+ procCode?: string;
48
+ CodeGroupNum?: number;
49
+ }
50
+ /**
51
+ * Parameters to update an insplan.
52
+ * @see https://www.opendental.com/site/apibenefits.html
53
+ */
54
+ export interface UpdateBenefitParams {
55
+ BenefitNum: number;
56
+ CovCatNum?: number;
57
+ BenefitType?: "ActiveCoverage" | "CoInsurance" | "Deductible" | "CoPayment" | "Exclusions" | "Limitations" | "WaitingPeriod";
58
+ Percent?: number;
59
+ MonetaryAmt?: number;
60
+ TimePeriod?: "None" | "ServiceYear" | "CalendarYear" | "Lifetime" | "Years" | "NumberInLast12Months";
61
+ QuantityQualifier?: "None" | "NumberOfServices" | "AgeLimit" | "Visits" | "Years" | "Months";
62
+ Quantity?: number;
63
+ CodeNum?: number;
64
+ procCode?: string;
65
+ CoverageLevel?: "None" | "Individual" | "Family";
66
+ }
67
+ //# sourceMappingURL=benefitTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"benefitTypes.d.ts","sourceRoot":"","sources":["../../src/types/benefitTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,gBAAgB,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,eAAe,CAAC;IAC7H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