PrescriptionChangeResponse

Introduction #

The PrescriptionChangeResponse model is the anchor for the ApproveChange and DenyChange commands — a response to a Surescripts prescription change request, recorded on a Note.

Basic usage #

To get a prescription change response by identifier, use the get method on the PrescriptionChangeResponse model manager:

from canvas_sdk.v1.data import PrescriptionChangeResponse

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

If you have a patient object, the prescription change responses for a patient can be accessed with the prescription_change_responses attribute:

from canvas_sdk.v1.data.patient import Patient

patient = Patient.objects.get(id="1eed3ea2a8d546a1b681a2a45de1d790")
responses = patient.prescription_change_responses.all()

The same attribute is available on a medication:

from canvas_sdk.v1.data import Medication

medication = Medication.objects.get(id="b80b1cdc-2e6a-4aca-90cc-ebc02e683f35")
responses = medication.prescription_change_responses.all()

Committed records #

The committed method returns responses that have been committed and not entered in error:

from canvas_sdk.v1.data import PrescriptionChangeResponse

committed_responses = PrescriptionChangeResponse.objects.committed()

Attributes #

PrescriptionChangeResponse #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
originatorCanvasUser
committerCanvasUser
entered_in_errorCanvasUser
patientPatient
noteNote
medicationMedication
response_typePrescriptionChangeResponseType
statusPrescriptionChangeResponseStatus
denied_medicationString
refillsInteger
note_to_pharmacistString
approved_drug_indexInteger
reason_codeString
message_idString
prior_authorization_numberString
requestPrescriptionChangeRequest

Enumeration types #

PrescriptionChangeResponseType #

NameValue
APPROVEDA
DENIEDD

PrescriptionChangeResponseStatus #

NameValue
OPENopen
PENDINGpending
ULTIMATELY_ACCEPTEDultimately-accepted
ERRORerror