├── .gitignore ├── HospitalManagementSystem ├── HELP.md ├── mvnw ├── mvnw.cmd ├── pom.xml ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── company │ │ │ │ └── varnaa │ │ │ │ ├── CalendarApplication.java │ │ │ │ ├── HospitalManagementSystemApplication.java │ │ │ │ ├── MainController.java │ │ │ │ ├── PatientController.java │ │ │ │ ├── SecurityConfig.java │ │ │ │ ├── ServletInitializer.java │ │ │ │ ├── appointment.java │ │ │ │ ├── appointmentRepository.java │ │ │ │ ├── appointmentService.java │ │ │ │ ├── doctorController.java │ │ │ │ ├── invoice.java │ │ │ │ ├── invoiceRepository.java │ │ │ │ ├── invoiceservice.java │ │ │ │ ├── prescription.java │ │ │ │ ├── prescriptionController.java │ │ │ │ ├── prescriptionRepository.java │ │ │ │ ├── prescriptionService.java │ │ │ │ └── receptionistController.java │ │ └── resources │ │ │ ├── application.properties │ │ │ └── templates │ │ │ ├── add.html │ │ │ ├── allevents.html │ │ │ ├── calendar.html │ │ │ ├── cancelAppointment.html │ │ │ ├── confirm.html │ │ │ ├── doctorAppointments.html │ │ │ ├── doctors.html │ │ │ ├── findbystart.html │ │ │ ├── invoice.html │ │ │ ├── jsoncalendar.html │ │ │ ├── main.html │ │ │ ├── myAppointments.html │ │ │ ├── patients.html │ │ │ ├── postlogin.html │ │ │ ├── receptionist.html │ │ │ ├── receptionistAppointments.html │ │ │ ├── receptionistSchedule.html │ │ │ ├── signup.html │ │ │ ├── staticcalendar.html │ │ │ ├── varsha.html │ │ │ └── viewPrescriotions.html │ └── test │ │ └── java │ │ └── com │ │ └── company │ │ └── varnaa │ │ └── HospitalManagementSystemApplicationTests.java └── target │ ├── classes │ ├── application.properties │ ├── com │ │ └── company │ │ │ └── varnaa │ │ │ ├── BadDateFormatException.class │ │ │ ├── CalendarApplication.class │ │ │ ├── Event.class │ │ │ ├── EventController.class │ │ │ ├── EventJpaRepository.class │ │ │ ├── HospitalManagementSystemApplication.class │ │ │ ├── MainController.class │ │ │ ├── PatientController.class │ │ │ ├── SecurityConfig.class │ │ │ ├── ServletInitializer.class │ │ │ ├── appointment.class │ │ │ ├── appointmentRepository.class │ │ │ ├── appointmentService.class │ │ │ ├── doctorController.class │ │ │ ├── invoice.class │ │ │ ├── invoiceRepository.class │ │ │ ├── invoiceservice.class │ │ │ ├── prescription.class │ │ │ ├── prescriptionController.class │ │ │ ├── prescriptionRepository.class │ │ │ ├── prescriptionService.class │ │ │ └── receptionistController.class │ └── templates │ │ ├── add.html │ │ ├── allevents.html │ │ ├── calendar.html │ │ ├── cancelAppointment.html │ │ ├── confirm.html │ │ ├── doctorAppointments.html │ │ ├── doctors.html │ │ ├── findbystart.html │ │ ├── invoice.html │ │ ├── jsoncalendar.html │ │ ├── main.html │ │ ├── myAppointments.html │ │ ├── patients.html │ │ ├── postlogin.html │ │ ├── receptionist.html │ │ ├── receptionistAppointments.html │ │ ├── receptionistSchedule.html │ │ ├── signup.html │ │ ├── staticcalendar.html │ │ ├── varsha.html │ │ └── viewPrescriotions.html │ └── m2e-wtp │ └── web-resources │ └── META-INF │ ├── MANIFEST.MF │ └── maven │ └── com.company.varnaa │ └── HospitalManagementSystem │ ├── pom.properties │ └── pom.xml ├── Screenshot (41).png ├── Screenshot (42).png ├── Screenshot (43).png ├── Screenshot (44).png ├── Screenshot (47).png ├── Screenshot (48).png ├── Screenshot (49).png └── Screenshot (50).png /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.war 15 | *.nar 16 | *.ear 17 | *.zip 18 | *.tar.gz 19 | *.rar 20 | 21 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 22 | hs_err_pid* 23 | -------------------------------------------------------------------------------- /HospitalManagementSystem/HELP.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | ### Reference Documentation 4 | For further reference, please consider the following sections: 5 | 6 | * [Official Apache Maven documentation](https://maven.apache.org/guides/index.html) 7 | * [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.2.4.RELEASE/maven-plugin/) 8 | * [Spring Data JDBC](https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/) 9 | * [Spring Data JPA](https://docs.spring.io/spring-boot/docs/2.2.4.RELEASE/reference/htmlsingle/#boot-features-jpa-and-spring-data) 10 | * [Spring Security](https://docs.spring.io/spring-boot/docs/2.2.4.RELEASE/reference/htmlsingle/#boot-features-security) 11 | * [Thymeleaf](https://docs.spring.io/spring-boot/docs/2.2.4.RELEASE/reference/htmlsingle/#boot-features-spring-mvc-template-engines) 12 | * [Spring Web](https://docs.spring.io/spring-boot/docs/2.2.4.RELEASE/reference/htmlsingle/#boot-features-developing-web-applications) 13 | 14 | ### Guides 15 | The following guides illustrate how to use some features concretely: 16 | 17 | * [Accessing data with MySQL](https://spring.io/guides/gs/accessing-data-mysql/) 18 | * [Using Spring Data JDBC](https://github.com/spring-projects/spring-data-examples/tree/master/jdbc/basics) 19 | * [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/) 20 | * [Securing a Web Application](https://spring.io/guides/gs/securing-web/) 21 | * [Spring Boot and OAuth2](https://spring.io/guides/tutorials/spring-boot-oauth2/) 22 | * [Authenticating a User with LDAP](https://spring.io/guides/gs/authenticating-ldap/) 23 | * [Handling Form Submission](https://spring.io/guides/gs/handling-form-submission/) 24 | * [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) 25 | * [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) 26 | * [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/) 27 | 28 | -------------------------------------------------------------------------------- /HospitalManagementSystem/mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # https://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Maven Start Up Batch script 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # M2_HOME - location of maven2's installed home dir 31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 32 | # e.g. to debug Maven itself, use 33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 35 | # ---------------------------------------------------------------------------- 36 | 37 | if [ -z "$MAVEN_SKIP_RC" ] ; then 38 | 39 | if [ -f /etc/mavenrc ] ; then 40 | . /etc/mavenrc 41 | fi 42 | 43 | if [ -f "$HOME/.mavenrc" ] ; then 44 | . "$HOME/.mavenrc" 45 | fi 46 | 47 | fi 48 | 49 | # OS specific support. $var _must_ be set to either true or false. 50 | cygwin=false; 51 | darwin=false; 52 | mingw=false 53 | case "`uname`" in 54 | CYGWIN*) cygwin=true ;; 55 | MINGW*) mingw=true;; 56 | Darwin*) darwin=true 57 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 58 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 59 | if [ -z "$JAVA_HOME" ]; then 60 | if [ -x "/usr/libexec/java_home" ]; then 61 | export JAVA_HOME="`/usr/libexec/java_home`" 62 | else 63 | export JAVA_HOME="/Library/Java/Home" 64 | fi 65 | fi 66 | ;; 67 | esac 68 | 69 | if [ -z "$JAVA_HOME" ] ; then 70 | if [ -r /etc/gentoo-release ] ; then 71 | JAVA_HOME=`java-config --jre-home` 72 | fi 73 | fi 74 | 75 | if [ -z "$M2_HOME" ] ; then 76 | ## resolve links - $0 may be a link to maven's home 77 | PRG="$0" 78 | 79 | # need this for relative symlinks 80 | while [ -h "$PRG" ] ; do 81 | ls=`ls -ld "$PRG"` 82 | link=`expr "$ls" : '.*-> \(.*\)$'` 83 | if expr "$link" : '/.*' > /dev/null; then 84 | PRG="$link" 85 | else 86 | PRG="`dirname "$PRG"`/$link" 87 | fi 88 | done 89 | 90 | saveddir=`pwd` 91 | 92 | M2_HOME=`dirname "$PRG"`/.. 93 | 94 | # make it fully qualified 95 | M2_HOME=`cd "$M2_HOME" && pwd` 96 | 97 | cd "$saveddir" 98 | # echo Using m2 at $M2_HOME 99 | fi 100 | 101 | # For Cygwin, ensure paths are in UNIX format before anything is touched 102 | if $cygwin ; then 103 | [ -n "$M2_HOME" ] && 104 | M2_HOME=`cygpath --unix "$M2_HOME"` 105 | [ -n "$JAVA_HOME" ] && 106 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 107 | [ -n "$CLASSPATH" ] && 108 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 109 | fi 110 | 111 | # For Mingw, ensure paths are in UNIX format before anything is touched 112 | if $mingw ; then 113 | [ -n "$M2_HOME" ] && 114 | M2_HOME="`(cd "$M2_HOME"; pwd)`" 115 | [ -n "$JAVA_HOME" ] && 116 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 117 | fi 118 | 119 | if [ -z "$JAVA_HOME" ]; then 120 | javaExecutable="`which javac`" 121 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 122 | # readlink(1) is not available as standard on Solaris 10. 123 | readLink=`which readlink` 124 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 125 | if $darwin ; then 126 | javaHome="`dirname \"$javaExecutable\"`" 127 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 128 | else 129 | javaExecutable="`readlink -f \"$javaExecutable\"`" 130 | fi 131 | javaHome="`dirname \"$javaExecutable\"`" 132 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 133 | JAVA_HOME="$javaHome" 134 | export JAVA_HOME 135 | fi 136 | fi 137 | fi 138 | 139 | if [ -z "$JAVACMD" ] ; then 140 | if [ -n "$JAVA_HOME" ] ; then 141 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 142 | # IBM's JDK on AIX uses strange locations for the executables 143 | JAVACMD="$JAVA_HOME/jre/sh/java" 144 | else 145 | JAVACMD="$JAVA_HOME/bin/java" 146 | fi 147 | else 148 | JAVACMD="`which java`" 149 | fi 150 | fi 151 | 152 | if [ ! -x "$JAVACMD" ] ; then 153 | echo "Error: JAVA_HOME is not defined correctly." >&2 154 | echo " We cannot execute $JAVACMD" >&2 155 | exit 1 156 | fi 157 | 158 | if [ -z "$JAVA_HOME" ] ; then 159 | echo "Warning: JAVA_HOME environment variable is not set." 160 | fi 161 | 162 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher 163 | 164 | # traverses directory structure from process work directory to filesystem root 165 | # first directory with .mvn subdirectory is considered project base directory 166 | find_maven_basedir() { 167 | 168 | if [ -z "$1" ] 169 | then 170 | echo "Path not specified to find_maven_basedir" 171 | return 1 172 | fi 173 | 174 | basedir="$1" 175 | wdir="$1" 176 | while [ "$wdir" != '/' ] ; do 177 | if [ -d "$wdir"/.mvn ] ; then 178 | basedir=$wdir 179 | break 180 | fi 181 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 182 | if [ -d "${wdir}" ]; then 183 | wdir=`cd "$wdir/.."; pwd` 184 | fi 185 | # end of workaround 186 | done 187 | echo "${basedir}" 188 | } 189 | 190 | # concatenates all lines of a file 191 | concat_lines() { 192 | if [ -f "$1" ]; then 193 | echo "$(tr -s '\n' ' ' < "$1")" 194 | fi 195 | } 196 | 197 | BASE_DIR=`find_maven_basedir "$(pwd)"` 198 | if [ -z "$BASE_DIR" ]; then 199 | exit 1; 200 | fi 201 | 202 | ########################################################################################## 203 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 204 | # This allows using the maven wrapper in projects that prohibit checking in binary data. 205 | ########################################################################################## 206 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then 207 | if [ "$MVNW_VERBOSE" = true ]; then 208 | echo "Found .mvn/wrapper/maven-wrapper.jar" 209 | fi 210 | else 211 | if [ "$MVNW_VERBOSE" = true ]; then 212 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." 213 | fi 214 | if [ -n "$MVNW_REPOURL" ]; then 215 | jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 216 | else 217 | jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 218 | fi 219 | while IFS="=" read key value; do 220 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;; 221 | esac 222 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" 223 | if [ "$MVNW_VERBOSE" = true ]; then 224 | echo "Downloading from: $jarUrl" 225 | fi 226 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" 227 | if $cygwin; then 228 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` 229 | fi 230 | 231 | if command -v wget > /dev/null; then 232 | if [ "$MVNW_VERBOSE" = true ]; then 233 | echo "Found wget ... using wget" 234 | fi 235 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 236 | wget "$jarUrl" -O "$wrapperJarPath" 237 | else 238 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" 239 | fi 240 | elif command -v curl > /dev/null; then 241 | if [ "$MVNW_VERBOSE" = true ]; then 242 | echo "Found curl ... using curl" 243 | fi 244 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 245 | curl -o "$wrapperJarPath" "$jarUrl" -f 246 | else 247 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f 248 | fi 249 | 250 | else 251 | if [ "$MVNW_VERBOSE" = true ]; then 252 | echo "Falling back to using Java to download" 253 | fi 254 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" 255 | # For Cygwin, switch paths to Windows format before running javac 256 | if $cygwin; then 257 | javaClass=`cygpath --path --windows "$javaClass"` 258 | fi 259 | if [ -e "$javaClass" ]; then 260 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 261 | if [ "$MVNW_VERBOSE" = true ]; then 262 | echo " - Compiling MavenWrapperDownloader.java ..." 263 | fi 264 | # Compiling the Java class 265 | ("$JAVA_HOME/bin/javac" "$javaClass") 266 | fi 267 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 268 | # Running the downloader 269 | if [ "$MVNW_VERBOSE" = true ]; then 270 | echo " - Running MavenWrapperDownloader.java ..." 271 | fi 272 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") 273 | fi 274 | fi 275 | fi 276 | fi 277 | ########################################################################################## 278 | # End of extension 279 | ########################################################################################## 280 | 281 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} 282 | if [ "$MVNW_VERBOSE" = true ]; then 283 | echo $MAVEN_PROJECTBASEDIR 284 | fi 285 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 286 | 287 | # For Cygwin, switch paths to Windows format before running java 288 | if $cygwin; then 289 | [ -n "$M2_HOME" ] && 290 | M2_HOME=`cygpath --path --windows "$M2_HOME"` 291 | [ -n "$JAVA_HOME" ] && 292 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 293 | [ -n "$CLASSPATH" ] && 294 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 295 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 296 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 297 | fi 298 | 299 | # Provide a "standardized" way to retrieve the CLI args that will 300 | # work with both Windows and non-Windows executions. 301 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" 302 | export MAVEN_CMD_LINE_ARGS 303 | 304 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 305 | 306 | exec "$JAVACMD" \ 307 | $MAVEN_OPTS \ 308 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 309 | "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 310 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 311 | -------------------------------------------------------------------------------- /HospitalManagementSystem/mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" 50 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 124 | 125 | FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 162 | if ERRORLEVEL 1 goto error 163 | goto end 164 | 165 | :error 166 | set ERROR_CODE=1 167 | 168 | :end 169 | @endlocal & set ERROR_CODE=%ERROR_CODE% 170 | 171 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost 172 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 173 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" 174 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" 175 | :skipRcPost 176 | 177 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 178 | if "%MAVEN_BATCH_PAUSE%" == "on" pause 179 | 180 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% 181 | 182 | exit /B %ERROR_CODE% 183 | -------------------------------------------------------------------------------- /HospitalManagementSystem/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.2.4.RELEASE 9 | 10 | 11 | com.company.varnaa 12 | HospitalManagementSystem 13 | 0.0.1-SNAPSHOT 14 | war 15 | HospitalManagementSystem 16 | Demo project for Spring Boot 17 | 18 | 19 | 1.8 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter-data-jdbc 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-data-jpa 30 | 31 | 32 | org.springframework.boot 33 | spring-boot-starter-security 34 | 35 | 36 | org.springframework.boot 37 | spring-boot-starter-thymeleaf 38 | 39 | 40 | org.springframework.boot 41 | spring-boot-starter-web 42 | 43 | 44 | org.springframework.session 45 | spring-session-core 46 | 47 | 48 | 49 | mysql 50 | mysql-connector-java 51 | runtime 52 | 53 | 54 | org.springframework.boot 55 | spring-boot-starter-tomcat 56 | provided 57 | 58 | 59 | org.springframework.boot 60 | spring-boot-starter-test 61 | test 62 | 63 | 64 | org.junit.vintage 65 | junit-vintage-engine 66 | 67 | 68 | 69 | 70 | org.springframework.security 71 | spring-security-test 72 | test 73 | 74 | 75 | org.springframework.boot 76 | spring-boot-starter-data-rest 77 | 78 | 79 | org.springframework.boot 80 | spring-boot-starter-actuator 81 | 82 | 83 | 84 | 85 | org.springframework.boot 86 | spring-boot-starter-actuator 87 | 88 | 89 | org.springframework.boot 90 | spring-boot-starter-data-jpa 91 | 92 | 93 | org.springframework.boot 94 | spring-boot-starter-data-rest 95 | 96 | 97 | org.springframework.boot 98 | spring-boot-starter-thymeleaf 99 | 100 | 101 | 102 | 103 | org.springframework.boot 104 | spring-boot-devtools 105 | runtime 106 | true 107 | 108 | 109 | 110 | mysql 111 | mysql-connector-java 112 | runtime 113 | 114 | 115 | org.springframework.boot 116 | spring-boot-starter-test 117 | test 118 | 119 | 120 | org.springframework.boot 121 | spring-boot-starter-hateoas 122 | 123 | 124 | org.webjars 125 | fullcalendar 126 | 2.2.5 127 | 128 | 129 | org.webjars 130 | momentjs 131 | 2.9.0 132 | 133 | 134 | org.webjars 135 | jquery-ui 136 | 1.12.1 137 | 138 | 139 | org.webjars 140 | jquery 141 | 3.4.1 142 | 143 | 144 | 145 | 146 | 147 | 148 | org.springframework.boot 149 | spring-boot-maven-plugin 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/CalendarApplication.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import java.text.ParseException; 4 | import java.text.SimpleDateFormat; 5 | import java.time.LocalDateTime; 6 | import java.time.ZoneId; 7 | import java.util.Date; 8 | import java.util.List; 9 | 10 | import javax.persistence.Entity; 11 | import javax.persistence.GeneratedValue; 12 | import javax.persistence.GenerationType; 13 | import javax.persistence.Id; 14 | import javax.persistence.Table; 15 | import javax.servlet.http.HttpServletRequest; 16 | 17 | import org.springframework.beans.factory.annotation.Autowired; 18 | import org.springframework.data.jpa.repository.JpaRepository; 19 | import org.springframework.data.jpa.repository.Query; 20 | import org.springframework.http.HttpStatus; 21 | import org.springframework.security.core.Authentication; 22 | import org.springframework.security.core.context.SecurityContextHolder; 23 | import org.springframework.stereotype.Controller; 24 | import org.springframework.stereotype.Repository; 25 | import org.springframework.ui.Model; 26 | import org.springframework.web.bind.annotation.RequestBody; 27 | import org.springframework.web.bind.annotation.RequestMapping; 28 | import org.springframework.web.bind.annotation.RequestMethod; 29 | import org.springframework.web.bind.annotation.RequestParam; 30 | import org.springframework.web.bind.annotation.ResponseStatus; 31 | import org.springframework.web.bind.annotation.RestController; 32 | import org.springframework.web.servlet.ModelAndView; 33 | 34 | 35 | 36 | @Controller 37 | class CalendarApplication { 38 | 39 | @Autowired 40 | private EventJpaRepository eventRepository; 41 | 42 | // @RequestMapping(value="/", method=RequestMethod.GET) 43 | // public ModelAndView index() { 44 | // return new ModelAndView("index"); 45 | // } 46 | 47 | @RequestMapping(value="/staticcalendar", method=RequestMethod.GET) 48 | public ModelAndView staticcalendar() { 49 | return new ModelAndView("staticcalendar"); 50 | } 51 | 52 | @RequestMapping(value="/calendar", method=RequestMethod.GET) 53 | public ModelAndView calendar() { 54 | return new ModelAndView("calendar"); 55 | } 56 | 57 | @RequestMapping(value="/jsoncalendar", method=RequestMethod.GET) 58 | public ModelAndView jsoncalendar() { 59 | return new ModelAndView("jsoncalendar"); 60 | } 61 | 62 | @RequestMapping(value="/eventlist", method=RequestMethod.GET) 63 | public String events(HttpServletRequest request, Model model) { 64 | List event = eventRepository.findAll(); 65 | model.addAttribute("events",event); 66 | return "allevents"; 67 | } 68 | } 69 | 70 | @Entity 71 | @Table(name="event") 72 | class Event { 73 | 74 | @Id 75 | @GeneratedValue(strategy = GenerationType.IDENTITY) 76 | private Long id; 77 | 78 | private String name; 79 | private String title; 80 | private String description; 81 | private LocalDateTime start; 82 | private LocalDateTime finish; 83 | 84 | 85 | 86 | public Event(Long id, String name, String title, String description, LocalDateTime start, LocalDateTime finish) { 87 | super(); 88 | this.id = id; 89 | this.name = name; 90 | this.title = title; 91 | this.description = description; 92 | this.start = start; 93 | this.finish = finish; 94 | } 95 | 96 | public Event() { 97 | super(); 98 | // TODO Auto-generated constructor stub 99 | } 100 | 101 | public Long getId() { 102 | return id; 103 | } 104 | 105 | public void setId(Long id) { 106 | this.id = id; 107 | } 108 | 109 | public String getTitle() { 110 | return title; 111 | } 112 | 113 | public void setTitle(String title) { 114 | this.title = title; 115 | } 116 | 117 | public String getDescription() { 118 | return description; 119 | } 120 | 121 | public void setDescription(String description) { 122 | this.description = description; 123 | } 124 | 125 | public LocalDateTime getStart() { 126 | return start; 127 | } 128 | 129 | public void setStart(LocalDateTime start) { 130 | this.start = start; 131 | } 132 | 133 | public LocalDateTime getFinish() { 134 | return finish; 135 | } 136 | 137 | public void setFinish(LocalDateTime finish) { 138 | this.finish = finish; 139 | } 140 | 141 | 142 | public String getName() { 143 | return name; 144 | } 145 | 146 | public void setName(String name) { 147 | this.name = name; 148 | } 149 | 150 | @Override 151 | public String toString() { 152 | return "Event [id=" + id + ", name=" + name + ", title=" + title + ", description=" + description + ", start=" 153 | + start + ", finish=" + finish + "]"; 154 | } 155 | 156 | 157 | 158 | } 159 | 160 | 161 | @Repository 162 | interface EventJpaRepository extends JpaRepository { 163 | 164 | /* Note these two methods do the same thing. The @Repository annotation handles both*/ 165 | 166 | 167 | /* This one uses a JPQL */ 168 | public List findByStartGreaterThanEqualAndFinishLessThanEqual(LocalDateTime start, LocalDateTime end); 169 | 170 | public List findByName(String name); 171 | 172 | public List findByStart(LocalDateTime start); 173 | 174 | /* This one uses an @Query */ 175 | @Query("select b from Event b where b.start >= ?1 and b.finish <= ?2") 176 | public List findByDateBetween(LocalDateTime start, LocalDateTime end); 177 | 178 | 179 | 180 | } 181 | 182 | @RestController 183 | class EventController { 184 | 185 | @Autowired 186 | private EventJpaRepository eventRepository; 187 | 188 | @RequestMapping(value="/allevents", method=RequestMethod.GET) 189 | public List allEvents() { 190 | // Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); 191 | // String doctorName = authentication.getName(); 192 | return eventRepository.findAll(); 193 | } 194 | 195 | @RequestMapping(value="/findByName", method=RequestMethod.GET) 196 | public List findByName() { 197 | Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); 198 | String doctorName = authentication.getName(); 199 | return eventRepository.findByName(doctorName); 200 | } 201 | 202 | 203 | @RequestMapping(value="/event", method=RequestMethod.POST) 204 | public Event addEvent(@RequestBody Event event) { 205 | Authentication authentication= SecurityContextHolder.getContext().getAuthentication(); 206 | String username= authentication.getName(); 207 | Event created = new Event(); 208 | created.setName(username); 209 | created.setTitle(event.getTitle()); 210 | created.setDescription(event.getDescription()); 211 | created.setStart(event.getStart()); 212 | created.setFinish(event.getFinish()); 213 | return eventRepository.save(created); 214 | } 215 | 216 | @RequestMapping(value="/event", method=RequestMethod.PATCH) 217 | public Event updateEvent(@RequestBody Event event) { 218 | return eventRepository.save(event); 219 | } 220 | 221 | @RequestMapping(value="/event", method=RequestMethod.DELETE) 222 | public void removeEvent(@RequestBody Event event) { 223 | eventRepository.delete(event); 224 | } 225 | 226 | @RequestMapping(value="/events", method=RequestMethod.GET) 227 | public List getEventsInRange(@RequestParam(value = "start", required = true) String start, 228 | @RequestParam(value = "end", required = true) String end) { 229 | Date startDate = null; 230 | Date endDate = null; 231 | SimpleDateFormat inputDateFormat=new SimpleDateFormat("yyyy-MM-dd"); 232 | 233 | try { 234 | startDate = inputDateFormat.parse(start); 235 | } catch (ParseException e) { 236 | throw new BadDateFormatException("bad start date: " + start); 237 | } 238 | 239 | try { 240 | endDate = inputDateFormat.parse(end); 241 | } catch (ParseException e) { 242 | throw new BadDateFormatException("bad end date: " + end); 243 | } 244 | 245 | LocalDateTime startDateTime = LocalDateTime.ofInstant(startDate.toInstant(), 246 | ZoneId.systemDefault()); 247 | 248 | LocalDateTime endDateTime = LocalDateTime.ofInstant(endDate.toInstant(), 249 | ZoneId.systemDefault()); 250 | 251 | return eventRepository.findByDateBetween(startDateTime, endDateTime); 252 | } 253 | } 254 | 255 | @ResponseStatus(HttpStatus.BAD_REQUEST) 256 | class BadDateFormatException extends RuntimeException { 257 | private static final long serialVersionUID = 1L; 258 | 259 | public BadDateFormatException(String dateString) { 260 | super(dateString); 261 | } 262 | } 263 | 264 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/HospitalManagementSystemApplication.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class HospitalManagementSystemApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(HospitalManagementSystemApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/MainController.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import java.time.LocalDateTime; 4 | import java.time.format.DateTimeFormatter; 5 | import java.util.List; 6 | import java.util.Optional; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.security.core.Authentication; 10 | import org.springframework.security.core.context.SecurityContextHolder; 11 | import org.springframework.stereotype.Controller; 12 | import org.springframework.ui.Model; 13 | import org.springframework.ui.ModelMap; 14 | import org.springframework.validation.BindingResult; 15 | import org.springframework.web.bind.annotation.GetMapping; 16 | import org.springframework.web.bind.annotation.ModelAttribute; 17 | import org.springframework.web.bind.annotation.RequestMapping; 18 | import org.springframework.web.bind.annotation.RequestMethod; 19 | import org.springframework.web.servlet.ModelAndView; 20 | import org.springframework.web.servlet.mvc.support.RedirectAttributes; 21 | import org.springframework.web.servlet.view.RedirectView; 22 | 23 | 24 | 25 | @Controller 26 | public class MainController { 27 | 28 | 29 | 30 | @GetMapping({"/", "/main"}) 31 | public String showMain() { 32 | return "main"; 33 | } 34 | 35 | 36 | @GetMapping("/patients") 37 | public String showPatient(Model model) { 38 | Authentication authentication= SecurityContextHolder.getContext().getAuthentication(); 39 | String username= authentication.getName(); 40 | model.addAttribute("username",username); 41 | // String confirmation ="Your appointment has been successfully booked. ID="; 42 | // model.addAttribute("confirmation",confirmation); 43 | String id = (String) model.asMap().get("appointmentId"); 44 | model.addAttribute("appointmentId",id); 45 | return "patients"; 46 | } 47 | 48 | @GetMapping("/doctors") 49 | public String showDoctors(Model model) { 50 | Authentication authentication= SecurityContextHolder.getContext().getAuthentication(); 51 | String username= authentication.getName(); 52 | model.addAttribute("username",username); 53 | return "doctors"; 54 | } 55 | 56 | 57 | @GetMapping("/showPostLogin") 58 | public String showPostLogin() { 59 | 60 | return "postlogin"; 61 | } 62 | 63 | @GetMapping("/receptionist") 64 | public String showReceptionist(Model model) { 65 | Authentication authentication= SecurityContextHolder.getContext().getAuthentication(); 66 | String username= authentication.getName(); 67 | model.addAttribute("username",username); 68 | 69 | 70 | return "receptionist"; 71 | } 72 | 73 | 74 | 75 | 76 | @Autowired 77 | private appointmentService service; 78 | 79 | @GetMapping("/add") 80 | public String newAppointment(Model model) { 81 | appointment appointment = new appointment(); 82 | appointment.setConfirmed("Not yet confirmed"); 83 | model.addAttribute("appointment",appointment); 84 | return "add.html"; 85 | } 86 | 87 | @GetMapping("/save") 88 | public String saveProduct(@ModelAttribute("appointment") appointment appointment, 89 | BindingResult result, ModelMap model, 90 | RedirectAttributes redirectAttributes 91 | ) { 92 | appointment.setConfirmed("Not yet confirmed"); 93 | service.save(appointment); 94 | String appointmentId=appointment.getAppointment_id().toString(); 95 | String message = "Appointment was successfully booked, your id is: "+appointmentId; 96 | redirectAttributes.addFlashAttribute("message", message); 97 | redirectAttributes.addFlashAttribute("alertClass", "alert-success"); 98 | redirectAttributes.addFlashAttribute("appointmentId",appointmentId); 99 | return "redirect:/patients"; 100 | 101 | } 102 | 103 | 104 | @GetMapping("/cancel") 105 | public String cancel(@ModelAttribute("appointment") appointment appointment, 106 | BindingResult result, ModelMap model, 107 | RedirectAttributes redirectAttributes 108 | ) { 109 | Integer id = appointment.getAppointment_id(); 110 | service.delete(id); 111 | String message = "Appointment was successfully canceled!"; 112 | redirectAttributes.addFlashAttribute("message", message); 113 | redirectAttributes.addFlashAttribute("alertClass", "alert-success"); 114 | return "redirect:/patients"; 115 | 116 | } 117 | 118 | @RequestMapping("/confirm") 119 | public String confirm(@ModelAttribute("appointment") appointment appointment, BindingResult result, ModelMap model, 120 | RedirectAttributes redirectAttributes 121 | ) { 122 | System.out.println(appointment); 123 | //Optional x = service.get(appointment.getAppointment_id()); 124 | String confirmation = "confirmed"; 125 | Integer id = appointment.getAppointment_id(); 126 | service.setConfirmation(confirmation, id); 127 | System.out.println(id); 128 | String message = "Appointment was successfully confirmed!"; 129 | redirectAttributes.addFlashAttribute("message", message); 130 | redirectAttributes.addFlashAttribute("alertClass", "alert-success"); 131 | return "redirect:/receptionist/receptionistAppointments"; 132 | 133 | } 134 | 135 | @GetMapping("/confirmm") 136 | public String showConfirmm(Model model) { 137 | appointment confirmation = new appointment(); 138 | model.addAttribute("confirmation",confirmation); 139 | return "confirm"; 140 | } 141 | 142 | 143 | @GetMapping("/findbystart") 144 | public String showBydate(Model model) { 145 | Authentication auth = SecurityContextHolder.getContext().getAuthentication(); 146 | String doctorName = auth.getName(); 147 | DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyy/MM/dd"); 148 | LocalDateTime now = LocalDateTime.now(); 149 | System.out.println(dtf.format(now).toString()); 150 | List appointments = service.findByDate(dtf.format(now).toString(),doctorName); 151 | model.addAttribute("appointments",appointments); 152 | return "findbystart"; 153 | } 154 | 155 | @GetMapping("/varsha") 156 | public String createPrescription(Model model) { 157 | prescription ps = new prescription(); 158 | model.addAttribute("prescription",ps); 159 | return "varsha"; 160 | } 161 | 162 | @GetMapping("/signup") 163 | public String signup() { 164 | return "signup"; 165 | } 166 | 167 | @GetMapping("/signupp") 168 | public String signupp(RedirectAttributes redirectAttributes) { 169 | redirectAttributes.addFlashAttribute("message", "Account created successfully"); 170 | redirectAttributes.addFlashAttribute("alertClass", "alert-success"); 171 | return "redirect:/"; 172 | } 173 | 174 | @Autowired 175 | public invoiceservice invoiceService; 176 | 177 | @GetMapping("/saveInvoice") 178 | public String saveInvoice(@ModelAttribute("invoice") invoice invoice, 179 | BindingResult result, ModelMap model, 180 | RedirectAttributes redirectAttributes 181 | ) { 182 | invoiceService.save(invoice); 183 | String message = "Invoice was successfully created!"; 184 | redirectAttributes.addFlashAttribute("message", message); 185 | redirectAttributes.addFlashAttribute("alertClass", "alert-success"); 186 | return "redirect:/patients"; 187 | } 188 | 189 | } 190 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/PatientController.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.security.core.Authentication; 7 | import org.springframework.security.core.context.SecurityContextHolder; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.ui.Model; 10 | import org.springframework.ui.ModelMap; 11 | import org.springframework.validation.BindingResult; 12 | import org.springframework.web.bind.annotation.GetMapping; 13 | import org.springframework.web.bind.annotation.ModelAttribute; 14 | import org.springframework.web.bind.annotation.RequestMapping; 15 | import org.springframework.web.bind.annotation.RequestMethod; 16 | import org.springframework.web.servlet.mvc.support.RedirectAttributes; 17 | import org.springframework.web.servlet.view.RedirectView; 18 | 19 | @Controller 20 | @RequestMapping("/patients") 21 | public class PatientController { 22 | 23 | @Autowired 24 | private appointmentService service; 25 | 26 | 27 | 28 | @GetMapping("/myAppointments") 29 | public String myAppointments(Model model) { 30 | Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); 31 | String patientName = authentication.getName(); 32 | List listAppointments = service.findByPatientName(patientName); 33 | model.addAttribute("listAppointments",listAppointments); 34 | return "myAppointments"; 35 | } 36 | 37 | @GetMapping("/cancelAppointment") 38 | public String cancelAppointment(Model model) { 39 | appointment cancelAppointment = new appointment(); 40 | model.addAttribute("appointment",cancelAppointment); 41 | return "cancelAppointment"; 42 | 43 | } 44 | 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/SecurityConfig.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; 5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; 7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; 8 | import org.springframework.security.crypto.factory.PasswordEncoderFactories; 9 | import org.springframework.security.crypto.password.PasswordEncoder; 10 | 11 | @Configuration 12 | @EnableWebSecurity 13 | public class SecurityConfig extends WebSecurityConfigurerAdapter{ 14 | @Override 15 | protected void configure(AuthenticationManagerBuilder auth) throws Exception { 16 | PasswordEncoder encoder = 17 | PasswordEncoderFactories.createDelegatingPasswordEncoder(); 18 | auth 19 | .inMemoryAuthentication() 20 | .withUser("varnaa") 21 | .password(encoder.encode("test123")) 22 | .roles("USER","PATIENT") 23 | .and() 24 | .withUser("marry") 25 | .password(encoder.encode("test123")) 26 | .roles("USER", "RECEPTIONIST") 27 | .and() 28 | .withUser("bijoy") 29 | .password(encoder.encode("test123")) 30 | .roles("USER","DOCTOR") 31 | .and() 32 | .withUser("damon") 33 | .password(encoder.encode("test123")) 34 | .roles("USER","DOCTOR") 35 | .and() 36 | .withUser("walter") 37 | .password(encoder.encode("test123")) 38 | .roles("USER","PATIENT") 39 | .and() 40 | .withUser("varshaa") 41 | .password(encoder.encode("test123")) 42 | .roles("USER","PATIENT") 43 | .and() 44 | .withUser("pradeep") 45 | .password(encoder.encode("test123")) 46 | .roles("USER","PATIENT") 47 | .and() 48 | .withUser("rupa") 49 | .password(encoder.encode("test123")) 50 | .roles("USER","PATIENT"); 51 | } 52 | 53 | @Override 54 | protected void configure(HttpSecurity http) throws Exception { 55 | http 56 | .csrf().disable() 57 | .authorizeRequests() 58 | .antMatchers("/").permitAll() 59 | .antMatchers("/main").permitAll() 60 | 61 | .antMatchers("/signup").permitAll() 62 | .antMatchers("/doctors/**").hasRole("DOCTOR") 63 | .antMatchers("/patients/**").hasRole("PATIENT") 64 | .antMatchers("/receptionist/**").hasRole("RECEPTIONIST") 65 | .antMatchers("/anonymous*").anonymous() 66 | .antMatchers("/login*").permitAll() 67 | .anyRequest().authenticated() 68 | .and() 69 | .formLogin() 70 | // .loginPage("/login") 71 | // .loginProcessingUrl("/perform_login") 72 | .defaultSuccessUrl("/showPostLogin", false) 73 | .permitAll() 74 | //.failureUrl("/login.html?error=true") 75 | //.failureHandler(authenticationFailureHandler()) 76 | .and() 77 | .logout() 78 | .logoutSuccessUrl("/") 79 | .permitAll(); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/ServletInitializer.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import org.springframework.boot.builder.SpringApplicationBuilder; 4 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 5 | 6 | public class ServletInitializer extends SpringBootServletInitializer { 7 | 8 | @Override 9 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { 10 | return application.sources(HospitalManagementSystemApplication.class); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/appointment.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import org.hibernate.annotations.DynamicUpdate; 11 | 12 | 13 | @Entity 14 | @Table(name="appointment",schema = "hospital") 15 | @DynamicUpdate 16 | public class appointment { 17 | 18 | 19 | @Id 20 | @GeneratedValue(strategy=GenerationType.IDENTITY) 21 | @Column(name="appointment_id") 22 | private Integer appointment_id; 23 | 24 | @Column(name="patientName") 25 | private String patientName; 26 | 27 | @Column(name="doctor_name") 28 | private String doctorName; 29 | 30 | @Column(name="appointment_date") 31 | private String date; 32 | 33 | @Column(name="prescription") 34 | private String prescription; 35 | 36 | @Column(name="confirmed") 37 | private String confirmed; 38 | 39 | public String getPrescription() { 40 | return prescription; 41 | } 42 | 43 | public void setPrescription(String prescription) { 44 | this.prescription = prescription; 45 | } 46 | 47 | 48 | @Override 49 | public String toString() { 50 | return "appointment [appointment_id=" + appointment_id + ", patientName=" + patientName + ", doctorName=" 51 | + doctorName + ", date=" + date + ", prescription=" + prescription + "]"; 52 | } 53 | 54 | public appointment(Integer appointment_id, String patientName, String doctorName, String date, 55 | String prescription,String confirmed) { 56 | super(); 57 | this.appointment_id = appointment_id; 58 | this.patientName = patientName; 59 | this.doctorName = doctorName; 60 | this.date = date; 61 | this.prescription = prescription; 62 | this.confirmed=confirmed; 63 | } 64 | 65 | public Integer getAppointment_id() { 66 | return appointment_id; 67 | } 68 | 69 | public void setAppointment_id(Integer appointment_id) { 70 | this.appointment_id = appointment_id; 71 | } 72 | 73 | public appointment() {} 74 | 75 | public String getPatientName() { 76 | return patientName; 77 | } 78 | 79 | public void setPatientName(String patientName) { 80 | this.patientName = patientName; 81 | } 82 | 83 | public String getDoctorName() { 84 | return doctorName; 85 | } 86 | 87 | public void setDoctorName(String doctorName) { 88 | this.doctorName = doctorName; 89 | } 90 | 91 | public String getDate() { 92 | return date; 93 | } 94 | 95 | public void setDate(String date) { 96 | this.date = date; 97 | } 98 | 99 | public String getConfirmed() { 100 | return confirmed; 101 | } 102 | 103 | public void setConfirmed(String confirmed) { 104 | this.confirmed = confirmed; 105 | } 106 | 107 | 108 | 109 | } 110 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/appointmentRepository.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | 4 | import java.util.List; 5 | import java.util.Optional; 6 | 7 | import org.springframework.data.jpa.repository.JpaRepository; 8 | import org.springframework.data.jpa.repository.Modifying; 9 | import org.springframework.data.jpa.repository.Query; 10 | 11 | public interface appointmentRepository extends JpaRepository { 12 | 13 | 14 | List findByDoctorName(String doctorName); 15 | 16 | 17 | List findByPatientName(String patientName); 18 | 19 | @Modifying 20 | @Query("update appointment a set a.confirmed = ?1 where a.appointment_id = ?2") 21 | int setConfirmation(String confitmation, Integer id); 22 | 23 | 24 | @Modifying 25 | @Query("update appointment a set a.prescription = ?1 where a.appointment_id = ?2") 26 | int setPrescription(String prescription, Integer id); 27 | 28 | @Query(value="select * from appointment a where a.appointment_date =?1 AND a.doctor_name =?2", nativeQuery=true) 29 | List findByDate(String date,String doctorName); 30 | } 31 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/appointmentService.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | @Service 11 | @Transactional 12 | public class appointmentService { 13 | 14 | @Autowired 15 | private appointmentRepository bookAppointment; 16 | 17 | 18 | 19 | public List listAll(){ 20 | return bookAppointment.findAll(); 21 | } 22 | 23 | public void save(appointment appointment) { 24 | bookAppointment.save(appointment); 25 | } 26 | 27 | 28 | public void delete(Integer id) { 29 | bookAppointment.deleteById(id); 30 | } 31 | 32 | public int setConfirmation(String confirmation, Integer id) { 33 | return bookAppointment.setConfirmation(confirmation, id); 34 | } 35 | 36 | 37 | public int setPrescription(String confirmation, Integer id) { 38 | return bookAppointment.setPrescription(confirmation, id); 39 | } 40 | 41 | public Optional get(Integer id) { 42 | return bookAppointment.findById(id); 43 | 44 | } 45 | 46 | public List findByPatientName(String patientName) 47 | { 48 | return bookAppointment.findByPatientName(patientName); 49 | } 50 | 51 | public List findByDoctorName(String doctorName) 52 | { 53 | return bookAppointment.findByDoctorName(doctorName); 54 | } 55 | 56 | public List findByDate(String date, String doctorName){ 57 | return bookAppointment.findByDate(date, doctorName); 58 | } 59 | 60 | } 61 | 62 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/doctorController.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.security.core.Authentication; 7 | import org.springframework.security.core.context.SecurityContextHolder; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.ui.Model; 10 | import org.springframework.web.bind.annotation.GetMapping; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | 13 | @Controller 14 | @RequestMapping("/doctors") 15 | public class doctorController { 16 | 17 | @Autowired 18 | private appointmentService service; 19 | 20 | @RequestMapping("/doctorAppointments") 21 | public String showDoctorAppointments(Model model) { 22 | Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); 23 | String doctorName = authentication.getName(); 24 | List doctorAppointments = service.findByDoctorName(doctorName); 25 | model.addAttribute("doctorAppointments",doctorAppointments); 26 | return "doctorAppointments.html"; 27 | } 28 | 29 | @RequestMapping("/createPrescription") 30 | public String createPrescription() { 31 | return "createPrescription"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/invoice.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import org.hibernate.annotations.DynamicUpdate; 11 | 12 | @Entity 13 | @Table(name="prescription",schema="hospital") 14 | @DynamicUpdate 15 | public class invoice { 16 | 17 | @Id 18 | @Column 19 | @GeneratedValue(strategy=GenerationType.IDENTITY) 20 | private Integer invoiceID; 21 | 22 | @Column 23 | private String patientName; 24 | 25 | @Column 26 | private Integer appointmentID; 27 | 28 | @Column 29 | private String invoice; 30 | 31 | public Integer getInvoiceID() { 32 | return invoiceID; 33 | } 34 | 35 | public void setInvoiceID(Integer invoiceID) { 36 | this.invoiceID = invoiceID; 37 | } 38 | 39 | public String getPatientName() { 40 | return patientName; 41 | } 42 | 43 | public void setPatientName(String patientName) { 44 | this.patientName = patientName; 45 | } 46 | 47 | public Integer getAppointmentID() { 48 | return appointmentID; 49 | } 50 | 51 | public void setAppointmentID(Integer appointmentID) { 52 | this.appointmentID = appointmentID; 53 | } 54 | 55 | public String getInvoice() { 56 | return invoice; 57 | } 58 | 59 | public void setInvoice(String invoice) { 60 | this.invoice = invoice; 61 | } 62 | 63 | public invoice(Integer invoiceID, String patientName, Integer appointmentID, String invoice) { 64 | super(); 65 | this.invoiceID = invoiceID; 66 | this.patientName = patientName; 67 | this.appointmentID = appointmentID; 68 | this.invoice = invoice; 69 | } 70 | 71 | public invoice() { 72 | 73 | } 74 | 75 | 76 | } 77 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/invoiceRepository.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | 8 | public interface invoiceRepository extends JpaRepository { 9 | 10 | } -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/invoiceservice.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | @Service 10 | @Transactional 11 | public class invoiceservice { 12 | 13 | @Autowired 14 | private invoiceRepository rep; 15 | 16 | 17 | public void save(invoice entity) { 18 | rep.save(entity); 19 | } 20 | 21 | public List view(){ 22 | return rep.findAll(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/prescription.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import org.hibernate.annotations.DynamicUpdate; 11 | 12 | @Entity 13 | @Table(name="prescription",schema="hospital") 14 | @DynamicUpdate 15 | public class prescription { 16 | 17 | @Id 18 | @Column 19 | @GeneratedValue(strategy=GenerationType.IDENTITY) 20 | private Integer prescriptionID; 21 | 22 | public Integer getPrescriptionID() { 23 | return prescriptionID; 24 | } 25 | 26 | public void setPrescriptionID(Integer prescriptionID) { 27 | this.prescriptionID = prescriptionID; 28 | } 29 | 30 | @Column 31 | private String patientName; 32 | 33 | 34 | @Column 35 | private Integer appointmentID; 36 | 37 | 38 | @Column 39 | private String description; 40 | 41 | 42 | @Column 43 | private String doctorName; 44 | 45 | public prescription(String patientName, Integer appointmentID, String description, String doctorName) { 46 | super(); 47 | this.patientName = patientName; 48 | this.appointmentID = appointmentID; 49 | this.description = description; 50 | this.doctorName = doctorName; 51 | } 52 | 53 | public prescription() { 54 | // TODO Auto-generated constructor stub 55 | } 56 | 57 | public String getPatientName() { 58 | return patientName; 59 | } 60 | 61 | public void setPatientName(String patientName) { 62 | this.patientName = patientName; 63 | } 64 | 65 | public Integer getAppointmentID() { 66 | return appointmentID; 67 | } 68 | 69 | public void setAppointmentID(Integer appointmentID) { 70 | this.appointmentID = appointmentID; 71 | } 72 | 73 | public String getDescription() { 74 | return description; 75 | } 76 | 77 | public void setDescription(String description) { 78 | this.description = description; 79 | } 80 | 81 | public String getDoctorName() { 82 | return doctorName; 83 | } 84 | 85 | public void setDoctorName(String doctorName) { 86 | this.doctorName = doctorName; 87 | } 88 | 89 | 90 | } 91 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/prescriptionController.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.security.core.Authentication; 8 | import org.springframework.security.core.context.SecurityContextHolder; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.ui.Model; 11 | import org.springframework.ui.ModelMap; 12 | import org.springframework.validation.BindingResult; 13 | import org.springframework.web.bind.annotation.GetMapping; 14 | import org.springframework.web.bind.annotation.ModelAttribute; 15 | import org.springframework.web.servlet.mvc.support.RedirectAttributes; 16 | 17 | @Controller 18 | public class prescriptionController { 19 | 20 | @Autowired 21 | private prescriptionService service; 22 | 23 | @Autowired 24 | private appointmentService service1; 25 | 26 | @GetMapping("/viewPrescription") 27 | public String viewPrescription(Model model) { 28 | Authentication auth = SecurityContextHolder.getContext().getAuthentication(); 29 | String patientName = auth.getName(); 30 | List prescriptions = service.findByPatientName(patientName); 31 | model.addAttribute("prescriptions",prescriptions); 32 | return"viewPrescriotions"; 33 | } 34 | 35 | @GetMapping("/savePrescription") 36 | public String saveProduct(@ModelAttribute("prescription") prescription prescription, 37 | BindingResult result, ModelMap model, 38 | RedirectAttributes redirectAttributes 39 | ) { 40 | Integer id= prescription.getAppointmentID(); 41 | service1.setPrescription("prescribed", id); 42 | Authentication auth = SecurityContextHolder.getContext().getAuthentication(); 43 | String doctorName = auth.getName(); 44 | prescription.setDoctorName(doctorName); 45 | service.save(prescription); 46 | String message = "Prescription was successfully saved "; 47 | redirectAttributes.addFlashAttribute("message", message); 48 | redirectAttributes.addFlashAttribute("alertClass", "alert-success"); 49 | return "redirect:/doctorAppointments"; 50 | } 51 | 52 | 53 | } -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/prescriptionRepository.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | public interface prescriptionRepository extends JpaRepository { 8 | 9 | List findByPatientName(String patientName); 10 | } 11 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/prescriptionService.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | @Service 10 | @Transactional 11 | public class prescriptionService { 12 | 13 | @Autowired 14 | private prescriptionRepository repository; 15 | 16 | public void save(prescription Prescription) { 17 | repository.save(Prescription); 18 | } 19 | 20 | public List findByPatientName(String patientName){ 21 | 22 | return repository.findByPatientName(patientName); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/java/com/company/varnaa/receptionistController.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | 4 | import java.text.SimpleDateFormat; 5 | import java.time.LocalDateTime; 6 | import java.time.format.DateTimeFormatter; 7 | import java.util.Date; 8 | import java.util.List; 9 | 10 | import javax.swing.text.DateFormatter; 11 | 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.format.annotation.DateTimeFormat; 14 | import org.springframework.stereotype.Controller; 15 | import org.springframework.ui.Model; 16 | import org.springframework.ui.ModelMap; 17 | import org.springframework.validation.BindingResult; 18 | import org.springframework.web.bind.annotation.GetMapping; 19 | import org.springframework.web.bind.annotation.ModelAttribute; 20 | import org.springframework.web.bind.annotation.RequestMapping; 21 | import org.springframework.web.bind.annotation.RequestMethod; 22 | import org.springframework.web.servlet.mvc.support.RedirectAttributes; 23 | 24 | @Controller 25 | @RequestMapping("/receptionist") 26 | public class receptionistController { 27 | 28 | @Autowired 29 | private appointmentService service = new appointmentService(); 30 | 31 | @GetMapping("/receptionistAppointments") 32 | public String showReceptionistAppointments(Model model) { 33 | List listAppointments = service.listAll(); 34 | model.addAttribute("listAppointments",listAppointments); 35 | 36 | String confirmed = "confirmed"; 37 | model.addAttribute("confirmed",confirmed); 38 | return "receptionistAppointments"; 39 | 40 | } 41 | 42 | @GetMapping("/confirmm") 43 | public String showConfirmm(Model model) { 44 | appointment confirmation = new appointment(); 45 | model.addAttribute("confirmation",confirmation); 46 | return "confirm"; 47 | } 48 | 49 | 50 | 51 | @Autowired 52 | private EventJpaRepository repository; 53 | 54 | @RequestMapping(value="/receptionistSchedule", method=RequestMethod.GET) 55 | public String receptionistSchedule(Model model) { 56 | List events = repository.findAll(); 57 | model.addAttribute("events",events); 58 | return "receptionistSchedule"; 59 | } 60 | 61 | @RequestMapping("/findbystart") 62 | public String showBydate(Model model) { 63 | DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyy/MM/dd HH:mm:ss"); 64 | LocalDateTime now = LocalDateTime.now(); 65 | 66 | System.out.println(now); 67 | List event = repository.findByStart(now); 68 | model.addAttribute("event",event); 69 | return "scheduleFindByName"; 70 | } 71 | 72 | 73 | @RequestMapping("/createInvoice") 74 | public String createInvoice(Model model) { 75 | invoice i = new invoice(); 76 | model.addAttribute("invoice",i); 77 | return "invoice"; 78 | } 79 | 80 | 81 | 82 | } 83 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | logging.level.root = WARN 2 | 3 | debug=true 4 | 5 | 6 | spring.datasource.url = jdbc:mysql://localhost:3306/hospital 7 | spring.datasource.username = root 8 | spring.datasource.password = muffin723 9 | 10 | 11 | spring.thymeleaf.cache=false 12 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect 13 | 14 | # Hibernate ddl auto (create, create-drop, validate, update) 15 | spring.jpa.hibernate.ddl-auto = update 16 | spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/add.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | new appointment 7 | 8 | 9 |

