Protocol Override

Introduction #

The ProtocolOverride model represents an instance of a protocol being snoozed for a patient.

Basic usage #

To get a protocol override by identifier, use the get method on the ProtocolOverride model manager:

from canvas_sdk.v1.data.protocol_override import ProtocolOverride

protocol_override = ProtocolOverride.objects.get(id="b80b1cdc-2e6a-4aca-90cc-ebc02e683f35")

If you have a patient object, the protocol overrides for a patient can be accessed with the protocol_overrides attribute on a Patient object:

from canvas_sdk.v1.data.patient import Patient

patient = Patient.objects.get(id="1eed3ea2a8d546a1b681a2a45de1d790")
overrides = patient.protocol_overrides.all()

If you have a patient ID, you can get the protocol overrides for the patient with the for_patient method on the ProtocolOverride model manager:

from canvas_sdk.v1.data.protocol_override import ProtocolOverride

patient_id = "1eed3ea2a8d546a1b681a2a45de1d790"
override = ProtocolOverride.objects.for_patient(patient_id)

Filtering #

Protocol overrides can be filtered by any attribute that exists on the model.

By attribute #

Specify an attribute with filter to filter by that attribute:

from canvas_sdk.v1.data.protocol_override import ProtocolOverride

overrides = ProtocolOverride.objects.filter(status="active")

Attributes #

ProtocolOverride #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
deletedBoolean
committerCanvasUser
entered_in_errorCanvasUser
patientPatient
protocol_keyString
is_adjustmentBoolean
reference_dateDateTime
cycle_in_daysInteger
is_snoozeBoolean
snooze_dateDate
snoozed_daysInteger
snooze_commentString
narrativeString
cycle_quantityInteger
cycle_unitIntervalUnit
statusStatus

Enumeration types #

IntervalUnit #

ValueLabel
daysdays
monthsmonths
yearsyears

Status #

ValueLabel
activeactive
inactiveinactive