-
This is a web application designed to assist doctors in managing the treatment of several patients belonging to the 25 ambulances alloted to him using data such as patient vitals, accessing medical documents, and communicating with Emergency Medical Technicians (EMTs) for critical cases.
-
The application is built using React for the frontend and Node.js with GraphQL for the backend and for storing files used Amazon S3.
The features being provided are the following :-
- View Vitals: View vitals of patients which are assigned to the doctor.
- Document Query: Search for medicines or procedures from uploaded medical documents from admins by the doctors.
- Live Chat: Communicate with EMT assistants of the ambulances regarding critical cases.
- Document Uploading : Admins can upload documents on which doctors can query to handle critical cases and also edit/view/delete them.
- Navigate to the code directory.
- Open a terminal and run
npm i. - Modify
server.js:- Change the MongoDB connection string from
process.env.MONGO_URIto
'mongodb+srv://dass39:dass39@emri.vubkrrz.mongodb.net/?retryWrites=true&w=majority'.
- Change the MongoDB connection string from
- Start the servers by running
npm run dev.
- Navigate to the client directory.
- Open a terminal and run
npm i. - Start the frontend server by running
npm run start. - Access the application at http://localhost:3000.
- Navigate to the emt dummy directory.
- Open a terminal and run
npm i. - Start the chat server by running
npm run start. - Access the dummy EMT chat at http://localhost:3001.
-
For Doctors:
- Email: doctor1@gmail.com
- Password: doctor1 (similarly for doctor2, doctor3, and so on)
-
For Admin:
- Email: admin1@gmail.com
- Password: admin1 (similarly for admin2, admin3, and so on)
- Navigate to
/to access the login page. - For Signup, go to
/signupto access the signup page. - Once logged in, you'll be able to:
- View patient vitals
- Search medical documents
- Chat with EMTs if logged in as a doctor
- View all documents uploaded already and upload more or delete them if logged in as an admin.
/: Login page./signup: Signup page./passwordreset: Password reset page./home: Dashboard for doctors and admins./profile: Profile page of doctor or admin after login.
Also in S3 bucket :-
All documents are in :- 'EMRI_audio_files/DASS_39/Document_query/' folder path
All files of chat are in :- 'EMRI_audio_files/DASS_39/Message_files/' folder path.
-
Upload a file:
- Select a POST request and use the API:
http://localhost:5002/upload_files - Choose any file with its field name 'image' for upload.
- Select a POST request and use the API:
-
Upload a document:
- Select a POST request and use the API:
http://localhost:5002/upload_documents - Choose any file with its field name 'image' for upload.
- Select a POST request and use the API:
-
Fetch all files:
- Select a GET request and use the API:
http://localhost:5002/get_files
- Select a GET request and use the API:
-
Fetch all documents:
- Select a GET request and use the API:
http://localhost:5002/get_documents
- Select a GET request and use the API:
-
Delete all files:
- Select a DELETE request and use the API:
http://localhost:5002/delete_files
- Select a DELETE request and use the API:
-
Delete all documents:
- Select a DELETE request and use the API:
http://localhost:5002/delete_documents
- Select a DELETE request and use the API:
-
Delete a specific file:
- Select a DELETE request and use the API:
http://localhost:5002/delete_file/filename - Replace
filenamewith the actual filename in the URL.
- Select a DELETE request and use the API:
-
Delete a specific document:
- Select a DELETE request and use the API:
http://localhost:5002/delete_document/filename - Replace
filenamewith the actual filename in the URL.
- Select a DELETE request and use the API:
Please note that you can also upload multiple files; however, this part is currently commented out in the codebase, allowing only single-file uploads.
Ensure that the port used is 3000 for the client and 3001 for the EMT chat. Modify CORS origin URL if necessary.
If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/new-feature. - Make your changes and commit them:
git commit -m 'Add new feature'. - Push to the branch:
git push origin feature/new-feature. - Submit a pull request.