10 |

HOSPITAL SWERSIE

11 |
12 |
13 |

Create New Appointment

14 |
15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
Patient name:
doctor name:
date:
Need prescription?
40 |
41 |
42 | 43 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/allevents.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Doctors event 7 | 8 | 9 |

10 |

HOSPITAL SWERSIE

11 |

12 |
13 |
14 | 15 |

your appointments

16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
AppointmentIDPatient NameDoctor NameAppointment Date
31 | 32 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/calendar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 10 | 12 | 14 | 16 | 18 | 19 | 45 | 46 | 58 | 59 | 60 |

61 |

HOSPITAL SWERSIE

62 |
63 |
64 | 65 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/cancelAppointment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Cancel Appointments 7 | 8 | 9 |

10 |

HOSPITAL SWERSIE

11 |
12 |
13 |

Cancel Appointment

14 |
15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Appointment ID:
Note: This action can not be undone!
29 |
30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/confirm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 |

HOSPITAL SWERSIE

7 |
8 |
9 |

Create New Appointment

10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
Appointment id:
22 |
23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/doctorAppointments.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Your appointments 7 | 17 | 18 | 19 | 20 |

21 |

HOSPITAL SWERSIE

22 |

23 |
24 |
25 | homepage 26 | Today's appointment 27 |

