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")

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

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 NameType
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
stateJSON
userCanvasUser
signatureString
supervising_teamStaff[]
notesNote[]
creator_tasksTask[]
assignee_tasksTask[]
commentsTaskComment[]
care_team_membershipsCareTeamMembership[]
teamsTeam[]
telecomStaffContactPoint[]
external_identifiersStaffExternalIdentifier[]
metadataStaffMetadata[]

StaffContactPoint #

Field NameType
idUUID
dbidInteger
systemContactPointSystem
valueString
useString
use_notesString
rankInteger
stateContactPointState
staffStaff

StaffAddress #

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

StaffLicense #

Field NameType
idUUID
dbidInteger
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
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

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

Computed Properties #

  • photo_url: The URL of the staff member’s photo, if available, or a placeholder image URL.
  • signature_url: A presigned S3 URL for the staff member’s signature file (valid for 1 hour), or None if no signature is on file.