GithubHelp home page GithubHelp logo

akmalhisyammm / myhealth Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 13.3 MB

Decentralized healthcare platform built on the Intenet Computer using Next.js and Azle.

License: MIT License

JavaScript 0.09% Shell 0.61% TypeScript 98.12% CSS 1.18%
azle blockchain chakra-ui decentralized-application healthcare internet-computer nextjs smart-contract

myhealth's Introduction

MyHealth

MyHealth is a decentralized healthcare platform built on the Intenet Computer. With decentralized data storage, user data will be securely stored on the blockchain. We are open to any hospitals that wants to connect their systems with MyHealth.

Motivation

We realized that there are security issues with centralized data storage in the medical field, which is still adopted by most hospitals today. With centralized data storage, all patient data is stored centrally on a hospital's server, so patients have no control over their data. Therefore, MyHealth was created to overcome these problems by converting centralized data storage into decentralized data storage. With decentralized data storage, patients have full control over who can access their personal data and medical records. In addition, patients can also visit various hospitals using existing data, so that patients can feel safer and easier when visiting various hospitals.

Requirements

Installation

Clone this repository:

git clone https://github.com/akmalhisyammm/myhealth.git
cd myhealth

jq is a command-line JSON processor you will use to run scripts in this project. If you don't already have it installed:

sudo apt update && sudo apt install -y jq

dfx is the tool you will use to interact with the IC locally and on mainnet. If you don't already have it installed:

npm run install:dfx

Next you will want to start a replica, which is a local instance of the IC that you can deploy your canisters to:

npm run start:replica

Install project dependencies:

npm install

Now you can deploy your canister locally:

npm run deploy:local

Start the project in development mode:

npm run dev

Assuming you have created a cycles wallet and funded it with cycles, you can deploy to mainnet like this:

npm run deploy:mainnet

If you ever want to stop the replica:

npm run stop:replica

Structures

.
├── public/             # Static files
├── scripts/            # Script helpers
├── src/
│   ├── app/            # Next.js app router (Frontend)
│   ├── contract/       # Azle canister (Backend)
│   ├── declarations/   # Frontend and Backend connector
│   └── lib/            # Project libraries
├── LICENSE
├── README.md
├── dfx.json            # DFX configurations
├── next-env.d.ts
├── next.config.js
├── package-lock.json
├── package.json
├── tsconfig.json

Features

Owner (Terminal Only)

  • Able to add a new hospital.

  • Able to verify all users.

To initialize you as the owner, you need to run the following command:

dfx canister call myhealth_backend initCallerAsOwner

To verify user, the owner needs to get a list of unverified users by running the following command:

dfx canister call myhealth_backend getUnverifiedUsers

Copy the user ID that the owner wants to review, then run the following command to verify:

dfx canister call myhealth_backend reviewUser '(<USER_ID>, true)'

If the owner wants to reject the user, the owner can change the second parameter to false:

dfx canister call myhealth_backend reviewUser '(<USER_ID>, false)'

Example:

dfx canister call myhealth_backend reviewUser '(principal "kxauy-kjdop-wjmxk-i2mvu-x5d5o-oljmp-mawxf-lax7h-bhfzx-5zzao-gae", true)'

Admin

  • Able to verify all patient, doctor and nurse in the same hospital.

Doctor

  • Able to change his/her practice schedule.
  • Able to confirm or reject appointments made by patients.
  • Able to view all medical records of patients who have scheduled appointments.
  • Able to review the patient's medical record after the scheduled appointments.

Nurse

  • Able to review all medical records of patients after the scheduled appointments with doctors at the same hospital.

Patient

  • Able to create and delete appointments with doctors (if not confirmed yet).
  • Able to view all of his/her medical records.

Authors

Credits

License

This project is licensed under MIT License. Please see the LICENSE for more information.

myhealth's People

Contributors

akmalhisyammm avatar riloanggoro avatar imgbot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.