your appointments

28 | 29 |
30 | No appointments found 31 |
32 |

33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 50 | 51 |
AppointmentIDPatient NameAppointment DatePrescription
46 | Create Prescription 47 | - 48 | prescribed 49 |
52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/doctors.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Patient profile 7 | 8 | 9 |
10 |

HOSPITAL SWERISIE

11 |
12 | Hello! DR: 13 |
14 | 15 |
16 | 17 | Schedule 18 | Appointments 19 | 20 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/findbystart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 |

17 |

HOSPITAL SWERSIE

18 |
19 | homepage 20 |
21 |
22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
Appointment IDPatient NameDateprescription
38 | 39 | 40 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/invoice.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 |
8 |

Create New Invoice

9 |
10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
Appointment ID:
patient name:
28 |
29 |
30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/jsoncalendar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 12 | 15 | 16 | 19 | 21 | 24 | 25 | 26 | 29 | 33 | 34 | 288 | 323 | 324 | 354 | 355 | 356 | 371 | 372 | 373 | 374 |

375 |

HOSPITAL SWERSIE

376 |
377 |
homepage
378 | 381 | 382 |
383 |
384 | 385 |
loading...
386 | 387 |
388 | 389 |
390 |
391 |
392 | 393 | 394 | 395 | 396 | 397 | 398 |

