Skip to content

Aryankarma/unihosp

 
 

Repository files navigation

UniHosp - United Hospital

UniHosp stands for United Hospitals acronym we made for our website name. We built this project with the thinking to convert entire health sector digital by recording all the medical history of the citizen of India into database and which they can by a given Uni ID which a user can create during the registration. We are trying built a prototype to connect all the hospital like UPI connected all the banks for online revolution of Indian Financial Sector.

Problem Being Addressed

Suppose a person had a medical surgery in one state and changed city after few years. If he needed a new surgery the doctor might need past medical records and checkup reports. Now If that is the case it can be possible that those documents got lost or damaged or not in very good condition to be read or understand. And if that's the case, that person might to go through another body check up which is cost him a lot money. As India's health sector is not cheap, If you are in India there is great chance you know that.

Solution

There is very simple solution to convert entire health sector of India digital and save all the data related to citizens health in clouds and give access to user of these services to monitor there health profile and control the access who see and who can't so that can be accessed as they need the profile can be shared.

This service will work like UPI, Every Person will be given a Uni ID as we named it for a while. With the Help Of Uni ID hospitals will be able update citizen health report on cloud which is going to be managed centrally like any other servers. User is can access these reports in there Health Profile.

Addressed Problem and Services

  1. Anytime access of past medical records using UniID
  2. Helps in finding Hospital and Making appointments with doctors
  3. Notifications related Profile Access, Health Issues, Doctor Appointments
  4. Health Profile Access Management

User Flow

To view the currently deployed app Click Here

There are two main folders and branches which are webfront (client) and uniserver.

Webfront

Webfront is an angular app In main branch it is located at:

client client consists of our app frontend design and app flow logic

It's not fully completed yet so we have deployed a development build right some features might break.

Dashboard

Note: We are trying to hide as much as secret keys and token as we can so please be carefull if you are trying to exploit.

Uniserver

Uniserver is an nest.js server which is the main server In main branch it is located at: uniserver In the uniserver main folder one is prisma and src prisma Consits of our database schema src Consists of authentication and all the logics of it's not yet completely perfect

Technologies Used:

  1. Google Cloud Instance for website building and deployment.
  2. Google Cloud SQL for Database hosting.
  3. Node.js, Nest.js for server design, Prisma ORM For database connection
  4. Socket IO for notification services.
  5. Programming Languages - Typescript/Javascript
  6. Angular framework for frontend.
  7. Services Used - Elastic Mail

Conclusion

UniHosp is a revolutionary digital platform that aims to make healthcare accessible and convenient for patients and doctors. By providing patients with a centralised platform to manage their medical records, access medical services, and communicate with healthcare providers, UniHosp enables doctors to provide better care and improve patient outcomes. The use of advanced technologies such as Google Maps API, Socket.IO, and Angular framework, combined with the ease of use and convenience of the platform, makes UniHosp an ideal solution for addressing the challenges faced by the healthcare sector in India.


Project Setup

Prerequisites

Before you begin, ensure you have met the following requirements:

To Setup this project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/abhi6774/unihosp.git
  2. Navigate to the project directory:

    cd unihosp

Server Setup

Setting Up Environment Variables

This project requires certain environment variables to be set. Here's how you can set them up:

  1. In the root directory of the project, create a new file and name it .env.

  2. Open the .env file and set the environment variables in this format:

    DATABASE_URL_ROOT=<your_postgres_database_url>
    PRIVATE_TOKEN_KEY=<your_private_token_key>
    JWT_REFRESH_EXPIRE=86400000
    ACCESS_TOKEN_EXPIRATION=86400000
    REFRESH_TOKEN_EXPIRATION=86400000
    DEVELOPMENT_KEY=86dff15115508c9fb1da8c748740e753
    BEARER=<bearer_name>

Replace <your_database_url> and <your_private_token_key> with your actual database URL and private token key.

example your_private_token_key = 0eedfcd5776881153393943dc8a86478c100d58366ac277d84053703...

  1. Save the .env file. The application will now have access to the values you set in the .env file.

  2. Install the dependencies:

npm install

If you don't want to install below package globally run commands with npx prefix

npm install -g nx@latest
  1. Prisma Generate
npx prisma migrate dev ---name dev
npx prisma generate
  1. Start Server
nx serve uniserver

or

npx nx serve uniserver

Docker Setup or Build Api Server

If you want to use the docker directly

You have two options to set up Docker for this project:

  1. Build the Docker image locally:

    Use the following command to build the Docker image on your local machine:

    docker build -f Dockerfile.Uniserver . -t <server-name>:<tag> \
    --build-arg DATABASE_URL_ROOT=<your_postgres_database_url> \
    --build-arg PRIVATE_TOKEN_KEY=<your_private_token_key> \
    --build-arg JWT_REFRESH_EXPIRE=86400000 \
    --build-arg ACCESS_TOKEN_EXPIRATION=86400000 \
    --build-arg REFRESH_TOKEN_EXPIRATION=86400000 \
    --build-arg DEVELOPMENT_KEY=86dff15115508c9fb1da8c748740e753 \
    --build-arg BEARER=<bearer_name>

    Replace <your_postgres_database_url>, <your_private_token_key>, and <bearer_name> with your actual values.

    Replace <server-name>:<tag> with name of preference

  2. Pull the Docker image from a registry:

    Docker image is available in a Docker registry, you can pull it using the following command:

    docker pull abhishek6774/uniserver:latest
  3. Running the Docker Container

    After you have either built the Docker image locally or pulled it from a registry, you can run the Docker container using the following command:

    docker run -it -d -e DATABASE_URL_ROOT=<your_postgres_database_url> \
    -e PRIVATE_TOKEN_KEY=<your_private_token_key> \
    -e JWT_REFRESH_EXPIRE=86400000 \
    -e ACCESS_TOKEN_EXPIRATION=86400000 \
    -e REFRESH_TOKEN_EXPIRATION=86400000 \
    -e DEVELOPMENT_KEY=86dff15115508c9fb1da8c748740e753 \
    -e BEARER=<bearer_name> \
    -d -p 3000:3000 <server-name>:<tag>

Choose the option that best fits your needs.


Client Setup

To use unihosp, follow these steps:

  1. Start the client - Directly:

    nx serve client

    or

    npx nx serve client
  2. Start the client - With Docker Build or Pull

    Image is available at: abhishek6774/uniclient

    docker pull abhishek6774/uniclient

    or Build Locally:

    docker build -f Dockerfile.Client -t <client-name>:<tag-name> .
    docker push <client-name>:<tag-name>
  3. To Run Docker Generated or Pulled Image:

    docker run -it --rm -p 4200:4200 <client-name>:<tag-name>

    In Detached Mode

    docker run -it -d --rm -p 4200:4200 <client-name>:<tag-name>
  4. Open your web browser and visit https://localhost:4200

  5. If you are not on the https://localhost:4200 update the cors settings in the apps/uniserver/src/main.ts respectively and add the root api endpoint in the apps/client/src/app/rootEndPoint.ts and libs/api-interface/src/index.ts

By Team - Creators

If You See any issue with deployed app please contact us at:


UNIHOSP - UNITED HOSPITAL

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 53.5%
  • SCSS 24.9%
  • HTML 21.1%
  • Other 0.5%