Referral

Introduction #

The Referral and ReferralReport models represent referral results.

Basic Usage #

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

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

referral = Referral.objects.get(id="d2194110-5c9a-4842-8733-ef09ea5ead11")
referral_report = ReferralReport.objects.get(id="c1a5a35a-4ee2-4a0e-85c0-21739dc8c4a8")

If you have a patient object, the referrals and reports can be accessed with the referral_set and referral_reports 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()

Filtering #

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

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

By attribute #

Specify an attribute with filter to filter by that attribute:

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

referrals = Referral.objects.filter(priority="urgent")
reports = ReferralReport.objects.filter(requires_signature=True)

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