Inspiration
The inspiration for this project was that there are billions of data points associated with hospital systems and in theory there should be extensive longitudinal data on patients as we experience health issues and receive care over our lifetimes. So, I wanted to use the power of ML regression models to test whether readmission could be predicted based on available data.
What it does
What this app does is extract data from the Azalea Health Ambulatory EHR API and analyzes it in a way that results in an evaluation of the predictive ability of three ML regression models. It also presents the results as a dashboard.
How we built it
Our Approach
- FHIR API Selection
- Batch processing of API definitions, classifications, categorization, and initial recommendations for use in ReCure AI using OpenAI's batch processing feature. File available here: https://github.com/vicknentura/Predictive-AI-in-Healthcare-with-FHIR/blob/main/MeldRx%20Hackathon%20API%20Selection.jsonl.
- Creating a shortlist of APIs based on the GPT4 outputs based on categorization as 'clinical data' and 'patient management'
- Choosing the two lead options based on API open access and workspace similarity to Ventura & Associates HTA Advisors' cloud partners (GCP and Azure)
- Azalea EHR (Electronic Health Records) by Azalea Health; https://devportal.azaleahealth.com/overview/start
- CareCloud Charts by CareCloud Health, Inc. (3.0); https://api-datamanager.carecloud.com/apiaccess
- API Testing and Feature Selection
- Extensive schema/data structure evaluation using the provided documentation (https://www.postman.com/azalea-api/workspace/azalea-ambulatory-public-api/overview) and an abridged version of our proprietary QA test for APIs (https://docs.google.com/document/d/1eqADHHct6T26Xpc0Ue4z1SjUpA2EzLdmKfUvj1fFhyc/edit?usp=sharing)
- Contract testing
- Parameter validation
- Response validation
- To select the key features of our model, we decided to consider three main areas: pre-existing conditions, condition under evaluation which includes a patient-reported measure component, and care administered. This is be cause we wanted to analyze a focused set of variables as close as possible to the acute care episode. This logic implies that readmission is a factor of how complex the condition is for, the underlying health condition of the patient, and the quality of care or intervention that was provided by the care team.
- Pre-existing Conditions
- "AllergyIntolerance" (https://app.azaleahealth.com/fhir/R4/sandbox/StructureDefinition/AllergyIntolerance)
- "DiagnosticReport" (http://hl7.org/fhir/StructureDefinition/DiagnosticReport)
- Condition Under Evaluation
- "Condition" (http://hl7.org/fhir/StructureDefinition/Condition)
- "QuestionnaireResponse" (https://app.azaleahealth.com/fhir/R4/sandbox/StructureDefinition/QuestionnaireResponse)
- Care Administered
- Pre-existing Conditions
- Presence of "Patient id" was the final confirmation whether an endpoint could be used in the analysis as we apply SQL logic to join the datasets using "Patient" as base of the model.
- Extensive schema/data structure evaluation using the provided documentation (https://www.postman.com/azalea-api/workspace/azalea-ambulatory-public-api/overview) and an abridged version of our proprietary QA test for APIs (https://docs.google.com/document/d/1eqADHHct6T26Xpc0Ue4z1SjUpA2EzLdmKfUvj1fFhyc/edit?usp=sharing)
- Target Setting
- The selection of the target was determined during parameter validation and is part of the "Account" endpoint
- Presence of multiple service periods in "Service Period"
- Multiple account visit dates in "Account visit date for a charge group"
- The selection of the target was determined during parameter validation and is part of the "Account" endpoint
- Model Development
- Here, we compare the results (RMSE, MSE, and MAE) of sci-kit learn's LinearRegression(), DecisionTreeRegressor(), and RandomForestRegressor() with extensive preprocessing and encoding methods applied to the data prior to training the readmission prediction model.
Challenges we ran into
The API was blocked and my app was not authorized by Azalea Health in time to successfully extract the data. What you are seeing here is a development stage model. Unfortunately, the instructions were not clear as to how to gain access and successfully extract the data in this case.
Accomplishments that we're proud of
I am proud that this is one of my cleanest sets of codes to date.
What we learned
It helps to be organized and test things methodically.
What's next for ReCure AI
Continue trying to extract the data, potentially testing with another EHR API provider, and announcing our achievement on LinkedIn.
Log in or sign up for Devpost to join the conversation.