Skip to content

feat: add DocumentReference, SnapshotImage, PatientIdentificationCard, and related models#1481

Merged
beaugunderson merged 11 commits intomainfrom
bg-add-models
Mar 11, 2026
Merged

feat: add DocumentReference, SnapshotImage, PatientIdentificationCard, and related models#1481
beaugunderson merged 11 commits intomainfrom
bg-add-models

Conversation

@beaugunderson
Copy link
Member

@beaugunderson beaugunderson commented Feb 2, 2026

https://canvasmedical.atlassian.net/browse/KOALA-1979
https://canvasmedical.atlassian.net/browse/KOALA-3759

  • Add presigned S3 URL support to SDK data module file fields. New models (DocumentReference, SnapshotImage, PatientIdentificationCard) and MessageAttachment all now expose presigned URLs via document_url, image_url, and file_url properties.
  • Add new SDK data models: DocumentReference (with DocumentReferenceCategory, DocumentReferenceCoding, DocumentReferenceStatus), Snapshot, SnapshotImage, and PatientIdentificationCard
  • Add a presigned_url utility in canvas_sdk.v1.data.utils that generates S3 presigned URLs using AWS SigV4 without requiring boto3

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 99.23664% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.60%. Comparing base (c3e1de6) to head (ff4e282).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
canvas_sdk/v1/data/document_reference.py 97.67% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1481      +/-   ##
==========================================
+ Coverage   93.57%   93.60%   +0.03%     
==========================================
  Files         487      489       +2     
  Lines       21855    21985     +130     
  Branches     1014     1019       +5     
==========================================
+ Hits        20450    20579     +129     
- Misses       1252     1253       +1     
  Partials      153      153              
Flag Coverage Δ
plugin-abnormal_lab_task_notification 100.00% <ø> (ø)
plugin-api_samples 33.33% <ø> (ø)
plugin-appointment_coverage_label 100.00% <ø> (ø)
plugin-coverage_metadata_sync 100.00% <ø> (ø)
plugin-my_first_plugin 100.00% <ø> (ø)
plugin-patient_summary_chart_groups 100.00% <ø> (ø)
plugin-preact_hello_world 100.00% <ø> (ø)
plugin-send_all_prescriptions 100.00% <ø> (ø)
plugin-simple_note_button_plugin 100.00% <ø> (ø)
plugin-supervising_provider_prescribe 100.00% <ø> (ø)
plugin-supervising_provider_prescribe_protocol 100.00% <ø> (ø)
plugin-upsert_patient_metadata 100.00% <ø> (ø)
plugin-vitals_visualizer_plugin 98.43% <ø> (ø)
py3.11 93.63% <99.23%> (+0.03%) ⬆️
py3.12 93.63% <99.23%> (+0.03%) ⬆️
sdk-core 93.63% <99.23%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@beaugunderson beaugunderson marked this pull request as ready for review February 24, 2026 01:02
@beaugunderson beaugunderson requested a review from a team as a code owner February 24, 2026 01:02
@aduane aduane requested a review from nmpsilva February 26, 2026 17:06
@github-actions github-actions bot added the Jira: Linked PR body contains a Jira link label Mar 3, 2026
The foreign package check requires the first segment of the handler
class path to match the plugin directory name. Without the prefix,
the handler was silently skipped, causing a 404 on /uat.
Default authenticate() returns False, denying all requests.
Cover the *_url properties on DocumentReference, SnapshotImage,
MessageAttachment, and PatientIdentificationCard to fix patch
coverage gaps.
@beaugunderson beaugunderson merged commit 44a20c7 into main Mar 11, 2026
44 checks passed
@beaugunderson beaugunderson deleted the bg-add-models branch March 11, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Jira: Linked PR body contains a Jira link

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants