Commit 878e5cf
Release/2025.07.1 [main] (#1917)
* feat: Enhances OneUp Health integration for document retrieval (M2-8883) (#1879)
* Enhances OneUp Health integration for document retrieval
Improves the OneUp Health integration by adding functionality
to download and store patient documents associated with EHR data.
This change introduces the ability to fetch documents referenced
in DocumentReference resources, store them in a zip file,
and upload the zip to the EHR storage.
It also introduces generic file uploading and listing capabilities
in the EHR storage, along with helper methods.
* Adds metadata to EHR answers
Adds metadata to the EHR answers table to store information about the uploaded zip files, including their names and sizes.
This allows for better tracking and management of the EHR data stored in the system.
* Adds assertion to task ingest user data
Adds an assertion to check that the result of the
`ingest_user_data` function is not None. This ensures that
the task completes successfully and returns a valid result.
* Update src/apps/integrations/oneup_health/service/oneup_health.py
Co-authored-by: Farmer Paul <paul.hh@metalab.com>
* Refactors EHR metadata handling
Updates EHR metadata to use a dedicated data model.
This change introduces `EHRFileMetadata` and `EHRFileTypeEnum`
to provide more structured and type-safe handling of EHR file
metadata, replacing the previous use of dictionaries. This improves
code clarity and maintainability.
* Adds provider name to EHR document filename
Ensures that the EHR document filename includes the
healthcare provider's name (or ID if name unavailable)
to improve identification and organization.
* Adds buckets for answers and operations
Extends MinIO bucket creation to include buckets for answers and operations, in addition to the existing media bucket.
This allows for a more organized storage structure within MinIO and improves separation of concerns.
* Adds a TODO item to optimize zip file creation.
Adds a TODO item to address potential memory issues
when creating zip files, especially when dealing with
large documents or numerous files.
* Refactors EHR file upload process
Streamlines the EHR file upload process by moving the base path
generation logic into the `EHRStorage.upload_file` method.
This change improves code maintainability and reduces redundancy.
---------
Co-authored-by: Farmer Paul <paul.hh@metalab.com>
* fix: Refactors ehr zip download to use storage path (M2-9443) (#1893)
Simplifies the ehr zip download process by directly using the storage path. This eliminates redundant path construction and improves code readability.
* chore: Added worker configuration to uvicorn startup (#1896)
* fix: Optimizes schedule event retrieval for performance (#1897)
* Optimizes event retrieval for schedule app
Improves performance by fetching events and associated
notifications/reminders in bulk using applet IDs.
This reduces database queries and speeds up schedule loading.
* Optimizes event data retrieval
Reduces the number of database queries required to fetch event
notifications and reminders by retrieving them in bulk.
This change improves performance when fetching schedule events,
especially when retrieving events for a large number of users.
* fix: Temp fix for workers (#1902)
* Fix: Enhances EHR exports to filter only allowed subjects answers (M2-9434) (#1894)
* Adjusts retry delay for task processing errors
Modifies the retry mechanism to use a linear delay
after the first failed attempt. This avoids excessive
wait times when processing tasks that encounter errors.
* Filters EHR answers by allowed subjects
Ensures that exported EHR answers are filtered based on the subjects the user is authorized to access.
If a list of allowed subjects is available, it's added as a filter when querying EHR answers.
* Refines subject ID filtering for EHR answers
Ensures that the target subject IDs for EHR answer exports are
filtered to only include IDs that are allowed for the user.
This prevents unauthorized access to data associated with subjects
outside the user's permitted scope.
* Adds reviewer role to EHR data endpoint test
Extends the EHR data endpoint test to include scenarios for
users with the reviewer role. This ensures that reviewers
can properly access and download EHR data relevant to their
responsibilities.
* Disabling APM for feature environments
* fix: Adds index to activity_items.activity_id (#1901)
Improves query performance by adding an index to the
activity_id column in the activity_items table.
Optimizes database lookups and enhances the efficiency
of related queries.
* [pip] Dependabot: Bump ddtrace from 2.21.8 to 3.9.4 (#1908)
Bumps [ddtrace](https://github.com/DataDog/dd-trace-py) from 2.21.8 to 3.9.4.
- [Release notes](https://github.com/DataDog/dd-trace-py/releases)
- [Changelog](https://github.com/DataDog/dd-trace-py/blob/main/CHANGELOG.md)
- [Commits](DataDog/dd-trace-py@v2.21.8...v3.9.4)
---
updated-dependencies:
- dependency-name: ddtrace
dependency-version: 3.9.4
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [pip] Dependabot: Bump botocore from 1.38.28 to 1.38.46 (#1907)
---
updated-dependencies:
- dependency-name: botocore
dependency-version: 1.38.46
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [pip] Dependabot: Bump google-api-python-client from 2.170.0 to 2.174.0 (#1906)
---
updated-dependencies:
- dependency-name: google-api-python-client
dependency-version: 2.174.0
dependency-type: indirect
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Use the real exception message (#1904)
* chore: Removing workers (#1909)
* chore: Enable Database connection pooling (M2-9464) (#1898)
* chore: Enabled connection pooling
* fixed timeout and docs
* cq
* feat: Add logging around /answers 422 errors (M2-9475) (#1905)
* feat: Add logging around /answers 422 errors (M2-9475)
* Remove unused methods
* M2 9399 transfer ownership (#1888)
* Update errors.py
Adding the expected message error for the transfer ownvership test
* Update tests.py
Adding the new migrated test from TAF:
- Adding the fixture applet_one_bob_coordinator_reviewer
- Adding the tests test_manager_can_not_transfer_ownership
test_respondent_can_not_transfer_ownershipto
test_reviewer_can_not_transfer_ownership
test_editor_can_not_transfer_ownership
test_coordinator_can_not_transfer_ownership
* Update errors.py
deleting the error exception to use TransferOwnershipAccessDenied
* Update tests.py
deleting in all the test
key = uuid.uuid4()
mocker.patch("uuid.uuid4", return_value=key)
updating the exception: AccessDenied.message to TransferOwnershipAccessDenied.message
* M2 9368 api update applets in workspace (#1882)
* Update test_workspaces.py
adding the test test_manager_can_update_applet, pending fix
* Update test_workspaces.py
moving the test to the correct place, test_applet
* Update test_applet.py
adding the test test_manager_can_update_applet to the test_applet file, adding the missing values
* Update test_applet.py
adding 2 new tests:
1. test_coordinator_can_not_update_applet
2. test_editor_can_update_applet
Updating the response for a http status
* Update PR
update the pr after run make cqf command
* fix: Disabling connection pooling (#1916)
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Rodrigo Colao Merlo <rodrigo.merlo@metalab.com>
Co-authored-by: Farmer Paul <paul.hh@metalab.com>
Co-authored-by: Marty <mbanting@yahoo.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: SebasYanik <96058252+SebasYanik@users.noreply.github.com>
Co-authored-by: egodoy-metalab <elder.gordy@metalab.com>1 parent 9f6ca3a commit 878e5cf
13 files changed
Lines changed: 318 additions & 127 deletions
File tree
- compose/fastapi
- copilot/mindlogger-backend
- src
- apps
- activities/db/schemas
- answers
- applets/tests
- transfer_ownership
- config
- infrastructure
- database
- migrations/versions
- http
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 16 | | |
27 | 17 | | |
28 | 18 | | |
29 | 19 | | |
30 | 20 | | |
31 | 21 | | |
32 | 22 | | |
33 | | - | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
127 | 136 | | |
128 | 137 | | |
129 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
1298 | 1299 | | |
1299 | 1300 | | |
1300 | 1301 | | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
| |||
536 | 544 | | |
537 | 545 | | |
538 | 546 | | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
0 commit comments