\documentclass[titlepage,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{bera}
%\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{csquotes}
\usepackage{hyperref}
\renewcommand{\listfigurename}{List of Images}
\title{\textrm{\textbf{\Huge{\mbox{DigiMED}}}}}
\author{\Huge{Mind Optimizers}\and
Shreyas Narahari : 203050037 \and
Jalay Dhaval : 203050063 \and
Mohith Jagalmohanan : 203050073 \and
Gaurav Dewangan : 203050074}
\date{\LARGE{\today}}

\begin{document}
\maketitle
\tableofcontents
\pagebreak
\listoffigures
\pagebreak 

\section{\textbf{Introduction}}
This project attempts to implement an \textit{Electronic Health Record} (EHR) for patients to keep track of their medical prescriptions and test reports. We have identified three different usecases and corresponding roles for the users: Patient, Doctor and Lab Technician.\\ \\
The patient can view his previous history of medical prescriptions/test results. He can also book for specific lab tests. Furthermore, the patient can give(and revoke) permission to his/her doctor to view this medical history.\\ \\
The doctor has the permission to request specific patients for access to view the previous medical history. Once permission is granted, he could view the patient's medical history, and prescribe medications.\\ \\
Finally, the lab technician on logging in would be able to view the list of pending lab test requests. For this project, we have only included 4 types of tests: Common Blood Count, Basic Metabolism Channel, MRI scan and X-ray scan. On fulfilling a request, the corresponding user (and the doctor(s) if necessary permission has been granted) can view the result on his homepage.
\section{\textbf{Motivation}}
As far as we know, India has not yet implemented an EHR management system. So, we all have experienced the discomfort of having to search through a lot of bags before we find the prescriptions we were looking for, whether it be medicines, eye reports etc. Sometimes, we don't even get them. This is what got us thinking towards a solution to end this problem.\\\\
We envision every patient and doctor connected to a centralized secure server, and every single medical prescription/lab report should be easily accessible on demand. But the benefits of implementing such a system do not end here.\\\\
Since the doctors could view the entire medical history of patients, they could take better informed decisions, thus reducing the risks of side-effects and allergic reactions to certain types of medicines. Even though we haven't currently implemented this, we believe that it is possible to keep record of side-effects to medicines and give necessary warnings to doctors if they try to prescribe similar medicines(based on the chemical content) to patients in future. Moreover, once a lot of data has been collected, some sort of data analysis could be implemented to be able to predict possible undetected diseases from the pattern of diseases that have been observed.
\section{\textbf{Dependencies}}
\begin{itemize}
    \item Python3
    \item Django
\end{itemize}
\section{\textbf{Using DigiMED}}
\subsection{Installing Dependencies}
Before using the project, we need to ensure that the dependencies have been installed. We provide the steps needed to install the dependencies on Ubuntu, but the same can also be implemented on other operating systems.
\begin{itemize}
    \item \textbf{Installing Python via terminal:}
    \begin{itemize}
        \item sudo apt-get install python3.9
        \item sudo alias python=python3.9
    \end{itemize}
    \item \textbf{Installing Django via terminal:}
    \begin{itemize}
        \item python -m pip install Django:
    \end{itemize}
\end{itemize}
After installing the dependencies, git clone the project from:\\ \url{https://git.cse.iitb.ac.in/shreyasn/Final-Project-CS699}\\ \\
Now run the following commands:
\begin{itemize}
    \item python manage.py makemigrations
	\item python manage.py migrate
	\item python manage.py runserver
\end{itemize}
Once you have completed all the above steps correctly, you have the server up and running. To access the login page open the web browser and go to "localhost:8000"
\subsection{Common Authentication Portal}
\subsubsection{Common Sign in portal}
The patient, doctor and lab technician has to sign up through the same portal. Based on the username, the app automatically identifies the profile type(as being a patient/doctor/lab technician) and directs the user to the required homepage. 
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Authentication/Signin.png}
    \caption{Sign In}
\end{figure}
\subsubsection{Common Sign up portal}
Whether the user is a patient, doctor or a lab technician, he has to sign up through the same portal
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Authentication/Signup.png}
    \caption{Sign Up}
\end{figure}
\subsubsection{Patient Sign up form}
If the user has chosen his profile type as Patient in the common sign up portal, he will be directed to another page where he will be asked to provide further details specific to patient user.
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Authentication/PatientSignUpForm.png}
    \caption{Patient Sign up form}
