Claim

Introduction #

This module defines the data models used to manage healthcare claim workflows.

Basic usage #

To retrieve a claim by its identifier:

from canvas_sdk.v1.data.claim import Claim

claim = Claim.objects.get(id="9d2e0f58-338b-11ec-8d3d-0242ac130003")

To access diagnosis codes for a claim:

from canvas_sdk.v1.data.claim import Claim

claim = Claim.objects.get(id="9d2e0f58-338b-11ec-8d3d-0242ac130003")
diagnosis_codes = claim.diagnosis_codes.all().order_by("rank")

for diagnosis in diagnosis_codes:
    print(f"Rank {diagnosis.rank}: {diagnosis.code} - {diagnosis.display}")

To access banner alerts for a claim:

from canvas_sdk.v1.data.claim import Claim

claim = Claim.objects.get(id="9d2e0f58-338b-11ec-8d3d-0242ac130003")
active_alerts = claim.banner_alerts.filter(status="active")

for alert in active_alerts:
    print(f"[{alert.intent}] {alert.narrative}")

When a claim is created #

A claim is created for an appointment or note only when the note’s type is billable. A note type with is_billable set to False, such as the built-in Chart review type, produces a note and no claim, so check the flag rather than assuming every appointment produces a claim.

The flag lives on NoteType, reached through the note’s note_type_version attribute. To read the claim itself, call the note’s get_claim() method, which returns the note’s most recent claim, or None when it has none:

from canvas_sdk.v1.data.note import Note

note = Note.objects.get(id="89992c23-c298-4118-864a-26cb3e1ae822")

expects_claim = note.note_type_version.is_billable
claim = note.get_claim()

Claim balances and totals #

The money on a claim comes from two stored balance fields plus a set of computed properties layered over the claim’s line items and postings.

patient_balance and aggregate_coverage_balance are stored on the claim and kept in sync by signals as coverage postings transfer money to the patient, as coverage is added or removed, and as the patient makes payments. Reading them needs no aggregation on your part, and they stay correct when coverage is added after a note is signed.

The rest are computed on access, each over a different slice of the claim:

PropertyWhat it adds up
total_chargescharge across the claim’s active line items, with copay and unlinked items excluded
total_paidpaid_amount across every active posting on the claim, coverage and patient alike
total_payer_paidpaid_amount across the active postings of the claim’s active coverages
total_patient_paidpaid_amount across the active postings on the claim’s patient record
total_adjustedcontractual_adjusted_amount plus transferred_amount across every active posting
balanceaggregate_coverage_balance plus patient_balance, the coverage side and the patient side together

A posting counts as active when it has not been entered in error. Because total_paid spans both sides of the claim, total_payer_paid and total_patient_paid are that figure split by who paid it.

Computing patient-allocated charges #

To find how much has been allocated to the patient on a claim, add what the patient still owes to what they have already paid:

from canvas_sdk.v1.data.claim import Claim

claim = Claim.objects.get(id="9d2e0f58-338b-11ec-8d3d-0242ac130003")

patient_allocated = claim.patient_balance + claim.total_patient_paid

This holds for self-pay and insured claims alike, including a self-pay claim carrying no postings at all.

Filtering #

from canvas_sdk.v1.data.claim import Claim

# Active claims only
active_claims = Claim.objects.active()

Attributes #

Claim #

Represents a complete healthcare claim. Claim belongs to a Note and has a one-to-one relationship with a ClaimPatient.

Field NameTypeDescription
idUUID 
dbidInteger 
noteNote 
installment_planInstallmentPlan 
current_queueClaimQueue 
current_coverageClaimCoverage 
accept_assignBoolean 
auto_accidentBoolean 
auto_accident_stateString 
employment_relatedBoolean 
other_accidentBoolean 
accident_codeString 
illness_dateDate 
remote_batch_idString 
remote_file_idString 
prior_authString 
narrativeString 
account_numberString 
snoozed_untilDate 
patient_balanceDecimal 
aggregate_coverage_balanceDecimal 
createdDateTime 
modifiedDateTime 
diagnosis_codesClaimDiagnosisCode[] 
commentsClaimComment[] 
line_itemsClaimLineItem[] 
labelsTaskLabel[] 
metadataClaimMetadata[] 
banner_alertsClaimBannerAlert[] 
providerClaimProvider 
incident_toBoolean 
supervising_providerClaimSupervisingProvider 
latest_invoiceInvoice 
patientClaimPatient 
coveragesClaimCoverage[] 
submissionsClaimSubmission[] 
postingsBasePosting[] 
total_chargesDecimal (computed)Total charges for active line items
total_paidDecimal (computed)Sum of paid amounts from postings
total_adjustedDecimal (computed)Sum of adjustments and transfers
balanceDecimal (computed)Remaining balance (coverage plus patient)
total_patient_paidDecimal (computed)Amount paid by the patient
total_payer_paidDecimal (computed)Amount paid by coverages

