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

Smart ICU POC #130

Merged
merged 3 commits into from
Jun 3, 2024
Merged

Smart ICU POC #130

merged 3 commits into from
Jun 3, 2024

Conversation

khavinshankar
Copy link
Member

@khavinshankar khavinshankar commented May 28, 2024

In this PR:

  • Added support for configuring either OpenAI or Azure OpenAI via environment variables.
  • Implemented recording of vital statistics based on environment settings.
  • Added a cron job to dump vital statistics and images to S3 based on environment settings.
  • Added functionality to delete vital statistics from the database based on environment settings.
  • Added an API to retrieve the latest accuracy metrics.

Flow:

An hourly cron job automates daily rounds by fetching all monitor assets. If a monitor has no associated patient, it is skipped; otherwise, it retrieves vitals from observations. If the configuration to save vital stats is enabled, it gets the monitor preset from the care system, moves the camera to the preset position, captures an image, and saves it locally. This image is analyzed by GPT to extract vital data, which is then compared with the observation-based vitals to calculate accuracy. The data, including accuracy, GPT model, and API version, is stored in the database, and a daily round is created using the observation-based vitals. If saving vital stats is disabled, a daily round is created using only the observation-based vitals. If observation data is unavailable, the system uses image-based vitals to create the daily round but does not save this data.

Additionally, a second cron job, triggered at midnight if the S3 dump vitals stat environment variable is enabled, dumps all stored vital stats and images to S3 and deletes the local and database-stored data if the delete vital stat on dump configuration is enabled.

@khavinshankar khavinshankar changed the title Dump vitals from observation and image to s3 while creating automated daily round Smart ICU POC May 30, 2024
@gigincg gigincg merged commit d47cffd into develop Jun 3, 2024
3 checks passed
@khavinshankar khavinshankar deleted the store_automated_daily_round_data branch June 3, 2024 07:51
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.

3 participants