You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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.
---------
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>
0 commit comments