399 | 400 | 401 | 402 |

403 | 404 | 405 | 406 | 407 | 408 |
409 |
410 |
411 | 412 |
413 |
414 |
415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 |

423 | 424 | 425 | 426 | 427 |
428 |
429 |
430 | 431 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/main.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | WELCOME 8 | 9 | 10 | 11 | 39 |
40 |

HOSPITAL SWERISIE

41 |
42 | 48 |

49 | 50 | 51 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/myAppointments.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Your appointments 7 | 17 | 18 | 19 |

20 |

HOSPITAL SWERSIE

21 |
22 | homepage 23 |
24 |
25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
Your appointments
AppointmentIDPatient NameDoctor NameAppointment DateConfirmation
44 | 45 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/patients.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | Patient profile 9 | 10 | 11 |
12 |

HOSPITAL SWERISIE

13 |
14 | Hello!
15 |
16 |
17 | 18 |
19 |
20 | view appointments 21 | view prescriptions 22 | cancel appointment 23 |

24 | Schedule your visit by booking an appointment: book appointment 25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/postlogin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 | post login 9 | 10 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/receptionist.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Receptionist 7 | 8 | 9 |

10 |

HOSPITAL SWERSIE

11 |
12 | Hello! 13 |
14 | 15 |
16 |
17 |

