Posting

Introduction #

This module defines models related to payments and postings associated with healthcare claims.

Basic usage #

To retrieve a posting by ID:

from canvas_sdk.v1.data.posting import BasePosting

posting = BasePosting.objects.get(dbid=1234)

To retrieve all active postings for a given claim:

from canvas_sdk.v1.data.claim import Claim

claim = Claim.objects.get(id="<uuid>")
claim_postings = claim.postings.active()

Payments, adjustments, and transfers each record the claim line item the amount was posted to. To find the charge behind a payment, go through its claim line item:

from canvas_sdk.v1.data import NewLineItemPayment

payment = NewLineItemPayment.objects.select_related("claim_line_item").get(dbid=1234)
claim_line_item = payment.claim_line_item
print(claim_line_item.proc_code)

# None when the claim line item has no billing line item
charge = claim_line_item.billing_line_item

On a remit, each coverage posting also records the amount the payer allowed on each claim line item and the remark codes the payer sent with it:

from canvas_sdk.v1.data import CoveragePosting

posting = CoveragePosting.objects.get(dbid=1234)

for allowed in posting.lineitemalloweds.active():
    print(allowed.claim_line_item.proc_code, allowed.amount)

for remark in posting.remark_codes.all():
    print(remark.claim_line_item.proc_code, remark.remark_code)

Remits #

A remit is a payer’s payment and explanation for one or more claims. Canvas stores each one as a BaseRemittanceAdvice, which is either an ElectronicRemittanceAdvice received from a clearinghouse or a ManualRemittanceAdvice posted by hand. Query the subtype to get only one kind, along with its own fields:

from canvas_sdk.v1.data import ElectronicRemittanceAdvice

for era in ElectronicRemittanceAdvice.objects.filter(payer_name="Acme Health"):
    print(era.era_id, era.received_time, era.total_paid)

A remit lists the claims it covers in claims, and a claim lists its remits in remits. The file a remit was posted from is a NewRemittanceDocument, reached through the remit’s document:

from canvas_sdk.v1.data import BaseRemittanceAdvice, NewRemittanceDocument

remit = BaseRemittanceAdvice.objects.get(id="d2194110-5c9a-4842-8733-ef09ea5ead11")
claims = remit.claims.all()

try:
    # Presigned S3 URL to the remit file, or None if there is no file
    url = remit.document.document_url
except NewRemittanceDocument.DoesNotExist:
    url = None

Attributes #

BasePosting #

Base model for aggregating multiple line item-level transactions (payments, adjustments, transfers) associated with a claim.

Field NameTypeDescription
dbidInteger 
corrected_postingBasePosting 
claimClaim 
payment_collectionPaymentCollection 
descriptionString 
entered_in_errorCanvasUser 
createdDateTime 
modifiedDateTime 
correction_postingsQuerySet[BasePosting] 
lineitemallowedsQuerySet[LineItemAllowed]Allowed amounts per claim line item
paid_amountDecimal (computed)Total paid
contractual_adjusted_amountDecimal (computed)Adjustments marked as write-offs
non_write_off_adjusted_amountDecimal (computed)Non-write-off adjustments
transferred_amountDecimal (computed)Total transferred
transferred_to_patient_amountDecimal (computed)Portion transferred to the patient
transferred_to_coverage_amountDecimal (computed)Portion transferred to another coverage
adjusted_and_transferred_amountDecimal (computed)Combined adjusted and transferred amount
posted_amountDecimal (computed)Total of payments and write-offs

CoveragePosting #

Represents an insurance payment or adjustment associated with a claim’s coverage.

Field NameType
remittanceBaseRemittanceAdvice
claim_coverageClaimCoverage
crossover_carrierString
crossover_idString
payer_icnString
position_in_eraInteger
remark_codesQuerySet[RemarkCode]

PatientPosting #

Represents patient-side payments or adjustments, including links to copays or patient-level discounts.

Field NameTypeDescription
claim_patientClaimPatient 
patient_paymentBulkPatientPosting 
copayBulkPatientPosting 
discounted_amountDecimal (computed)Discount applied
charges_amountDecimal (computed)Discount plus paid amount

BulkPatientPosting #

Aggregates bulk patient payments on multiple claims.

Field NameTypeDescription
idUUID 
dbidInteger 
payment_collectionPaymentCollection 
total_paidDecimal 
createdDateTime 
modifiedDateTime 
discountDiscount 
payerPatient 
postingsQuerySet[PatientPosting] 
copaysQuerySet[PatientPosting] 
total_posted_amountDecimal (computed)Sum of all posted amounts
discounted_amountDecimal (computed)Sum of discounted amounts

