# How to choose a hospital for treatment? -> Inpatient Decision

This web app allows consumers to explore potential hospitals to visit when they must undergo a specific procedure. The hospitals are ranked by a relatively simple algorithm that uses features such as Risk Adjusted Rate (RAR) of the Inpatient Quality Indicators, patients who have already undergone that procedure at the same hospital, variance of RAR, etc.

### The Benefit

The problem is that consumers do not have an easy way to determine the quality of inpatient care at hospitals beyond knowing that a hospital has a specific treatment. Now with this tool consumers can explore different hospitals and see how they stack up in quality of care for different medical procedures.
## Inspiration

“Emergency” + “Need” = “EmergeNeed”

Imagine a pleasant warm Autumn evening, and you are all ready to have Thanksgiving dinner with your family. You are having a lovely time, but suddenly you notice a batch of red welts, swollen lips, and itchy throat. Worried and scared, you rush to the hospital just to realize that you will have to wait for another 3 hours to see a doctor due to the excess crowd.

Now imagine that you could quickly talk to a medical professional who could recommend going to urgent care instead to treat your allergic reaction. Or, if you were recommended to seek emergency hospital care, you could see the estimated wait times at different hospitals before you left. Such a system would allow you to get advice from a medical professional quickly, save time waiting for treatment, and decrease your risk of COVID exposure by allowing you to avoid large crowds.

## What it does

Our project aims to address three main areas of healthcare improvement. First, there is no easy way for an individual to know how crowded a hospital will be at a given time. Especially in the current pandemic environment, users would benefit from information such as **crowd level and estimated travel times to different hospitals** near them. Knowing this information would help them avoid unnecessary crowds and the risk of COVID19 exposure and receive faster medical attention and enhanced treatment experience. Additionally, such a system allows hospital staff to operate more effectively and begin triaging earlier since they will receive a heads-up about incoming (non-ambulance) patients before they arrive.

Second, online information is often unreliable, and specific demographics may not have access to a primary care provider to ask for advice during an emergency. Our interface allows users to access **on-call tele-network services specific to their symptoms** easily and therefore receive advice about options such as monitoring at home, urgent care, or an emergency hospital.

Third, not knowing what to expect contributes to the elevated stress levels surrounding an emergency. Having an app service that encourages users to **actively engage in health monitoring** and providing **tips about what to expect** and how to prepare in an emergency will make users better equipped to handle these situations when they occur. Our dashboard offers tools such as a check-in journal to log their mood gratitudes and vent about frustrations. The entries are sent for sentiment analysis to help monitor mental states and offer support. Additionally, the dashboard allows providers to assign goals to patients and monitor progress (for example, taking antibiotics every day for 1 week or not smoking). Furthermore, the user can track upcoming medical appointments and access key medical data quickly (COVID19 vaccination card, immunization forms, health insurance).

## How we built it

Our application consists of a main front end and a backend.
The front end was built using the Bubble.io interface. Within the Bubble service, we set up a database to store user profile information, create emergency events, and accumulate user inputs and goals. The Bubble Design tab and connection to various API’s allowed us to develop different pages to represent the functionalities and tools we needed. For example, we had a user login page, voice recording and symptom input page, emergency event trigger with dynamic map page, and dashboard with journaling and calendar schedule page. The Bubble Workflow tab allowed us to easily connect these pages and communicate information between the front and back end.
The back end was built using Python Flask. We also used Dialogflow to map the symptoms with the doctor's speciality the user should visit. We processed data calls to InterSystems API in the backend server and processed data from the front end. We created synthetic data to test on.

## Challenges we ran into

This project was a great learning experience, and we had a lot of fun (and frustration) working through many challenges. First, we needed to spend time coming up with a project idea and then refining the scope of our idea. To do this, we talked with various sponsors and mentors to get feedback on our proposal and learn about the industry and actual needs of patients. Once we had a good roadmap for what features we wanted, we had to find data that we could use. Currently, hospitals are not required to provide any information about estimated wait time, so we had to find an alternative way to assess this. We decided to address this by developing our own heuristic that considers hospital distance, number of beds, and historic traffic estimation. This is a core functionality of our project, but also the most difficult, and we are still working on optimizing this metric. Another significant challenge we ran into was learning how to use the Bubble service, explicitly setting up the google maps functionality we wanted and connecting the backend with the frontend through Bubbles API. We sought mentor help, and are still trying to debug this step. Another ongoing challenge is implementing the call a doc feature with Twilio API. Finally, our team consists of members from drastically different time zones. So we needed to be proactive about scheduling meetings and communicating progress and tasks.

## Accomplishments that we're proud of

We are proud of our idea - indeed the amount of passion put into developing this toolkit to solve a meaningful problem is something very special (Thank you TreeHacks!).
We are proud of the technical complexity we accomplished in this short time frame. Our project idea seemed very complex, with lots of features we wanted to add.
Collaboration with team mates from different parts of the world and integration of different API’s (Bubble, Google Maps, InterSystems)

## What we learned

We learned a lot about the integration of multiple frameworks. Being a newbie in web development and making an impactful application was one of the things that we are proud of. Most importantly, the research and problem identification were the most exciting part of the whole project. We got to know the possible shortcomings of our present-day healthcare systems and how we can improve them. Coming to the technical part, we learned Bubble, Web Scraping, NLP, integrating with InterSystems API, Dialogflow, Flask.

## What's next for EmergeNeed

We could not fully integrate our backend to our Frontend web application built on Bubble as we faced some technical difficulties at the end that we didn’t expect. The calling feature needs to be implemented fully (currently it just records user audio). We look to make EmergeNeed a full-fledged customer-friendly application. We plan to implement our whole algorithm (ranging from finding hospitals with proper machines and less commute time to integrating real-time speech to text recognition) for large datasets.
## Inspiration

Our journey started with a close friend’s misdiagnosis, which was a result of fragmented medical records and lack of comprehensive analysis. Realizing that many face similar challenges globally, we sought to ensure that no patient would suffer due to scattered information or gaps in understanding their health data. This deeply personal connection became the driving force behind HealthRev. We envisioned a world where every patient and doctor could harness the power of technology to make well-informed health decisions, and thus, HealthRev was born. Combining the empathy from personal experiences with the capabilities of AI, our mission is to revolutionize patient care and data interpretation in healthcare.

What it does
HealthRev serves as a centralized platform for patients and doctors to collaborate and interpret health data efficiently. With AI-powered analysis and seamless integration with popular health portals, it aims to provide a real-time health overview, risk assessment, and a communication channel for both patients and medical professionals.

## How we built it

1. Login/Signup Screen: We built a robust authentication system using modern encryption techniques to ensure data privacy.
2. Dashboard/Home Screen: AI algorithms were developed to process the current and historical health data of the patient, presenting a concise health overview.
3. Data Input Screen: A straightforward data entry system was implemented, accommodating various data types from blood tests to family history.
4. Analysis and Risk Assessment: Using a combination of machine learning models and predefined medical rules, we analyze input data, flag anomalies, and deduce possible implications.
5. Doctor's View & Dispute Resolution Screen: We introduced a doctor-specific view to enhance the collaboration between the doctor and the patient. If a doctor disputes an AI finding, they can input their reasoning, triggering a re-analysis of the data.
6. Feedback/Communication Screen: Implemented a secure messaging protocol, allowing smooth and confidential communication.
7. Integration with Other Portals: While theoretical at this stage, we've crafted a module for potential API-based integrations with popular health portals.

Challenges we ran into

1. Data Security: Ensuring data privacy was paramount. Implementing end-to-end encryption and complying with health data regulations was a challenge.
2. AI Interpretability: Making AI decisions transparent and understandable to both doctors and patients was not straightforward.
3. Integration Potential: Designing the app for potential integration with other health portals without actual collaborations was a speculative challenge.

## Accomplishments that we're proud of

1. AI-Doctor Collaboration: Achieving a balance where the AI aids the doctors without overshadowing their expertise.
2. User-Friendly Interface: Despite the complexity of the back end, the user interface remains intuitive and easy to navigate for both doctors and patients.
3. Dispute Resolution Mechanism: Building a constructive platform where AI analysis can be disputed, re-evaluated, and refined based on expert inputs.

What we learned

1. The immense potential of combining AI with healthcare, and the challenges it presents.
2. The importance of making technology accessible to non-tech-savvy users, especially in critical sectors like healthcare.
3. The value of collaboration between AI and human experts in refining and validating data interpretations.

What's next for HealthRev

1. Expand Integration Capabilities: We plan to collaborate with popular healthcare portals and expand our integration capabilities.
2. Feedback Loop: Introduce a system where doctors' inputs from the Dispute Resolution screen can be used to continually refine and train our AI models.
3. Telehealth Integration: Considering the growing trend of telemedicine, we aim to introduce features that facilitate virtual doctor-patient interactions directly through the app.