18 | Appointments 19 | Schedules 20 | Create invoice 21 | 22 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/receptionistAppointments.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Your appointments 7 | 8 | 18 | 19 | 20 |

21 |

HOSPITAL SWERSIE

22 |
23 | homepage 24 |
25 |
26 |
27 |

28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 55 | 56 |
Appointments
AppointmentIDPatient NameDoctor NameAppointment Dateconfirmation
46 |
47 | 48 |
49 | 50 |
51 |
52 | confirmed 53 | 54 |
57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/receptionistSchedule.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Your appointments 7 | 17 | 18 | 19 |

20 |

HOSPITAL SWERSIE

21 |
22 | homepage 23 |
24 |
25 |
26 | 27 |

Schedules

28 |
29 | 30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
Schedules
Doctor NameTittleDescriptionstartfinish
49 | 50 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/signup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Sign Up Form 10 | 11 | 12 | 13 | 14 | 257 | 265 | 266 | 267 | 268 | 269 | 270 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/staticcalendar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 10 | 12 | 14 | 16 | 18 | 19 | 88 | 89 | 104 | 105 | 106 |
107 | 108 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/varsha.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 |
10 |

Create New Prescription

11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
Appointmen ID:
patient name:
30 |
31 |
32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/main/resources/templates/viewPrescriotions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Create prescription 7 | 8 | 9 | 19 | 20 |

