Skip to content

Release/2025.06.3 [main] - #1890

Merged
mbanting merged 3 commits into
mainfrom
release/2025.06.3
Jun 20, 2025
Merged

Release/2025.06.3 [main]#1890
mbanting merged 3 commits into
mainfrom
release/2025.06.3

Conversation

@mbanting

Copy link
Copy Markdown
Contributor

Merging release/2025.06.3 to main

SebasYanik and others added 3 commits June 6, 2025 11:01
* feat: Add CLI documentation (m2-9070)

* Update README.md

Co-authored-by: Farmer Paul <paul.hh@metalab.com>

---------

Co-authored-by: Farmer Paul <paul.hh@metalab.com>
* Change EHR resource file name pattern and add zip file

Modifies the EHR ingestion process to include the user ID, ensuring proper association of data with the user.
The user ID is now passed to the task, EHR storage, and Oneup Health service to maintain context throughout the process.
It also adds python-slugify package to handle healthcare provider names

* Exports EHR data as zipped files.

Refactors EHR data export to download existing zipped files from storage instead of generating them on the fly.

This improves performance and reduces resource consumption
during the export process. Also changes the answer service to return a data class, so the correct data is passed to the cdn service.

* Adds EHR export filtering capabilities

Enables filtering of EHR export data by respondent IDs,
target subject IDs, activity IDs, and date ranges.

This allows for more targeted and efficient retrieval of
EHR data for specific use cases.

* Enables EHR data export with filenames

Adds the ability to include EHR data filenames in answer exports.
This enhancement provides users with a more complete dataset,
facilitating easier identification and access to associated EHR
files. A new filter is introduced, and a service method is added
to retrieve the EHR filenames based on activity and submit IDs.

* Improves EHR data export and retrieval

Adds compression to the EHR data export zip file to reduce its size.

Moves EHR export filter logic to improve query building and includes EHR
data file in data exports.

Updates EHR storage service and fixes corresponding tests.

* Refactors EHR filename generation

Centralizes EHR filename generation into a single method,
improving code maintainability and consistency.

Updates the EHR export query to include additional filters for completed
ingestions and non-null storage URIs, as well as moving the filter logic.

* Returns 204 if no EHR answers found

Returns a 204 No Content status code when attempting to export EHR answers and none are found, instead of proceeding with an empty export.

* Adds EHR download endpoint tests

Adds tests for the EHR data download endpoint to verify correct behavior,
including handling cases where EHR data is still in progress. It also
refactors the creation of AnswerEHR records to use the upsert method.

* Fixes retry logic in data ingestion task

Corrects the retry mechanism for the data ingestion task to ensure that the retry count is accurately incremented and passed to the retry scheduler. Also, ensure that the error status is correctly managed after reaching the maximum number of retries.

Updates the test case to assert the correct number of retry attempts, reflecting the corrected logic.

* Adds broker wait to Oneup Health task tests

Ensures all tasks finish in Oneup Health task tests by adding a broker wait.
This prevents potential race conditions and ensures test reliability.

* Handles existing user during signup

Adds handling for the case where a user already exists when creating a 1UpHealth user.

This prevents the application from crashing when this scenario occurs, and logs relevant information for debugging.

* Fix healthcare provider name retrieval during ingestion

Modifies the data retrieval process to include healthcare provider information.

This change updates the `check_audit_events` method to return a list of healthcare providers associated with the data transfer events, rather than a single provider name. It also updates the `_process_data_transfer` and `_get_resources` methods to use this list to associate resources with the correct healthcare provider.

* Fix async taskIq test, need to wait all tasks

* Replaces `user_id` with `target_subject_id`

Updates EHR ingestion and export processes to use `target_subject_id`
instead of `user_id` for identifying the subject. This change ensures
that the correct subject is associated with the EHR data, especially
in scenarios where a user might have multiple subjects.

* Updates EHR filename generation

Updates the EHR filename generation to use underscores instead of hyphens as separators for better readability and consistency.

* Filters EHR export by flow

Allows filtering the EHR export by flow IDs.

When flow IDs are provided, it retrieves all activity IDs
submitted by those flows and includes them in the activity
IDs filter for the EHR export. This ensures that all relevant
data is included in the export, even if activities are submitted
through different flows.

* Enables filtering EHR exports by flow

Allows filtering EHR data exports based on specific flows.
Removes redundant activity ID filtering logic in favor of a
more streamlined approach using submit IDs, improving efficiency.

* Removes redundant user exists check

The 1UpHealth API already handles user existence checks.
Therefore, removes the redundant check in the integration code to
simplify error handling.
@github-actions

github-actions Bot commented Jun 18, 2025

Copy link
Copy Markdown

➡️ Preview environment failed to be destroyed

@mbanting
mbanting merged commit a3883c6 into main Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants