@rinse-dental/open-dental 2.5.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/claimProcs.d.ts +27 -1
- package/dist/api/claimProcs.d.ts.map +1 -1
- package/dist/api/claimProcs.js +49 -0
- package/dist/types/claimProcTypes.d.ts +30 -0
- package/dist/types/claimProcTypes.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/claimProcs.ts +73 -0
- package/src/types/claimProcTypes.ts +31 -0
package/dist/api/claimProcs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import HttpClient from "../utils/httpClient";
|
|
2
|
-
import { ClaimProc, GetClaimProcsParams } from "../types/claimProcTypes";
|
|
2
|
+
import { ClaimProc, GetClaimProcsParams, updateClaimProcParams } from "../types/claimProcTypes";
|
|
3
3
|
export default class ClaimProcs {
|
|
4
4
|
private httpClient;
|
|
5
5
|
constructor(httpClient: HttpClient);
|
|
@@ -15,5 +15,31 @@ export default class ClaimProcs {
|
|
|
15
15
|
* @returns {Promise<ClaimProc[]>} - A list of ClaimProcs.
|
|
16
16
|
*/
|
|
17
17
|
getClaimProcs({ ProcNum, ClaimNum, PatNum, Status, ClaimPaymentNum, Offset, }?: GetClaimProcsParams): Promise<ClaimProc[]>;
|
|
18
|
+
/**
|
|
19
|
+
* Updates an existing procedure. When changing procCode, the treatment area of the current and passed in procedure codes must match. Attempting to pass in empty strings for ToothNum, Surf, and ToothRange will be silently ignored. The CodeNum, procCode, Discount, ToothNum, Surf, and ToothRange fields cannot be updated on procedures with a ProcStatus of C. If the procedurelog is associated with certain appointments, claims, or orthocases, then some fields cannot be updated. Procedure code default notes will not be used.
|
|
20
|
+
* ProcedureLogs associated with adjustments, appointments, payments, payplancharges, or paysplits are updated exactly as in Open Dental.
|
|
21
|
+
* @param {Object} data - The updated details of the procedure log.
|
|
22
|
+
* @param {number} data.ClaimProcNum - Primary Key. Required in the URL.
|
|
23
|
+
* @param {number} [data.ProvNum] - ProvNum of a provider. Follows the ProcProvChangesClaimProcWithClaim preference. See Claimproc Provider for more information.,
|
|
24
|
+
* @param {number} [data.FeeBilled] - The amount billed to insurance.
|
|
25
|
+
* @param {number} [data.DedApplied] - Deductible applied to this procedure only. DedApplied will always match the DedEstOverride value when ClaimProc status is NotReceived or Preauth.
|
|
26
|
+
* @param {"NotReceived" | "Received" | "Preauth" | "Supplemental" | "Estimate" } [data.Status] - Either "NotReceived", "Received", "Preauth", "Supplemental", or "Estimate". When set to Received or Supplemental, ClaimProc.DateEntry will be updated to DateTime.Now.
|
|
27
|
+
* @param {number} [data.InsPayAmt] - Amount insurance actually paid. Cannot be updated once the procedure is attached to a check.
|
|
28
|
+
* @param {string} [data.Remarks] - The remarks that insurance sends in the EOB about procedures. Overwrites any existing Remarks.
|
|
29
|
+
* @param {number} [data.ClaimPaymentNum] - 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.
|
|
30
|
+
* @param {number} [data.WriteOff] - Amount not covered by insurance which is written off.
|
|
31
|
+
* @param {string} [data.CodeSent] - 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.
|
|
32
|
+
* @param {number} [data.PercentOverride] - The percentage that insurance is expected to cover. A number between 0 and 100. Use -1 to indicate no override.
|
|
33
|
+
* @param {"true" | "false"} [data.NoBillIns]
|
|
34
|
+
* @param {number} [data.CopayOverride] - Based on the insurance plan's copay fee schedule, and subtracted from the amount that insurance will pay. Use -1 to indicate no override.
|
|
35
|
+
* @param {number} [data.DedEstOverride] - 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.
|
|
36
|
+
* @param {number} [data.InsEstTotalOverride] - 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.
|
|
37
|
+
* @param {number} [data.PaidOtherInsOverride] - Adds up all amounts paid by insurance plans that are lower in order. Use -1 to indicate no override.
|
|
38
|
+
* @param {number} [data.WriteOffEstOverride] - WriteOff amount usually only used for PPOs. Use -1 to indicate no override.
|
|
39
|
+
* @param {number} [data.ClaimPaymentTracking] - 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.
|
|
40
|
+
* @returns {Promise<ClaimProc>} - The updated procedure log.
|
|
41
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
42
|
+
*/
|
|
43
|
+
updateClaimProc({ ClaimProcNum, ProvNum, FeeBilled, DedApplied, Status, InsPayAmt, Remarks, ClaimPaymentNum, WriteOff, CodeSent, PercentOverride, NoBillIns, CopayOverride, DedEstOverride, InsEstTotalOverride, PaidOtherInsOverride, WriteOffEstOverride, ClaimPaymentTracking, }: updateClaimProcParams): Promise<ClaimProc>;
|
|
18
44
|
}
|
|
19
45
|
//# sourceMappingURL=claimProcs.d.ts.map
|
|
@@ -1 +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,
|
|
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,EACnB,qBAAqB,EACtB,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;IAalD;;;;;;;;;;;;;;;;;;;;;;;;SAwBK;IACU,eAAe,CAC1B,EACE,YAAY,EACZ,OAAO,EACP,SAAS,EACT,UAAU,EACV,MAAM,EACN,SAAS,EACT,OAAO,EACP,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,SAAS,EACT,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GACrB,EAAE,qBAAqB,GACvB,OAAO,CAAC,SAAS,CAAC;CAyBxB"}
|
package/dist/api/claimProcs.js
CHANGED
|
@@ -27,5 +27,54 @@ class ClaimProcs {
|
|
|
27
27
|
};
|
|
28
28
|
return this.httpClient.get("/claimprocs", params);
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Updates an existing procedure. When changing procCode, the treatment area of the current and passed in procedure codes must match. Attempting to pass in empty strings for ToothNum, Surf, and ToothRange will be silently ignored. The CodeNum, procCode, Discount, ToothNum, Surf, and ToothRange fields cannot be updated on procedures with a ProcStatus of C. If the procedurelog is associated with certain appointments, claims, or orthocases, then some fields cannot be updated. Procedure code default notes will not be used.
|
|
32
|
+
* ProcedureLogs associated with adjustments, appointments, payments, payplancharges, or paysplits are updated exactly as in Open Dental.
|
|
33
|
+
* @param {Object} data - The updated details of the procedure log.
|
|
34
|
+
* @param {number} data.ClaimProcNum - Primary Key. Required in the URL.
|
|
35
|
+
* @param {number} [data.ProvNum] - ProvNum of a provider. Follows the ProcProvChangesClaimProcWithClaim preference. See Claimproc Provider for more information.,
|
|
36
|
+
* @param {number} [data.FeeBilled] - The amount billed to insurance.
|
|
37
|
+
* @param {number} [data.DedApplied] - Deductible applied to this procedure only. DedApplied will always match the DedEstOverride value when ClaimProc status is NotReceived or Preauth.
|
|
38
|
+
* @param {"NotReceived" | "Received" | "Preauth" | "Supplemental" | "Estimate" } [data.Status] - Either "NotReceived", "Received", "Preauth", "Supplemental", or "Estimate". When set to Received or Supplemental, ClaimProc.DateEntry will be updated to DateTime.Now.
|
|
39
|
+
* @param {number} [data.InsPayAmt] - Amount insurance actually paid. Cannot be updated once the procedure is attached to a check.
|
|
40
|
+
* @param {string} [data.Remarks] - The remarks that insurance sends in the EOB about procedures. Overwrites any existing Remarks.
|
|
41
|
+
* @param {number} [data.ClaimPaymentNum] - 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.
|
|
42
|
+
* @param {number} [data.WriteOff] - Amount not covered by insurance which is written off.
|
|
43
|
+
* @param {string} [data.CodeSent] - 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.
|
|
44
|
+
* @param {number} [data.PercentOverride] - The percentage that insurance is expected to cover. A number between 0 and 100. Use -1 to indicate no override.
|
|
45
|
+
* @param {"true" | "false"} [data.NoBillIns]
|
|
46
|
+
* @param {number} [data.CopayOverride] - Based on the insurance plan's copay fee schedule, and subtracted from the amount that insurance will pay. Use -1 to indicate no override.
|
|
47
|
+
* @param {number} [data.DedEstOverride] - 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.
|
|
48
|
+
* @param {number} [data.InsEstTotalOverride] - 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.
|
|
49
|
+
* @param {number} [data.PaidOtherInsOverride] - Adds up all amounts paid by insurance plans that are lower in order. Use -1 to indicate no override.
|
|
50
|
+
* @param {number} [data.WriteOffEstOverride] - WriteOff amount usually only used for PPOs. Use -1 to indicate no override.
|
|
51
|
+
* @param {number} [data.ClaimPaymentTracking] - 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.
|
|
52
|
+
* @returns {Promise<ClaimProc>} - The updated procedure log.
|
|
53
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
54
|
+
*/
|
|
55
|
+
async updateClaimProc({ ClaimProcNum, ProvNum, FeeBilled, DedApplied, Status, InsPayAmt, Remarks, ClaimPaymentNum, WriteOff, CodeSent, PercentOverride, NoBillIns, CopayOverride, DedEstOverride, InsEstTotalOverride, PaidOtherInsOverride, WriteOffEstOverride, ClaimPaymentTracking, }) {
|
|
56
|
+
if (!ClaimProcNum || typeof ClaimProcNum !== "number") {
|
|
57
|
+
throw new Error("Invalid parameter: ClaimProcNum must be a valid number.");
|
|
58
|
+
}
|
|
59
|
+
return this.httpClient.put(`/claimprocs/${ClaimProcNum}`, {
|
|
60
|
+
ProvNum,
|
|
61
|
+
FeeBilled,
|
|
62
|
+
DedApplied,
|
|
63
|
+
Status,
|
|
64
|
+
InsPayAmt,
|
|
65
|
+
Remarks,
|
|
66
|
+
ClaimPaymentNum,
|
|
67
|
+
WriteOff,
|
|
68
|
+
CodeSent,
|
|
69
|
+
PercentOverride,
|
|
70
|
+
NoBillIns,
|
|
71
|
+
CopayOverride,
|
|
72
|
+
DedEstOverride,
|
|
73
|
+
InsEstTotalOverride,
|
|
74
|
+
PaidOtherInsOverride,
|
|
75
|
+
WriteOffEstOverride,
|
|
76
|
+
ClaimPaymentTracking,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
30
79
|
}
|
|
31
80
|
exports.default = ClaimProcs;
|
|
@@ -63,4 +63,34 @@ export interface GetClaimProcsParams {
|
|
|
63
63
|
ClaimPaymentNum?: number;
|
|
64
64
|
Offset?: number;
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* ClaimProcs are complex. They are used to link procedures to claims, insurance payments to procedures or claims, and insurance estimates to procedures without a claim.
|
|
68
|
+
* See Claim Procedures ( claimprocs ) and Claim for more details.
|
|
69
|
+
* Updates a ClaimProc exactly as in Open Dental, performing the same calculations for necessary fields.
|
|
70
|
+
* All below fields are optional. However, which fields can be changed depends on the status of the ClaimProc and the Claim (if associated).
|
|
71
|
+
* Editing a received ClaimProc can delete all of the Income Transfers on the claim.
|
|
72
|
+
* Cannot update a ClaimProc that has IsTransfer set to true, or a Status of "Adjustment", "InsHist", "CapClaim", "CapComplete", or "CapEstimate". To update a ClaimProc with a Status of Adjustment, use ClaimProcs PUT InsAdjust.
|
|
73
|
+
* Updating a ClaimProc recalculates the claim totals of the Claim to which it's attached. BlueBook values are not updated. Override field values use -1 to represent none or blank.
|
|
74
|
+
* @see https://www.opendental.com/site/apiclaimprocs.html
|
|
75
|
+
*/
|
|
76
|
+
export interface updateClaimProcParams {
|
|
77
|
+
ClaimProcNum: number;
|
|
78
|
+
ProvNum?: number;
|
|
79
|
+
FeeBilled?: number;
|
|
80
|
+
DedApplied?: number;
|
|
81
|
+
Status?: "NotReceived" | "Received" | "Preauth" | "Adjustment" | "Supplemental" | "CapClaim" | "Estimate" | "CapComplete" | "CapEstimate" | "InsHist";
|
|
82
|
+
InsPayAmt?: number;
|
|
83
|
+
Remarks?: string;
|
|
84
|
+
ClaimPaymentNum?: number;
|
|
85
|
+
WriteOff?: number;
|
|
86
|
+
CodeSent?: string;
|
|
87
|
+
PercentOverride?: number;
|
|
88
|
+
NoBillIns?: true | false;
|
|
89
|
+
CopayOverride?: number;
|
|
90
|
+
DedEstOverride?: number;
|
|
91
|
+
InsEstTotalOverride?: number;
|
|
92
|
+
PaidOtherInsOverride?: number;
|
|
93
|
+
WriteOffEstOverride?: number;
|
|
94
|
+
ClaimPaymentTracking?: number;
|
|
95
|
+
}
|
|
66
96
|
//# sourceMappingURL=claimProcTypes.d.ts.map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CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,YAAY,GAAG,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,aAAa,GAAG,aAAa,GAAG,SAAS,CAAC;IACtJ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B"}
|
package/package.json
CHANGED
package/src/api/claimProcs.ts
CHANGED
|
@@ -2,6 +2,7 @@ import HttpClient from "../utils/httpClient";
|
|
|
2
2
|
import {
|
|
3
3
|
ClaimProc,
|
|
4
4
|
GetClaimProcsParams,
|
|
5
|
+
updateClaimProcParams,
|
|
5
6
|
} from "../types/claimProcTypes";
|
|
6
7
|
|
|
7
8
|
export default class ClaimProcs {
|
|
@@ -41,4 +42,76 @@ export default class ClaimProcs {
|
|
|
41
42
|
|
|
42
43
|
return this.httpClient.get<ClaimProc[]>("/claimprocs", params);
|
|
43
44
|
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Updates an existing procedure. When changing procCode, the treatment area of the current and passed in procedure codes must match. Attempting to pass in empty strings for ToothNum, Surf, and ToothRange will be silently ignored. The CodeNum, procCode, Discount, ToothNum, Surf, and ToothRange fields cannot be updated on procedures with a ProcStatus of C. If the procedurelog is associated with certain appointments, claims, or orthocases, then some fields cannot be updated. Procedure code default notes will not be used.
|
|
48
|
+
* ProcedureLogs associated with adjustments, appointments, payments, payplancharges, or paysplits are updated exactly as in Open Dental.
|
|
49
|
+
* @param {Object} data - The updated details of the procedure log.
|
|
50
|
+
* @param {number} data.ClaimProcNum - Primary Key. Required in the URL.
|
|
51
|
+
* @param {number} [data.ProvNum] - ProvNum of a provider. Follows the ProcProvChangesClaimProcWithClaim preference. See Claimproc Provider for more information.,
|
|
52
|
+
* @param {number} [data.FeeBilled] - The amount billed to insurance.
|
|
53
|
+
* @param {number} [data.DedApplied] - Deductible applied to this procedure only. DedApplied will always match the DedEstOverride value when ClaimProc status is NotReceived or Preauth.
|
|
54
|
+
* @param {"NotReceived" | "Received" | "Preauth" | "Supplemental" | "Estimate" } [data.Status] - Either "NotReceived", "Received", "Preauth", "Supplemental", or "Estimate". When set to Received or Supplemental, ClaimProc.DateEntry will be updated to DateTime.Now.
|
|
55
|
+
* @param {number} [data.InsPayAmt] - Amount insurance actually paid. Cannot be updated once the procedure is attached to a check.
|
|
56
|
+
* @param {string} [data.Remarks] - The remarks that insurance sends in the EOB about procedures. Overwrites any existing Remarks.
|
|
57
|
+
* @param {number} [data.ClaimPaymentNum] - 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.
|
|
58
|
+
* @param {number} [data.WriteOff] - Amount not covered by insurance which is written off.
|
|
59
|
+
* @param {string} [data.CodeSent] - 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.
|
|
60
|
+
* @param {number} [data.PercentOverride] - The percentage that insurance is expected to cover. A number between 0 and 100. Use -1 to indicate no override.
|
|
61
|
+
* @param {"true" | "false"} [data.NoBillIns]
|
|
62
|
+
* @param {number} [data.CopayOverride] - Based on the insurance plan's copay fee schedule, and subtracted from the amount that insurance will pay. Use -1 to indicate no override.
|
|
63
|
+
* @param {number} [data.DedEstOverride] - 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.
|
|
64
|
+
* @param {number} [data.InsEstTotalOverride] - 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.
|
|
65
|
+
* @param {number} [data.PaidOtherInsOverride] - Adds up all amounts paid by insurance plans that are lower in order. Use -1 to indicate no override.
|
|
66
|
+
* @param {number} [data.WriteOffEstOverride] - WriteOff amount usually only used for PPOs. Use -1 to indicate no override.
|
|
67
|
+
* @param {number} [data.ClaimPaymentTracking] - 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.
|
|
68
|
+
* @returns {Promise<ClaimProc>} - The updated procedure log.
|
|
69
|
+
* @throws {Error} - If required fields are missing or the API returns an error.
|
|
70
|
+
*/
|
|
71
|
+
public async updateClaimProc(
|
|
72
|
+
{
|
|
73
|
+
ClaimProcNum,
|
|
74
|
+
ProvNum,
|
|
75
|
+
FeeBilled,
|
|
76
|
+
DedApplied,
|
|
77
|
+
Status,
|
|
78
|
+
InsPayAmt,
|
|
79
|
+
Remarks,
|
|
80
|
+
ClaimPaymentNum,
|
|
81
|
+
WriteOff,
|
|
82
|
+
CodeSent,
|
|
83
|
+
PercentOverride,
|
|
84
|
+
NoBillIns,
|
|
85
|
+
CopayOverride,
|
|
86
|
+
DedEstOverride,
|
|
87
|
+
InsEstTotalOverride,
|
|
88
|
+
PaidOtherInsOverride,
|
|
89
|
+
WriteOffEstOverride,
|
|
90
|
+
ClaimPaymentTracking,
|
|
91
|
+
}: updateClaimProcParams
|
|
92
|
+
): Promise<ClaimProc> {
|
|
93
|
+
if (!ClaimProcNum || typeof ClaimProcNum !== "number") {
|
|
94
|
+
throw new Error("Invalid parameter: ClaimProcNum must be a valid number.");
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return this.httpClient.put<ClaimProc>(`/claimprocs/${ClaimProcNum}`, {
|
|
98
|
+
ProvNum,
|
|
99
|
+
FeeBilled,
|
|
100
|
+
DedApplied,
|
|
101
|
+
Status,
|
|
102
|
+
InsPayAmt,
|
|
103
|
+
Remarks,
|
|
104
|
+
ClaimPaymentNum,
|
|
105
|
+
WriteOff,
|
|
106
|
+
CodeSent,
|
|
107
|
+
PercentOverride,
|
|
108
|
+
NoBillIns,
|
|
109
|
+
CopayOverride,
|
|
110
|
+
DedEstOverride,
|
|
111
|
+
InsEstTotalOverride,
|
|
112
|
+
PaidOtherInsOverride,
|
|
113
|
+
WriteOffEstOverride,
|
|
114
|
+
ClaimPaymentTracking,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
44
117
|
}
|
|
@@ -65,4 +65,35 @@ export interface ClaimProc {
|
|
|
65
65
|
Offset?: number; // Pagination offset for results
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* ClaimProcs are complex. They are used to link procedures to claims, insurance payments to procedures or claims, and insurance estimates to procedures without a claim.
|
|
70
|
+
* See Claim Procedures ( claimprocs ) and Claim for more details.
|
|
71
|
+
* Updates a ClaimProc exactly as in Open Dental, performing the same calculations for necessary fields.
|
|
72
|
+
* All below fields are optional. However, which fields can be changed depends on the status of the ClaimProc and the Claim (if associated).
|
|
73
|
+
* Editing a received ClaimProc can delete all of the Income Transfers on the claim.
|
|
74
|
+
* Cannot update a ClaimProc that has IsTransfer set to true, or a Status of "Adjustment", "InsHist", "CapClaim", "CapComplete", or "CapEstimate". To update a ClaimProc with a Status of Adjustment, use ClaimProcs PUT InsAdjust.
|
|
75
|
+
* Updating a ClaimProc recalculates the claim totals of the Claim to which it's attached. BlueBook values are not updated. Override field values use -1 to represent none or blank.
|
|
76
|
+
* @see https://www.opendental.com/site/apiclaimprocs.html
|
|
77
|
+
*/
|
|
78
|
+
export interface updateClaimProcParams {
|
|
79
|
+
ClaimProcNum: number; // Primary Key. Required in the URL.
|
|
80
|
+
ProvNum?: number; // ProvNum of a provider. Follows the ProcProvChangesClaimProcWithClaim preference. See Claimproc Provider for more information.,
|
|
81
|
+
FeeBilled?: number; // The amount billed to insurance.
|
|
82
|
+
DedApplied?: number; // Deductible applied to this procedure only. DedApplied will always match the DedEstOverride value when ClaimProc status is NotReceived or Preauth.
|
|
83
|
+
Status?: "NotReceived" | "Received" | "Preauth" | "Adjustment" | "Supplemental" | "CapClaim" | "Estimate" | "CapComplete" | "CapEstimate" | "InsHist"; // Either "NotReceived", "Received", "Preauth", "Adjustment", "Supplemental", "CapClaim", "Estimate", "CapComplete", "CapEstimate", or "InsHist".
|
|
84
|
+
InsPayAmt?: number; // Amount insurance actually paid. Cannot be updated once the procedure is attached to a check.
|
|
85
|
+
Remarks?: string; // The remarks that insurance sends in the EOB about procedures. Overwrites any existing Remarks.
|
|
86
|
+
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.
|
|
87
|
+
WriteOff?: number; // Amount not covered by insurance which is written off.
|
|
88
|
+
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.
|
|
89
|
+
PercentOverride?: number; // The percentage that insurance is expected to cover. A number between 0 and 100. Use -1 to indicate no override.
|
|
90
|
+
NoBillIns?: true | false; // false,
|
|
91
|
+
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.
|
|
92
|
+
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.
|
|
93
|
+
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.
|
|
94
|
+
PaidOtherInsOverride?: number; // Adds up all amounts paid by insurance plans that are lower in order. Use -1 to indicate no override.
|
|
95
|
+
WriteOffEstOverride?: number; // WriteOff amount usually only used for PPOs. Use -1 to indicate no override.
|
|
96
|
+
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.
|
|
97
|
+
}
|
|
98
|
+
|
|
68
99
|
|