21 |

HOSPITAL SWERSIE

22 |
23 | homepage 24 |
25 |
26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
Your appointments
AppointmentIDPatient NamePrescription
43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /HospitalManagementSystem/src/test/java/com/company/varnaa/HospitalManagementSystemApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.company.varnaa; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class HospitalManagementSystemApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/application.properties: -------------------------------------------------------------------------------- 1 | logging.level.root = WARN 2 | 3 | debug=true 4 | 5 | 6 | spring.datasource.url = jdbc:mysql://localhost:3306/hospital 7 | spring.datasource.username = root 8 | spring.datasource.password = muffin723 9 | 10 | 11 | spring.thymeleaf.cache=false 12 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect 13 | 14 | # Hibernate ddl auto (create, create-drop, validate, update) 15 | spring.jpa.hibernate.ddl-auto = update 16 | spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/BadDateFormatException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/BadDateFormatException.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/CalendarApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/CalendarApplication.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/Event.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/Event.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/EventController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/EventController.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/EventJpaRepository.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/EventJpaRepository.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/HospitalManagementSystemApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/HospitalManagementSystemApplication.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/MainController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/MainController.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/PatientController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/PatientController.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/SecurityConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/SecurityConfig.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/ServletInitializer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/ServletInitializer.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/appointment.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/appointment.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/appointmentRepository.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/appointmentRepository.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/appointmentService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/appointmentService.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/doctorController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/doctorController.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/invoice.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/invoice.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/invoiceRepository.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/invoiceRepository.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/invoiceservice.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/invoiceservice.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/prescription.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/prescription.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/prescriptionController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/prescriptionController.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/prescriptionRepository.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/prescriptionRepository.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/prescriptionService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/prescriptionService.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/com/company/varnaa/receptionistController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/HospitalManagementSystem/target/classes/com/company/varnaa/receptionistController.class -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/add.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | new appointment 7 | 8 | 9 |

