Discord:

* spicedGG#1470
* jeremy#1472

![patientport logo](https://i.imgur.com/qWsX4Yw.png)

## 💡 Inspiration

As healthcare is continuing to be more interconnected and advanced, patients and healthcare resources will always have to worry about data breaches and the misuses of private information. While healthcare facilities move their databases to third-party providers (Amazon, Google, Microsoft), patients become further distanced from accessing their own medical record history, and the complete infrastructure of healthcare networks are significantly at risk and threatened by malicious actors. Even a single damaging attack on a centralized storage solution can end up revealing much sensitive and revealing data.

To combat this risk, we created Patientport as a decentralized and secure solution for patients to easily view the requests for their medical records and take action on them.

## 💻 What it does

Patientport is a decentralized, secure, and open medical record solution. It is built on the Ethereum blockchain and securely stores all of your medical record requests, responses, and exchanges through smart contracts. Your medical data is encrypted and stored on the blockchain.

By accessing the powerful web application online through <patientport.tech>, the patient can gain access to all these features.

First, on the website, the patient authenticates to the blockchain via MetaMask, and provides the contract address that was provided to them from their primary care provider.

Once they complete these two steps, a user has the ability to view all requests made about their medical record by viewing their “patientport” smart contract that is stored on the blockchain.

For demo purposes, the instance of the Ethereum blockchain that the application connects to is hosted locally.

However, anyone can compile and deploy the smart contracts on the Ethereum mainnet and connect to our web app.

## ⚙️ How we built it

|  |  |
| --- | --- |
| **Application** | **Purpose** |
| React, React Router, Chakra UI
  | Front-end web application
  |
| Ethers, Solidity, MetaMask
  | Blockchain, Smart contracts
  |
| Netlify
  | Hosting
  |
| Figma, undraw.co
  | Design
  |

## 🧠 Challenges we ran into

* Implementation of blockchain and smart contracts was very difficult, especially since the web3.js API was incompatible with the latest version of react, so we had to switch to a new, unfamiliar library, ethers.
* We ran into many bugs and unfamiliar behavior when coding the smart contracts with Solidity due to our lack of experience with it.
* Despite our goals and aspirations for the project, we had to settle to build a viable product quickly within the timeframe.

## 🏅 Accomplishments that we're proud of

* Implementing a working and functioning prototype of our idea
* Designing and developing a minimalist and clean user interface through a new UI library and reusable components with a integrated design
* Working closely with Solidity and MetaMask to make an application that interfaces directly with the Ethereum blockchain
* Creating and deploying smart contracts that communicate with each other and store patient data securely

## 📖 What we learned

* How to work with the blockchain and smart contracts to make decentralized transactions that can accurately record and encrypt/decrypt transactions
* How to work together and collaborate with developers in a remote environment via Github
* How to use React to develop a fully-featured web application that users can access and interact with

## 🚀 What's next for patientport

* Implementing more features, data, and information into patientport via a more robust smart contract and blockchain connections
* Developing a solution for medical professionals to handle their patients’ data with patientport through a simplified interface of the blockchain wallet
## Inspiration

Last week, one of our team members was admitted to the hospital with brain trauma. Doctors hesitated to treat them because of their lack of insight into the patient’s medical history. This prompted us to store EVERYONE’s health records on a single, decentralized chain. The catch? The process is end-to-end encrypted, ensuring only yourself and your designated providers can access your data.

## How we built it

Zorg was built across 3 verticals: a frontend client, a backend server, and the chain.

The frontend client…

We poured our hearts and ingenuity into crafting a seamless user interface, a harmonious blend of aesthetics and functionality designed to resonate across the spectrum of users. Our aim? To simplify the process for patients to effortlessly navigate and control their medical records while enabling doctors and healthcare providers to seamlessly access and request patient information. Leveraging the synergy of Bun, React, Next, and Shadcn, we crafted a performant portal. To safeguard privacy, we fortified client-side interactions with encryption, ensuring sensitive data remains inaccessible to central servers. This fusion of technology and design principles heralds a new era of secure, user-centric digital healthcare record keeping.

The backend server…

The backend server of Zorg is the crux of our mission to revolutionize healthcare records management, ensuring secure, fast, and reliable access to encrypted patient data. Utilizing Zig for its performance and security advantages, our backend encrypts health records using a doctor's public key and stores them on IPFS for decentralized access. These records are then indexed on the blockchain via unique identifiers (CIDs), ensuring both privacy and immutability.

Upon request, the system retrieves and decrypts the data for authorized users, transforming it into a vectorized format suitable for semantic search. This process not only safeguards patient information but also enables healthcare providers to efficiently parse through detailed medical histories. Our use of Zig ensures that these operations are executed swiftly, maintaining our commitment to providing immediate access to critical medical information while prioritizing patient privacy and data integrity.

The chain…

The chain stores the encrypted key and the CID, allowing seemless access to a patient’s file stored on decentralized storage (IPFS). The cool part? The complex protocols and keys governing this system is completely abstracted away and wrapped up modern UI/UX, giving easy access to senior citizens and care providers.

## Challenges we ran into

Our biggest challenges were during integration, near the end of the hackathon. We had divided the project, with each person focusing on a different area—machine learning and queries, blockchain and key sharing, encryption and IPFS, and the frontend design. However, when we began to put things together, we quickly realized that we had failed to communicate with each other the specific details of how each of our systems worked. As a result we had to spend a few hours just tweaking each of our systems so that they could work with each other.

Another smaller (but enjoyable!) challenge we faced was learning to use a new language (Zig!). We ended up building our entire encryption and decryption system in Zig (as it needed to be incredibly fast due to the potentially vast amounts of data it would be processing) and had to piece together both how to build these systems in Zig, and how to integrate the resulting Zig binaries into the rest of our project.

## What's next for Zorg

In the future, we hope to devise a cryptographically sound way to revoke access to records after they have been granted. Additionally, our system would best benefit the population if we were able to partner with the government to include patient private keys in something everyone carries with them like their phone or ID so that in an emergency situation, first responders can access the patient data and identify things like allergies to medications.
## Inspiration

We were inspired to develop ClinicAnalytic after learning that the Healthcare system employs methodologies often based on race, gender and other features, sometimes resulting in varying success rates. We then decided to develop a Machine Learning algorithm that takes in Hospital records as its data set and determine whether these methodologies work while detecting potential systemic racism in the Healthcare sector. Furthermore we noticed that there was not a centralized database for Healthcare providers to securely store their data and noticing this, we developed ClinicAnalytic as a way for hospitals to record keep while also being able to analyze their own data.

## What it does

Our application allows Hospitals to keep track of the basic information of both doctors and patients, as well as any procedures that doctors conduct with patients. The application allows users to upload valid health cards which will be read have the text parsed. Using this information, it is able to display scatter plot graphs using the information given so that users may analyze them to discover notable trends or patterns. We have set up the system to target 3 of the themes presented in the hackathon, namely Diversity, Health, and Discovery. We incorporated concepts such as Machine Learning and Optical Character Recognition in our application to give it more practical usage as well as display our skillset.

## How we built it

We built the front-end of the project using React, Tailwind, Redux and Material UI and JSON Web Tokens for authentication. The back-end on the other hand was built using Flask and MongoDB to record and dispatch the information required for our application to function. Our backend also employed the pandas and matplotlib libraries to aid us in visualizing and representing the data that the user collects, as well as also implementing machine learning with the help of the OpenCV and EasyOCR libraries.

## Challenges we ran into

For our analysis page, we ran into implementation problems as well as semantical problems related to how we can gauge performance. We were uncertain of what thresholds would need to be crossed in order for a doctor to be considered “underperforming”, as we do not have any medical background or exposure to how often medical procedures are to fail or succeed, so we settled with making sure that the performance of one doctor should be relative to the performance of other doctors at the hospital. Our group agreed that this was a reasonable compromise as if we were to consider the case that a doctor has a lower success rate (which is determined by dividing the number of successes they have in a procedure by the total number of that specific procedure that this doctor conducted) than the average success rate of doctors at the hospital minus the standard deviation, it is safe to declare that they are underperforming.

## Accomplishments that we're proud of

We are proud that within the span of Hack The Valley, we were able to develop an application that leverages Machine Learning in order to detect anomalies in the Healthcare system.

## What we learned

We conducted research on and learned about several Machine Learning algorithms. We also learned about optical character recognition.

## What's next for ClinicAnalytic

Caching data required for Machine Learning algorithms using Redis in order to optimize application's Scalability.