EligibilityResponse

Introduction #

The EligibilityResponse model represents a coverage eligibility (271) response returned by a payer for a patient’s Coverage, along with the originating EligibilityRequest (270). An EligibilityResponse also derives a check status (Active, Inactive, or Failed) from the payer’s response.

Basic usage #

To get an eligibility response by identifier, use the get method on the EligibilityResponse model manager:

from canvas_sdk.v1.data.eligibility_response import EligibilityResponse

response = EligibilityResponse.objects.get(id="b80b1cdc-2e6a-4aca-90cc-ebc02e683f35")

Eligibility requests and responses are linked to a Coverage. From a coverage object, use the requests and eligibility_responses attributes:

from canvas_sdk.v1.data.coverage import Coverage

coverage = Coverage.objects.get(id="b80b1cdc-2e6a-4aca-90cc-ebc02e683f35")
requests = coverage.requests.all()
responses = coverage.eligibility_responses.all()

Eligibility status #

EligibilityResponse.status returns an EligibilityResponseStatus derived from the payer’s response — FAILED when the check errored, INACTIVE when the payer reports an inactive benefit section, otherwise ACTIVE:

from canvas_sdk.v1.data.coverage import Coverage
from canvas_sdk.v1.data.eligibility_response import EligibilityResponseStatus

coverage = Coverage.objects.get(id="b80b1cdc-2e6a-4aca-90cc-ebc02e683f35")
response = coverage.eligibility_responses.order_by("created").last()
is_active = response is not None and response.status == EligibilityResponseStatus.ACTIVE

A coverage with no eligibility responses (an empty coverage.eligibility_responses queryset) has not been verified.

Attributes #

EligibilityRequest #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
coverageCoverage
trading_partner_idString
memberJSON
providerJSON
payloadString
control_numberString

EligibilityResponse #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
eligibility_requestEligibilityRequest
coverageCoverage
client_idString
correlation_idString
deductibleJSON
out_of_pocketJSON
coverage_infoJSON
payerJSON
providerJSON
service_type_codesList[String]
service_typesList[String]
subscriberJSON
trading_partner_idString
valid_requestBoolean
errorsList[String]
eligidString
x12_responseString
parsed_x12_responseJSON
statusEligibilityResponseStatus (read-only property)
eligibility_or_benefit_informationList (read-only property)

status and eligibility_or_benefit_information are computed from errors and parsed_x12_response rather than stored, so neither can be used in filter(). To select responses by outcome, filter on the columns they derive from — a failed check is one with a non-empty errors:

from canvas_sdk.v1.data.eligibility_response import EligibilityResponse

failed = EligibilityResponse.objects.exclude(errors=None).exclude(errors=[])

Enumeration types #

EligibilityResponseStatus #

NameValue
ACTIVEActive
INACTIVEInactive
FAILEDFailed
UNKNOWNUnknown