Helpful Methods:

  • get_coverage_by_payer_id(payer_id: str, subscriber_number: str | None = None): Finds the active coverage associated with a payer_id. Optionally checks if the subscriber_number matches, which will choose the correct coverage in the case where a patient has two coverages with the same payer_id.

ClaimSupervisingProvider #

An immutable snapshot of a claim’s supervising provider (837P loop 2310D), captured at claim creation from the note’s supervising provider and frozen thereafter, so later edits to the note or the underlying Staff record do not retroactively change a submitted claim.

Field NameType
idUUID
dbidInteger
claimClaim
staffStaff
first_nameString
last_nameString
middle_nameString
npiString
taxonomyString
tax_idString
tax_id_typeTaxIDType
createdDateTime
modifiedDateTime

ClaimLineItem #

Represents individual billed procedures or services tied to a claim.

Field NameType
idUUID
dbidInteger
billing_line_itemBillingLineItem
diagnosis_codesClaimLineItemDiagnosisCode[]
modifiersClaimLineItemModifier[]
claimClaim
statusClaimLineItemStatus
chargeDecimal
from_dateString
thru_dateString
narrativeString
ndc_codeString
ndc_dosageString
ndc_measureString
place_of_servicePracticeLocationPOS
proc_codeString
displayString
remote_chg_idString
unitsInteger
epsdtString
family_planningFamilyPlanningOptions
createdDateTime
modifiedDateTime
newlineitempaymentsQuerySet[NewLineItemPayment]
newlineitemadjustmentsQuerySet[NewLineItemAdjustment]
lineitemtransfersQuerySet[LineItemTransfer]

ClaimLineItemDiagnosisCode #

Represents a diagnosis code for a given ClaimLineItem. There exists one ClaimLineItemDiagnosisCode for each ClaimDiagnosisCode, and the “linked” attribute indicates whether or not the diagnosis code is linked to the line item.

Field NameType
idUUID
dbidInteger
line_itemClaimLineItem
claim_diagnosis_codeClaimDiagnosisCode
codeString
poaString
linkedBoolean
createdDateTime
modifiedDateTime

ClaimLineItemModifier #

Represents a modifier code for a given ClaimLineItem.

Field NameType
idUUID
dbidInteger
line_itemClaimLineItem
modifierString
createdDateTime
modifiedDateTime

ClaimCoverage #

Links a claim to a specific insurance coverage.

Field NameType
idUUID
dbidInteger
claimClaim
coverageCoverage
activeBoolean
payer_nameString
payer_idString
payer_typecodeString
payer_orderClaimPayerOrder
payer_addr1String
payer_addr2String
payer_cityString
payer_stateString
payer_zipString
payer_plan_typeClaimTypeCode
coverage_typeCoverageType
subscriber_employerString
subscriber_groupString
subscriber_numberString
subscriber_planString
subscriber_dobString
subscriber_first_nameString
subscriber_last_nameString
subscriber_middle_nameString
subscriber_phoneString
subscriber_sexPersonSex
subscriber_addr1String
subscriber_addr2String
subscriber_cityString
subscriber_stateString
subscriber_zipString
subscriber_countryString
patient_relationship_to_subscriberCoverageRelationshipCode
pay_to_addr1String
pay_to_addr2String
pay_to_cityString
pay_to_stateString
pay_to_zipString
resubmission_codeString
payer_icnString
createdDateTime
modifiedDateTime

ClaimComment #

Represents a free-text comment made on a Claim.

Field NameType
idUUID
dbidInteger
claimClaim
createdDateTime
modifiedDateTime
originatorCanvasUser
entered_in_errorCanvasUser
committerCanvasUser
commentString

ClaimBannerAlert #

Represents banner alerts associated with a claim. Banner alerts are displayed in the UI to surface important information about a claim. To create or remove ClaimBannerAlert records, see Claim Effects.

Field NameType
idUUID
dbidInteger
claimClaim
plugin_nameString
keyString
narrativeString
intentBannerAlertIntent
hrefString
statusBannerAlertStatus
createdDateTime
modifiedDateTime

ClaimDiagnosisCode #

Represents diagnosis codes associated with a claim, ordered by rank.

Field NameType
idUUID
dbidInteger
claimClaim
line_item_diagnosis_codesClaimLineItemDiagnosisCode[]
rankInteger
codeString
displayString
createdDateTime
modifiedDateTime

