Release/2025.06.3 [main] - #1890
Merged
Merged
Conversation
* 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.
|
➡️ Preview environment failed to be destroyed |
sultanofcardio
approved these changes
Jun 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merging
release/2025.06.3to main