Referral

Introduction #

The Referral, ReferralReport, and ReferralReview models represent referral results and their reviews.

Basic Usage #

To retrieve a Referral, ReferralReport, or ReferralReview by identifier, use the get method on the model manager:

from canvas_sdk.v1.data.referral import Referral, ReferralReport, ReferralReview

referral = Referral.objects.get(id="d2194110-5c9a-4842-8733-ef09ea5ead11")
referral_report = ReferralReport.objects.get(id="c1a5a35a-4ee2-4a0e-85c0-21739dc8c4a8")
referral_review = ReferralReview.objects.get(id="b3e6f74c-2a1b-4c8d-9f2e-31842ae7d3b9")

If you have a patient object, the referrals, reports, and reviews can be accessed with the referral_set, referral_reports, and referral_reviews attributes, respectively on a Patient object:

from canvas_sdk.v1.data.patient import Patient

patient = Patient.objects.get(id="1eed3ea2a8d546a1b681a2a45de1d790")
referrals = patient.referral_set.all()
reports = patient.referral_reports.all()
reviews = patient.referral_reviews.all()

Filtering #

Referrals, reports, and reviews can be filtered by any attribute that exists on the models.

Filtering is done with the filter method on the Referral, ReferralReport, and ReferralReview model managers.

By attribute #

Specify an attribute with filter to filter by that attribute:

from canvas_sdk.v1.data.referral import Referral, ReferralReport, ReferralReview

referrals = Referral.objects.filter(priority="urgent")
reports = ReferralReport.objects.filter(requires_signature=True)
reviews = ReferralReview.objects.filter(status="completed")

Related Tasks #

To retrieve an Referral’s related tasks, use the get_task_objects method on the Referral object.

from canvas_sdk.v1.data.referral import Referral

referral = Referral.objects.get(id="d2194110-5c9a-4842-8733-ef09ea5ead11")
tasks = referral.get_task_objects().all()

Attributes #

Referral #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
originatorCanvasUser
deletedBoolean
committerCanvasUser
entered_in_errorCanvasUser
patientPatient
noteNote
assessmentsAssessment
service_providerServiceProvider
clinical_questionString
priorityString
include_visit_noteBoolean
notesString
date_referredDateTime
internal_commentString
forwardedBoolean
internal_task_commentTaskComment
task_idsString

ReferralReport #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
originatorCanvasUser
assigned_byCanvasUser
review_modeDocumentReviewMode
junkedBoolean
requires_signatureBoolean
assigned_dateDateTime
team_assigned_dateDateTime
teamTeam
patientPatient
referralReferral
specialtyString
commentString
priorityBoolean
original_dateDate
reviewReferralReview

ReferralReview #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
originatorCanvasUser
deletedBoolean
committerCanvasUser
entered_in_errorCanvasUser
internal_commentString
message_to_patientString
statusString
patientPatient
patient_communication_methodString