BaseRemittanceAdvice #

Represents shared data for both electronic and manual remittance advice.

Field NameTypeDescription
idUUID 
dbidInteger 
payment_collectionPaymentCollection 
total_paidDecimal 
createdDateTime 
modifiedDateTime 
transactorTransactor 
era_idString 
claimsQuerySet[Claim]Claims the remit covers, including claims whose remit processing was skipped
postingsQuerySet[CoveragePosting] 
documentNewRemittanceDocumentFile the remit was posted from
total_posted_amountDecimal (computed)Sum of all posted amounts

ElectronicRemittanceAdvice #

An electronic remit (ERA) received from a clearinghouse. It has every BaseRemittanceAdvice field, plus:

Field NameType
check_typeString
payer_nameString
provider_nameString
provider_npiString
download_dateDate
received_timeDateTime

ManualRemittanceAdvice #

A remit posted by hand. It has the BaseRemittanceAdvice fields and no others.

BaseRemittanceAdviceClaim #

Links a remit to a claim it covers. Read the link through remit.claims or claim.remits rather than querying this model.

from canvas_sdk.v1.data import Claim

claim = Claim.objects.get(id="9d2e0f58-338b-11ec-8d3d-0242ac130003")
remits = claim.remits.all()
Field NameType
dbidInteger
remittanceBaseRemittanceAdvice
claimClaim

NewRemittanceDocument #

The file a manual or electronic remit was posted from.

Field NameTypeDescription
dbidInteger 
remittanceBaseRemittanceAdvice 
documentFile (S3 key) 
document_urlString (computed)Presigned URL for the file, or None when unset
originatorCanvasUser 
committerCanvasUser 
entered_in_errorCanvasUser 
createdDateTime 
modifiedDateTime 

PaymentCollection #

Captures metadata about the method and details of a collected payment.

Field NameType
idUUID
dbidInteger
total_collectedDecimal
methodPostingMethods
check_numberString
check_dateDate
deposit_dateDate
descriptionString
createdDateTime
modifiedDateTime
postingsQuerySet[BasePosting]
receiptReceipt

NewLineItemPayment #

Represents a payment applied to a claim line item.

Field NameType
dbidInteger
postingBasePosting
billing_line_itemBillingLineItem (deprecated)
claim_line_itemClaimLineItem
amountDecimal
chargedDecimal
entered_in_errorCanvasUser
createdDateTime
modifiedDateTime

NewLineItemAdjustment #

Represents an adjustment applied to a claim line item.

Field NameType
dbidInteger
postingBasePosting
billing_line_itemBillingLineItem (deprecated)
claim_line_itemClaimLineItem
amountDecimal
codeString
groupString
deviated_from_posting_rulesetBoolean
write_offBoolean
entered_in_errorCanvasUser
createdDateTime
modifiedDateTime

LineItemTransfer #

Represents a transfer of a claim line item balance to another coverage or patient.

Field NameType
dbidInteger
postingBasePosting
billing_line_itemBillingLineItem (deprecated)
claim_line_itemClaimLineItem
amountDecimal
codeString
groupString
deviated_from_posting_rulesetBoolean
transfer_toClaimCoverage
transfer_to_patientBoolean
entered_in_errorCanvasUser
createdDateTime
modifiedDateTime

LineItemAllowed #

Represents the amount a payer allowed on a claim line item. Call active() to leave out amounts entered in error.

Field NameType
dbidInteger
postingBasePosting
billing_line_itemBillingLineItem (deprecated)
claim_line_itemClaimLineItem
amountDecimal
entered_in_errorCanvasUser
createdDateTime
modifiedDateTime

RemarkCode #

Represents a remark code a payer sent in an 835 remit for a claim line item on a coverage posting.

remark_code holds the code exactly as the payer sent it. Payers send codes from the X12 Remittance Advice Remark Codes list, such as N381 or M15, which X12 updates several times a year, so look up a code’s meaning there rather than hardcoding a list.

Field NameType
dbidInteger
postingCoveragePosting
claim_line_itemClaimLineItem
remark_codeString
createdDateTime
modifiedDateTime

Discount #

Represents a discount applied to a claim or patient posting, linked by adjustment group and code.

Field NameType
dbidInteger
nameString
adjustment_groupString
adjustment_codeString
discountDecimal
createdDateTime
modifiedDateTime
patient_postingsQuerySet[BulkPatientPosting]

Enumeration types #

PostingMethods #

ValueLabel
cashCash
checkCheck
cardCard
otherOther