ClaimQueue #

Defines the metadata for claim queues used in revenue workflows.

Field NameType
idUUID
dbidInteger
queue_sort_orderingInteger
nameString
display_nameString
descriptionString
show_in_revenueBoolean
visible_columnsArray[ClaimQueueColumns]
createdDateTime
modifiedDateTime

ClaimPatient #

Captures patient-level data related to a specific claim.

Field NameType
dbidInteger
claimClaim
photoString
dobString
first_nameString
last_nameString
middle_nameString
phoneString
sexPersonSex
ssnString
addr1String
addr2String
cityString
stateString
zipString
countryString
createdDateTime
modifiedDateTime

ClaimLabel #

Represents labels assigned to the claim.

Field NameType
idUUID
dbidInteger
claimClaim
labelTaskLabel

ClaimMetadata #

Represents key-value metadata associated with a claim. Each claim-key pair is unique.

Field NameType
idUUID
dbidInteger
claimClaim
keyString
valueString
createdDateTime
modifiedDateTime

ClaimProvider #

Captures provider-level data related to a specific claim.

Field NameType
idUUID
dbidInteger
claimClaim
clia_numberString
billing_provider_nameString
billing_provider_phoneString
billing_provider_addr1String
billing_provider_addr2String
billing_provider_cityString
billing_provider_stateString
billing_provider_zipString
billing_provider_idString
billing_provider_npiString
billing_provider_tax_idString
billing_provider_tax_id_typeString
billing_provider_taxonomyString
provider_idString
provider_first_nameString
provider_last_nameString
provider_middle_nameString
provider_npiString
provider_tax_idString
provider_tax_id_typeString
provider_taxonomyString
provider_ptan_identifierString
provider_addr1String
provider_addr2String
provider_cityString
provider_stateString
provider_zipString
referring_provider_idString
referring_provider_first_nameString
referring_provider_last_nameString
referring_provider_middle_nameString
referring_provider_npiString
referring_provider_ptan_identifierString
ordering_provider_first_nameString
ordering_provider_last_nameString
ordering_provider_middle_nameString
ordering_provider_npiString
facility_idString
facility_nameString
facility_npiString
facility_addr1String
facility_addr2String
facility_cityString
facility_stateString
facility_zipString
hosp_from_dateString
hosp_to_dateString
createdDateTime
modifiedDateTime

ClaimSubmission #

Captures clearinghouse submission details about a claim.

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
claimClaim
coverageClaimCoverage
clearinghouse_claim_idString
claim_indexInteger

InstallmentPlan #

Represents a payment plan between a patient and provider.

Field NameType
dbidInteger
creatorCanvasUser
patientPatient
total_amountDecimal
statusInstallmentPlanStatus
expected_payoff_dateDate
createdDateTime
modifiedDateTime
claimsClaim[]

Enumeration types #

ClaimLineItemStatus #

ValueLabel
activeActive
removedRemoved

LineItemCodes #

Value
COPAY
UNLINKED

FamilyPlanningOptions #

ValueLabel
YYes
NNo

ClaimLineItemStatus #

ValueLabel
activeActive
removedRemoved

LineItemCodes #

Value
COPAY
UNLINKED

FamilyPlanningOptions #

ValueLabel
YYes
NNo

ClaimPayerOrder #

ValueLabel
PrimaryPrimary
SecondarySecondary
TertiaryTertiary
QuaternaryQuaternary
QuinaryQuinary

ClaimTypeCode #

CodeDescription
12Working Aged (Age 65 or older)
13End-Stage Renal Disease
14No-fault
15Workers Compensation
41Black Lung
42Veterans Administration
43Disabled (Under Age 65)
47Other Liability Insurance is primary
””No Typecode necessary

ClaimQueueColumns #

ValueLabel
NoteTypeNote type
ClaimIDClaim ID
DateOfServiceDate of service
PatientPatient
ActiveInsuranceActive insurance
InsuranceBalanceInsurance balance
PatientBalancePatient balance
DaysInQueueDays in queue
ProviderProvider
GuarantorGuarantor
LatestRemitLatest remit
LastInvoicedLast invoiced
SnoozedUntilSnoozed until
LabelsLabels

ClaimQueues #

ValueLabel
1Appointment
2NeedsClinicianReview
3NeedsCodingReview
4QueuedForSubmission
5FiledAwaitingResponse
6RejectedNeedsReview
7AdjudicatedOpenBalance
8PatientBalance
9ZeroBalance
10Trash

InstallmentPlanStatus #

ValueLabel
activeActive
completedCompleted
cancelledCancelled