This is a full-stack web application built using the MERN stack, with a MSSQL database backend.
The Patient Information Management System (PIMS) is a web application designed to streamline patient record management through CRUD operations. Developed using React and connected to a SQL Server backend, PIMS offers a user-friendly interface for healthcare providers to efficiently manage patient data.
Before running the application, ensure you have the following installed:
- Node.js
- MSSQL Server
- MSSQL studio
- git
Follow these steps to run the application locally:
-
Clone the repository:
git clone https://github.com/aynuayex/patient-information-management-system.git
-
Navigate to the project directory:
cd your-project-directory
-
Navigate to the backend directory:
cd backend
-
Install dependencies:
npm install
-
Configure the MSSQL database connection in the .env file.
create a file named
.env
in the backend folder and paste the code shown below
DATABASE_URL="sqlserver://localhost:1433;initial catalog=pims;user=ayex;password=correct;encrypt=true;trustServerCertificate=true"
please change the user value 'ayex' and the password value 'correct' to your mssql studio login credentials and assure that the account has the neccessary privilage to create a database.
Make sure TCP/IP connections are enabled via SQL Server Configuration Manager to avoid No connection could be made because the target machine actively refused it. (os error 10061)
-
run
npx prisma migrate dev --name init
in the terminal where it is opened in the backend folder -
Start the backend server:
npm start
-
Navigate to the frontend directory:
cd ../frontend
-
Install dependencies:
npm install
-
since, i am using clerk authentication.go to clerk create account or login if you already have and create an application and name it after that click on the react icon and copy all the connection string you see it should look like something like this
VITE_CLERK_PUBLISHABLE_KEY=pk_test_bm9ybWFsLWtyaWNsZXJrLmFjY291bnRzLmRldiQ
and create a.env
file inside the frontend folder and paste it there as you see it do not modify and double check it. -
Start the frontend development server:
npm run dev
Once the backend and frontend servers are running, you can access the application at http://localhost:5173
.
after some operation on the website you can go a head and execute the database pims of the created data.
don't forget to add .env
file to your .gitignore
file so that you do not accidentally commit your credentials to a remote repository.
This project is licensed under the [MIT] license name.