Imaging
Introduction #
The ImagingOrder, ImagingReview, ImagingReport, and ImagingReportCoding models represent imaging results and their associated codes.
Basic Usage #
To retrieve an ImagingOrder, ImagingReview, or ImagingReport by identifier, use the get method on the model manager:
from canvas_sdk.v1.data.imaging import ImagingOrder, ImagingReview, ImagingReport, ImagingReportCoding
imaging_order = ImagingOrder.objects.get(id="d2194110-5c9a-4842-8733-ef09ea5ead11")
imaging_review = ImagingReview.objects.get(id="c02c6b02-2581-46bf-819c-b5aacad2134c")
imaging_report = ImagingReport.objects.get(id="c1a5a35a-4ee2-4a0e-85c0-21739dc8c4a8")
If you have a patient object, the orders, reviews, and reports can be accessed with the imaging_orders, imaging_reviews, and imaging_results attributes, respectively on a Patient object:
from canvas_sdk.v1.data.patient import Patient
patient = Patient.objects.get(id="1eed3ea2a8d546a1b681a2a45de1d790")
orders = patient.imaging_orders.all()
reviews = patient.imaging_reviews.all()
reports = patient.imaging_results.all()
Filtering #
Imaging orders, reviews, and reports can be filtered by any attribute that exists on the models.
Filtering is done with the filter method on the ImagingOrder, ImagingReview, and ImagingReport model managers.
By attribute #
Specify an attribute with filter to filter by that attribute:
from canvas_sdk.v1.data.imaging import ImagingOrder, ImagingReview, ImagingReport
orders = ImagingOrder.objects.filter(status="completed")
reviews = ImagingReview.objects.filter(is_released_to_patient=False)
reports = ImagingReport.objects.filter(requires_signature=True)
Codings #
The codings for an imaging report can be accessed with the codings attribute on an ImagingReport object:
from canvas_sdk.v1.data.imaging import ImagingReport
from logger import log
report = ImagingReport.objects.get(id="c1a5a35a-4ee2-4a0e-85c0-21739dc8c4a8")
for coding in report.codings.all():
log.info(f"system: {coding.system}")
log.info(f"code: {coding.code}")
log.info(f"display: {coding.display}")
Related Tasks #
To retrieve an Imaging Order’s related tasks, use the get_task_objects method on the ImagingOrder object.
from canvas_sdk.v1.data.imaging import ImagingOrder
imaging_order = ImagingOrder.objects.get(id="d2194110-5c9a-4842-8733-ef09ea5ead11")
tasks = imaging_order.get_task_objects().all()
Attributes #
ImagingOrder #
| Field Name | Type |
|---|---|
| id | UUID |
| dbid | Integer |
| created | DateTime |
| modified | DateTime |
| originator | CanvasUser |
| deleted | Boolean |
| committer | CanvasUser |
| entered_in_error | CanvasUser |
| patient | Patient |
| note | Note |
| imaging | String |
| imaging_center | ServiceProvider |
| note_to_radiologist | String |
| internal_comment | String |
| status | OrderStatus |
| date_time_ordered | DateTime |
| ordering_provider | Staff |
| priority | String |
| delegated | Boolean |
| task_ids | String |
ImagingReview #
| Field Name | Type |
|---|---|
| id | UUID |
| dbid | Integer |
| created | DateTime |
| modified | DateTime |
| originator | CanvasUser |
| deleted | Boolean |
| committer | CanvasUser |
| patient_communication_method | ReviewPatientCommunicationMethod |
| internal_comment | String |
| message_to_patient | String |
| is_released_to_patient | Boolean |
| status | ReviewStatus |
| patient | Patient |
ImagingReport #
| Field Name | Type |
|---|---|
| id | UUID |
| dbid | Integer |
| created | DateTime |
| modified | DateTime |
| review_mode | DocumentReviewMode |
| junked | Boolean |
| requires_signature | Boolean |
| assigned_date | DateTime |
| patient | Patient |
| order | ImagingOrder |
| source | ImagingReportSource |
| name | String |
| result_date | Date |
| original_date | Date |
| review | ImagingReview |
| codings | ImagingReportCoding[] |
ImagingReportCoding #
| Field Name | Type |
|---|---|
| dbid | Integer |
| system | String |
| code | String |
| display | String |
| report | ImagingReport |
Enumeration types #
ImagingReportSource #
| Value | Label |
|---|---|
| RADIOLOGY_PATIENT | Radiology Report From Patient |
| VERBAL_PATIENT | Verbal Report From Patient |
| DIRECTLY_RADIOLOGY | Directly Radiology Report |