Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track Active Users in Database #17

Open
1 task done
Vicbi opened this issue May 28, 2024 · 3 comments
Open
1 task done

Track Active Users in Database #17

Vicbi opened this issue May 28, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Vicbi
Copy link
Collaborator

Vicbi commented May 28, 2024

Problem

Currently, the SpeziDataPipelineTemplate lacks functionality to monitor the active users in the database. There is no mechanism to detect when each user last connected or interacted with the system. This limitation makes it challenging to understand user engagement and activity patterns.

Solution

Implement a new feature in the SpeziDataPipelineTemplate to track the last activity date of each user in the database. This feature will work as follows:

  • The mechanism will scan the database to extract the last interaction date for each user. This can be achieved by identifying the date of the most recent FHIR resource collected for each user.
  • The feature will export this information into a CSV file. The CSV file can contain two columns: UserId and LastActivityDate.
  • Ensure that this new feature integrates with the existing pipeline processes and add tests to verify its proper functionality.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@Vicbi Vicbi added the enhancement New feature or request label May 28, 2024
@ArnavS59
Copy link

ArnavS59 commented Oct 18, 2024

Hi @Vicbi ,

Sounds like an interesting feature. However, I had a few questions, regarding the input FHIR data. Would it be possible to receive access to a sample Firestore DB or more data to understand better and cover edge cases?

I also noticed there is sample_df.csv. From the source code, it seems to be a flattened_fhir_dataframe converted to a csv file. Would it be safe to make this assumption? I think it might be easier to work with the dataframe directly to implement the required functionality. What do you think?

@Vicbi
Copy link
Collaborator Author

Vicbi commented Oct 21, 2024

Hi @ArnavS59, thanks for reaching out! You’re right—there are only few data points in the sample_df. If you're looking for more extensive data access, please contact @PSchmiedmayer to discuss this further and explore additional opportunities.

@ArnavS59
Copy link

Hi @Vicbi @PSchmiedmayer ,

I created a PR for it in SpeziDataPipelineTemplate as requested.
To add tests, it seems that the function would need to imported into the main SpeziDataPipeline repo first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants