Detected Issue

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_issues import DetectedIssue

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

Attributes #

DetectedIssue #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
identifiedDateTime
deletedBoolean
originatorCanvasUser
committerCanvasUser
entered_in_errorCanvasUser
patientPatient
codeString
statusString
severityString
referenceString
issue_identifierString
issue_identifier_systemString
detailString

DetectedIssueEvidence #

Field NameType
dbidInteger
systemString
versionString
codeString
displayString
user_selectedBoolean
detected_issueDetectedIssue