\end{figure}
\subsubsection{Doctor Sign up form}
If the user has chosen his profile type as Doctor in the common sign up portal, he will be directed to another page where he will be asked to provide further details specific to doctor user.
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Authentication/DoctorSignUpForm.png}
    \caption{Doctor Sign up form}
\end{figure}
\subsubsection{Lab Technician Sign up form}
In case the user selects his profile type as Lab Technician, he will not be asked any extra information, and will be directed to his new homepage.
\subsection{Patient}
\subsubsection{Home Page}
Here the patient can view his history of prescriptions, as well as all the lab tests that he has taken. The patient can also filter the results based on a date range.
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Patient/ViewPrescriptionHistory.png}
    \caption{Prescription History}
\end{figure}
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Patient/ViewCBCandBMP.png}
    \caption{Blood Test History}
\end{figure}
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Patient/ViewMRIHistory.png}
    \caption{MRI Test History}
\end{figure}
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Patient/ViewXrayHistory.png}
    \caption{X-ray Test History}
\end{figure}
\subsubsection{Pending Request from Doctor}
Pending requests from doctor to view the patient's medical history can be seen here.
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Patient/PendingRequests.png}
    \caption{Pending Request from Doctor}
\end{figure}
\subsubsection{Granted Requests}
The list of doctors who currently have access to see the patient's history is shown here.
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Patient/GrantedRequests.png}
    \caption{Granted Request from Doctor}
\end{figure}
\subsubsection{Request for Lab Test}
The list of doctors who currently have access to see the patient's history is shown here.
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Patient/RequestLabTest.png}
    \caption{Request for Lab Test}
\end{figure}
\subsection{Doctor}
\subsubsection{Home Page}
The doctor can see the list of list of patients who have granted permission to view their medical history.
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Doctor/DoctorHomePage.jpeg}
    \caption{Doctor Homepage}
\end{figure}
\subsubsection{View Patient Medical History}
Once the doctor clicks on "View History" for a particular patient, he can see the patient's history.
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Doctor/DoctorViewPatientHistory.jpeg}
    \caption{View Patient Medical History}
\end{figure}
\subsubsection{Add Prescription}
Once the doctor clicks on "Add Prescription" corresponding to a particular user from the homepage, he/she would be directed to another page that would allow him/her to add prescriptions for the patient.
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Doctor/AddPrescription.png}
    \caption{Add Prescription}
\end{figure}
\subsubsection{Request Permission to view patient's medical history}
Once the doctor clicks on "View History" for a particular patient, he can see the patient's history.
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{Doctor/DoctorRequestPermission.jpeg}
    \caption{Request Patient's Permission}
\end{figure}
\subsection{Lab Technician}
\subsubsection{Home Page}
On the homepage, the lab technician can see the pending lab test requests of patients
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{LabTechnician/LabMRIRequest.png}
    \caption{Lab Technician Homepage}
\end{figure}
\subsubsection{Lab Test Request Fulfilment}
The lab technician clicks on individual requests, and input the necessary data.
\begin{figure}[h!]
\centering
    \includegraphics[width=13.6cm,height=10cm,keepaspectratio]{LabTechnician/SubmitLabTest.png}
    \caption{Request Fulfilment}
\end{figure}
\section{\textbf{Future Scope}}
What we have currently built only a small POC of a huge project with far-reaching possibilities. We have included only 4 tests and a few medicines for this project, but before taking this live, we would have to ensure that all possible lab tests and medicines have been exhausted by our list.\\\\
We also believe we haven't completely optimized on the query time, so that is one area of improvement. Since a lot of public information is being collected, security is going to be another major factor that should not be compromised upon. So that would be another area of improvement.\\\\
It would also make sense to extend this web-app to a mobile application, so that a lot more features could be implemented. For example, the app could collect the current location of the patient and give suggestions of doctors and lab test centres around. There could also be a feature of giving anonymous ratings for the doctors, so that patients could get the best treatment wherever they go.\\\\
Furthermore, as mentioned earlier in the motivation, it is possible to keep record of side-effects to medicines and alert the doctors when they prescribe similar medicines(based on the chemical content) to patients. Once large amount of data has been gathered, machine learning techniques could be applied to enable prediction of undiagnosed ailments in patients.
\end{document}