10 |

HOSPITAL SWERSIE

11 |
12 |
13 |

Create New Appointment

14 |
15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
Patient name:
doctor name:
date:
Need prescription?
40 |
41 |
42 | 43 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/allevents.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Doctors event 7 | 8 | 9 |

10 |

HOSPITAL SWERSIE

11 |

12 |
13 |
14 | 15 |

your appointments

16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
AppointmentIDPatient NameDoctor NameAppointment Date
31 | 32 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/calendar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 10 | 12 | 14 | 16 | 18 | 19 | 45 | 46 | 58 | 59 | 60 |

61 |

HOSPITAL SWERSIE

62 |
63 |
64 | 65 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/cancelAppointment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Cancel Appointments 7 | 8 | 9 |

10 |

HOSPITAL SWERSIE

11 |
12 |
13 |

Cancel Appointment

14 |
15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Appointment ID:
Note: This action can not be undone!
29 |
30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/confirm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 |

HOSPITAL SWERSIE

7 |
8 |
9 |

Create New Appointment

10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
Appointment id:
22 |
23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/doctorAppointments.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Your appointments 7 | 17 | 18 | 19 | 20 |

21 |

HOSPITAL SWERSIE

22 |

23 |
24 |
25 | homepage 26 | Today's appointment 27 |

