Skip to content

monikagotnochills/ONCHAIN_HealthREC

 
 

Repository files navigation

ON CHAIN HEALTH

This repository contains the source code for an ON CHAIN HEALTH canister on the Internet Computer Protocol (ICP). The canister allows users to manage and query patient details, providing functionality such as adding, updating, deleting, and querying patient records based on various criteria.

Table of Contents

Overview

The hospital management canister is designed to be a decentralized solution for managing patient information. Each patient is represented by the PatientDetails struct, which includes fields such as id, patient_name, patient_history, doctor_name, created_at, updated_at, next_appointment, and in_clinic. The canister uses a BTreeMap for efficient storage and retrieval.

Key Features:

  • Querying: Retrieve information about specific patients, all patients, patients in the clinic, or perform a search based on a query string.

Prerequisites

Before you begin, ensure that you have the following installed:

Installation

Clone the repository to your local machine:

git clone https://github.com/RealYash27/ONCHAIN_HealthREC.git
cd ONCHAIN_HealthREC

✅ Automated Setup

To automatically set up the project (including canister creation and environment configuration):

chmod +x setup.sh
./setup.sh

This script will handle:

  • Installing frontend dependencies
  • Creating and deploying the backend canister
  • Syncing the environment variables
  • Starting the local replica
  • Launching the frontend development server

Usage

To use the hospital management canister, you can explore the provided query and update functions via the frontend or dfx commands.

Testing

To run backend tests, use the following command:

cargo test

Deployment

To deploy the canister locally manually:

  1. Start the local Internet Computer replica:

    dfx start --clean --background
  2. Deploy the backend canister:

    dfx deploy
  3. Use the generated canister ID to interact with the deployed backend.

For advanced deployment (e.g., production or remote), see the DFINITY SDK Documentation.

Contributing

Feel free to contribute by opening issues or submitting pull requests. Follow the standard GitHub flow for contributing.

License

This project is licensed under the MIT License – see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 54.6%
  • JavaScript 22.1%
  • Rust 19.7%
  • Shell 2.5%
  • Other 1.1%