Staff

Introduction #

The Staff model represents a staff member in a Canvas instance.

To get a Staff object by it’s identifier, use the get method:

from canvas_sdk.v1.data.staff import Staff

staff = Staff.objects.get(id="4150cd20de8a470aa570a852859ac87e")

To list every staff member, use Staff.objects.all(). When you need a stable cross-system mapping, prefer the immutable dbid (integer) and id (UUID) attributes over names, which can change:

from canvas_sdk.v1.data.staff import Staff

staff = Staff.objects.all()

staff_dbids = [s.dbid for s in staff]
staff_ids = [s.id for s in staff]

A command’s committer is a CanvasUser, not a Staff record, so its dbid is the user’s dbid — not the staff dbid. To resolve a committer back to the Staff record, look it up by user, not dbid:

from canvas_sdk.v1.data.staff import Staff

# command_instance.committer is a CanvasUser
staff = Staff.objects.get(user=command_instance.committer)

Staff objects are commonly used in related models, for example the Task model. To see all of a staff member’s assigned or created tasks, the following code can be used:

from canvas_sdk.v1.data.staff import Staff

staff = Staff.objects.get(id="4150cd20de8a470aa570a852859ac87e")

staff.assignee_tasks.all()
# <QuerySet [<Task: Task object (3)>]>

staff.creator_tasks.all()
# <QuerySet [<Task: Task object (7)>]>

To show a Staff member’s contact points (email, phone, etc.), the telecom attribute can be used. For example:

from canvas_sdk.v1.data.staff import Staff

staff = Staff.objects.get(id="4150cd20de8a470aa570a852859ac87e")

[(t.system, t.value,) for t in staff.telecom.all()]
# [('phone', '8005551416'), ('email', 'support@canvasmedical.com')]

To show a Staff full name, credentialed name, the topmost clinical role or top role abbreviation use the properties full_name, credentialed_name, top_clinical_role or top_role_abbreviation.

from canvas_sdk.v1.data.staff import Staff

staff = Staff.objects.get(id="4150cd20de8a470aa570a852859ac87e")
staff.full_name
# Larry Weed

staff.credentialed_name
# Larry Weed MD

staff.top_clinical_role.name
# Physician

staff.top_role_abbreviation
# MD

When a staff member holds more than one role, top_clinical_role looks only at roles in a clinical domain — those whose domain is CLINICAL or HYBRID — and returns the one with the highest domain_privilege_level. Administrative roles are never selected, even if they carry a higher privilege level. If the staff member has no clinical or hybrid roles, both top_clinical_role and top_role_abbreviation are None. Because credentialed_name appends top_role_abbreviation, it reflects the same highest-privilege clinical role.

To get Staff licenses.

from canvas_sdk.v1.data.staff import Staff

staff = Staff.objects.get(id="4150cd20de8a470aa570a852859ac87e")
staff.licenses.all()
# <QuerySet [<StaffLicense: CA License for Larry Weed>]>

Accessing the staff signature #

The signature_url property returns a presigned S3 URL for securely accessing the staff member’s signature file, when one is on file. If no signature has been uploaded, the property returns None.

from canvas_sdk.v1.data.staff import Staff

staff = Staff.objects.get(id="4150cd20de8a470aa570a852859ac87e")

# Returns a presigned S3 URL (valid for 1 hour) or None
url = staff.signature_url

Attributes #

Staff #