your appointments

28 | 29 |
30 | No appointments found 31 |
32 |

33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 50 | 51 |
AppointmentIDPatient NameAppointment DatePrescription
46 | Create Prescription 47 | - 48 | prescribed 49 |
52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/doctors.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Patient profile 7 | 8 | 9 |
10 |

HOSPITAL SWERISIE

11 |
12 | Hello! DR: 13 |
14 | 15 |
16 | 17 | Schedule 18 | Appointments 19 | 20 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/findbystart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 |

17 |

HOSPITAL SWERSIE

18 |
19 | homepage 20 |
21 |
22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
Appointment IDPatient NameDateprescription
38 | 39 | 40 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/invoice.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 |
8 |

Create New Invoice

9 |
10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
Appointment ID:
patient name:
28 |
29 |
30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/jsoncalendar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 12 | 15 | 16 | 19 | 21 | 24 | 25 | 26 | 29 | 33 | 34 | 288 | 323 | 324 | 354 | 355 | 356 | 371 | 372 | 373 | 374 |

375 |

HOSPITAL SWERSIE

376 |
377 |
homepage
378 | 381 | 382 |
383 |
384 | 385 |
loading...
386 | 387 |
388 | 389 |
390 |
391 |
392 | 393 | 394 | 395 | 396 | 397 | 398 |

399 | 400 | 401 | 402 |

403 | 404 | 405 | 406 | 407 | 408 |
409 |
410 |
411 | 412 |
413 |
414 |
415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 |

423 | 424 | 425 | 426 | 427 |
428 |
429 |
430 | 431 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/main.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | WELCOME 8 | 9 | 10 | 11 | 39 |
40 |

HOSPITAL SWERISIE

41 |
42 | 48 |

49 | 50 | 51 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/myAppointments.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Your appointments 7 | 17 | 18 | 19 |

20 |

HOSPITAL SWERSIE

21 |
22 | homepage 23 |
24 |
25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
Your appointments
AppointmentIDPatient NameDoctor NameAppointment DateConfirmation
44 | 45 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/patients.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | Patient profile 9 | 10 | 11 |
12 |

HOSPITAL SWERISIE

13 |
14 | Hello!
15 |
16 |
17 | 18 |
19 |
20 | view appointments 21 | view prescriptions 22 | cancel appointment 23 |

24 | Schedule your visit by booking an appointment: book appointment 25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/postlogin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 | post login 9 | 10 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/receptionist.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Receptionist 7 | 8 | 9 |

10 |

HOSPITAL SWERSIE

11 |
12 | Hello! 13 |
14 | 15 |
16 |
17 |

18 | Appointments 19 | Schedules 20 | Create invoice 21 | 22 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/receptionistAppointments.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Your appointments 7 | 8 | 18 | 19 | 20 |

21 |

HOSPITAL SWERSIE

22 |
23 | homepage 24 |
25 |
26 |
27 |

28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 55 | 56 |
Appointments
AppointmentIDPatient NameDoctor NameAppointment Dateconfirmation
46 |
47 | 48 |
49 | 50 |
51 |
52 | confirmed 53 | 54 |
57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/receptionistSchedule.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Your appointments 7 | 17 | 18 | 19 |

20 |

HOSPITAL SWERSIE

21 |
22 | homepage 23 |
24 |
25 |
26 | 27 |

Schedules

28 |
29 | 30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
Schedules
Doctor NameTittleDescriptionstartfinish
49 | 50 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/signup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Sign Up Form 10 | 11 | 12 | 13 | 14 | 257 | 265 | 266 | 267 | 268 | 269 | 270 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/staticcalendar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 10 | 12 | 14 | 16 | 18 | 19 | 88 | 89 | 104 | 105 | 106 |
107 | 108 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/varsha.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 |
10 |

Create New Prescription

11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
Appointmen ID:
patient name:
30 |
31 |
32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/classes/templates/viewPrescriotions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Create prescription 7 | 8 | 9 | 19 | 20 |

21 |

HOSPITAL SWERSIE

22 |
23 | homepage 24 |
25 |
26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
Your appointments
AppointmentIDPatient NamePrescription
43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Implementation-Title: HospitalManagementSystem 3 | Implementation-Version: 0.0.1-SNAPSHOT 4 | Build-Jdk-Spec: 1.8 5 | Created-By: Maven Integration for Eclipse 6 | 7 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/m2e-wtp/web-resources/META-INF/maven/com.company.varnaa/HospitalManagementSystem/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven Integration for Eclipse 2 | #Fri Apr 10 17:27:51 IST 2020 3 | version=0.0.1-SNAPSHOT 4 | groupId=com.company.varnaa 5 | m2e.projectName=HospitalManagementSystem 6 | m2e.projectLocation=D\:\\se\\HospitalManagementSystem 7 | artifactId=HospitalManagementSystem 8 | -------------------------------------------------------------------------------- /HospitalManagementSystem/target/m2e-wtp/web-resources/META-INF/maven/com.company.varnaa/HospitalManagementSystem/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.2.4.RELEASE 9 | 10 | 11 | com.company.varnaa 12 | HospitalManagementSystem 13 | 0.0.1-SNAPSHOT 14 | war 15 | HospitalManagementSystem 16 | Demo project for Spring Boot 17 | 18 | 19 | 1.8 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter-data-jdbc 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-data-jpa 30 | 31 | 32 | org.springframework.boot 33 | spring-boot-starter-security 34 | 35 | 36 | org.springframework.boot 37 | spring-boot-starter-thymeleaf 38 | 39 | 40 | org.springframework.boot 41 | spring-boot-starter-web 42 | 43 | 44 | org.springframework.session 45 | spring-session-core 46 | 47 | 48 | 49 | mysql 50 | mysql-connector-java 51 | runtime 52 | 53 | 54 | org.springframework.boot 55 | spring-boot-starter-tomcat 56 | provided 57 | 58 | 59 | org.springframework.boot 60 | spring-boot-starter-test 61 | test 62 | 63 | 64 | org.junit.vintage 65 | junit-vintage-engine 66 | 67 | 68 | 69 | 70 | org.springframework.security 71 | spring-security-test 72 | test 73 | 74 | 75 | org.springframework.boot 76 | spring-boot-starter-data-rest 77 | 78 | 79 | org.springframework.boot 80 | spring-boot-starter-actuator 81 | 82 | 83 | 84 | 85 | org.springframework.boot 86 | spring-boot-starter-actuator 87 | 88 | 89 | org.springframework.boot 90 | spring-boot-starter-data-jpa 91 | 92 | 93 | org.springframework.boot 94 | spring-boot-starter-data-rest 95 | 96 | 97 | org.springframework.boot 98 | spring-boot-starter-thymeleaf 99 | 100 | 101 | 102 | 103 | org.springframework.boot 104 | spring-boot-devtools 105 | runtime 106 | true 107 | 108 | 109 | 110 | mysql 111 | mysql-connector-java 112 | runtime 113 | 114 | 115 | org.springframework.boot 116 | spring-boot-starter-test 117 | test 118 | 119 | 120 | org.springframework.boot 121 | spring-boot-starter-hateoas 122 | 123 | 124 | org.webjars 125 | fullcalendar 126 | 2.2.5 127 | 128 | 129 | org.webjars 130 | momentjs 131 | 2.9.0 132 | 133 | 134 | org.webjars 135 | jquery-ui 136 | 1.12.1 137 | 138 | 139 | org.webjars 140 | jquery 141 | 3.4.1 142 | 143 | 144 | 145 | 146 | 147 | 148 | org.springframework.boot 149 | spring-boot-maven-plugin 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /Screenshot (41).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/Screenshot (41).png -------------------------------------------------------------------------------- /Screenshot (42).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/Screenshot (42).png -------------------------------------------------------------------------------- /Screenshot (43).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/Screenshot (43).png -------------------------------------------------------------------------------- /Screenshot (44).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/Screenshot (44).png -------------------------------------------------------------------------------- /Screenshot (47).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/Screenshot (47).png -------------------------------------------------------------------------------- /Screenshot (48).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/Screenshot (48).png -------------------------------------------------------------------------------- /Screenshot (49).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/Screenshot (49).png -------------------------------------------------------------------------------- /Screenshot (50).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/varnaa/hospital-management-system-using-spring-boot/0be0e0e048579f4dcb35e341f11dea623a1c7ec5/Screenshot (50).png --------------------------------------------------------------------------------