OrganizationalEntity

Introduction #

The OrganizationalEntity model represents an external entity that Canvas references through a generic relation — for example, the ServiceProvider backing a patient’s external care team member. Its type indicates which kind of entity it points at, and the content_type and object_id fields identify the specific record.

The most common use is reaching the external members of a patient’s care team. A CareTeamMembership with no staff is an external member, and its organizational_entity links to the OrganizationalEntity describing the external provider.

Basic usage #

When an OrganizationalEntity has a type of Service Provider, its service_provider property resolves to the linked ServiceProvider, giving you access to the provider’s contact details — such as business_fax — without leaving the plugin:

from canvas_sdk.v1.data.patient import Patient

patient = Patient.objects.get(id="a74592ae8a6c4d0ebe0799d3fb3713d1")
external_member = patient.care_team_memberships.filter(staff__isnull=True).first()

entity = external_member.organizational_entity
if entity and entity.service_provider:
    print(entity.service_provider.business_fax)

For entities of any other type, the service_provider property returns None.

Attributes #

OrganizationalEntity #

Field NameType
idUUID
dbidInteger
content_typeContentType
object_idInteger
nameString
activeBoolean
typeOrganizationalEntityType

Properties #

NameTypeDescription
service_providerServiceProvider | NoneThe linked ServiceProvider when type is Service Provider; otherwise None.

Enumeration types #

OrganizationalEntityType #

ValueLabel
TransactorTransactor
Business EntityBusiness Entity
VendorVendor
Service ProviderService Provider