Field NameTypeDescription
idUUID 
dbidInteger 
createdDateTime 
modifiedDateTime 
prefixString 
suffixString 
first_nameString 
middle_nameString 
last_nameString 
maiden_nameString 
nicknameString 
previous_namesJSON 
birth_dateDate 
sex_at_birthPersonSex 
sexual_orientation_termString 
sexual_orientation_codeString 
gender_identity_termString 
gender_identity_codeString 
preferred_pronounsString 
biological_race_codesArray[String] 
biological_race_termsArray[String] 
cultural_ethnicity_codesArray[String] 
cultural_ethnicity_termsArray[String] 
last_known_timezoneTimeZone 
activeBoolean 
primary_practice_locationPracticeLocation 
npi_numberString 
nadean_numberString 
group_npi_numberString 
bill_through_organizationBoolean 
tax_idString 
tax_id_typeTaxIDType 
spi_numberString 
personal_meeting_room_linkURL 
languageLanguage 
language_secondaryLanguage 
schedule_column_orderingInteger 
stateJSON 
userCanvasUser 
signatureString 
supervising_teamStaff[] 
default_supervising_providerStaff 
notesNote[] 
supervised_notesNote[] 
creator_tasksTask[] 
assignee_tasksTask[] 
commentsTaskComment[] 
care_team_membershipsCareTeamMembership[] 
teamsTeam[] 
telecomStaffContactPoint[] 
external_identifiersStaffExternalIdentifier[] 
metadataStaffMetadata[] 
addressesStaffAddress[] 
photosStaffPhoto[] 
rolesStaffRole[] 
licensesStaffLicense[] 
lettersLetter[] 
imaging_ordersImagingOrder[] 
immunizations_givenImmunization[] 
supervising_prescriptionsPrescription[] 
refill_requestsRefillRequest[] 
default_patientsPatient[] 
medication_history_responsesMedicationHistoryResponse[] 
transmissions_deliveredMessageTransmission[] 
integration_task_reviewsIntegrationTaskReview[] 
assignee_note_tasksNoteTask[] 
appointment_setAppointment[] 
prescription_setPrescription[] 
note_setNote[] 
prescription_change_requestsPrescriptionChangeRequest[] 
full_nameString (computed)The staff member’s first and last name, for example Larry Weed
credentialed_nameString (computed)The staff member’s full name suffixed with their topmost credential abbreviation, for example Larry Weed MD
top_clinical_roleStaffRole (computed)The staff member’s highest-ranking clinical role, selected by privilege level when they hold more than one, or None if they have no clinical role
top_role_abbreviationString (computed)The public credential abbreviation of top_clinical_role, for example MD, or None if there is no clinical role
photo_urlString (computed)The URL of the staff member’s photo, or a placeholder image URL
signature_urlString (computed)A presigned S3 URL for the staff member’s signature file, valid for 1 hour, or None if no signature is on file

StaffContactPoint #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
systemContactPointSystem
valueString
useString
use_notesString
rankInteger
stateContactPointState
staffStaff

StaffAddress #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
line1String
line2String
cityString
districtString
state_codeString
postal_codeString
useAddressUse
typeAddressType
longitudeFloat
latitudeFloat
startDate
endDate
countryString
stateString
staffStaff

StaffLicense #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
staffStaff
issuing_authority_long_nameString
issuing_authority_urlURL
license_or_certification_identifierString
issuance_dateDate
expiration_dateDate
license_typeLicenseType
primaryBoolean
stateString

StaffPhoto #

Field NameType
dbidInteger
createdDateTime
modifiedDateTime
staffStaff
urlString
titleString

StaffRole #

Field NameType
dbidInteger
createdDateTime
modifiedDateTime
staffStaff
internal_codeString
public_abbreviationString
domainRoleDomain
nameString
domain_privilege_levelInteger
permissionsJSON
role_typeRoleType

StaffExternalIdentifier #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
staffStaff
useString
identifier_typeString
systemString
valueString
issued_dateDate
expiration_dateDate
from canvas_sdk.v1.data.staff import Staff
from logger import log

staff_id = "4150cd20de8a470aa570a852859ac87e"
staff = Staff.objects.get(id=staff_id)

for identifier in staff.external_identifiers.all():
    log.info(f"Staff external identifier: {identifier.system}, {identifier.value}")
    # https://www.example.com - employee-001

StaffExternalIdentifier is the supported way to store and read an external system’s ID on a Staff/Practitioner record (the equivalent of PatientExternalIdentifier for staff). Plugins read it from this data module and write to it with the CreateStaffExternalIdentifier effect. The FHIR Practitioner.identifier field carries only the NPI: Canvas stores the first identifier’s value as the practitioner’s NPI and ignores the rest, so an external ID sent there would replace the NPI. Use StaffExternalIdentifier instead.

StaffMetadata #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
staffStaff
keyString
valueString
from canvas_sdk.v1.data.staff import Staff
from logger import log

staff_id = "4150cd20de8a470aa570a852859ac87e"
staff = Staff.objects.get(id=staff_id)

for metadata in staff.metadata.all():
    log.info(f"{metadata.key}={metadata.value}")

StaffMetadata is a free-form key/value store on a staff member, mirroring PatientMetadata. The (staff, key) pair is unique, so a given key has at most one value per staff member; use the StaffMetadata effect to upsert it from a plugin.

Enumeration types #

License Type #

ValueDescription
CLIACLIA
DEADEA
PTANPTAN
STATE_LICENSEState License
TAXONOMYTaxonomy
SPISPI
OTHEROther

Role Domain #

ValueAbbreviationDescription
CLINICALCLIClinical
ADMINISTRATIVEADMAdministrative
HYBRIDHYBHybrid

Role Type #

ValueDescription
NON_LICENSEDNon-Licensed
LICENSEDLicensed
PROVIDERProvider