@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,70 @@
1
+ /**
2
+ * @see https://www.opendental.com/site/apibenefits.html
3
+ */
4
+ export interface Benefit {
5
+ BenefitNum?: number; // Primary Key
6
+ PlanNum?: number; // FK to InsPlan.PlanNum.
7
+ PatPlanNum?: number; // FK to PatPlan.PlanNum.
8
+ CovCatNum?: number; // FK to covcat.CovCatNum.
9
+ BenefitType?: "ActiveCoverage" | "CoInsurance" | "Deductible" | "CoPayment" | "Exclusions" | "Limitations" | "WaitingPeriod"; // Either "ActiveCoverage", "CoInsurance", "Deductible", "CoPayment", "Exclusions", "Limitations", or "WaitingPeriod".
10
+ Percent?: number; // Only allowed if BenefitType is "CoInsurance". Must be a value between 0 and 100. Default -1 (Indicating empty).
11
+ MonetaryAmt?: number; // Only used if BenefitType is "CoPayment", "Limitations", or "Deductible". Default -1.0 (Indicating empty).
12
+ TimePeriod?: "None" | "ServiceYear" | "CalendarYear" | "Lifetime" | "Years" | "NumberInLast12Months"; // Either "None", "ServiceYear", "CalendarYear", "Lifetime", "Years", or "NumberInLast12Months". Default "CalendarYear".
13
+ QuantityQualifier?: "None" | "NumberOfServices" | "AgeLimit" | "Visits" | "Years" | "Months"; // Either "None", "NumberOfServices", "AgeLimit", "Visits", "Years", or "Months". Default "None". Must be "Months" or "Years" if BenefitType is "WaitingPeriod".
14
+ Quantity?: number; // Must be a value between 0 and 100. Default 0. Must be a value greater than 0 if QuantityQualifier is "AgeLimit".
15
+ CodeNum?: number; // FK to procedurecode.CodeNum. Only allowed if CovCatNum is 0. Will be used over procCode if both are specified. Default 0.
16
+ procCode?: string; // FK to procedurecode.ProcCode. Only allowed if CovCatNum is 0. Default empty string.
17
+ CoverageLevel?: "None" | "Individual" | "Family"; // Either "None", "Individual", or "Family".
18
+ SecDateTEntry?: string; // String in "yyyy-MM-dd HH:mm:ss" format
19
+ SecDateTEdit?: string; // String in "yyyy-MM-dd HH:mm:ss" format
20
+ CodeGroupNum?: number; // (Added in version 23.2.62) FK to codegroup.CodeGroupNum. The group of procedure codes that apply to this Frequency Limitation benefit.
21
+ }
22
+
23
+ /**
24
+ * Gets a list of PatPlans that meet a set of search criteria.
25
+ * @see https://www.opendental.com/site/apibenefits.html
26
+ */
27
+ export interface GetBenefitsParams {
28
+ PlanNum?: number; // FK to InsPlan.PlanNum.
29
+ PatPlanNum?: number; // FK to PatPlan.PatPlanNum.
30
+ Offset?: number; // Pagination offset for results
31
+ }
32
+
33
+ /**
34
+ * Parameters for creating a new insplan.
35
+ * @see https://www.opendental.com/site/apibenefits.html
36
+ */
37
+ export interface CreateBenefitParams {
38
+ PlanNum?: number; // This or PatPlanNum is required. FK to InsPlan.PlanNum.
39
+ PatPlanNum?: number; // This or PlanNum is required. FK to PatPlan.PlanNum.
40
+ BenefitType: "ActiveCoverage" | "CoInsurance" | "Deductible" | "CoPayment" | "Exclusions" | "Limitations" | "WaitingPeriod"; // Required. Either "ActiveCoverage", "CoInsurance", "Deductible", "CoPayment", "Exclusions", "Limitations", or "WaitingPeriod".
41
+ CoverageLevel: "None" | "Individual" | "Family"; // Required. Either "None", "Individual", or "Family".
42
+ CovCatNum?: number; // Optional. FK to covcat.CovCatNum.
43
+ Percent?: number; // Optional. Only allowed if BenefitType is "CoInsurance". Must be a value between 0 and 100. Default -1 (Indicating empty).
44
+ MonetaryAmt?: number; // Optional. Only used if BenefitType is "CoPayment", "Limitations", or "Deductible". Default -1.0 (Indicating empty).
45
+ TimePeriod?: "None" | "ServiceYear" | "CalendarYear" | "Lifetime" | "Years" | "NumberInLast12Months"; // Optional. Either "None", "ServiceYear", "CalendarYear", "Lifetime", "Years", or "NumberInLast12Months". Default "CalendarYear".
46
+ QuantityQualifier?: "None" | "NumberOfServices" | "AgeLimit" | "Visits" | "Years" | "Months"; // Optional. Either "None", "NumberOfServices", "AgeLimit", "Visits", "Years", or "Months". Default "None". Must be "Months" or "Years" if BenefitType is "WaitingPeriod".
47
+ Quantity?: number; // Optional. Must be a value between 0 and 100. Default 0. Must be a value greater than 0 if QuantityQualifier is "AgeLimit".
48
+ CodeNum?: number; // Optional. FK to procedurecode.CodeNum. Only allowed if CovCatNum is 0. Will be used over procCode if both are specified. Default 0.
49
+ procCode?: string; // Optional. FK to procedurecode.ProcCode. Only allowed if CovCatNum is 0. Default empty string.
50
+ CodeGroupNum?: number; // Optional. (Added in version 23.2.62) FK to codegroup.CodeGroupNum. The group of procedure codes that apply to this Frequency Limitation benefit.
51
+ }
52
+
53
+ /**
54
+ * Parameters to update an insplan.
55
+ * @see https://www.opendental.com/site/apibenefits.html
56
+ */
57
+ export interface UpdateBenefitParams {
58
+ BenefitNum: number; // Required in URL. Primary Key.
59
+ CovCatNum?: number; // Optional. FK to covcat.CovCatNum.
60
+ BenefitType?: "ActiveCoverage" | "CoInsurance" | "Deductible" | "CoPayment" | "Exclusions" | "Limitations" | "WaitingPeriod"; // Optional. Either "ActiveCoverage", "CoInsurance", "Deductible", "CoPayment", "Exclusions", "Limitations", or "WaitingPeriod".
61
+ Percent?: number; // Optional. Only allowed if BenefitType is "CoInsurance". Must be a value between 0 and 100. Default -1 (Indicating empty).
62
+ MonetaryAmt?: number; // Optional. Only used if BenefitType is "CoPayment", "Limitations", or "Deductible". Default -1.0 (Indicating empty).
63
+ TimePeriod?: "None" | "ServiceYear" | "CalendarYear" | "Lifetime" | "Years" | "NumberInLast12Months"; // Optional. Either "None", "ServiceYear", "CalendarYear", "Lifetime", "Years", or "NumberInLast12Months". Default "CalendarYear".
64
+ QuantityQualifier?: "None" | "NumberOfServices" | "AgeLimit" | "Visits" | "Years" | "Months"; // Optional. Either "None", "NumberOfServices", "AgeLimit", "Visits", "Years", or "Months". Default "None". Must be "Months" or "Years" if BenefitType is "WaitingPeriod".
65
+ Quantity?: number; // Optional. Must be a value between 0 and 100. Default 0. Must be a value greater than 0 if QuantityQualifier is "AgeLimit".
66
+ CodeNum?: number; // Optional. FK to procedurecode.CodeNum. Only allowed if CovCatNum is 0. Will be used over procCode if both are specified.
67
+ procCode?: string; // Optional. FK to procedurecode.ProcCode. Only allowed if CovCatNum is 0. Default empty string.
68
+ CoverageLevel?: "None" | "Individual" | "Family"; // Optional. Either "None", "Individual", or "Family".
69
+ }
70
+
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Represents a ClaimProc in the Open Dental system.
3
+ * @see https://www.opendental.com/site/apiclaimprocs.html
4
+ */
5
+ export interface ClaimProc {
6
+ ClaimProcNum?: number; // Primary Key.
7
+ ProcNum?: number; // FK to procedurelog.ProcNum.
8
+ ClaimNum?: number; // FK to claim.ClaimNum.
9
+ PatNum?: number; // FK to patient.PatNum.
10
+ ProvNum?: number; // ProvNum of a provider. Follows the ProcProvChangesClaimProcWithClaim preference. See Claimproc Provider for more information.,
11
+ FeeBilled?: number; // The amount billed to insurance.
12
+ InsPayEst?: number; // The estimated amount that insurance will pay.
13
+ DedApplied?: number; // Deductible applied to this procedure only. DedApplied will always match the DedEstOverride value when ClaimProc status is NotReceived or Preauth.
14
+ Status?: "NotReceived" | "Received" | "Preauth" | "Adjustment" | "Supplemental" | "CapClaim" | "Estimate" | "CapComplete" | "CapEstimate" | "InsHist"; // Either "NotReceived", "Received", "Preauth", "Adjustment", "Supplemental", "CapClaim", "Estimate", "CapComplete", "CapEstimate", or "InsHist".
15
+ InsPayAmt?: number; // Amount insurance actually paid. Cannot be updated once the procedure is attached to a check.
16
+ Remarks?: string; // The remarks that insurance sends in the EOB about procedures. Overwrites any existing Remarks.
17
+ ClaimPaymentNum?: number; // ClaimPaymentNum of a partial claimpayment. Attaches this ClaimProc, alongside any other able ClaimProcs on the same Claim, to the specified ClaimPayment. Can supply 0 to detach this ClaimProc, and all other ClaimProcs from the same claim that are on the same ClaimPayment. See Finalize Insurance Payment and Batch Insurance Payment for more information.
18
+ PlanNum?: number; // FK to insplan.plannum.
19
+ DateCP?: string; // 2021-02-16,
20
+ WriteOff?: number; // Amount not covered by insurance which is written off.
21
+ CodeSent?: string; // The procedure code that was sent to insurance. Usually it is the same as the actual procedure code, but may be different if using alternate codes (for example: Medicaid), medical codes, or custom codes with suffixes that get removed before being sent. See also Incorrect Procedures on Claim. Use ProcedureCodes GET to get a list of valid codes.
22
+ AllowedOverride?: number; //
23
+ Percentage?: number; // The percentage that insurance is expected to cover.
24
+ PercentOverride?: number; // The percentage that insurance is expected to cover. A number between 0 and 100. Use -1 to indicate no override.
25
+ CopayAmt?: number; // Based on the insurance plan's copay fee schedule, and subtracted from the amount that insurance will pay.
26
+ NoBillIns?: true | false; // false,
27
+ PaidOtherIns?: number; // 0.0,
28
+ BaseEst?: number; // 88.0,
29
+ CopayOverride?: number; // Based on the insurance plan's copay fee schedule, and subtracted from the amount that insurance will pay. Use -1 to indicate no override.
30
+ ProcDate?: string; // String in "yyyy-MM-dd" format.
31
+ DateEntry?: string; // String in "yyyy-MM-dd" format.
32
+ DedEst?: number; // The amount that the patient must pay each year before insurance kicks in, and always subtracted before Percentage is calculated.
33
+ DedEstOverride?: number; // The amount that the patient must pay each year before insurance kicks in, and always subtracted before Percentage is calculated. Use -1 to indicate no override.
34
+ InsEstTotal?: number; // 88.0,
35
+ InsEstTotalOverride?: number; // The estimated amount that insurance will pay. If the claimproc is already attached to a claim, this will not affect the patient balance. Use -1 to indicate no override.
36
+ PaidOtherInsOverride?: number; // Adds up all amounts paid by insurance plans that are lower in order. Use -1 to indicate no override.
37
+ EstimateNote?: string; //
38
+ WriteOffEst?: number; // WriteOff amount usually only used for PPOs.
39
+ WriteOffEstOverride?: number; // WriteOff amount usually only used for PPOs. Use -1 to indicate no override.
40
+ ClinicNum?: number; // FK to clinics
41
+ InsSubNum?: number; // FK to inssub.inssubnum
42
+ PaymentRow?: number; //
43
+ PayPlanNum?: number; // FK to pay plans
44
+ ClaimPaymentTracking?: number; // Used to document information about the payment of the procedure. Useful to track why payment was rejected. See also Definitions: Claim Payment Tracking. Definition.DefNum where definition.Category=36.
45
+ claimPaymentTracking?: string; // Used to document information about the payment of the procedure. Useful to track why payment was rejected. See also Definitions: Claim Payment Tracking. Definition.DefNum where definition.Category=36.
46
+ SecUserNumEntry?: number; //
47
+ SecDateEntry?: string; // String in "yyyy-MM-dd" format.
48
+ SecDateTEdit?: string; // String in "yyyy-MM-dd HH:mm:ss" format.
49
+ DateSuppReceived?: string; // String in "yyyy-MM-dd" format.
50
+ DateInsFinalized?: string; // String in "yyyy-MM-dd" format.
51
+ IsTransfer?: "true" | "false"; // false,
52
+ ClaimAdjReasonCodes?: string; //
53
+ }
54
+
55
+ /**
56
+ * Gets all ClaimProcs based on provided parameters. If no parameter is given, it will get all ClaimProcs ordered by ClaimProcNum.
57
+ * @see https://www.opendental.com/site/apiclaimprocs.html
58
+ */
59
+ export interface GetClaimProcsParams {
60
+ ProcNum?: number; // Optional. FK to procedurelog.ProcNum.
61
+ ClaimNum?: number; // Optional. FK to claim.ClaimNum.
62
+ PatNum?: number; // Optional. FK to patient.PatNum.
63
+ Status?: "NotReceived" | "Received" | "Preauth" | "Adjustment" | "Supplemental" | "CapClaim" | "Estimate" | "CapComplete" | "CapEstimate" | "InsHist"; // Either "NotReceived", "Received", "Preauth", "Adjustment", "Supplemental", "CapClaim", "Estimate", "CapComplete", "CapEstimate", or "InsHist".
64
+ ClaimPaymentNum?: number; // Optional. FK to claimpayment.ClaimPaymentNum.
65
+ Offset?: number; // Pagination offset for results
66
+ }
67
+
68
+
@@ -0,0 +1,72 @@
1
+ /**
2
+ * @see https://www.opendental.com/site/apiinsplans.html
3
+ */
4
+ export interface InsPlan {
5
+ PlanNum?: number; // PK
6
+ GroupName?: string; // Typically the same as the employer. Used to identify difference in plans.
7
+ GroupNum?: string; //
8
+ PlanNote?: string; // Note for this plan. Same for all subscribers.
9
+ FeeSched?: number; // FK to feesched.FeeSchedNum. Default 0.
10
+ PlanType?: "" | "p" | "f" | "c"; // Either "" (Percentage), "p" (PPO Percentage), "f" (Flat Copay), or "c".
11
+ ClaimFormNum?: number; // A patient ID which will override the subscriber ID on eclaims. Also used for Canada.
12
+ CopayFeeSched?: number; // FK to feesched.FeeSchedNum when FeeSchedType is CoPay. Typically only used for capitation or copay plans. Default 0.
13
+ EmployerNum?: number; // FK to employer.EmployerNum. Default 0.
14
+ CarrierNum?: number; // FK to carrier.CarrierNum.
15
+ CodeSubstNone?: "true" | "false"; // Either "true" or "false". Set "true" if this Insurance Plan should ignore any Substitution Codes. Default "false".
16
+ IsHidden?: "true" | "false"; // Either "true" or "false". Default "false".
17
+ MonthRenew?: number; // The month, 1-12, when the insurance plan renews. It will renew on the first of the month. Default 0 to indicate calendar year.
18
+ SecUserNumEntry?: number; //
19
+ SecDateEntry?: string; // String in "yyyy-MM-dd" format
20
+ SecDateTEdit?: string; // String in "yyyy-MM-dd HH:mm:ss" format
21
+ IsBlueBookEnabled?: "true" | "false"; // 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.
22
+ }
23
+
24
+ /**
25
+ * Gets a list of PatPlans that meet a set of search criteria.
26
+ * @see https://www.opendental.com/site/apiinsplans.html
27
+ */
28
+ export interface GetInsPlansParams {
29
+ PlanType?: "percentage" | "p" | "f" | "c"; // 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.
30
+ CarrierNum?: number; // FK to carrier.CarrierNum.
31
+ Offset?: number; // Pagination offset for results
32
+ }
33
+
34
+ /**
35
+ * Parameters for creating a new insplan.
36
+ * @see https://www.opendental.com/site/apiinsplans.html
37
+ */
38
+ export interface CreateInsPlanParams {
39
+ CarrierNum: number; // Required. FK to carrier.CarrierNum.
40
+ GroupName?: string; // Optional. Typically the same as the employer. Used to identify difference in plans.
41
+ GroupNum?: string; // Optional. The carrier assigned identifier, unique for each plan.
42
+ PlanNote?: string; // Optional. Note for this plan. Same for all subscribers.
43
+ FeeSched?: number; // Optional. FK to feesched.FeeSchedNum. Default 0.
44
+ PlanType?: "" | "p" | "f" | "c"; // Optional. Either "" (Percentage), "p" (PPO Percentage), "f" (Flat Copay), or "c". Default is "" (Percentage).
45
+ CopayFeeSched?: number; // Optional. FK to feesched.FeeSchedNum when FeeSchedType is CoPay. Typically only used for capitation or copay plans. Default 0.
46
+ EmployerNum?: number; // Optional. FK to employer.EmployerNum. Default 0.
47
+ CodeSubstNone?: "true" | "false"; // Optional. Either "true" or "false". Set "true" if this Insurance Plan should ignore any Substitution Codes. Default "false".
48
+ IsHidden?: "true" | "false"; // Optional. Either "true" or "false". Default "false".
49
+ MonthRenew?: number; // 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
+ IsBlueBookEnabled?: "true" | "false"; // 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
+ }
52
+
53
+ /**
54
+ * Parameters to update an insplan.
55
+ * @see https://www.opendental.com/site/apiinsplans.html
56
+ */
57
+ export interface UpdateInsPlanParams {
58
+ PlanNum: number; // Required. PK
59
+ GroupName?: string; // Optional. Typically the same as the employer. Used to identify difference in plans.
60
+ GroupNum?: string; // Optional. The carrier assigned identifier, unique for each plan.
61
+ PlanNote?: string; // Optional. Note for this plan. Same for all subscribers.
62
+ FeeSched?: number; // Optional. FK to feesched.FeeSchedNum. Default 0.
63
+ PlanType?: "" | "p" | "f" | "c"; // Optional. Either "" (Percentage), "p" (PPO Percentage), "f" (Flat Copay), or "c". Default is "" (Percentage).
64
+ CopayFeeSched?: number; // Optional. FK to feesched.FeeSchedNum when FeeSchedType is CoPay. Typically only used for capitation or copay plans. Default 0.
65
+ EmployerNum?: number; // Optional. FK to employer.EmployerNum. Default 0.
66
+ CarrierNum: number; // Optional. FK to carrier.CarrierNum.
67
+ CodeSubstNone?: "true" | "false"; // Optional. Either "true" or "false". Set "true" if this Insurance Plan should ignore any Substitution Codes. Default "false".
68
+ IsHidden?: "true" | "false"; // Optional. Either "true" or "false". Default "false".
69
+ MonthRenew?: number; // 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.
70
+ IsBlueBookEnabled?: "true" | "false"; // 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.
71
+ }
72
+
@@ -13,7 +13,7 @@ export interface InsSub {
13
13
  ReleaseInfo?: "true" | "false"; //
14
14
  AssignBen?: "true" | "false"; //
15
15
  SubscNote?: string; //
16
- SecDateTEdit?: string; //String in "yyyy-MM-dd HH:mm:ss" format
16
+ SecDateTEdit?: string; // String in "yyyy-MM-dd HH:mm:ss" format
17
17
  }
18
18
 
19
19
  /**