DetectedIssue

Introduction #

The DetectedIssue model represents an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient.

Basic usage #

To get a detected issue by identifier, use the get method on the DetectedIssue model manager:

from canvas_sdk.v1.data.detected_issue import DetectedIssue

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

If you have a patient object, the detected issues for a patient can be accessed with the detected_issues attribute on a Patient object:

from canvas_sdk.v1.data.patient import Patient

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

Evidence #

The codings for the evidence of a detected issue can be accessed with the evidence attribute on a DetectedIssue object:

from canvas_sdk.v1.data.detected_issue import DetectedIssue
from logger import log

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

for coding in detected_issue.evidence.all():
    log.info(f"system:  {coding.system}")
    log.info(f"code:    {coding.code}")
    log.info(f"display: {coding.display}")

Filtering #

Detected issues can be filtered by any attribute that exists on the model.

Filtering for detected issues is done with the filter method on the DetectedIssue model manager.

By attribute #

Specify an attribute with filter to filter by that attribute:

from canvas_sdk.v1.data.detected_issue import DetectedIssue

detected_issues = DetectedIssue.objects.filter(status="active")

Committed detected issues #

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

from canvas_sdk.v1.data.detected_issue import DetectedIssue

committed_detected_issues = DetectedIssue.objects.committed()

Attributes #

DetectedIssue #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
identifiedDateTime
originatorCanvasUser
committerCanvasUser
entered_in_errorCanvasUser
patientPatient
codeString
statusDetectedIssueStatus
severityDetectedIssueSeverity
referenceString
issue_identifierString
issue_identifier_systemString
detailString
evidenceDetectedIssueEvidence[]
assessed_coding_gap_eventsAssessCodingGapEvent[]
created_coding_gap_eventsCreateCodingGapEvent[]
deferred_coding_gap_eventsDeferCodingGapEvent[]
validated_coding_gap_eventsValidateCodingGapEvent[]

DetectedIssueEvidence #

Field NameType
idUUID
dbidInteger
systemString
versionString
codeString
displayString
user_selectedBoolean
detected_issueDetectedIssue

DetectedIssueStatus #

Available on the model as DetectedIssue.Status, so a comparison reads detected_issue.status == DetectedIssue.Status.FINAL.

EnumValueLabel
REGISTEREDregisteredRegistered
PRELIMINARYpreliminaryPreliminary
CANCELLEDcancelledCancelled
AMENDEDamendedAmended
FINALfinalFinal
CORRECTEDcorrectedCorrected
ENTERED_IN_ERRORentered-in-errorEntered in Error

DetectedIssueSeverity #

Available on the model as DetectedIssue.Severity. A detected issue that carries no severity holds an empty string rather than None.

EnumValueLabel
HIGHhighHigh
MODERATEmoderateModerate
LOWlowLow