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.
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.
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.
- Anytime access of past medical records using UniID
- Helps in finding Hospital and Making appointments with doctors
- Notifications related Profile Access, Health Issues, Doctor Appointments
- Health Profile Access Management
To view the currently deployed app Click Here
There are two main folders and branches which are webfront (client) and uniserver.
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.
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 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
- Google Cloud Instance for website building and deployment.
- Google Cloud SQL for Database hosting.
- Node.js, Nest.js for server design, Prisma ORM For database connection
- Socket IO for notification services.
- Programming Languages - Typescript/Javascript
- Angular framework for frontend.
- Services Used - Elastic Mail
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.
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of Node.js and npm
To Setup this project, follow these steps:
-
Clone the repository:
git clone https://github.com/abhi6774/unihosp.git
-
Navigate to the project directory:
cd unihosp
This project requires certain environment variables to be set. Here's how you can set them up:
-
In the root directory of the project, create a new file and name it
.env
. -
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...
-
Save the
.env
file. The application will now have access to the values you set in the.env
file. -
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
- Prisma Generate
npx prisma migrate dev ---name dev
npx prisma generate
- Start Server
nx serve uniserver
or
npx nx serve uniserver
If you want to use the docker directly
You have two options to set up Docker for this project:
-
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 -
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
-
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.
To use unihosp, follow these steps:
-
Start the client - Directly:
nx serve client
or
npx nx serve client
-
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>
-
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>
-
Open your web browser and visit
https://localhost:4200
-
If you are not on the
https://localhost:4200
update the cors settings in theapps/uniserver/src/main.ts
respectively and add the root api endpoint in theapps/client/src/app/rootEndPoint.ts
andlibs/api-interface/src/index.ts
If You See any issue with deployed app please contact us at: