fda-ai / fdai Goto Github PK
View Code? Open in Web Editor NEWDiscovering the positive and negative effects of every food and drug in the world!
Home Page: https://fdai.earth
Discovering the positive and negative effects of every food and drug in the world!
Home Page: https://fdai.earth
We need to create a Docusaurus2 instance for our developer documentation in this repository. The documentation should include detailed instructions on how to use our APIs, SDKs, and other developer tools.
As a developer who is new to our API, I want to be able to quickly and easily find the information I need to get started. This includes detailed documentation on each endpoint, example code snippets in various programming languages, and interactive OpenAPI documentation that I can use to explore and test the API.
The Docusaurus2 instance should be set up with the following features:
Experiment with gpt-migrate to Migrate to modularize features listed in README and migrate to a JS framework, maybe T3 Stack
After adding cacao powder as a measurement, I wanted to add a water measurement as well, but every time I try to add the water measurement, it keeps on showing me the previous cacao powder measurement as seen below:
The same happened when trying to input other measurements such as Himalayan salt after inputting an espresso:
I notice it happens when you want to record two or more measurements after another.
You have to go to another page for you to be able to record the new measurement properly.
We want an AI agent, named FDAi, that will eventually serve as the director of the FDAi project. This AI agent will be responsible for automating various repository management tasks, significantly improving efficiency and ensuring consistent project progression. The ultimate goal is to create a self-improving system that will autonomously manage the repository, contributing to the global mission of accelerating clinical research and maximizing health and happiness.
feedback
or suggestion
.The relationship between a given variable and the actual figure is usually inconsistent.
Example below:
Also, the guiltiness in the example is not found in the study, which is linked to:
https://app.quantimo.do/variables/1872
More examples of the relationships below:
Link to the vitamin D mega study mentioned in the example above:
https://app.quantimo.do/variables/95802
Also, the studies show similar descriptions, such as "very slightly higher" ,"very slightly lower" for huge deviations in percentage:
User Story:
— As a digital health company, I want a self-hosted data aggregation service, so I can add integrations, save money, reduce latency, adhere to compliance requirements.
Current Implementation:
— Back End
— React Demo
— React Implementation
Alternative Implementations:
— https://docs.nango.dev
See
https://github.com/wishonia/FDAi/edit/develop/libs/black-box-optimization/README.md
☝️The image above is what we're trying to achieve here.
To determine the effects of various factors on health outcomes, we currently apply pharmacokinetic modeling over various onset delay and duration of action hyper-parameters. We combine that with some other parameters for each of Hill's criteria for causality.
The distributions in this type of data aren't super normal, and you've got the onset delays and durations of action, so regular Pearson correlations don't work so well. So, we mainly focus on change from baseline. There's a ton of room for improvement by controlling using instrumental variables or convolutional recursive neural networks.
Hybrid Predictive Control Black Box Models seem most appropriate.
The best file is probably arthritis-factor-measurements-matrix-zeros-unixtime.csv. It's a matrix of years of self-reported
Arthritis Severity Rating measurements and hundreds of potential factors over time.
The first row is the variable names. The first column is Unix timestamp (seconds since 1970-01-01 00:00:00 UTC).
To make it easier to analyze some preprocessing has been done. This includes zero-filling where appropriate. Also,
the factor measurement values are aggregated values preceding the Arthritis measurements based on the onset
delay and duration of action.
The aggregation method and other hyper-parameters can be found by putting the Variable Name in either
https://api.fdai.earth/VARIABLE_NAME_HERE.
We collect data on food and drug intake in addition to symptom severity ratings.
This data is fed into a predictive control model system, a concept borrowed from behavioral medicine and control systems engineering. This system uses the data to continually refine its suggestions, helping you optimize your health and well-being.
Adaptive intervention is a strategy used in behavioral medicine to create individually tailored strategies for the prevention and treatment of chronic disorders. It involves intensive measurement and frequent decision-making over time, allowing the intervention to adapt to the individual's needs.
Predictive control models are a control system that uses data to predict future outcomes and adjust actions accordingly. In the context of Longevitron, this means using the data it collects to predict your future health outcomes and adjust its suggestions to optimize your health.
A control systems engineering approach for adaptive behavioral interventions: illustration with a fibromyalgia intervention - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4167895/
Consider a hypothetical scenario where you're dealing with a chronic condition like fibromyalgia. We collect data on your symptoms, medication intake, stress levels, sleep quality, and other relevant factors. It would then feed this data into its predictive control model system, which would use it to predict your future symptoms and adjust your treatment plan accordingly.
This could involve suggesting changes to your medication dosage, recommending lifestyle changes, or even alerting your healthcare provider if it detects a potential issue. The goal is to optimize your health and well-being based on your needs and circumstances.
☝️The image above is what we're trying to achieve here.
To determine the effects of various factors on health outcomes, we currently apply pharmacokinetic modeling over various onset delay and duration of action hyper-parameters and combine that with some other parameters for each of Hill's criteria for causality.
The distributions in this type of data aren't super normal, and you've got the onset delays and durations of action so regular Pearson correlations don't work so well. So we mainly focus on change from baseline. There's a ton of room for improvement by controlling using instrumental variables or convolutional recursive neural networks.
Hybrid Predictive Control Black Box Models seem most appropriate.
It's a matrix of years of self-reported Arthritis Severity Rating measurements and hundreds of potential factors over
time.
The first row is the variable names. The first column is Unix timestamp (seconds since 1970-01-01 00:00:00 UTC).
To make it easier to analyze some preprocessing has been done. This includes zero-filling where appropriate. Also,
the factor measurement values are aggregated values preceding the Arthritis measurements based on the onset
delay and duration of action.
The aggregation method and other hyper-parameters can be found by putting the Variable Name in either
https://studies.fdai.earth/VARIABLE_NAME_HERE
.Analyzing the effects of a treatment based on observational time series data is a common need in many domains like medicine, psychology, and economics. However, this analysis often faces several key challenges:
This article provides a comprehensive methodology to overcome these challenges and determine whether a treatment makes an outcome metric better, worse, or has no effect based on sparse, irregular time series data with missingness.
Before statistical analysis can begin, the data must be preprocessed:
Proper preprocessing sets up the data for robust analysis.
With cleaned data, a rigorous methodology can determine treatment effects:
First, split the data into three segments:
This enables separate analysis of the acute and cumulative effects.
To analyze acute effects, compare the 'during treatment' segment vs the 'pre-treatment' segment:
To analyze cumulative effects, build regression models between the outcome variable and the cumulative treatment dosage over time:
Combine the acute and cumulative insights to determine the overall effect direction and statistical significance.
For example, acute worsening but long-term cumulative improvement would imply an initial side effect but long-term benefits. Lack of statistical significance would imply no effect.
To determine the optimal dosage, incrementally adjust the daily dosage amount in the models above. Determine the dosage that minimizes the outcome variable in both the acute and cumulative sense.
Absolutely, given your constraints and requirements, here's a refined methodology:
Data Preprocessing:
Lagged Regression Analysis:
Reverse Causality Check:
Cross-Correlation Analysis:
Granger Causality Tests:
Moving Window Analysis (for cumulative effects):
Optimal Dosage Analysis:
Control for Confounders (if data is available):
Model Diagnostics:
Interpretation:
By adhering to this methodology, you will be working with actual observations, minimizing the introduction of potential errors from imputation. The combination of lagged regression, Granger causality tests, and moving window analysis will provide insights into both acute and cumulative effects, onset delays, and optimal treatment dosages.
Property | Type | Nullable | Description |
---|---|---|---|
id |
int auto_increment | No | Unique identifier for each correlation entry. |
user_id |
bigint unsigned | No | ID of the user to whom this correlation data belongs. |
cause_variable_id |
int unsigned | No | ID of the variable considered as the cause in the correlation. |
effect_variable_id |
int unsigned | No | ID of the variable considered as the effect in the correlation. |
qm_score |
double | Yes | Quantitative metric scoring the importance of the correlation based on strength, usefulness, and causal plausibility. |
forward_pearson_correlation_coefficient |
float(10, 4) | Yes | Statistical measure indicating the linear relationship strength between cause and effect. |
value_predicting_high_outcome |
double | Yes | Specific cause variable value that predicts a higher than average effect. |
value_predicting_low_outcome |
double | Yes | Specific cause variable value that predicts a lower than average effect. |
predicts_high_effect_change |
int(5) | Yes | Percentage change in the effect when the predictor is near the value predicting high outcome. |
predicts_low_effect_change |
int(5) | No | Percentage change in the effect when the predictor is near the value predicting low outcome. |
average_effect |
double | No | Average value of the effect variable across all measurements. |
average_effect_following_high_cause |
double | No | Average value of the effect variable following high cause variable measurements. |
average_effect_following_low_cause |
double | No | Average value of the effect variable following low cause variable measurements. |
average_daily_low_cause |
double | No | Daily average of cause variable values that are below average. |
average_daily_high_cause |
double | No | Daily average of cause variable values that are above average. |
average_forward_pearson_correlation_over_onset_delays |
float | Yes | Average of Pearson correlation coefficients calculated over different onset delays. |
average_reverse_pearson_correlation_over_onset_delays |
float | Yes | Average of reverse Pearson correlation coefficients over different onset delays. |
cause_changes |
int | No | Count of changes in cause variable values across the dataset. |
cause_filling_value |
double | Yes | Default value used to fill gaps in cause variable data. |
cause_number_of_processed_daily_measurements |
int | No | Count of daily processed measurements for the cause variable. |
cause_number_of_raw_measurements |
int | No | Count of raw data measurements for the cause variable. |
cause_unit_id |
smallint unsigned | Yes | ID representing the unit of measurement for the cause variable. |
confidence_interval |
double | No | Statistical range indicating the reliability of the correlation effect size. |
critical_t_value |
double | No | Threshold value for statistical significance in correlation analysis. |
created_at |
timestamp | No | Timestamp of when the correlation record was created. |
data_source_name |
varchar(255) | Yes | Name of the data source for the correlation data. |
deleted_at |
timestamp | Yes | Timestamp of when the correlation record was marked as deleted. |
duration_of_action |
int | No | Duration in seconds for which the cause is expected to have an effect. |
effect_changes |
int | No | Count of changes in effect variable values across the dataset. |
effect_filling_value |
double | Yes | Default value used to fill gaps in effect variable data. |
effect_number_of_processed_daily_measurements |
int | No | Count of daily processed measurements for the effect variable. |
effect_number_of_raw_measurements |
int | No | Count of raw data measurements for the effect |
variable. |
| forward_spearman_correlation_coefficient
| float | No | Spearman correlation assessing monotonic relationships between lagged cause and effect data. |
| number_of_days
| int | No | Number of days over which the correlation data was collected. |
| number_of_pairs
| int | No | Total number of cause-effect pairs used for calculating the correlation. |
| onset_delay
| int | No | Estimated time in seconds between cause occurrence and effect observation. |
| onset_delay_with_strongest_pearson_correlation
| int(10) | Yes | Onset delay duration yielding the strongest Pearson correlation. |
| optimal_pearson_product
| double | Yes | Theoretical optimal value for the Pearson product in the correlation analysis. |
| p_value
| double | Yes | Statistical significance indicator for the correlation, with values below 0.05 indicating high significance. |
| pearson_correlation_with_no_onset_delay
| float | Yes | Pearson correlation coefficient calculated without considering onset delay. |
| predictive_pearson_correlation_coefficient
| double | Yes | Pearson coefficient quantifying the predictive strength of the cause variable on the effect. |
| reverse_pearson_correlation_coefficient
| double | Yes | Correlation coefficient when cause and effect variables are reversed, used to assess causality. |
| statistical_significance
| float(10, 4) | Yes | Value representing the combination of effect size and sample size in determining correlation significance. |
| strongest_pearson_correlation_coefficient
| float | Yes | The highest Pearson correlation coefficient observed in the analysis. |
| t_value
| double | Yes | Statistical value derived from correlation and sample size, used in assessing significance. |
| updated_at
| timestamp | No | Timestamp of the most recent update made to the correlation record. |
| grouped_cause_value_closest_to_value_predicting_low_outcome
| double | No | Realistic daily cause variable value associated with lower-than-average outcomes. |
| grouped_cause_value_closest_to_value_predicting_high_outcome
| double | No | Realistic daily cause variable value associated with higher-than-average outcomes. |
This rigorous methodology uses interrupted time series analysis, regression modeling, statistical testing, onset/duration modeling, and optimization to determine treatment effects from sparse, irregular observational data with missingness. It establishes causality and significance in both an acute and cumulative sense. By finding the optimal dosage, it provides actionable insights for maximizing the benefits of the treatment.
When signing in using a new mobile device, you go through the initial setup phase again with the intro and onboarding.
That is also quite a barrier to start using the app on a new device in one's browser.
Ideally, the User Experience would be clear enough for it to be enough to only show those once.
We aim to improve our governance system by implementing a robust system for proposals and voting. The desired system should be capable of handling time-limited proposals to circumvent analysis paralysis and unnecessary delays.
A proposal for the system can be found in this document: https://docs.google.com/document/d/1hkl5n7WlG6Nmr-ZvPU_oW7D-EHZ9dSbGoZdt4ttaZwM/edit?usp=driveyqsdk
Our current system, Swae (https://dfda.swae.io), has limited functionality - it neither works on mobile devices nor does it integrate with Discord. Furthermore, GitHub Discussion polls (#80) also lack mobile support.
Other platforms like Discourse and Discord (https://discord.gg/XQqEPmkK5K) have their own drawbacks, such as the inability to perform rank choice voting, and a generally low engagement rate.
Potential platforms to consider for our voting system include:
The new system must meet the following criteria:
User Story 1: As a user, I want to be able to submit and vote on proposals from any device so that I can participate in the governance process at my convenience.
User Story 2: As a user, I want my votes to carry weight proportional to my token holdings so that the influence of my decisions is accurately represented.
User Story 3: As a user, I want the voting results to be hidden until the end of the voting period to ensure that my vote is uninfluenced and independent.
User Story 4 (Nice to have): As a user, I want the option to rank my choices in a vote to provide more nuance to my voting decisions.
We welcome suggestions, ideas, and feedback on how to improve our governance system. Please feel free to share your thoughts below.
When I try to record a measurement it some goes to the study page as shown below:
Study page:
https://app.curedao.org/app/public/#/app/study
Record a measurement page:
https://app.curedao.org/app/public/#/app/measurement-add-search
We aim to develop a server-side Next.js API that will process images into measurements, handling product labels, UPCs, nutrition facts, ingredient lists, or images of foods. We'll also create a client-side library, compatible with any JavaScript framework, that communicates with this API. Both components will be developed within our Nx monorepo, using TypeScript.
Here's where the scanning is currently done:
https://github.com/curedao/decentralized-fda/blob/75423cb44f6f2a3b43720e2b6e7ff95bced06c0f/apps/dfda-1/public/app/public/js/controllers/searchPageCtrl.js#LL63C14-L63C25
Here are the UPC usages for reference:
https://github.com/search?q=repo%3Acuredao%2Fdecentralized-fda%20upc&type=code
User Story
As a user, I want to use my device's camera to take a picture of a product (label, UPC, nutrition facts, ingredients list, or food image), and have the app convert this image into an array of measurements for me.
Steps
Measurements should be an array with at least the following properties:
combinationOperation
– string – Way to aggregate measurements over time. SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED.startAt
– required – The current time in UTC ISO 8601 YYYY-MM-DDThh:mm:ss
date time format. Time zone should be UTC and not local.value
– double – required – Measurement value. Default to 1 serving
for foods, x %RDA in one serving for nutrition facts, maybe 1 for yes with yes/no
unit, unless we can figure out a more precise unit from the measurementunitName
– string – required – Unit of measurement like serving
, %RDA
, yes/no
variableCategoryName
– string – Ex: Treatments, Foods, or Nutrients. See options here https://curedao.readme.io/reference/getvariablecategoriesvariableName
– string – required – Name of the variable for which we are creating the measurement recordsupc
– string – UPC or other barcode scan resultnote
– string – Optional additional informationServer-side Next.js API Features
Client-side Library Features
Developer Registration Page
We will include a developer registration page on the Next.js site. This page will generate API keys for the client-side libraries to use when interacting with the server-side API.
Relevant Libraries and APIs
https://opendata.stackexchange.com/questions/17714/food-ingredient-api-database
Demo Implementation
We'll create an Img2Measurements
demo application in the apps
folder within the monorepo. This application will demonstrate the usage of the client-side library and be built using a cross-platform framework like React Native.
Testing
We'll write unit tests for all functionality in the client-side library and the server-side API. Cypress UI tests should be implemented in the demo app.
Automatic Deployments
We'll set up GitHub Actions for automatic deployments. The server-side API will be deployed to Vercel and the client-side library will be published to npm.
GitHub Actions for Testing
Before merging any feature branches to the develop branch, we'll require that all tests are run via GitHub Actions and that all tests pass successfully.
Library Publishing
The client-side library should be included in the libs
folder of our Nx monorepo.
Documentation
We'll include comprehensive documentation in the README.md and also publish it on a site built using Mintlify. Documentation should be accessible and follow web content accessibility guidelines (WCAG).
Additional Clarifications
We want to be able to include the barcode in any app with a script tag that has
onVariableSelected
callback functionScrape supplement purchases from your Amazon account or food from Instacart, for instance.
We have a simple tracking reminder extension that could be added to:
https://github.com/FDA-AI/FDAi/tree/develop/apps/browser-extension
Link to the "Add measurement" page
https://app.curedao.org/app/public/#/app/measurement-add
The loading times and processing power required to use the app in a browser is substantial.
Discovered on both computer and mobile devices.
Ideally, this would dramatically be reduced, so all potential users could use the app regularly in a web browser with no issues.
I made a library for this:
https://github.com/FDA-AI/FDAi/tree/develop/libs/text-2-measurements
It works well for the test cases here:
https://github.com/FDA-AI/FDAi/blob/develop/libs/text-2-measurements/src/lib/statement-2-measurements.json
We'll have to add more test cases and set up automated testing with GitHub actions to avoid regression.
We can create a NextJS app in the apps
folder with an API and developer portal for people to sign up, create API keys, and manage usage, similar to the OpenAI API key management system.
https://platform.openai.com/api-keys
Ideally, it would be easily deployable on Vercel.
We'll also want to implement caching for when we receive identical requests so we don't waste so much money on the LLM calls.
This is test Issue for pipedream
setting up issue resolver agent
Kindly check your ClickUp form settings.
RE: "This form is currently unavailable"
Overview:
This document outlines the workflow and implementation details for creating an AI agent that interacts with patients daily, collects health-related data, structures it as time series measurements, and stores it in a database using the OpenAI API.
Workflow:
Daily Interaction Setup:
Data Collection:
Data Structuring:
Data Storage:
Implementation Details:
OpenAI API Integration:
Database Technology:
Security and Privacy:
User Interface:
Monitoring and Updates:
Conclusion:
Creating an AI agent for daily patient interactions and data collection involves setting up a reliable interaction schedule, employing natural language processing for data collection, structuring the data for analysis, and ensuring secure data storage. This system enables personalized health recommendations and supports ongoing health management.
FDAi Agent: "Good morning! Let's do our daily check-in. Can you provide today's intake of specific foods, supplements, and any medications, including doses and units?"
Patient: "Sure. For breakfast, I had eggs and white bread, and for lunch, fried chicken with french fries. I haven't taken my supplements yet, but I plan to take vitamin D and omega-3. I'm on Fluoxetine for depression."
FDAi Agent: "Thank you. How much vitamin D and omega-3 will you take, and what's the dosage of Fluoxetine?"
Patient: "I take 1000 IU of vitamin D, 1000 mg of omega-3, and 20 mg of Fluoxetine."
FDAi Agent: "Let's optimize that. Based on your conditions and intake:
Forgotten items? Any other foods, medications, or supplements not mentioned?
Supplement efficacy: You've been on vitamin D and omega-3 for 3 months with minimal improvement in psoriasis severity. Considering the expense—approximately $30 monthly on these supplements—it might be wise to reallocate funds towards higher doses or different supplements, like turmeric (curcumin), which has shown benefits in inflammation and depression at 500 mg daily.
We'll also track zeros for non-taken items for accurate causal inference. It's crucial to monitor onset delays and action durations, adjusting our strategy as we gather more data."
This approach ensures daily, precise tracking of the patient's intake and symptoms, allowing for data-driven adjustments and recommendations tailored to their specific health conditions and lifestyle.
When I visit my grandma, I try to collect data on her cognitive performance and factors that could influence them.
I also talk to her for a while. But she can only remember 5 minutes, so I repeat myself 12 times in an hour.
She'd probably like to talk to me 16 hours a day, but I'd get even less done than I already do.
So it would be cool to have a robocaller service that calls lonely old people, reminds them to take their grandma, and talks to her for about 16 hours.
Also, I'd like it if I got a phone call every day and could do my treatment/diet/symptom tracking that way. i.e.
Then it would convert the responses to measurement objects and post to whatever endpoint is specified.
Example Measurement Array for the response, I took 5 grams of NMN
:
[
{
"combinationOperation" : "SUM",
"startAt" : "{ISO_DATETIME_IN_UTC}",
"unitName" : "grams",
"value" : "5",
"variableCategoryName" : "Treatments",
"variableName" : "NMN",
"note" : "{MAYBE_THE_ORIGINAL_STATEMENT_FOR_REFERENCE}"
}
]
Nice possible future feature:
Since people with Alzheimer's don't remember what you said before, ideally, it could eventually use verbal and maybe frequency data to quantify how nice each statement makes her feel. Then, it could gradually say more of the nice things that make her the happiest since it's usually like she heard it the first time.
For reference and cannibalization, I implemented statement intent identification and handling in PHP and JavaScript here
https://github.com/search?q=repo%3AFDA-AI%2FFDAi%20intent&type=code
It's dumb relative to what's possible with LLM's now, though:
We may want a T3 framework API or something less monolithic and more maintainable.
Vocode also has a great framework for this. The response times in the demo are superfast.
https://docs.vocode.dev/welcome
Phase 1 until April 1st
General User stories for testing:
Functional stories:
Create an API endpoint that returns colored images based on a number provided: 0=Black, >0=Yellow .
Create an NFT contract with updatable metadata using Revise (http://app.revise.network/).
Send the Revise NFT to Wallet A.
Create an API endpoint and a button that:
https://example.com/donationImage/{amountDonated}
.Create a job that runs and updates the NFT color:
When the NFT is in Wallet A, the color should be yellow.
When the NFT is moved to Wallet B, the color should be black.
When the NFT is moved back to Wallet A, the color should be yellow again.
The job changes the color of the NFT based on whether it is associated with any donations or not. When the NFT is in Wallet A, it is associated with donations because the owner of Wallet A has made donations to the smart contract. Therefore, the job sets the color to yellow based on the current amount of donations. When the NFT is moved to Wallet B, it is no longer associated with any donations because the owner of Wallet B has not made any donations to the smart contract. Therefore, the job sets the color to black to indicate that the NFT is not associated with any donations. When the NFT is moved back to Wallet A, it is again associated with donations because the owner of Wallet A has made donations to the smart contract. Therefore, the job sets the color back to yellow based on the current amount of donations.
https://docs.google.com/document/d/1_XrLAnj15dXUr7tgWCdJWNoaQseslrsF1GUEXz1KEGQ/edit#
If a user wants to see results for memory, and quickly see Caloric Intake or the strongest improver of memory,
they should be able to, at the top of the page, Sort by > alphabetically (ascending), alphabetically (descending), effect size (large), effect size (small).
--Other sort field could be n# of the study.
Create GitHub issues for all the the tasks in https://github.com/FDA-AI/FDAi/blob/develop/docs/treaty/strategy.md
scripts/jobs/create_issues_from_strategy_doc.py
✓ 12d90a2 Editscripts/jobs/create_issues_from_strategy_doc.py
✓ Editdocs/contributing/task-management/create-a-task.md
✓ aa8cd99 Editdocs/contributing/task-management/create-a-task.md
✓ EditAs a user of CureDAO, I want to obtain data from any health app or wearable device in a standardized format consisting of an array of measurements with the following properties:
We already have an Express-based gateway server with a Prisma schema here:
https://github.com/curedao/curedao-monorepo/tree/develop/apps/api
However, it doesn't use a framework, so it's not well-organized. Also, it's vanilla JavaScript, so it isn't type-safe.
Ideally, we'd have a TypeScript-based API Gateway server that acts as a proxy to these APIs, utilizing Prisma Client for database operations. The API Gateway server will handle the authentication, authorization, rate limiting, and caching of requests to the 3rd party APIs.
CureDAO interacts with multiple 3rd party APIs, each with its own authentication and authorization process. Managing these processes for each API separately can be time-consuming and error-prone. Furthermore, making direct requests to the 3rd party APIs can result in performance issues due to network latency and the number of requests made.
To address these issues, we need an API Gateway server that acts as a proxy to the 3rd party APIs, utilizing TypeScript and Prisma Client for efficient and type-safe code. The API Gateway server will handle the authentication and authorization processes for the 3rd party APIs, as well as rate limiting and caching of requests. This will improve the performance and security of CureDAO.
More details here:
https://docs.curedao.org/constitution/3-platform
Create a TypeScript-based API Gateway server that acts as a proxy to the 3rd party APIs and utilizes Prisma Client for database operations. The API Gateway server should be designed to handle multiple APIs and should be flexible enough to support new APIs as they are added.
A TypeScript-based API Gateway server using a framework such as NestJS. The API Gateway server will act as a reverse proxy, routing requests to the appropriate backend server based on the path and HTTP method. It will also handle the authentication and authorization processes for the 3rd party APIs using OAuth2 or other authentication mechanisms. The API Gateway server will also handle rate limiting and caching of requests to improve performance.
The API Gateway server should be designed to be scalable and fault-tolerant. It should be able to handle a large number of requests and should be able to recover from failures quickly. It should also utilize Prisma Client for efficient and type-safe database operations.
The acceptance criteria for this issue are as follows:
We already have an Express-based gateway server here:
https://github.com/curedao/curedao-monorepo/tree/develop/apps/api
https://github.com/curedao/curedao-monorepo/blob/develop/apps/api/prisma/schema.prisma
Current API Documentation: https://curedao.readme.io/reference
I haven't been able to use the search bar for several days in a row now for some reason.
Air quality has been shown to impact Alzheimer's severity and cognition.
It would be great if we could do a cognition study that inferred cognitive performance from speech and a minicog test administered by a robot with speech, speech recognition, and an artificial nose.
Cognitive Performance Inference from Speech: Develop a feature that allows Longevitron to analyze speech patterns and infer cognitive performance. This will involve using speech recognition technology to monitor changes in speech fluency and word usage over time.
Mini-Cog Test Administration: Implement a feature that allows Longevitron to administer the Mini-Cog test, a brief cognitive test involving a memory recall task and a clock-drawing task. Longevitron should be able to guide its owner through the test, record the results, and track changes over time.
Air Quality Monitoring with an Artificial Nose: Integrate an artificial nose sensor into Longevitron to monitor air quality. This sensor could be based on the technology developed by Microsoft's AI Lab. The data collected by this sensor should be correlated with cognitive performance data to study the impact of air quality on cognition.
This enhancement will allow Longevitron to provide a comprehensive approach to cognitive health monitoring and research. It could lead to earlier detection of cognitive decline, better understanding of the environmental factors that impact cognitive health, and more effective interventions to improve cognitive performance and quality of life.
This seems to be the best one for indoor monitoring:
https://www2.purpleair.com/products/purpleair-touch
API Docs
https://community.purpleair.com/t/making-api-calls-with-the-purpleair-api/180
Example API Connectors Located Here:
https://github.com/wishonia/FDAi/tree/72a45934262b88bb99bf4f527edd0d014e0e57ac/apps/dfda-1/app/DataSources/Connectors
This would be a good opportunity to document how to add a new connector.
Please comment if you're interested, and I can help you build it.
The goal is to publish a universal health intervention protocol that can be shared on the blockchain for anyone to use and report results on health outcomes, and reward various actors using cost savings from prevented healthcare spending.
Identify or create a standard schema for intervention protocols: We will need to define a standard schema for the intervention protocols to ensure consistency and ease of use. This schema should include fields such as the intervention name, purpose, target population, duration, and expected outcomes.
There are existing schemas for health interventions protocols that can be used as a basis for our universal protocol schema. For example, the National Library of Medicine's (NLM) Health Services Research Projects in Progress (HSRProj) uses a standardized schema to collect information on ongoing health services research projects. The schema includes fields such as the project title, research objectives, study design, study population, and expected outcomes.
In addition, the Consolidated Standards of Reporting Trials (CONSORT) statement provides a standard schema for reporting randomized controlled trials, which can also be useful in developing a schema for health intervention protocols.
We can use these existing schemas as a starting point and tailor them to our specific needs for a universal health intervention protocol schema.
Find or create a JavaScript library for storing and displaying the protocol: We will need to create or find a JavaScript library that can store and display the protocol. This library should be easy to use and integrate into any app.
Seems lovely:
Implement the protocol on the blockchain: Once we have the standard schema and JavaScript library, we can implement the protocol on the blockchain. This will make the protocol universally accessible from any app, as long as the app integrates the JavaScript library.
Can be done with existing platform (https://github.com/curedao/decentralized-fda/tree/develop/apps/dfda-1), OpenCures, Healome, Reputable.Health or others.
Ideally, WorldCoin or some KYC would be integrated eventually.
Establish a rewards system: To incentivize people to create and follow the protocols, we can establish a rewards system based on the health outcomes and cost savings. For example, once the impacts on health were identified for a protocol, and it was determined to be beneficial, we could calculate the health cost savings to the government or insurance companies.
The government could then distribute the savings as follows (or some other proposed allocation):
a. Keep 25% of the savings (or reduce taxes)
b. Give 25% to the person who posted the protocol (You)
c. Give 25% to the person who followed the protocol and reduced their costs
d. Give 25% to the dFDA or whatever apps recorded the data or something
Ideally, this would be implemented in the smart contract with DBDAO or whatever.
Please comment with any suggested modifications or interest in this issue.
It's currently a pain to:
Cloudron solves these problems by automating most of the processes.
LLMs are amazing. However, they can only be trained on existing public research papers, which suffer from many shortcomings.
Furthermore, there has only been thorough research on a small percentage of available data. The rest of the data exists as dark matter in silos. By creating an easily deployable local instance for sharing and deriving business value from health data, we can shine light on this dark matter data to produce valuable discoveries.
Currently, Cloudron is set up so that each application uses its own database, which is not accessible to other applications. This issue aims to create a Cloudron instance that makes it possible to automatically install any digital health application and allows them to share the same database or easily sync between databases. Relevant Links:
Here are some Cloudron applications and their usefulness for a digital health platform:
These applications can be installed and managed on Cloudron, providing a centralized platform for digital health data aggregation, storage, and analysis2
The project aims to customize Cloudron (or create a setup script) to support shared databases and enable the automatic installation of open-source digital health applications. The goal is to improve integration and data sharing between digital health applications, enhancing the overall user experience and functionality of self-hosted solutions.
By following these steps, you can streamline the deployment and management of your open-source project on Cloudron, making it easier for users to install and maintain your app.
This customization will enable better integration and data sharing between digital health applications, improving the overall user experience and functionality of self-hosted solutions.
(I'm sure I'm missing a million, so please suggest any other valuable projects in the comments.)
To run a Cloudron health instance locally in Vagrant instances and utilize federated learning to share synthetic analytical results while keeping raw data local, you can follow these steps:
By following these steps, you can create a digital health ecosystem that leverages federated learning and synthetic data sharing while keeping raw data secure and local.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.