├── .gitignore ├── README.md ├── build.gradle ├── gradle └── wrapper │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src ├── main ├── java │ └── org │ │ └── easy │ │ ├── Application.java │ │ ├── component │ │ └── ActiveDicoms.java │ │ ├── dao │ │ ├── AbstractJpaDao.java │ │ ├── EquipmentDao.java │ │ ├── InstanceDao.java │ │ ├── PatientDao.java │ │ ├── SeriesDao.java │ │ ├── StudyDao.java │ │ └── impl │ │ │ ├── EquipmentDaoImpl.java │ │ │ ├── InstanceDaoImpl.java │ │ │ ├── PatientDaoImpl.java │ │ │ ├── SeriesDaoImpl.java │ │ │ └── StudyDaoImpl.java │ │ ├── entity │ │ ├── Equipment.java │ │ ├── Instance.java │ │ ├── Patient.java │ │ ├── Series.java │ │ └── Study.java │ │ ├── event │ │ └── NewFileEvent.java │ │ ├── handler │ │ └── IncomingFileHandler.java │ │ ├── rest │ │ ├── AjaxInstance.java │ │ ├── AjaxPatient.java │ │ ├── AjaxResult.java │ │ ├── AjaxSeries.java │ │ ├── AjaxStudy.java │ │ └── HomeController.java │ │ ├── server │ │ ├── DicomReader.java │ │ └── DicomServer.java │ │ ├── service │ │ ├── DBService.java │ │ └── impl │ │ │ └── DBServiceImpl.java │ │ └── util │ │ ├── DicomEntityBuilder.java │ │ └── Utils.java └── resources │ ├── application.properties │ ├── messages.properties │ ├── static │ ├── css │ │ ├── bootstrap.min.css │ │ └── custom.css │ ├── fonts │ │ ├── Ubuntu │ │ │ ├── UFL.txt │ │ │ ├── Ubuntu-Bold.ttf │ │ │ ├── Ubuntu-BoldItalic.ttf │ │ │ ├── Ubuntu-Italic.ttf │ │ │ ├── Ubuntu-Light.ttf │ │ │ ├── Ubuntu-LightItalic.ttf │ │ │ ├── Ubuntu-Medium.ttf │ │ │ ├── Ubuntu-MediumItalic.ttf │ │ │ └── Ubuntu-Regular.ttf │ │ ├── font-awesome-4.2.0 │ │ │ ├── css │ │ │ │ ├── font-awesome.css │ │ │ │ └── font-awesome.min.css │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ └── fontawesome-webfont.woff │ │ │ ├── less │ │ │ │ ├── bordered-pulled.less │ │ │ │ ├── core.less │ │ │ │ ├── fixed-width.less │ │ │ │ ├── font-awesome.less │ │ │ │ ├── icons.less │ │ │ │ ├── larger.less │ │ │ │ ├── list.less │ │ │ │ ├── mixins.less │ │ │ │ ├── path.less │ │ │ │ ├── rotated-flipped.less │ │ │ │ ├── spinning.less │ │ │ │ ├── stacked.less │ │ │ │ └── variables.less │ │ │ └── scss │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ ├── _core.scss │ │ │ │ ├── _fixed-width.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _larger.scss │ │ │ │ ├── _list.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _path.scss │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ ├── _spinning.scss │ │ │ │ ├── _stacked.scss │ │ │ │ ├── _variables.scss │ │ │ │ └── font-awesome.scss │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── img │ │ ├── ajax-loader.gif │ │ ├── report-128.png │ │ ├── server-128.png │ │ └── viewer-128.png │ ├── js │ │ ├── bootstrap.min.js │ │ ├── details.js │ │ ├── fancybox │ │ │ ├── blank.gif │ │ │ ├── fancybox_loading.gif │ │ │ ├── fancybox_loading@2x.gif │ │ │ ├── fancybox_overlay.png │ │ │ ├── fancybox_sprite.png │ │ │ ├── fancybox_sprite@2x.png │ │ │ ├── helpers │ │ │ │ ├── fancybox_buttons.png │ │ │ │ ├── jquery.fancybox-buttons.css │ │ │ │ ├── jquery.fancybox-buttons.js │ │ │ │ ├── jquery.fancybox-media.js │ │ │ │ ├── jquery.fancybox-thumbs.css │ │ │ │ └── jquery.fancybox-thumbs.js │ │ │ ├── jquery.fancybox.css │ │ │ ├── jquery.fancybox.js │ │ │ └── jquery.fancybox.pack.js │ │ ├── header.js │ │ ├── index.js │ │ ├── jquery-1.11.1.js │ │ ├── jquery-ui-1.11.4.custom │ │ │ ├── external │ │ │ │ └── jquery │ │ │ │ │ └── jquery.js │ │ │ ├── images │ │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ │ ├── ui-bg_glass_0_f3f1f1_1x400.png │ │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ │ ├── ui-bg_glass_80_e3eaf7_1x400.png │ │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ │ ├── ui-bg_highlight-soft_0_2C3E50_1x100.png │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ │ ├── ui-icons_454545_256x240.png │ │ │ │ ├── ui-icons_888888_256x240.png │ │ │ │ ├── ui-icons_cd0a0a_256x240.png │ │ │ │ └── ui-icons_ffffff_256x240.png │ │ │ ├── index.html │ │ │ ├── jquery-ui.css │ │ │ ├── jquery-ui.js │ │ │ ├── jquery-ui.min.css │ │ │ ├── jquery-ui.min.js │ │ │ ├── jquery-ui.structure.css │ │ │ ├── jquery-ui.structure.min.css │ │ │ ├── jquery-ui.theme.css │ │ │ └── jquery-ui.theme.min.css │ │ ├── jquery.mousewheel-3.0.6.pack.js │ │ ├── purl.js │ │ ├── server.js │ │ └── vakata-jstree │ │ │ └── dist │ │ │ ├── jstree.js │ │ │ ├── jstree.min.js │ │ │ └── themes │ │ │ ├── default-dark │ │ │ ├── 32px.png │ │ │ ├── 40px.png │ │ │ ├── style.css │ │ │ ├── style.min.css │ │ │ └── throbber.gif │ │ │ ├── default │ │ │ ├── 32px.png │ │ │ ├── 40px.png │ │ │ ├── style.css │ │ │ ├── style.min.css │ │ │ └── throbber.gif │ │ │ └── proton │ │ │ ├── 30px.png │ │ │ ├── 32px.png │ │ │ ├── fonts │ │ │ └── titillium │ │ │ │ ├── titilliumweb-bold-webfont.eot │ │ │ │ ├── titilliumweb-bold-webfont.svg │ │ │ │ ├── titilliumweb-bold-webfont.ttf │ │ │ │ ├── titilliumweb-bold-webfont.woff │ │ │ │ ├── titilliumweb-extralight-webfont.eot │ │ │ │ ├── titilliumweb-extralight-webfont.svg │ │ │ │ ├── titilliumweb-extralight-webfont.ttf │ │ │ │ ├── titilliumweb-extralight-webfont.woff │ │ │ │ ├── titilliumweb-regular-webfont.eot │ │ │ │ ├── titilliumweb-regular-webfont.svg │ │ │ │ ├── titilliumweb-regular-webfont.ttf │ │ │ │ └── titilliumweb-regular-webfont.woff │ │ │ ├── style.css │ │ │ ├── style.min.css │ │ │ └── throbber.gif │ └── welcome.html │ └── templates │ ├── details.html │ ├── fragments │ ├── footer.html │ ├── header.html │ └── pager.html │ ├── index.html │ ├── layout │ └── layout.html │ ├── server.html │ ├── template.html │ └── welcome.html └── test ├── java └── org │ └── easy │ ├── ApplicationTest.java │ ├── ConnectionTest.java │ ├── DBServiceTest.java │ ├── Dcm2JpegTest.java │ ├── DicomReaderTest.java │ ├── EquipmentTest.java │ ├── InstanceTest.java │ ├── PatientTest.java │ ├── SeriesTest.java │ └── StudyTest.java └── resources ├── META-INF └── persistence2.xml └── application.properties /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io 2 | 3 | ### Eclipse ### 4 | *.pydevproject 5 | .metadata 6 | .gradle 7 | bin/ 8 | tmp/ 9 | *.tmp 10 | *.bak 11 | *.swp 12 | *~.nib 13 | local.properties 14 | .settings/ 15 | .loadpath 16 | 17 | # Eclipse Core 18 | .project 19 | 20 | # External tool builders 21 | .externalToolBuilders/ 22 | 23 | # Locally stored "Eclipse launch configurations" 24 | *.launch 25 | 26 | # CDT-specific 27 | .cproject 28 | 29 | # JDT-specific (Eclipse Java Development Tools) 30 | .classpath 31 | 32 | # PDT-specific 33 | .buildpath 34 | 35 | # sbteclipse plugin 36 | .target 37 | 38 | # TeXlipse plugin 39 | .texlipse 40 | 41 | 42 | ### Intellij ### 43 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm 44 | 45 | *.iml 46 | 47 | ## Directory-based project format: 48 | .idea/ 49 | # if you remove the above rule, at least ignore the following: 50 | 51 | # User-specific stuff: 52 | # .idea/workspace.xml 53 | # .idea/tasks.xml 54 | # .idea/dictionaries 55 | 56 | # Sensitive or high-churn files: 57 | # .idea/dataSources.ids 58 | # .idea/dataSources.xml 59 | # .idea/sqlDataSources.xml 60 | # .idea/dynamic.xml 61 | # .idea/uiDesigner.xml 62 | 63 | # Gradle: 64 | # .idea/gradle.xml 65 | # .idea/libraries 66 | 67 | # Mongo Explorer plugin: 68 | # .idea/mongoSettings.xml 69 | 70 | ## File-based project format: 71 | *.ipr 72 | *.iws 73 | 74 | ## Plugin-specific files: 75 | 76 | # IntelliJ 77 | /out/ 78 | 79 | # mpeltonen/sbt-idea plugin 80 | .idea_modules/ 81 | 82 | # JIRA plugin 83 | atlassian-ide-plugin.xml 84 | 85 | # Crashlytics plugin (for Android Studio and IntelliJ) 86 | com_crashlytics_export_strings.xml 87 | crashlytics.properties 88 | crashlytics-build.properties 89 | 90 | 91 | ### Gradle ### 92 | .gradle 93 | build/ 94 | 95 | # Ignore Gradle GUI config 96 | gradle-app.setting 97 | 98 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) 99 | !gradle-wrapper.jar 100 | 101 | 102 | ### OSX ### 103 | .DS_Store 104 | .AppleDouble 105 | .LSOverride 106 | 107 | # Icon must end with two \r 108 | Icon 109 | 110 | # Thumbnails 111 | ._* 112 | 113 | # Files that might appear in the root of a volume 114 | .DocumentRevisions-V100 115 | .fseventsd 116 | .Spotlight-V100 117 | .TemporaryItems 118 | .Trashes 119 | .VolumeIcon.icns 120 | 121 | # Directories potentially created on remote AFP share 122 | .AppleDB 123 | .AppleDesktop 124 | Network Trash Folder 125 | Temporary Items 126 | .apdisk 127 | 128 | 129 | ### ArchLinuxPackages ### 130 | *.tar 131 | *.tar.* 132 | *.zip 133 | *.tgz 134 | *.log 135 | *.log.* 136 | *.sig 137 | 138 | # AUR metadata 139 | .AURINFO 140 | .SRCINFO 141 | 142 | pkg/ 143 | 144 | 145 | ### Archives ### 146 | # It's better to unpack these files and commit the raw source because 147 | # git has its own built in compression methods. 148 | *.7z 149 | *.jar 150 | *.rar 151 | *.zip 152 | *.gz 153 | *.bzip 154 | *.bz2 155 | *.xz 156 | *.lzma 157 | *.cab 158 | 159 | #packing-only formats 160 | *.iso 161 | *.tar 162 | 163 | #package management formats 164 | *.dmg 165 | *.xpi 166 | *.gem 167 | *.egg 168 | *.deb 169 | *.rpm 170 | *.msi 171 | *.msm 172 | *.msp 173 | 174 | 175 | ### Linux ### 176 | *~ 177 | 178 | # KDE directory preferences 179 | .directory 180 | 181 | # Linux trash folder which might appear on any partition or disk 182 | .Trash-* 183 | 184 | 185 | ### Java ### 186 | *.class 187 | 188 | # Mobile Tools for Java (J2ME) 189 | .mtj.tmp/ 190 | 191 | # Package Files # 192 | *.jar 193 | *.war 194 | *.ear 195 | 196 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 197 | hs_err_pid* 198 | 199 | 200 | ### Windows ### 201 | # Windows image file caches 202 | Thumbs.db 203 | ehthumbs.db 204 | 205 | # Folder config file 206 | Desktop.ini 207 | 208 | # Recycle Bin used on file shares 209 | $RECYCLE.BIN/ 210 | 211 | # Windows Installer files 212 | *.cab 213 | *.msi 214 | *.msm 215 | *.msp 216 | 217 | # Windows shortcuts 218 | *.lnk 219 | 220 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | EasyPACS - Dicom Server 2 | ======================= 3 | 4 | EasyPACS is the simpliest PACS server for your dicom files. It uses DCM4CHEE listener and converts dicom files into jpegs. It is the easiest way to store dicom files. 5 | 6 | For details: http://mehmetsen80.github.io/EasyPACS/ 7 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | springBootVersion = '1.2.2.RELEASE' 4 | } 5 | repositories { 6 | mavenCentral() 7 | maven { url "http://repo.spring.io/snapshot" } 8 | maven { url "http://repo.spring.io/milestone" } 9 | } 10 | dependencies { 11 | classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 12 | 13 | } 14 | } 15 | 16 | apply plugin: 'java' 17 | apply plugin: 'eclipse' 18 | apply plugin: 'idea' 19 | apply plugin: 'spring-boot' 20 | 21 | 22 | jar { 23 | baseName = 'easy.pacs' 24 | version = '0.0.1-SNAPSHOT' 25 | } 26 | sourceCompatibility = 1.8 27 | targetCompatibility = 1.8 28 | 29 | repositories { 30 | mavenCentral() 31 | 32 | maven { url "http://repo.spring.io/snapshot" } 33 | maven { url "http://repo.spring.io/milestone" } 34 | maven { url "http://www.dcm4che.org/maven2"} 35 | 36 | flatDir { 37 | dirs 'lib' 38 | } 39 | } 40 | 41 | ext { 42 | dcm4cheVersion = '3.3.5' 43 | slf4jVersion = '1.7.7' 44 | guavaVersion = '18.0' 45 | commonsioVersion = '2.4' 46 | commonscodecVersion = '1.9' 47 | } 48 | 49 | dependencies { 50 | compile("org.springframework.boot:spring-boot-starter-thymeleaf") 51 | compile("org.springframework.boot:spring-boot-starter-web") 52 | compile("org.springframework.boot:spring-boot-starter-data-jpa") 53 | compile("org.springframework.boot:spring-boot-starter-logging") 54 | compile("org.springframework.boot:spring-boot-starter-log4j") 55 | 56 | runtime("mysql:mysql-connector-java") 57 | testCompile("org.springframework.boot:spring-boot-starter-test") 58 | testCompile("junit:junit") 59 | 60 | // guava 61 | compile ("com.google.guava:guava:${guavaVersion}") 62 | 63 | compile('org.springframework.data:spring-data-commons:1.10.0.RELEASE') 64 | 65 | //io utils 66 | compile('org.apache.commons:commons-io:1.3.2') 67 | 68 | // jackson for json purposes 69 | compile('org.codehaus.jackson:jackson-mapper-asl:1.9.13') 70 | compile('org.codehaus.jackson:jackson-core-asl:1.9.13') 71 | compile('com.fasterxml.jackson.core:jackson-core:2.5.2') 72 | 73 | //c3p0 - database connection ppol 74 | // compile( 75 | // "org.hibernate:hibernate-c3p0:4.3.8.Final" 76 | // ) 77 | 78 | 79 | // dcm4che 80 | compile( 81 | "org.dcm4che:dcm4che-core:${dcm4cheVersion}", 82 | "org.dcm4che:dcm4che-net:${dcm4cheVersion}", 83 | "org.dcm4che.tool:dcm4che-tool-dcm2jpg:${dcm4cheVersion}", 84 | "org.dcm4che.tool:dcm4che-tool-storescu:${dcm4cheVersion}" 85 | ) 86 | 87 | } 88 | 89 | eclipse { 90 | classpath { 91 | containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER') 92 | containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7' 93 | } 94 | } 95 | 96 | task wrapper(type: Wrapper) { 97 | gradleVersion = '2.3' 98 | } 99 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Mar 03 16:20:41 CST 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /src/main/java/org/easy/Application.java: -------------------------------------------------------------------------------- 1 | package org.easy; 2 | 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import javax.persistence.EntityManagerFactory; 8 | import javax.sql.DataSource; 9 | 10 | import org.easy.component.ActiveDicoms; 11 | import org.easy.handler.IncomingFileHandler; 12 | import org.easy.server.DicomServer; 13 | import org.slf4j.Logger; 14 | import org.slf4j.LoggerFactory; 15 | import org.springframework.beans.factory.annotation.Qualifier; 16 | import org.springframework.beans.factory.annotation.Value; 17 | import org.springframework.boot.SpringApplication; 18 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 19 | import org.springframework.boot.autoconfigure.SpringBootApplication; 20 | import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; 21 | import org.springframework.boot.context.properties.ConfigurationProperties; 22 | import org.springframework.boot.context.properties.EnableConfigurationProperties; 23 | import org.springframework.context.annotation.Bean; 24 | import org.springframework.context.annotation.ComponentScan; 25 | import org.springframework.context.annotation.Configuration; 26 | import org.springframework.context.annotation.Primary; 27 | import org.springframework.context.annotation.PropertySource; 28 | import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; 29 | import org.springframework.data.jpa.repository.config.EnableJpaRepositories; 30 | import org.springframework.orm.jpa.JpaTransactionManager; 31 | import org.springframework.orm.jpa.JpaVendorAdapter; 32 | import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; 33 | import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; 34 | import org.springframework.transaction.PlatformTransactionManager; 35 | 36 | import com.google.common.eventbus.AsyncEventBus; 37 | import com.google.common.eventbus.EventBus; 38 | 39 | 40 | @SpringBootApplication 41 | @Configuration 42 | @ComponentScan 43 | @EnableAutoConfiguration 44 | @EnableConfigurationProperties 45 | @EnableJpaRepositories(basePackages = {"org.easy.dao"}) // The package where dao classes reside 46 | @PropertySource("classpath:application.properties") 47 | public class Application { 48 | 49 | private static final Logger LOG = LoggerFactory.getLogger(Application.class); 50 | 51 | public static void main(String[] args) { 52 | 53 | SpringApplication app = new SpringApplication(Application.class); 54 | app.setShowBanner(false); 55 | app.setWebEnvironment(true); 56 | app.run(args); 57 | 58 | LOG.info("Welcome to EasyPACS!"); 59 | } 60 | 61 | 62 | /************************** Handler for incoming files works with asynchronous event bus initiated by the DicomServer ****************************/ 63 | @Bean // only one incoming file handler. Even we have multiple DicomServer instances, they all forward files to the same handler... 64 | public IncomingFileHandler incomingFileHandler(){ 65 | return new IncomingFileHandler(); 66 | } 67 | 68 | @Bean //Guava asynch event bus that initiates 100 fixed thread pool 69 | public EventBus asyncEventBus(){ 70 | EventBus eventBus = new AsyncEventBus(java.util.concurrent.Executors.newFixedThreadPool(100)); 71 | return eventBus; 72 | } 73 | 74 | @Bean //dicom server takes storage output directory, ae title and ports. Server listens same number of ports with same ae title 75 | public Map dicomServers(@Value("${pacs.storage.dcm}") String storageDir, @Value("${pacs.aetitle}") String aeTitle, @Value("#{'${pacs.ports}'.split(',')}") List ports){ 76 | Map dicomServers = new HashMap<>(); 77 | for (int port:ports) { 78 | dicomServers.put("DICOM_SERVER_AT_" + port, DicomServer.init(null, port, aeTitle, storageDir, asyncEventBus())); 79 | } 80 | return dicomServers; 81 | } 82 | /************************** End of Handler for incoming files works with asynchronous event bus initiated by the DicomServer ****************************/ 83 | 84 | @Bean 85 | @Qualifier(value = "activeDicoms") 86 | public ActiveDicoms activeDicoms(){ 87 | return new ActiveDicoms(); 88 | } 89 | 90 | 91 | /************************************************** Database JPA and Hibernate Settings ********************************************************/ 92 | @Bean //Creating and registering in spring context an entityManager 93 | public LocalContainerEntityManagerFactoryBean entityManagerFactory() { 94 | LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean(); 95 | em.setDataSource(primaryDataSource()); 96 | em.setPersistenceUnitName("dbdicom"); 97 | em.setPackagesToScan(new String[]{"org.easy.entity"}); // package where are the @Entity classes are located, usually your domain package 98 | JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter(); // JPA implementation 99 | em.setJpaVendorAdapter(vendorAdapter); 100 | 101 | return em; 102 | } 103 | 104 | @Bean 105 | @Primary //configure the primary database 106 | @ConfigurationProperties(prefix="datasource.primary") 107 | public DataSource primaryDataSource() { 108 | return DataSourceBuilder.create().build(); 109 | } 110 | 111 | @Bean //Configuring the transactionManager 112 | public PlatformTransactionManager transactionManager(EntityManagerFactory emf) { 113 | JpaTransactionManager transactionManager = new JpaTransactionManager(); 114 | transactionManager.setEntityManagerFactory(emf); 115 | return transactionManager; 116 | } 117 | 118 | @Bean 119 | public PersistenceExceptionTranslationPostProcessor exceptionTranslation() { 120 | return new PersistenceExceptionTranslationPostProcessor(); 121 | } 122 | 123 | /************************************************* End of Database JPA and Hibernate Settings ********************************************************/ 124 | 125 | } 126 | -------------------------------------------------------------------------------- /src/main/java/org/easy/component/ActiveDicoms.java: -------------------------------------------------------------------------------- 1 | package org.easy.component; 2 | 3 | import java.util.Map; 4 | import java.util.concurrent.ConcurrentHashMap; 5 | 6 | 7 | public class ActiveDicoms { 8 | 9 | private ConcurrentHashMap map = null; 10 | 11 | public ActiveDicoms(){ 12 | setList(new ConcurrentHashMap()); 13 | } 14 | 15 | public Map getList() { 16 | return map; 17 | } 18 | 19 | public void setList(ConcurrentHashMap list) { 20 | this.map = list; 21 | } 22 | 23 | public Integer getSize(){ 24 | return map.size(); 25 | } 26 | 27 | public void add(String key, String value){ 28 | this.map.put(key, value); 29 | } 30 | 31 | public void remove(String key){ 32 | this.map.remove(key); 33 | } 34 | 35 | @Override 36 | public String toString(){ 37 | 38 | StringBuffer buffer = new StringBuffer(); 39 | for (Map.Entry entry : map.entrySet()) { 40 | buffer.append(entry.getValue()); 41 | //System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue()); 42 | } 43 | 44 | return buffer.toString(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/org/easy/dao/AbstractJpaDao.java: -------------------------------------------------------------------------------- 1 | package org.easy.dao; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | import javax.persistence.EntityManager; 7 | import javax.persistence.PersistenceContext; 8 | import javax.persistence.TypedQuery; 9 | 10 | import org.slf4j.Logger; 11 | import org.slf4j.LoggerFactory; 12 | import org.springframework.transaction.annotation.Transactional; 13 | 14 | 15 | public abstract class AbstractJpaDao< T extends Serializable > { 16 | 17 | 18 | private Class< T > clazz; 19 | private static final Logger LOG = LoggerFactory.getLogger(AbstractJpaDao.class); 20 | 21 | @PersistenceContext(unitName = "dbdicom") 22 | EntityManager entityManager; 23 | 24 | public final void setClazz( Class< T > clazzToSet ){ 25 | this.clazz = clazzToSet; 26 | } 27 | 28 | public T findById( long id ){ 29 | return entityManager.find( clazz, id ); 30 | } 31 | 32 | public List< T > findAll(int firstResult, int maxResults){ 33 | TypedQuery< T > query = entityManager.createQuery("from " + clazz.getName()+" order by modifiedDate desc", clazz); 34 | return query.setFirstResult(firstResult).setMaxResults(maxResults).getResultList(); 35 | } 36 | 37 | public Long count() { 38 | TypedQuery query = this.entityManager.createQuery("select count(c) from "+clazz.getName()+" c", Long.class); 39 | return query.getSingleResult(); 40 | } 41 | 42 | @Transactional(noRollbackFor = Exception.class) 43 | public void save( T entity ){ 44 | 45 | try{ 46 | entityManager.persist( entity ); 47 | entityManager.flush(); 48 | }catch(Exception e){ 49 | LOG.info(e.getMessage()); 50 | } 51 | } 52 | 53 | public T update( T entity ){ 54 | return entityManager.merge( entity ); 55 | } 56 | 57 | public void delete( T entity ){ 58 | entityManager.remove( entity ); 59 | } 60 | 61 | public void deleteById( long entityId ){ 62 | T entity = findById( entityId ); 63 | delete( entity ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/org/easy/dao/EquipmentDao.java: -------------------------------------------------------------------------------- 1 | package org.easy.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.easy.entity.Equipment; 6 | 7 | public interface EquipmentDao { 8 | 9 | void save(Equipment equipment); 10 | Equipment update(Equipment equipment); 11 | List findAll(int firstResult, int maxResults); 12 | Long count(); 13 | Equipment findById(long pkTBLEquipmentID); 14 | Equipment findByPkTBLSeriesID(Long pkTBLSeriesID); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/easy/dao/InstanceDao.java: -------------------------------------------------------------------------------- 1 | package org.easy.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.easy.entity.Instance; 6 | 7 | public interface InstanceDao { 8 | 9 | void save(Instance instance); 10 | Instance update(Instance instance); 11 | List findAll(int firstResult, int maxResults); 12 | Long count(); 13 | Instance findById(long pkTBLInstanceID); 14 | List findByPkTBLSeriesID(Long pkTBLSeriesID); 15 | Instance findBySopInstanceUID(String sopInstanceUID); 16 | List findAllByPkTBLPatientID(Long pkTBLPatientID); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/easy/dao/PatientDao.java: -------------------------------------------------------------------------------- 1 | package org.easy.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.easy.entity.Patient; 6 | 7 | public interface PatientDao { 8 | 9 | void save(Patient patient); 10 | Patient update(Patient patient); 11 | List findAll(int firstResult, int maxResults); 12 | Long count(); 13 | Patient findById(long pkTBLPatientID); 14 | Patient findByPatientID(String patientID); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/easy/dao/SeriesDao.java: -------------------------------------------------------------------------------- 1 | package org.easy.dao; 2 | 3 | 4 | import java.util.List; 5 | 6 | import org.easy.entity.Series; 7 | 8 | 9 | 10 | public interface SeriesDao { 11 | 12 | void save(Series series); 13 | Series update(Series series); 14 | List findAll(int firstResult, int maxResults); 15 | Long count(); 16 | Series findById(long pkTBLSeriesID); 17 | List findByPkTBLStudyID(Long pkTBLStudyID); 18 | Series findBySeriesInstanceUID(String seriesInstanceUID); 19 | Series findBySeriesInstanceUID(String seriesInstanceUID, Integer seriesNumber); 20 | List findAllByPkTBLPatientID(Long pkTBLPatientID); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/easy/dao/StudyDao.java: -------------------------------------------------------------------------------- 1 | package org.easy.dao; 2 | 3 | 4 | import java.util.List; 5 | 6 | import org.easy.entity.Study; 7 | 8 | 9 | public interface StudyDao{ 10 | 11 | void save(Study study); 12 | Study update(Study study); 13 | List findAll(int firstResult, int maxResults); 14 | Long count(); 15 | Study findById(long pkTBLStudyID); 16 | List findByPkTBLPatientID(Long pkTBLPatientID); 17 | Study findByStudyInstanceUID(String studyInstanceUID); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/easy/dao/impl/EquipmentDaoImpl.java: -------------------------------------------------------------------------------- 1 | package org.easy.dao.impl; 2 | 3 | 4 | import javax.persistence.EntityManager; 5 | import javax.persistence.PersistenceContext; 6 | 7 | import org.easy.dao.AbstractJpaDao; 8 | import org.easy.dao.EquipmentDao; 9 | import org.easy.entity.Equipment; 10 | 11 | import org.springframework.stereotype.Repository; 12 | 13 | @Repository 14 | public class EquipmentDaoImpl extends AbstractJpaDao implements EquipmentDao { 15 | 16 | @PersistenceContext(unitName = "dbdicom") 17 | private EntityManager entityManager; 18 | 19 | public EquipmentDaoImpl(){ 20 | super(); 21 | setClazz(Equipment.class); 22 | } 23 | 24 | /*@Transactional 25 | @Override 26 | public void save(Equipment equipment) { 27 | entityManager.persist(equipment); 28 | entityManager.flush(); 29 | } 30 | 31 | @Override 32 | public List findAll() { 33 | try{ 34 | TypedQuery query = entityManager.createQuery("select e FROM Equipment e", Equipment.class); 35 | return query.getResultList(); 36 | 37 | }catch(Exception e){ 38 | return null; 39 | } 40 | } 41 | 42 | @Override 43 | public Equipment findByID(long pkTBLEquipmentID) { 44 | try{ 45 | return entityManager.find(Equipment.class, pkTBLEquipmentID); 46 | 47 | }catch(Exception e){ 48 | return null; 49 | } 50 | }*/ 51 | 52 | @Override 53 | public Equipment findByPkTBLSeriesID(Long pkTBLSeriesID){ 54 | 55 | try{ 56 | return entityManager.createQuery("select e from Equipment e where e.series.pkTBLSeriesID LIKE :pkTBLSeriesID", Equipment.class) 57 | .setParameter("pkTBLSeriesID", pkTBLSeriesID) 58 | .getSingleResult(); 59 | }catch(Exception e){ 60 | return null; 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/org/easy/dao/impl/InstanceDaoImpl.java: -------------------------------------------------------------------------------- 1 | package org.easy.dao.impl; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.EntityManager; 6 | import javax.persistence.PersistenceContext; 7 | 8 | 9 | import org.easy.dao.AbstractJpaDao; 10 | import org.easy.dao.InstanceDao; 11 | import org.easy.entity.Instance; 12 | import org.springframework.stereotype.Repository; 13 | 14 | @Repository 15 | public class InstanceDaoImpl extends AbstractJpaDao implements InstanceDao { 16 | 17 | @PersistenceContext(unitName = "dbdicom") 18 | private EntityManager entityManager; 19 | 20 | public InstanceDaoImpl(){ 21 | super(); 22 | setClazz(Instance.class); 23 | } 24 | 25 | @Override 26 | public List findByPkTBLSeriesID(Long pkTBLSeriesID){ 27 | 28 | try{ 29 | return entityManager.createQuery("select i from Instance i where i.series.pkTBLSeriesID = :pkTBLSeriesID", Instance.class) 30 | .setParameter("pkTBLSeriesID", pkTBLSeriesID) 31 | .getResultList(); 32 | }catch(Exception e){ 33 | return null; 34 | } 35 | } 36 | 37 | @Override 38 | public Instance findBySopInstanceUID(String sopInstanceUID){ 39 | 40 | try{ 41 | return entityManager.createQuery("select i from Instance i where i.sopInstanceUID = :sopInstanceUID", Instance.class) 42 | .setParameter("sopInstanceUID", sopInstanceUID) 43 | .getSingleResult(); 44 | }catch(Exception e){ 45 | return null; 46 | } 47 | } 48 | 49 | @Override 50 | public List findAllByPkTBLPatientID(Long pkTBLPatientID){ 51 | 52 | try{ 53 | 54 | return entityManager.createQuery("select i from Instance i LEFT OUTER JOIN i.series s " + 55 | "LEFT OUTER JOIN i.series.study st " + 56 | "LEFT OUTER JOIN i.series.study.patient p " + 57 | "where p.pkTBLPatientID = :pkTBLPatientID", Instance.class) 58 | .setParameter("pkTBLPatientID", pkTBLPatientID) 59 | .getResultList(); 60 | 61 | }catch(Exception e){ 62 | return null; 63 | } 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/org/easy/dao/impl/PatientDaoImpl.java: -------------------------------------------------------------------------------- 1 | package org.easy.dao.impl; 2 | 3 | 4 | 5 | import javax.persistence.EntityManager; 6 | import javax.persistence.PersistenceContext; 7 | 8 | import org.easy.dao.AbstractJpaDao; 9 | import org.easy.dao.PatientDao; 10 | import org.easy.entity.Patient; 11 | import org.springframework.stereotype.Repository; 12 | 13 | 14 | @Repository 15 | public class PatientDaoImpl extends AbstractJpaDao implements PatientDao { 16 | 17 | @PersistenceContext(unitName = "dbdicom") 18 | private EntityManager entityManager; 19 | 20 | public PatientDaoImpl(){ 21 | super(); 22 | setClazz(Patient.class); 23 | } 24 | 25 | /*@Transactional 26 | @Override 27 | public void save(Patient patient) { 28 | entityManager.persist(patient); 29 | entityManager.flush(); 30 | } 31 | 32 | @Override 33 | public List findAll() { 34 | 35 | try{ 36 | TypedQuery query = entityManager.createQuery("select p FROM Patient p", Patient.class); 37 | return query.getResultList(); 38 | 39 | }catch(Exception e){ 40 | return null; 41 | } 42 | } 43 | 44 | @Override 45 | public Patient findByID(long pkTBLPatientID) { 46 | try{ 47 | return entityManager.find(Patient.class, pkTBLPatientID); 48 | 49 | }catch(Exception e){ 50 | return null; 51 | } 52 | }*/ 53 | 54 | @Override 55 | public Patient findByPatientID(String patientID){ 56 | 57 | try{ 58 | return entityManager.createQuery("select p from Patient p where p.patientID LIKE :patientID", Patient.class) 59 | .setParameter("patientID", patientID) 60 | .getSingleResult(); 61 | }catch(Exception e){ 62 | return null; 63 | } 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/org/easy/dao/impl/SeriesDaoImpl.java: -------------------------------------------------------------------------------- 1 | package org.easy.dao.impl; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.EntityManager; 6 | import javax.persistence.PersistenceContext; 7 | 8 | 9 | import org.easy.dao.AbstractJpaDao; 10 | import org.easy.dao.SeriesDao; 11 | import org.easy.entity.Series; 12 | 13 | import org.springframework.stereotype.Repository; 14 | 15 | 16 | @Repository 17 | public class SeriesDaoImpl extends AbstractJpaDao implements SeriesDao { 18 | 19 | @PersistenceContext(unitName = "dbdicom") 20 | private EntityManager entityManager; 21 | 22 | public SeriesDaoImpl(){ 23 | super(); 24 | setClazz(Series.class); 25 | } 26 | 27 | @Override 28 | public List findByPkTBLStudyID(Long pkTBLStudyID){ 29 | 30 | try{ 31 | return entityManager.createQuery("select sr from Series sr where sr.study.pkTBLStudyID = :pkTBLStudyID", Series.class) 32 | .setParameter("pkTBLStudyID", pkTBLStudyID) 33 | .getResultList(); 34 | }catch(Exception e){ 35 | return null; 36 | } 37 | } 38 | 39 | @Override 40 | public synchronized Series findBySeriesInstanceUID(String seriesInstanceUID){ 41 | 42 | try{ 43 | return entityManager.createQuery("select sr from Series sr where sr.seriesInstanceUID = :seriesInstanceUID", Series.class) 44 | .setParameter("seriesInstanceUID", seriesInstanceUID) 45 | .getSingleResult(); 46 | }catch(Exception e){ 47 | return null; 48 | } 49 | } 50 | 51 | @Override 52 | public Series findBySeriesInstanceUID(String seriesInstanceUID, Integer seriesNumber){ 53 | 54 | try{ 55 | return entityManager.createQuery("select sr from Series sr where sr.seriesNumber = :seriesNumber AND sr.seriesInstanceUID = :seriesInstanceUID", Series.class) 56 | .setParameter("seriesInstanceUID", seriesInstanceUID) 57 | .setParameter("seriesNumber", seriesNumber) 58 | .getSingleResult(); 59 | }catch(Exception e){ 60 | return null; 61 | } 62 | } 63 | 64 | @Override 65 | public List findAllByPkTBLPatientID(Long pkTBLPatientID){ 66 | 67 | try{ 68 | 69 | return entityManager.createQuery("select sr from Series sr LEFT OUTER JOIN sr.study st " + 70 | "LEFT OUTER JOIN sr.study.patient p " + 71 | "where p.pkTBLPatientID = :pkTBLPatientID", Series.class) 72 | .setParameter("pkTBLPatientID", pkTBLPatientID) 73 | .getResultList(); 74 | 75 | }catch(Exception e){ 76 | return null; 77 | } 78 | } 79 | 80 | 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/org/easy/dao/impl/StudyDaoImpl.java: -------------------------------------------------------------------------------- 1 | package org.easy.dao.impl; 2 | 3 | 4 | import java.util.List; 5 | 6 | import javax.persistence.EntityManager; 7 | import javax.persistence.PersistenceContext; 8 | 9 | import org.easy.dao.AbstractJpaDao; 10 | import org.easy.dao.StudyDao; 11 | import org.easy.entity.Study; 12 | import org.springframework.stereotype.Repository; 13 | 14 | @Repository 15 | public class StudyDaoImpl extends AbstractJpaDao implements StudyDao { 16 | 17 | @PersistenceContext(unitName = "dbdicom") 18 | private EntityManager entityManager; 19 | 20 | public StudyDaoImpl(){ 21 | super(); 22 | setClazz(Study.class); 23 | } 24 | 25 | @Override 26 | public List findByPkTBLPatientID(Long pkTBLPatientID){ 27 | 28 | try{ 29 | return entityManager.createQuery("select s from Study s where s.patient.pkTBLPatientID = :pkTBLPatientID", Study.class) 30 | .setParameter("pkTBLPatientID", pkTBLPatientID) 31 | .getResultList(); 32 | }catch(Exception e){ 33 | return null; 34 | } 35 | } 36 | 37 | @Override 38 | public Study findByStudyInstanceUID(String studyInstanceUID){ 39 | 40 | try{ 41 | return entityManager.createQuery("select s from Study s where s.studyInstanceUID = :studyInstanceUID", Study.class) 42 | .setParameter("studyInstanceUID", studyInstanceUID) 43 | .getSingleResult(); 44 | }catch(Exception e){ 45 | return null; 46 | } 47 | } 48 | 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/org/easy/entity/Equipment.java: -------------------------------------------------------------------------------- 1 | package org.easy.entity; 2 | 3 | import java.io.Serializable; 4 | import java.lang.String; 5 | import java.util.Date; 6 | import javax.persistence.*; 7 | 8 | import org.easy.entity.Series; 9 | 10 | import com.fasterxml.jackson.annotation.JsonIdentityInfo; 11 | import com.fasterxml.jackson.annotation.ObjectIdGenerators; 12 | 13 | /** 14 | * Entity implementation class for Entity: Equipment 15 | * 16 | */ 17 | @Entity 18 | @Table(name="tbl_equipment") 19 | @JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="@pkTBLEquipmentID") 20 | public class Equipment implements Serializable { 21 | 22 | private static final long serialVersionUID = 6245262777427705812L; 23 | 24 | @Id 25 | @GeneratedValue(strategy = GenerationType.IDENTITY) 26 | @Column(name="pkTBLEquipmentID") 27 | private Long pkTBLEquipmentID; 28 | 29 | @Column(name="modality", length=50) 30 | private String modality; 31 | 32 | @Column(name="conversionType", length=50) 33 | private String conversionType; 34 | 35 | @Column(name="stationName", length=60) 36 | private String stationName; 37 | 38 | @Column(name="institutionName", length=100) 39 | private String institutionName; 40 | 41 | @Column(name="institutionAddress", length=150) 42 | private String institutionAddress; 43 | 44 | @Column(name="institutionalDepartmentName", length=50) 45 | private String institutionalDepartmentName; 46 | 47 | @Column(name="manufacturer", length=100) 48 | private String manufacturer; 49 | 50 | @Column(name="manufacturerModelName", length=100) 51 | private String manufacturerModelName; 52 | 53 | @Column(name="softwareVersion", length=100) 54 | private String softwareVersion; 55 | 56 | @Column(name="deviceSerialNumber", length=100) 57 | private String deviceSerialNumber; 58 | 59 | @Temporal(TemporalType.TIMESTAMP) 60 | @Column(name="createdDate", updatable = false, insertable=true) 61 | private Date createdDate; 62 | 63 | @Temporal(TemporalType.TIMESTAMP) 64 | @Column(name="modifiedDate", insertable = true, updatable=true) 65 | private Date modifiedDate; 66 | 67 | 68 | @OneToOne(cascade = {CascadeType.ALL}) 69 | @JoinColumn(name="pkTBLSeriesID") 70 | private Series series; 71 | 72 | 73 | public Equipment() { 74 | super(); 75 | } 76 | 77 | public Long getPkTBLEquipmentID() { 78 | return this.pkTBLEquipmentID; 79 | } 80 | public void setPkTBLEquipmentID(Long pkTBLEquipmentID) { 81 | this.pkTBLEquipmentID = pkTBLEquipmentID; 82 | } 83 | 84 | public String getModality() { 85 | return this.modality; 86 | } 87 | public void setModality(String modality) { 88 | this.modality = modality; 89 | } 90 | 91 | public String getConversionType(){ 92 | return this.conversionType; 93 | } 94 | public void setConverstionType(String conversionType){ 95 | this.conversionType = conversionType; 96 | } 97 | 98 | public String getStationName() { 99 | return this.stationName; 100 | } 101 | public void setStationName(String stationName) { 102 | this.stationName = stationName; 103 | } 104 | 105 | public String getInstitutionName() { 106 | return this.institutionName; 107 | } 108 | public void setInstitutionName(String institutionName) { 109 | this.institutionName = institutionName; 110 | } 111 | 112 | public String getInstitutionAddress() { 113 | return this.institutionAddress; 114 | } 115 | public void setInstitutionAddress(String institutionAddress) { 116 | this.institutionAddress = institutionAddress; 117 | } 118 | 119 | public String getInstitutionalDepartmentName() { 120 | return this.institutionalDepartmentName; 121 | } 122 | public void setInstitutionalDepartmentName(String institutionalDepartmentName) { 123 | this.institutionalDepartmentName = institutionalDepartmentName; 124 | } 125 | 126 | public String getManufacturer() { 127 | return this.manufacturer; 128 | } 129 | public void setManufacturer(String manufacturer) { 130 | this.manufacturer = manufacturer; 131 | } 132 | 133 | public String getManufacturerModelName() { 134 | return this.manufacturerModelName; 135 | } 136 | public void setManufacturerModelName(String manufacturerModelName) { 137 | this.manufacturerModelName = manufacturerModelName; 138 | } 139 | 140 | public String getSoftwareVersion() { 141 | return this.softwareVersion; 142 | } 143 | public void setSoftwareVersion(String softwareVersion) { 144 | this.softwareVersion = softwareVersion; 145 | } 146 | 147 | public String getDeviceSerialNumber() { 148 | return this.deviceSerialNumber; 149 | } 150 | public void setDeviceSerialNumber(String deviceSerialNumber) { 151 | this.deviceSerialNumber = deviceSerialNumber; 152 | } 153 | 154 | public Date getCreatedDate() { 155 | return this.createdDate; 156 | } 157 | public void setCreatedDate(Date createdDate) { 158 | this.createdDate = createdDate; 159 | } 160 | 161 | public Date getModifiedDate() { 162 | return this.modifiedDate; 163 | } 164 | public void setModifiedDate(Date modifiedDate) { 165 | this.modifiedDate = modifiedDate; 166 | } 167 | 168 | @PreUpdate 169 | @PrePersist 170 | public void updateTimeStamps() { 171 | modifiedDate = new Date(); 172 | if (createdDate==null) { 173 | createdDate = new Date(); 174 | } 175 | } 176 | 177 | @Override 178 | public String toString(){ 179 | return String.format( 180 | "Equipment[pkTBLEquipmentID=%d, modality=%s, conversionType=%s, stationName=%s, institutionName=%s, institutionAddress=%s, institutionalDepartmentName=%s, manufacturer=%s, manufacturerModelName=%s, softwareVersion=%s, deviceSerialNumber=%s, createdDate=%s, modifiedDate=%s]", 181 | pkTBLEquipmentID, modality, conversionType, stationName, institutionName, institutionAddress, institutionalDepartmentName, manufacturer, manufacturerModelName, softwareVersion, deviceSerialNumber, createdDate, modifiedDate); 182 | } 183 | public Series getSeries() { 184 | return series; 185 | } 186 | public void setSeries(Series param) { 187 | this.series = param; 188 | } 189 | 190 | 191 | } 192 | -------------------------------------------------------------------------------- /src/main/java/org/easy/entity/Patient.java: -------------------------------------------------------------------------------- 1 | package org.easy.entity; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.GenerationType; 10 | import javax.persistence.Id; 11 | import javax.persistence.PrePersist; 12 | import javax.persistence.PreUpdate; 13 | import javax.persistence.Table; 14 | import javax.persistence.Temporal; 15 | import javax.persistence.TemporalType; 16 | import org.easy.entity.Study; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIdentityInfo; 19 | import com.fasterxml.jackson.annotation.ObjectIdGenerators; 20 | 21 | import java.util.Collection; 22 | import javax.persistence.OneToMany; 23 | 24 | /** 25 | * Entity implementation class for Entity: Patient 26 | * 27 | */ 28 | @Entity 29 | @Table(name = "tbl_patient") 30 | @JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="@pkTBLPatientID") 31 | public class Patient implements Serializable { 32 | 33 | private static final long serialVersionUID = 657390142518153080L; 34 | 35 | @Id 36 | @GeneratedValue(strategy = GenerationType.IDENTITY) 37 | @Column(name="pkTBLPatientID") 38 | private Long pkTBLPatientID; 39 | 40 | 41 | 42 | @Column(name="patientID", length=100) 43 | private String patientID; 44 | 45 | @Column(name="patientName", length=100) 46 | private String patientName; 47 | 48 | @Column(name="patientSex", length=10) 49 | private String patientSex; 50 | 51 | @Temporal(TemporalType.DATE) 52 | @Column(name="patientBirthday") 53 | private Date patientBirthday; 54 | 55 | @Column(name="patientAge", length=10) 56 | private String patientAge; 57 | 58 | @Temporal(TemporalType.TIMESTAMP) 59 | @Column(name="createdDate", updatable = false, insertable=true) 60 | private Date createdDate; 61 | 62 | @Temporal(TemporalType.TIMESTAMP) 63 | @Column(name="modifiedDate", insertable = true, updatable=true) 64 | private Date modifiedDate; 65 | 66 | @OneToMany(mappedBy = "patient") 67 | private Collection study; 68 | 69 | public Patient() { 70 | super(); 71 | } 72 | 73 | public Long getPkTBLPatientID() { 74 | return this.pkTBLPatientID; 75 | } 76 | 77 | public void setPkTBLPatientID(Long pkTBLPatientID) { 78 | this.pkTBLPatientID = pkTBLPatientID; 79 | } 80 | 81 | public String getPatientID() { 82 | return this.patientID; 83 | } 84 | 85 | public void setPatientID(String patientID) { 86 | this.patientID = patientID; 87 | } 88 | 89 | public String getPatientName() { 90 | return this.patientName; 91 | } 92 | 93 | public void setPatientName(String patientName) { 94 | this.patientName = patientName; 95 | } 96 | 97 | public String getPatientSex() { 98 | return this.patientSex; 99 | } 100 | 101 | public void setPatientSex(String patientSex) { 102 | this.patientSex = patientSex; 103 | } 104 | 105 | public Date getPatientBirthday() { 106 | return patientBirthday; 107 | } 108 | 109 | public void setPatientBirthday(Date patientBirthday) { 110 | this.patientBirthday = patientBirthday; 111 | } 112 | 113 | public String getPatientAge() { 114 | return this.patientAge; 115 | } 116 | 117 | public void setPatientAge(String patientAge) { 118 | this.patientAge = patientAge; 119 | } 120 | 121 | public Date getCreatedDate() { 122 | return this.createdDate; 123 | } 124 | 125 | public void setCreatedDate(Date createdDate) { 126 | this.createdDate = createdDate; 127 | } 128 | 129 | public Date getModifiedDate() { 130 | return this.modifiedDate; 131 | } 132 | 133 | public void setModifiedDate(Date modifiedDate) { 134 | this.modifiedDate = modifiedDate; 135 | } 136 | 137 | @PreUpdate 138 | @PrePersist 139 | public void updateTimeStamps() { 140 | modifiedDate = new Date(); 141 | if (createdDate==null) { 142 | createdDate = new Date(); 143 | } 144 | } 145 | 146 | public Collection getStudy() { 147 | return study; 148 | } 149 | 150 | public void setStudy(Collection param) { 151 | this.study = param; 152 | } 153 | 154 | @Override 155 | public String toString(){ 156 | return String.format( 157 | "Patient[pkTBLPatientID=%d, patientID=%s, patientName=%s, patientSex=%s, patientBirthday=%s, patientAge=%s, createdDate=%s, modifiedDate=%s]", 158 | pkTBLPatientID, patientID, patientName, patientSex, patientBirthday, patientAge, createdDate, modifiedDate); 159 | } 160 | 161 | } 162 | -------------------------------------------------------------------------------- /src/main/java/org/easy/entity/Series.java: -------------------------------------------------------------------------------- 1 | package org.easy.entity; 2 | 3 | import java.io.Serializable; 4 | import java.lang.Integer; 5 | import java.lang.String; 6 | import java.util.Date; 7 | import javax.persistence.*; 8 | 9 | import org.easy.entity.Study; 10 | import org.easy.entity.Equipment; 11 | 12 | import com.fasterxml.jackson.annotation.JsonIdentityInfo; 13 | import com.fasterxml.jackson.annotation.ObjectIdGenerators; 14 | 15 | import java.util.Collection; 16 | 17 | 18 | /** 19 | * Entity implementation class for Entity: Series 20 | * 21 | */ 22 | @Entity 23 | @Table(name="tbl_series") 24 | @JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="@pkTBLSeriesID") 25 | public class Series implements Serializable { 26 | 27 | private static final long serialVersionUID = 6918147797908911998L; 28 | 29 | @Id 30 | @GeneratedValue(strategy = GenerationType.IDENTITY) 31 | @Column(name="pkTBLSeriesID") 32 | private Long pkTBLSeriesID; 33 | 34 | @Column(name="seriesInstanceUID", length=100) 35 | private String seriesInstanceUID; 36 | 37 | @Column(name="seriesNumber") 38 | private Integer seriesNumber; 39 | 40 | @Column(name="seriesDescription", length=100) 41 | private String seriesDescription; 42 | 43 | @Column(name="bodyPartExamined", length=40) 44 | private String bodyPartExamined; 45 | 46 | @Column(name="patientPosition", length=30) 47 | private String patientPosition; 48 | 49 | @Column(name="laterality", length=100) 50 | private String laterality; 51 | 52 | @Column(name="protocolName", length=100) 53 | private String protocolName; 54 | 55 | @Column(name="operatorsName", length=50) 56 | private String operatorsName; 57 | 58 | @Temporal(TemporalType.TIMESTAMP) 59 | @Column(name="seriesDateTime") 60 | private Date seriesDateTime; 61 | 62 | @Temporal(TemporalType.TIMESTAMP) 63 | @Column(name="createdDate", updatable = false, insertable=true) 64 | private Date createdDate; 65 | 66 | @Temporal(TemporalType.TIMESTAMP) 67 | @Column(name="modifiedDate", insertable = true, updatable=true) 68 | private Date modifiedDate; 69 | 70 | @ManyToOne(cascade = {CascadeType.ALL}) 71 | @JoinColumn(name="pkTBLStudyID") 72 | private Study study; 73 | 74 | @OneToOne(mappedBy = "series") 75 | private Equipment equipment; 76 | 77 | @OneToMany(mappedBy = "series") 78 | private Collection instance; 79 | 80 | public Series() { 81 | super(); 82 | } 83 | 84 | public Long getPkTBLSeriesID() { 85 | return this.pkTBLSeriesID; 86 | } 87 | public void setPkTBLSeriesID(Long pkTBLSeriesID) { 88 | this.pkTBLSeriesID = pkTBLSeriesID; 89 | } 90 | 91 | public String getSeriesInstanceUID() { 92 | return this.seriesInstanceUID; 93 | } 94 | public void setSeriesInstanceUID(String seriesInstanceUID) { 95 | this.seriesInstanceUID = seriesInstanceUID; 96 | } 97 | 98 | public Integer getSeriesNumber() { 99 | return this.seriesNumber; 100 | } 101 | public void setSeriesNumber(Integer seriesNumber) { 102 | this.seriesNumber = seriesNumber; 103 | } 104 | 105 | public String getSeriesDescription() { 106 | return this.seriesDescription; 107 | } 108 | public void setSeriesDescription(String seriesDescription) { 109 | this.seriesDescription = seriesDescription; 110 | } 111 | 112 | public String getBodyPartExamined() { 113 | return this.bodyPartExamined; 114 | } 115 | public void setBodyPartExamined(String bodyPartExamined) { 116 | this.bodyPartExamined = bodyPartExamined; 117 | } 118 | 119 | public String getLaterality() { 120 | return this.laterality; 121 | } 122 | public void setLaterality(String laterality) { 123 | this.laterality = laterality; 124 | } 125 | 126 | public String getProtocolName() { 127 | return this.protocolName; 128 | } 129 | public void setProtocolName(String protocolName) { 130 | this.protocolName = protocolName; 131 | } 132 | 133 | public String getPatientPosition() { 134 | return patientPosition; 135 | } 136 | public void setPatientPosition(String patientPosition) { 137 | this.patientPosition = patientPosition; 138 | } 139 | 140 | public String getOperatorsName() { 141 | return this.operatorsName; 142 | } 143 | public void setOperatorsName(String operatorsName) { 144 | this.operatorsName = operatorsName; 145 | } 146 | 147 | public Date getSeriesDateTime() { 148 | return this.seriesDateTime; 149 | } 150 | public void setSeriesDateTime(Date seriesDateTime) { 151 | this.seriesDateTime = seriesDateTime; 152 | } 153 | 154 | public Date getCreatedDate() { 155 | return this.createdDate; 156 | } 157 | 158 | public void setCreatedDate(Date createdDate) { 159 | this.createdDate = createdDate; 160 | } 161 | 162 | public Date getModifiedDate() { 163 | return this.modifiedDate; 164 | } 165 | 166 | public void setModifiedDate(Date modifiedDate) { 167 | this.modifiedDate = modifiedDate; 168 | } 169 | 170 | @PreUpdate 171 | @PrePersist 172 | public void updateTimeStamps() { 173 | modifiedDate = new Date(); 174 | if (createdDate==null) { 175 | createdDate = new Date(); 176 | } 177 | } 178 | 179 | public Study getStudy() { 180 | return study; 181 | } 182 | 183 | public void setStudy(Study param) { 184 | this.study = param; 185 | } 186 | 187 | public Equipment getEquipment() { 188 | return equipment; 189 | } 190 | 191 | public void setEquipment(Equipment param) { 192 | this.equipment = param; 193 | } 194 | 195 | public Collection getInstance() { 196 | return instance; 197 | } 198 | 199 | public void setInstance(Collection param) { 200 | this.instance = param; 201 | } 202 | 203 | @Override 204 | public String toString(){ 205 | return String.format( 206 | "Series[pkTBLSeriesID=%d, seriesInstanceUID=%s, seriesNumber=%d, seriesDescription=%s, bodyPartExamined=%s, patientPosition=%s, laterality=%s, protocolName=%s, operatorsName=%s, seriesDateTime=%s, createdDate=%s, modifiedDate=%s]", 207 | pkTBLSeriesID, seriesInstanceUID, seriesNumber, seriesDescription, bodyPartExamined, patientPosition, laterality, protocolName, operatorsName, seriesDateTime, createdDate, modifiedDate); 208 | } 209 | 210 | 211 | } 212 | -------------------------------------------------------------------------------- /src/main/java/org/easy/entity/Study.java: -------------------------------------------------------------------------------- 1 | package org.easy.entity; 2 | 3 | import java.io.Serializable; 4 | import java.util.Collection; 5 | import java.util.Date; 6 | 7 | import javax.persistence.CascadeType; 8 | import javax.persistence.Column; 9 | import javax.persistence.Entity; 10 | import javax.persistence.GeneratedValue; 11 | import javax.persistence.GenerationType; 12 | import javax.persistence.Id; 13 | import javax.persistence.JoinColumn; 14 | import javax.persistence.OneToMany; 15 | import javax.persistence.PrePersist; 16 | import javax.persistence.PreUpdate; 17 | import javax.persistence.Table; 18 | import javax.persistence.Temporal; 19 | import javax.persistence.TemporalType; 20 | import org.easy.entity.Patient; 21 | import javax.persistence.ManyToOne; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIdentityInfo; 24 | import com.fasterxml.jackson.annotation.ObjectIdGenerators; 25 | 26 | 27 | 28 | /** 29 | * Entity implementation class for Entity: Study 30 | * 31 | */ 32 | @Entity 33 | @Table(name="tbl_study") 34 | @JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="@pkTBLStudyID") 35 | public class Study implements Serializable { 36 | 37 | private static final long serialVersionUID = 6126899965207417288L; 38 | 39 | @Id 40 | @GeneratedValue(strategy = GenerationType.IDENTITY) 41 | @Column(name="pkTBLStudyID") 42 | private Long pkTBLStudyID; 43 | 44 | @Column(name="studyID", length=50) 45 | private String studyID; 46 | 47 | @Column(name="studyDescription", length=300) 48 | private String studyDescription; 49 | 50 | @Column(name="studyInstanceUID", length=100) 51 | private String studyInstanceUID; 52 | 53 | @Column(name="accessionNumber", length=30) 54 | private String accessionNumber; 55 | 56 | @Temporal(TemporalType.TIMESTAMP) 57 | @Column(name="studyDateTime") 58 | private Date studyDateTime; 59 | 60 | @Column(name="referringPhysicianName", length=100) 61 | private String referringPhysicianName; 62 | 63 | @Column(name="additionalPatientHistory", length=300) 64 | private String additionalPatientHistory; 65 | 66 | @Column(name="admittingDiagnosesDescription", length=200) 67 | private String admittingDiagnosesDescription; 68 | 69 | @Column(name="studyStatusID", length=40) 70 | private String studyStatusID; 71 | 72 | @Column(name="studyPriorityID", length=40) 73 | private String studyPriorityID; 74 | 75 | @Temporal(TemporalType.TIMESTAMP) 76 | @Column(name="createdDate", updatable = false, insertable=true) 77 | private Date createdDate; 78 | 79 | @Temporal(TemporalType.TIMESTAMP) 80 | @Column(name="modifiedDate", insertable = true, updatable=true) 81 | private Date modifiedDate; 82 | 83 | @ManyToOne(cascade = {CascadeType.ALL}) 84 | @JoinColumn(name="pkTBLPatientID") 85 | private Patient patient; 86 | 87 | @OneToMany(mappedBy = "study") 88 | private Collection series; 89 | 90 | 91 | public Study() { 92 | super(); 93 | } 94 | 95 | public Long getPkTBLStudyID() { 96 | return this.pkTBLStudyID; 97 | } 98 | public void setPkTBLStudyID(Long pkTBLStudyID) { 99 | this.pkTBLStudyID = pkTBLStudyID; 100 | } 101 | 102 | public String getStudyID() { 103 | return this.studyID; 104 | } 105 | public void setStudyID(String studyID) { 106 | this.studyID = studyID; 107 | } 108 | 109 | public String getStudyDescription() { 110 | return studyDescription; 111 | } 112 | public void setStudyDescription(String studyDescription) { 113 | this.studyDescription = studyDescription; 114 | } 115 | 116 | public String getStudyInstanceUID() { 117 | return this.studyInstanceUID; 118 | } 119 | public void setStudyInstanceUID(String studyInstanceUID) { 120 | this.studyInstanceUID = studyInstanceUID; 121 | } 122 | 123 | public String getAccessionNumber() { 124 | return this.accessionNumber; 125 | } 126 | public void setAccessionNumber(String accessionNumber) { 127 | this.accessionNumber = accessionNumber; 128 | } 129 | 130 | public Date getStudyDateTime() { 131 | return this.studyDateTime; 132 | } 133 | public void setStudyDateTime(Date studyDateTime) { 134 | this.studyDateTime = studyDateTime; 135 | } 136 | 137 | public String getReferringPhysicianName() { 138 | return this.referringPhysicianName; 139 | } 140 | public void setReferringPhysicianName(String referringPhysicianName) { 141 | this.referringPhysicianName = referringPhysicianName; 142 | } 143 | 144 | public String getAdditionalPatientHistory() { 145 | return this.additionalPatientHistory; 146 | } 147 | public void setAdditionalPatientHistory(String additionalPatientHistory) { 148 | this.additionalPatientHistory = additionalPatientHistory; 149 | } 150 | 151 | public String getAdmittingDiagnosesDescription() { 152 | return this.admittingDiagnosesDescription; 153 | } 154 | public void setAdmittingDiagnosesDescription(String admittingDiagnosesDescription) { 155 | this.admittingDiagnosesDescription = admittingDiagnosesDescription; 156 | } 157 | 158 | public String getStudyStatusID() { 159 | return this.studyStatusID; 160 | } 161 | public void setStudyStatusID(String studyStatusID) { 162 | this.studyStatusID = studyStatusID; 163 | } 164 | 165 | public String getStudyPriorityID() { 166 | return this.studyPriorityID; 167 | } 168 | public void setStudyPriorityID(String studyPriorityID) { 169 | this.studyPriorityID = studyPriorityID; 170 | } 171 | 172 | public Date getCreatedDate() { 173 | return this.createdDate; 174 | } 175 | public void setCreatedDate(Date createdDate) { 176 | this.createdDate = createdDate; 177 | } 178 | 179 | public Date getModifiedDate() { 180 | return this.modifiedDate; 181 | } 182 | public void setModifiedDate(Date modifiedDate) { 183 | this.modifiedDate = modifiedDate; 184 | } 185 | 186 | @PreUpdate 187 | @PrePersist 188 | public void updateTimeStamps() { 189 | modifiedDate = new Date(); 190 | if (createdDate==null) { 191 | createdDate = new Date(); 192 | } 193 | } 194 | 195 | public Patient getPatient() { 196 | return patient; 197 | } 198 | public void setPatient(Patient param) { 199 | this.patient = param; 200 | } 201 | 202 | public Collection getSeries() { 203 | return series; 204 | } 205 | public void setSeries(Collection param) { 206 | this.series = param; 207 | } 208 | 209 | @Override 210 | public String toString(){ 211 | return String.format( 212 | "Study[pkTBLStudyID=%d, studyID=%s, studyDescription=%s, studyInstanceUID=%s, accessionNumber=%s, studyDateTime=%s, referringPhysicianName=%s, additionalPatientHistory=%s, admittingDiagnosesDescription=%s, studyStatusID=%s, studyPriorityID=%s, createdDate=%s, modifiedDate=%s, pkTBLPatientID=%s]", 213 | pkTBLStudyID, studyID, studyDescription, studyInstanceUID, accessionNumber, studyDateTime, referringPhysicianName, additionalPatientHistory, admittingDiagnosesDescription, studyStatusID, studyPriorityID, createdDate, modifiedDate, patient.getPkTBLPatientID()); 214 | } 215 | 216 | 217 | } 218 | -------------------------------------------------------------------------------- /src/main/java/org/easy/event/NewFileEvent.java: -------------------------------------------------------------------------------- 1 | package org.easy.event; 2 | 3 | import java.io.File; 4 | import java.io.Serializable; 5 | 6 | public class NewFileEvent implements Serializable{ 7 | 8 | private static final long serialVersionUID = 8244229216737621902L; 9 | 10 | public NewFileEvent(File file){ 11 | this.file = file; 12 | } 13 | 14 | private final File file; 15 | 16 | public File getFile() { 17 | return file; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/easy/handler/IncomingFileHandler.java: -------------------------------------------------------------------------------- 1 | package org.easy.handler; 2 | 3 | import java.io.File; 4 | 5 | import javax.annotation.PostConstruct; 6 | import javax.annotation.PreDestroy; 7 | 8 | import org.easy.component.ActiveDicoms; 9 | import org.easy.event.NewFileEvent; 10 | import org.easy.server.DicomReader; 11 | import org.easy.service.DBService; 12 | import org.slf4j.Logger; 13 | import org.slf4j.LoggerFactory; 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.transaction.annotation.Transactional; 16 | 17 | import com.google.common.eventbus.AllowConcurrentEvents; 18 | import com.google.common.eventbus.EventBus; 19 | import com.google.common.eventbus.Subscribe; 20 | 21 | 22 | 23 | public class IncomingFileHandler { 24 | 25 | private static final Logger LOG = LoggerFactory.getLogger(IncomingFileHandler.class); 26 | 27 | @Autowired(required = true) 28 | private EventBus eventBus; 29 | 30 | @Autowired 31 | private DBService dbService; 32 | 33 | @Autowired 34 | private ActiveDicoms activeDicoms; 35 | 36 | @Transactional 37 | @Subscribe 38 | @AllowConcurrentEvents 39 | public void handleIncomingFileEvent(NewFileEvent newFileEvent) { 40 | //IMPORTANT! Write everything inside try catch, the guava breaks if an exception occurs 41 | 42 | try{ 43 | File file = newFileEvent.getFile();//get the file from event handler 44 | DicomReader reader = new DicomReader(file); 45 | 46 | //LOG.info("Active Dicoms:{} Received Patient Name:{} ID:{} Age:{} Sex:{} ", activeDicoms.toString(), reader.getPatientName(), reader.getPatientID(), reader.getPatientAge(), reader.getPatientSex()); 47 | synchronized(dbService){ 48 | dbService.buildEntities(reader);//lets build our dicom database entities 49 | } 50 | 51 | 52 | }catch(Exception e){ 53 | LOG.error(e.getMessage()); 54 | } 55 | } 56 | 57 | @PostConstruct 58 | public void postConstruct(){ 59 | eventBus.register(this); 60 | } 61 | 62 | @PreDestroy 63 | public void preDestroy(){ 64 | eventBus.unregister(this); 65 | } 66 | 67 | public void printStats(String status) { 68 | //String str = Thread.currentThread().getName().split("@@")[0]; 69 | //Thread.currentThread().setName(String.valueOf(Thread.currentThread().getId())); 70 | LOG.info("{} {} {} [Active Threads: {}] ",Thread.currentThread().getId(), Thread.currentThread().getName(), status, Thread.activeCount()); 71 | 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/org/easy/rest/AjaxInstance.java: -------------------------------------------------------------------------------- 1 | package org.easy.rest; 2 | 3 | import org.easy.entity.Instance; 4 | 5 | public class AjaxInstance { 6 | 7 | private Boolean success; 8 | private Instance instance; 9 | 10 | public AjaxInstance(Boolean success, Instance instance){ 11 | this.success = success; 12 | this.instance = instance; 13 | } 14 | 15 | public Boolean getSuccess() { 16 | return success; 17 | } 18 | 19 | public void setSuccess(Boolean success) { 20 | this.success = success; 21 | } 22 | 23 | public Instance getInstance() { 24 | return instance; 25 | } 26 | 27 | public void setInstance(Instance instance) { 28 | this.instance = instance; 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/org/easy/rest/AjaxPatient.java: -------------------------------------------------------------------------------- 1 | package org.easy.rest; 2 | 3 | import org.easy.entity.Patient; 4 | 5 | public class AjaxPatient { 6 | 7 | private Boolean success; 8 | private Patient patient; 9 | 10 | public AjaxPatient(Boolean success, Patient patient){ 11 | this.success = success; 12 | this.patient = patient; 13 | } 14 | 15 | public Boolean getSuccess() { 16 | return success; 17 | } 18 | 19 | public void setSuccess(Boolean success) { 20 | this.success = success; 21 | } 22 | 23 | public Patient getPatient() { 24 | return patient; 25 | } 26 | 27 | public void setPatient(Patient patient) { 28 | this.patient = patient; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/easy/rest/AjaxResult.java: -------------------------------------------------------------------------------- 1 | package org.easy.rest; 2 | 3 | public class AjaxResult { 4 | 5 | private Boolean success; 6 | private String message; 7 | 8 | public AjaxResult(Boolean success, String message){ 9 | this.success = success; 10 | this.message = message; 11 | } 12 | 13 | public Boolean getSuccess() { 14 | return success; 15 | } 16 | public void setSuccess(Boolean success) { 17 | this.success = success; 18 | } 19 | public String getMessage() { 20 | return message; 21 | } 22 | public void setMessage(String message) { 23 | this.message = message; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/org/easy/rest/AjaxSeries.java: -------------------------------------------------------------------------------- 1 | package org.easy.rest; 2 | 3 | import org.easy.entity.Series; 4 | 5 | public class AjaxSeries { 6 | 7 | private Boolean success; 8 | private Series series; 9 | 10 | public AjaxSeries(Boolean success, Series series){ 11 | this.success = success; 12 | this.series = series; 13 | } 14 | 15 | public Boolean getSuccess() { 16 | return success; 17 | } 18 | 19 | public void setSuccess(Boolean success) { 20 | this.success = success; 21 | } 22 | 23 | public Series getSeries() { 24 | return series; 25 | } 26 | 27 | public void setSeries(Series series) { 28 | this.series = series; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/easy/rest/AjaxStudy.java: -------------------------------------------------------------------------------- 1 | package org.easy.rest; 2 | 3 | import org.easy.entity.Study; 4 | 5 | public class AjaxStudy { 6 | 7 | private Boolean success; 8 | private Study study; 9 | 10 | public AjaxStudy(Boolean success, Study study){ 11 | this.success = success; 12 | this.study = study; 13 | } 14 | 15 | public Boolean getSuccess() { 16 | return success; 17 | } 18 | 19 | public void setSuccess(Boolean success) { 20 | this.success = success; 21 | } 22 | 23 | public Study getStudy() { 24 | return study; 25 | } 26 | 27 | public void setStudy(Study study) { 28 | this.study = study; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/easy/service/DBService.java: -------------------------------------------------------------------------------- 1 | package org.easy.service; 2 | 3 | import org.easy.entity.Equipment; 4 | import org.easy.entity.Instance; 5 | import org.easy.entity.Patient; 6 | import org.easy.entity.Series; 7 | import org.easy.entity.Study; 8 | import org.easy.server.DicomReader; 9 | 10 | 11 | public interface DBService { 12 | 13 | public void buildEntities(DicomReader reader); 14 | Patient buildPatient(DicomReader reader); 15 | Study buildStudy(DicomReader reader,Patient patient); 16 | Series buildSeries(DicomReader reader, Study study); 17 | Equipment buildEquipment(DicomReader reader, Series series); 18 | Instance buildInstance(DicomReader reader, Series series); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/easy/util/DicomEntityBuilder.java: -------------------------------------------------------------------------------- 1 | package org.easy.util; 2 | 3 | import java.util.Date; 4 | 5 | import org.easy.entity.Equipment; 6 | import org.easy.entity.Instance; 7 | import org.easy.entity.Patient; 8 | import org.easy.entity.Series; 9 | import org.easy.entity.Study; 10 | 11 | 12 | 13 | 14 | public class DicomEntityBuilder { 15 | 16 | public static Patient newPatient(String patientAge, Date patientBirthday, String patientID, String patientName, String patientSex){ 17 | 18 | Patient patient = new Patient(); 19 | patient.setPatientAge(patientAge); 20 | patient.setPatientBirthday(patientBirthday); 21 | patient.setPatientID(patientID); 22 | patient.setPatientName(patientName); 23 | patient.setPatientSex(patientSex); 24 | 25 | return patient; 26 | } 27 | 28 | public static Study newStudy(String accessionNumber, String additionalPatientHistory, String admittingDiagnosesDescription, 29 | String referringPhysicianName, Date studyDateTime, String studyID, String studyDescription, String studyInstanceUID, String studyPriorityID, 30 | String studyStatusID){ 31 | 32 | Study study = new Study(); 33 | study.setAccessionNumber(accessionNumber); 34 | study.setAdditionalPatientHistory(additionalPatientHistory); 35 | study.setAdmittingDiagnosesDescription(admittingDiagnosesDescription); 36 | study.setReferringPhysicianName(referringPhysicianName); 37 | study.setStudyDateTime(studyDateTime); 38 | study.setStudyID(studyID); 39 | study.setStudyDescription(studyDescription); 40 | study.setStudyInstanceUID(studyInstanceUID); 41 | study.setStudyPriorityID(studyPriorityID); 42 | study.setStudyStatusID(studyStatusID); 43 | 44 | return study; 45 | } 46 | 47 | public static Series newSeries(String bodyPartExamined, String laterality, String operatorsName, String patientPosition, String protocolName, 48 | Date seriesDateTime, String seriesDescription, String seriesInstanceUID, Integer seriesNumber){ 49 | 50 | Series series = new Series(); 51 | series.setBodyPartExamined(bodyPartExamined); 52 | series.setLaterality(laterality); 53 | series.setOperatorsName(operatorsName); 54 | series.setPatientPosition(patientPosition); 55 | series.setProtocolName(protocolName); 56 | series.setSeriesDateTime(seriesDateTime); 57 | series.setSeriesDescription(seriesDescription); 58 | series.setSeriesInstanceUID(seriesInstanceUID); 59 | series.setSeriesNumber(seriesNumber); 60 | 61 | return series; 62 | } 63 | 64 | public static Equipment newEquipment(String conversionType, String deviceSerialNumber, String institutionAddress, String institutionName, 65 | String institutionalDepartmentName, String manufacturer, String manufacturerModelName, String modality, String softwareVersion, 66 | String stationName){ 67 | 68 | Equipment equipment = new Equipment(); 69 | equipment.setConverstionType(conversionType); 70 | equipment.setDeviceSerialNumber(deviceSerialNumber); 71 | equipment.setInstitutionAddress(institutionAddress); 72 | equipment.setInstitutionName(institutionName); 73 | equipment.setInstitutionalDepartmentName(institutionalDepartmentName); 74 | equipment.setManufacturer(manufacturer); 75 | equipment.setManufacturerModelName(manufacturerModelName); 76 | equipment.setModality(modality); 77 | equipment.setSoftwareVersion(softwareVersion); 78 | equipment.setStationName(stationName); 79 | 80 | return equipment; 81 | } 82 | 83 | public static Instance newInstance(Date acquisitionDateTime, Date contentDateTime, Integer exposureTime, String imageOrientation, String imagePosition, 84 | String imageType, Integer instanceNumber, String kvp, String mediaStorageSopInstanceUID, String patientOrientation, Float pixelSpacing, 85 | Float sliceLocation, Float sliceThickness, String sopClassUID, String sopInstanceUID, String transferSyntaxUID, String windowCenter, 86 | String windowWidth, Integer xrayTubeCurrent){ 87 | 88 | Instance instance = new Instance(); 89 | instance.setAcquisitionDateTime(acquisitionDateTime); 90 | instance.setContentDateTime(contentDateTime); 91 | instance.setExposureTime(exposureTime); 92 | instance.setImageOrientation(imageOrientation); 93 | instance.setImagePosition(imagePosition); 94 | instance.setImageType(imageType); 95 | instance.setInstanceNumber(instanceNumber); 96 | instance.setKvp(kvp); 97 | instance.setMediaStorageSopInstanceUID(mediaStorageSopInstanceUID); 98 | instance.setPatientOrientation(patientOrientation); 99 | instance.setPixelSpacing(pixelSpacing); 100 | instance.setSliceLocation(sliceLocation); 101 | instance.setSliceThickness(sliceThickness); 102 | instance.setSopClassUID(sopClassUID); 103 | instance.setSopInstanceUID(sopInstanceUID); 104 | instance.setTransferSyntaxUID(transferSyntaxUID); 105 | instance.setWindowCenter(windowCenter); 106 | instance.setWindowWidth(windowWidth); 107 | instance.setXrayTubeCurrent(xrayTubeCurrent); 108 | 109 | return instance; 110 | } 111 | 112 | 113 | } 114 | -------------------------------------------------------------------------------- /src/main/java/org/easy/util/Utils.java: -------------------------------------------------------------------------------- 1 | package org.easy.util; 2 | 3 | import java.awt.Dimension; 4 | 5 | public class Utils { 6 | 7 | public static Dimension getScaledDimension(Dimension imgSize, Dimension boundary) { 8 | 9 | int original_width = imgSize.width; 10 | int original_height = imgSize.height; 11 | int bound_width = boundary.width; 12 | int bound_height = boundary.height; 13 | int new_width = original_width; 14 | int new_height = original_height; 15 | 16 | // first check if we need to scale width 17 | if (original_width > bound_width) { 18 | //scale width to fit 19 | new_width = bound_width; 20 | //scale height to maintain aspect ratio 21 | new_height = (new_width * original_height) / original_width; 22 | } 23 | 24 | // then check if we need to scale even with the new height 25 | if (new_height > bound_height) { 26 | //scale height to fit instead 27 | new_height = bound_height; 28 | //scale width to maintain aspect ratio 29 | new_width = (new_height * original_width) / original_height; 30 | } 31 | 32 | return new Dimension(new_width, new_height); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # App 2 | app.name=Easy PACS Server 3 | app.description=${app.name} is a Dicom Server Application 4 | 5 | #thymeleaf cache; For Thymeleaf auto template reload configuration 6 | spring.thymeleaf.cache = false 7 | 8 | # DataSource settings: set here configurations for the database connection 9 | datasource.primary.url=jdbc:mysql://localhost:3306/dbdicom 10 | datasource.primary.username=[username] 11 | datasource.primary.password=[password] 12 | datasource.primary.driverClassName=com.mysql.jdbc.Driver 13 | datasource.primary.validation-query=SELECT 1 14 | datasource.primary.initialSize=10 15 | datasource.primary.maxActive=100 16 | datasource.primary.minIdle=20 17 | datasource.primary.maxWait=3000 18 | 19 | 20 | # Specify the DBMS 21 | spring.jpa.database = MYSQL 22 | # Show or not log for each sql query 23 | spring.jpa.show-sql = true 24 | # Hibernate settings are prefixed with spring.jpa.hibernate.* 25 | spring.jpa.hibernate.globally_quoted_identifiers=true 26 | spring.jpa.hibernate.ddl-auto = none 27 | spring.jpa.hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect 28 | spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.DefaultNamingStrategy 29 | spring.jpa.hibernate.show_sql = true 30 | spring.jpa.hibernate.format_sql = true 31 | spring.jpa.hibernate.generate_statistics = false 32 | spring.jpa.hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory 33 | 34 | 35 | # Pacs storage 36 | pacs.storage.dcm = ./tmp/dcm 37 | pacs.storage.image = ./tmp/img 38 | pacs.aetitle = * 39 | pacs.ports = 104 40 | 41 | # Server 42 | server.port=8085 43 | endpoints.shutdown.enabled=false -------------------------------------------------------------------------------- /src/main/resources/messages.properties: -------------------------------------------------------------------------------- 1 | easy.title=Easy PACS Imaging Repository 2 | easy.server=Easy PACS Server 3 | easy.details=Patient Details 4 | easy.users=Users -------------------------------------------------------------------------------- /src/main/resources/static/css/custom.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: 'Ubuntu', sans-serif; 3 | -ms-text-size-adjust: 100%; 4 | -webkit-text-size-adjust: 100%; } 5 | 6 | @font-face { 7 | font-family: 'Ubuntu', sans-serif; 8 | src: url('/fonts/Ubuntu/Ubuntu-Medium.ttf'); 9 | format('svg'); 10 | font-weight: normal; 11 | font-style: normal; 12 | } 13 | 14 | 15 | .navbar-text > a { 16 | color: inherit; 17 | text-decoration: none; 18 | } 19 | 20 | body { 21 | font-family: 'Ubuntu', sans-serif; 22 | padding-top: 50px; 23 | padding-bottom: 100px; 24 | } 25 | 26 | a { 27 | cursor: pointer; 28 | } 29 | 30 | p { 31 | /*font-family: 'Open Sans', sans-serif;*/ 32 | font-family: 'Ubuntu', sans-serif; 33 | } 34 | 35 | h1, h2, h3, h4, h5, h6{ 36 | /*font-family: 'Oswald', sans-serif;*/ 37 | font-family: 'Ubuntu', sans-serif; 38 | } 39 | 40 | .navbar-default{ 41 | background-color: #2C3E50; 42 | border-color: #FFFFFF; 43 | color: #FFFFFF; 44 | } 45 | 46 | .navbar-default .navbar-brand{ 47 | color: #FFFFFF; 48 | } 49 | 50 | .navbar-default .navbar-brand:hover, 51 | .navbar-default .navbar-brand:foucs{ 52 | color: #18BC9C; 53 | background-color: transparent; 54 | } 55 | 56 | .navbar-default .navbar-nav > li > a{ 57 | color: #FFFFFF; 58 | } 59 | 60 | .navbar-default .navbar-nav > .active > a, 61 | .navbar-default .navbar-nav > .active > a:hover, 62 | .navbar-default .navbar-nav > .active > a:focus{ 63 | color:#FFFFFF; 64 | background-color:#1A242F; 65 | } 66 | 67 | .navbar-default .navbar-nav > li > a:hover, 68 | .navbar-default .navbar-nav > li > a:focus{ 69 | color: #18BC9C; 70 | background-color: transparent; 71 | } 72 | 73 | .navbar-default .navbar-nav > .open > a, 74 | .navbar-default .navbar-nav > .open > a:hover, 75 | .navbar-default .navbar-nav > .open > a:focus{ 76 | background-color: #1A242F; 77 | color: #FFFFFF; 78 | } 79 | 80 | .btn-primary{ 81 | background-color: #2C3E50; 82 | border-color: #2C3E50; 83 | color: #FFFFFF; 84 | } 85 | 86 | .btn-primary:hover, 87 | .btn-primary:focus, 88 | .btn-primary:active, 89 | .btn-primary.active, 90 | .open .dropdown-toggle.btn-primary{ 91 | color: #FFFFFF; 92 | background-color: #1E2A36; 93 | border-color: #161F29; 94 | } 95 | 96 | .btn-success{ 97 | background-color: #18BC9C; 98 | border-color: #18BC9C; 99 | color: #FFFFFF; 100 | } 101 | 102 | .btn-success:hover, 103 | .btn-success:focus, 104 | .btn-success:active, 105 | .btn-success.active, 106 | .open .dropdown-toggle.btn-success{ 107 | color: #FFFFFF; 108 | background-color: #13987E; 109 | border-color: #13987E; 110 | } 111 | 112 | .btn-footer{ 113 | color: #FFFFFF; 114 | margin:14px; 115 | } 116 | .btn-footer, 117 | .btn-footer:focus, 118 | .btn-footer:active, 119 | .btn-footer.active, 120 | .btn-footer:hover{ 121 | color: #13987E; 122 | border-color: #13987E; 123 | } 124 | 125 | 126 | .btn-default{ 127 | background-color: #95A5A6; 128 | border-color: #95A5A6; 129 | color: #FFFFFF; 130 | } 131 | .btn-default:hover, 132 | .btn-default:focus, 133 | .btn-default:active, 134 | .btn-default.active, 135 | .open .dropdown-toggle.btn-default{ 136 | color: #FFFFFF; 137 | background-color: #7F9293; 138 | border-color: #74898A; 139 | } 140 | 141 | .home-thumb img:hover{ 142 | transform: scale(1.1); 143 | } 144 | 145 | .home-thumb img{ 146 | transition: all 0.3s ease 0s; 147 | /*width:100%;*/ 148 | } 149 | 150 | .home-thumb { 151 | overflow:hidden; 152 | } 153 | 154 | .bg-grey{ 155 | background-color: #F9F9F9; 156 | } 157 | 158 | .carousel{ 159 | margin-bottom: 20px; 160 | } 161 | 162 | 163 | 164 | table { 165 | border-collapse: separate; 166 | border-spacing: 0 0 0 0px; 167 | font-size:11px; 168 | } 169 | 170 | caption{ 171 | font-size:20px; 172 | } 173 | 174 | thead th { 175 | /*background-color: #006DCC; 176 | color: white;*/ 177 | background-color: #CCCCCC; 178 | color:#00000c; 179 | } 180 | 181 | table thead tr th a{ 182 | cursor: pointer; 183 | text-decoration: underline; 184 | } 185 | 186 | 187 | tbody td { 188 | background-color: #EEEEEE; 189 | text-align:left; 190 | padding:1px; 191 | } 192 | 193 | 194 | table tbody tr a{ 195 | cursor: pointer; 196 | text-decoration: underline; 197 | } 198 | 199 | tr td:first-child, 200 | tr th:first-child { 201 | border-top-left-radius: 6px; 202 | border-bottom-left-radius: 6px; 203 | } 204 | 205 | tr td:last-child, 206 | tr th:last-child { 207 | border-top-right-radius: 6px; 208 | border-bottom-right-radius: 6px; 209 | } 210 | 211 | .imagebox{ 212 | overflow-x:hidden; 213 | overflow-y: auto; 214 | width:100%; 215 | height:190px; 216 | padding-bottom:10px; 217 | } 218 | 219 | 220 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/Ubuntu/UFL.txt: -------------------------------------------------------------------------------- 1 | ------------------------------- 2 | UBUNTU FONT LICENCE Version 1.0 3 | ------------------------------- 4 | 5 | PREAMBLE 6 | This licence allows the licensed fonts to be used, studied, modified and 7 | redistributed freely. The fonts, including any derivative works, can be 8 | bundled, embedded, and redistributed provided the terms of this licence 9 | are met. The fonts and derivatives, however, cannot be released under 10 | any other licence. The requirement for fonts to remain under this 11 | licence does not require any document created using the fonts or their 12 | derivatives to be published under this licence, as long as the primary 13 | purpose of the document is not to be a vehicle for the distribution of 14 | the fonts. 15 | 16 | DEFINITIONS 17 | "Font Software" refers to the set of files released by the Copyright 18 | Holder(s) under this licence and clearly marked as such. This may 19 | include source files, build scripts and documentation. 20 | 21 | "Original Version" refers to the collection of Font Software components 22 | as received under this licence. 23 | 24 | "Modified Version" refers to any derivative made by adding to, deleting, 25 | or substituting -- in part or in whole -- any of the components of the 26 | Original Version, by changing formats or by porting the Font Software to 27 | a new environment. 28 | 29 | "Copyright Holder(s)" refers to all individuals and companies who have a 30 | copyright ownership of the Font Software. 31 | 32 | "Substantially Changed" refers to Modified Versions which can be easily 33 | identified as dissimilar to the Font Software by users of the Font 34 | Software comparing the Original Version with the Modified Version. 35 | 36 | To "Propagate" a work means to do anything with it that, without 37 | permission, would make you directly or secondarily liable for 38 | infringement under applicable copyright law, except executing it on a 39 | computer or modifying a private copy. Propagation includes copying, 40 | distribution (with or without modification and with or without charging 41 | a redistribution fee), making available to the public, and in some 42 | countries other activities as well. 43 | 44 | PERMISSION & CONDITIONS 45 | This licence does not grant any rights under trademark law and all such 46 | rights are reserved. 47 | 48 | Permission is hereby granted, free of charge, to any person obtaining a 49 | copy of the Font Software, to propagate the Font Software, subject to 50 | the below conditions: 51 | 52 | 1) Each copy of the Font Software must contain the above copyright 53 | notice and this licence. These can be included either as stand-alone 54 | text files, human-readable headers or in the appropriate machine- 55 | readable metadata fields within text or binary files as long as those 56 | fields can be easily viewed by the user. 57 | 58 | 2) The font name complies with the following: 59 | (a) The Original Version must retain its name, unmodified. 60 | (b) Modified Versions which are Substantially Changed must be renamed to 61 | avoid use of the name of the Original Version or similar names entirely. 62 | (c) Modified Versions which are not Substantially Changed must be 63 | renamed to both (i) retain the name of the Original Version and (ii) add 64 | additional naming elements to distinguish the Modified Version from the 65 | Original Version. The name of such Modified Versions must be the name of 66 | the Original Version, with "derivative X" where X represents the name of 67 | the new work, appended to that name. 68 | 69 | 3) The name(s) of the Copyright Holder(s) and any contributor to the 70 | Font Software shall not be used to promote, endorse or advertise any 71 | Modified Version, except (i) as required by this licence, (ii) to 72 | acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with 73 | their explicit written permission. 74 | 75 | 4) The Font Software, modified or unmodified, in part or in whole, must 76 | be distributed entirely under this licence, and must not be distributed 77 | under any other licence. The requirement for fonts to remain under this 78 | licence does not affect any document created using the Font Software, 79 | except any version of the Font Software extracted from a document 80 | created using the Font Software may only be distributed under this 81 | licence. 82 | 83 | TERMINATION 84 | This licence becomes null and void if any of the above conditions are 85 | not met. 86 | 87 | DISCLAIMER 88 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 89 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 90 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 91 | COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 92 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 93 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 94 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 95 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER 96 | DEALINGS IN THE FONT SOFTWARE. 97 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/Ubuntu/Ubuntu-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/Ubuntu/Ubuntu-Bold.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/Ubuntu/Ubuntu-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/Ubuntu/Ubuntu-BoldItalic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/Ubuntu/Ubuntu-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/Ubuntu/Ubuntu-Italic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/Ubuntu/Ubuntu-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/Ubuntu/Ubuntu-Light.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/Ubuntu/Ubuntu-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/Ubuntu/Ubuntu-LightItalic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/Ubuntu/Ubuntu-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/Ubuntu/Ubuntu-Medium.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/Ubuntu/Ubuntu-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/Ubuntu/Ubuntu-MediumItalic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/Ubuntu/Ubuntu-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/Ubuntu/Ubuntu-Regular.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/font-awesome-4.2.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .@{fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal 14px/1 FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "spinning.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal 14px/1 FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | } 12 | 13 | .fa-icon-rotate(@degrees, @rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 15 | -webkit-transform: rotate(@degrees); 16 | -ms-transform: rotate(@degrees); 17 | transform: rotate(@degrees); 18 | } 19 | 20 | .fa-icon-flip(@horiz, @vert, @rotation) { 21 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 22 | -webkit-transform: scale(@horiz, @vert); 23 | -ms-transform: scale(@horiz, @vert); 24 | transform: scale(@horiz, @vert); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 9 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 10 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 11 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/less/spinning.less: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | @-webkit-keyframes fa-spin { 10 | 0% { 11 | -webkit-transform: rotate(0deg); 12 | transform: rotate(0deg); 13 | } 14 | 100% { 15 | -webkit-transform: rotate(359deg); 16 | transform: rotate(359deg); 17 | } 18 | } 19 | 20 | @keyframes fa-spin { 21 | 0% { 22 | -webkit-transform: rotate(0deg); 23 | transform: rotate(0deg); 24 | } 25 | 100% { 26 | -webkit-transform: rotate(359deg); 27 | transform: rotate(359deg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal 14px/1 FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal 14px/1 FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | } 12 | 13 | @mixin fa-icon-rotate($degrees, $rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 15 | -webkit-transform: rotate($degrees); 16 | -ms-transform: rotate($degrees); 17 | transform: rotate($degrees); 18 | } 19 | 20 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 21 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 22 | -webkit-transform: scale($horiz, $vert); 23 | -ms-transform: scale($horiz, $vert); 24 | transform: scale($horiz, $vert); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 9 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 10 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 11 | //src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/scss/_spinning.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | @-webkit-keyframes fa-spin { 10 | 0% { 11 | -webkit-transform: rotate(0deg); 12 | transform: rotate(0deg); 13 | } 14 | 100% { 15 | -webkit-transform: rotate(359deg); 16 | transform: rotate(359deg); 17 | } 18 | } 19 | 20 | @keyframes fa-spin { 21 | 0% { 22 | -webkit-transform: rotate(0deg); 23 | transform: rotate(0deg); 24 | } 25 | 100% { 26 | -webkit-transform: rotate(359deg); 27 | transform: rotate(359deg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/font-awesome-4.2.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "spinning"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/resources/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/resources/static/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/img/ajax-loader.gif -------------------------------------------------------------------------------- /src/main/resources/static/img/report-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/img/report-128.png -------------------------------------------------------------------------------- /src/main/resources/static/img/server-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/img/server-128.png -------------------------------------------------------------------------------- /src/main/resources/static/img/viewer-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/img/viewer-128.png -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/fancybox/blank.gif -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/fancybox_loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/fancybox/fancybox_loading@2x.gif -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/fancybox_sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/fancybox/fancybox_sprite@2x.png -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/helpers/fancybox_buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/fancybox/helpers/fancybox_buttons.png -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/helpers/jquery.fancybox-buttons.css: -------------------------------------------------------------------------------- 1 | #fancybox-buttons { 2 | position: fixed; 3 | left: 0; 4 | width: 100%; 5 | z-index: 8050; 6 | } 7 | 8 | #fancybox-buttons.top { 9 | top: 10px; 10 | } 11 | 12 | #fancybox-buttons.bottom { 13 | bottom: 10px; 14 | } 15 | 16 | #fancybox-buttons ul { 17 | display: block; 18 | width: 166px; 19 | height: 30px; 20 | margin: 0 auto; 21 | padding: 0; 22 | list-style: none; 23 | border: 1px solid #111; 24 | border-radius: 3px; 25 | -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 26 | -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 27 | box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 28 | background: rgb(50,50,50); 29 | background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%); 30 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51))); 31 | background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 32 | background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 33 | background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 34 | background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 35 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 ); 36 | } 37 | 38 | #fancybox-buttons ul li { 39 | float: left; 40 | margin: 0; 41 | padding: 0; 42 | } 43 | 44 | #fancybox-buttons a { 45 | display: block; 46 | width: 30px; 47 | height: 30px; 48 | text-indent: -9999px; 49 | background-color: transparent; 50 | background-image: url('fancybox_buttons.png'); 51 | background-repeat: no-repeat; 52 | outline: none; 53 | opacity: 0.8; 54 | } 55 | 56 | #fancybox-buttons a:hover { 57 | opacity: 1; 58 | } 59 | 60 | #fancybox-buttons a.btnPrev { 61 | background-position: 5px 0; 62 | } 63 | 64 | #fancybox-buttons a.btnNext { 65 | background-position: -33px 0; 66 | border-right: 1px solid #3e3e3e; 67 | } 68 | 69 | #fancybox-buttons a.btnPlay { 70 | background-position: 0 -30px; 71 | } 72 | 73 | #fancybox-buttons a.btnPlayOn { 74 | background-position: -30px -30px; 75 | } 76 | 77 | #fancybox-buttons a.btnToggle { 78 | background-position: 3px -60px; 79 | border-left: 1px solid #111; 80 | border-right: 1px solid #3e3e3e; 81 | width: 35px 82 | } 83 | 84 | #fancybox-buttons a.btnToggleOn { 85 | background-position: -27px -60px; 86 | } 87 | 88 | #fancybox-buttons a.btnClose { 89 | border-left: 1px solid #111; 90 | width: 35px; 91 | background-position: -56px 0px; 92 | } 93 | 94 | #fancybox-buttons a.btnDisabled { 95 | opacity : 0.4; 96 | cursor: default; 97 | } -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/helpers/jquery.fancybox-buttons.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Buttons helper for fancyBox 3 | * version: 1.0.5 (Mon, 15 Oct 2012) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * buttons: { 10 | * position : 'top' 11 | * } 12 | * } 13 | * }); 14 | * 15 | */ 16 | (function ($) { 17 | //Shortcut for fancyBox object 18 | var F = $.fancybox; 19 | 20 | //Add helper object 21 | F.helpers.buttons = { 22 | defaults : { 23 | skipSingle : false, // disables if gallery contains single image 24 | position : 'top', // 'top' or 'bottom' 25 | tpl : '
' 26 | }, 27 | 28 | list : null, 29 | buttons: null, 30 | 31 | beforeLoad: function (opts, obj) { 32 | //Remove self if gallery do not have at least two items 33 | 34 | if (opts.skipSingle && obj.group.length < 2) { 35 | obj.helpers.buttons = false; 36 | obj.closeBtn = true; 37 | 38 | return; 39 | } 40 | 41 | //Increase top margin to give space for buttons 42 | obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; 43 | }, 44 | 45 | onPlayStart: function () { 46 | if (this.buttons) { 47 | this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); 48 | } 49 | }, 50 | 51 | onPlayEnd: function () { 52 | if (this.buttons) { 53 | this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); 54 | } 55 | }, 56 | 57 | afterShow: function (opts, obj) { 58 | var buttons = this.buttons; 59 | 60 | if (!buttons) { 61 | this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); 62 | 63 | buttons = { 64 | prev : this.list.find('.btnPrev').click( F.prev ), 65 | next : this.list.find('.btnNext').click( F.next ), 66 | play : this.list.find('.btnPlay').click( F.play ), 67 | toggle : this.list.find('.btnToggle').click( F.toggle ), 68 | close : this.list.find('.btnClose').click( F.close ) 69 | } 70 | } 71 | 72 | //Prev 73 | if (obj.index > 0 || obj.loop) { 74 | buttons.prev.removeClass('btnDisabled'); 75 | } else { 76 | buttons.prev.addClass('btnDisabled'); 77 | } 78 | 79 | //Next / Play 80 | if (obj.loop || obj.index < obj.group.length - 1) { 81 | buttons.next.removeClass('btnDisabled'); 82 | buttons.play.removeClass('btnDisabled'); 83 | 84 | } else { 85 | buttons.next.addClass('btnDisabled'); 86 | buttons.play.addClass('btnDisabled'); 87 | } 88 | 89 | this.buttons = buttons; 90 | 91 | this.onUpdate(opts, obj); 92 | }, 93 | 94 | onUpdate: function (opts, obj) { 95 | var toggle; 96 | 97 | if (!this.buttons) { 98 | return; 99 | } 100 | 101 | toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); 102 | 103 | //Size toggle button 104 | if (obj.canShrink) { 105 | toggle.addClass('btnToggleOn'); 106 | 107 | } else if (!obj.canExpand) { 108 | toggle.addClass('btnDisabled'); 109 | } 110 | }, 111 | 112 | beforeClose: function () { 113 | if (this.list) { 114 | this.list.remove(); 115 | } 116 | 117 | this.list = null; 118 | this.buttons = null; 119 | } 120 | }; 121 | 122 | }(jQuery)); 123 | -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/helpers/jquery.fancybox-media.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Media helper for fancyBox 3 | * version: 1.0.6 (Fri, 14 Jun 2013) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * media: true 10 | * } 11 | * }); 12 | * 13 | * Set custom URL parameters: 14 | * $(".fancybox").fancybox({ 15 | * helpers : { 16 | * media: { 17 | * youtube : { 18 | * params : { 19 | * autoplay : 0 20 | * } 21 | * } 22 | * } 23 | * } 24 | * }); 25 | * 26 | * Or: 27 | * $(".fancybox").fancybox({, 28 | * helpers : { 29 | * media: true 30 | * }, 31 | * youtube : { 32 | * autoplay: 0 33 | * } 34 | * }); 35 | * 36 | * Supports: 37 | * 38 | * Youtube 39 | * http://www.youtube.com/watch?v=opj24KnzrWo 40 | * http://www.youtube.com/embed/opj24KnzrWo 41 | * http://youtu.be/opj24KnzrWo 42 | * http://www.youtube-nocookie.com/embed/opj24KnzrWo 43 | * Vimeo 44 | * http://vimeo.com/40648169 45 | * http://vimeo.com/channels/staffpicks/38843628 46 | * http://vimeo.com/groups/surrealism/videos/36516384 47 | * http://player.vimeo.com/video/45074303 48 | * Metacafe 49 | * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ 50 | * http://www.metacafe.com/watch/7635964/ 51 | * Dailymotion 52 | * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people 53 | * Twitvid 54 | * http://twitvid.com/QY7MD 55 | * Twitpic 56 | * http://twitpic.com/7p93st 57 | * Instagram 58 | * http://instagr.am/p/IejkuUGxQn/ 59 | * http://instagram.com/p/IejkuUGxQn/ 60 | * Google maps 61 | * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 62 | * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 63 | * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 64 | */ 65 | (function ($) { 66 | "use strict"; 67 | 68 | //Shortcut for fancyBox object 69 | var F = $.fancybox, 70 | format = function( url, rez, params ) { 71 | params = params || ''; 72 | 73 | if ( $.type( params ) === "object" ) { 74 | params = $.param(params, true); 75 | } 76 | 77 | $.each(rez, function(key, value) { 78 | url = url.replace( '$' + key, value || '' ); 79 | }); 80 | 81 | if (params.length) { 82 | url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; 83 | } 84 | 85 | return url; 86 | }; 87 | 88 | //Add helper object 89 | F.helpers.media = { 90 | defaults : { 91 | youtube : { 92 | matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, 93 | params : { 94 | autoplay : 1, 95 | autohide : 1, 96 | fs : 1, 97 | rel : 0, 98 | hd : 1, 99 | wmode : 'opaque', 100 | enablejsapi : 1 101 | }, 102 | type : 'iframe', 103 | url : '//www.youtube.com/embed/$3' 104 | }, 105 | vimeo : { 106 | matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, 107 | params : { 108 | autoplay : 1, 109 | hd : 1, 110 | show_title : 1, 111 | show_byline : 1, 112 | show_portrait : 0, 113 | fullscreen : 1 114 | }, 115 | type : 'iframe', 116 | url : '//player.vimeo.com/video/$1' 117 | }, 118 | metacafe : { 119 | matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, 120 | params : { 121 | autoPlay : 'yes' 122 | }, 123 | type : 'swf', 124 | url : function( rez, params, obj ) { 125 | obj.swf.flashVars = 'playerVars=' + $.param( params, true ); 126 | 127 | return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; 128 | } 129 | }, 130 | dailymotion : { 131 | matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, 132 | params : { 133 | additionalInfos : 0, 134 | autoStart : 1 135 | }, 136 | type : 'swf', 137 | url : '//www.dailymotion.com/swf/video/$1' 138 | }, 139 | twitvid : { 140 | matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, 141 | params : { 142 | autoplay : 0 143 | }, 144 | type : 'iframe', 145 | url : '//www.twitvid.com/embed.php?guid=$1' 146 | }, 147 | twitpic : { 148 | matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, 149 | type : 'image', 150 | url : '//twitpic.com/show/full/$1/' 151 | }, 152 | instagram : { 153 | matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, 154 | type : 'image', 155 | url : '//$1/p/$2/media/?size=l' 156 | }, 157 | google_maps : { 158 | matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, 159 | type : 'iframe', 160 | url : function( rez ) { 161 | return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); 162 | } 163 | } 164 | }, 165 | 166 | beforeLoad : function(opts, obj) { 167 | var url = obj.href || '', 168 | type = false, 169 | what, 170 | item, 171 | rez, 172 | params; 173 | 174 | for (what in opts) { 175 | if (opts.hasOwnProperty(what)) { 176 | item = opts[ what ]; 177 | rez = url.match( item.matcher ); 178 | 179 | if (rez) { 180 | type = item.type; 181 | params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); 182 | 183 | url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); 184 | 185 | break; 186 | } 187 | } 188 | } 189 | 190 | if (type) { 191 | obj.href = url; 192 | obj.type = type; 193 | 194 | obj.autoHeight = false; 195 | } 196 | } 197 | }; 198 | 199 | }(jQuery)); -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/helpers/jquery.fancybox-thumbs.css: -------------------------------------------------------------------------------- 1 | #fancybox-thumbs { 2 | position: fixed; 3 | left: 0; 4 | width: 100%; 5 | overflow: hidden; 6 | z-index: 8050; 7 | } 8 | 9 | #fancybox-thumbs.bottom { 10 | bottom: 2px; 11 | } 12 | 13 | #fancybox-thumbs.top { 14 | top: 2px; 15 | } 16 | 17 | #fancybox-thumbs ul { 18 | position: relative; 19 | list-style: none; 20 | margin: 0; 21 | padding: 0; 22 | } 23 | 24 | #fancybox-thumbs ul li { 25 | float: left; 26 | padding: 1px; 27 | opacity: 0.5; 28 | } 29 | 30 | #fancybox-thumbs ul li.active { 31 | opacity: 0.75; 32 | padding: 0; 33 | border: 1px solid #fff; 34 | } 35 | 36 | #fancybox-thumbs ul li:hover { 37 | opacity: 1; 38 | } 39 | 40 | #fancybox-thumbs ul li a { 41 | display: block; 42 | position: relative; 43 | overflow: hidden; 44 | border: 1px solid #222; 45 | background: #111; 46 | outline: none; 47 | } 48 | 49 | #fancybox-thumbs ul li img { 50 | display: block; 51 | position: relative; 52 | border: 0; 53 | padding: 0; 54 | max-width: none; 55 | } -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/helpers/jquery.fancybox-thumbs.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Thumbnail helper for fancyBox 3 | * version: 1.0.7 (Mon, 01 Oct 2012) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * thumbs: { 10 | * width : 50, 11 | * height : 50 12 | * } 13 | * } 14 | * }); 15 | * 16 | */ 17 | (function ($) { 18 | //Shortcut for fancyBox object 19 | var F = $.fancybox; 20 | 21 | //Add helper object 22 | F.helpers.thumbs = { 23 | defaults : { 24 | width : 50, // thumbnail width 25 | height : 50, // thumbnail height 26 | position : 'bottom', // 'top' or 'bottom' 27 | source : function ( item ) { // function to obtain the URL of the thumbnail image 28 | var href; 29 | 30 | if (item.element) { 31 | href = $(item.element).find('img').attr('src'); 32 | } 33 | 34 | if (!href && item.type === 'image' && item.href) { 35 | href = item.href; 36 | } 37 | 38 | return href; 39 | } 40 | }, 41 | 42 | wrap : null, 43 | list : null, 44 | width : 0, 45 | 46 | init: function (opts, obj) { 47 | var that = this, 48 | list, 49 | thumbWidth = opts.width, 50 | thumbHeight = opts.height, 51 | thumbSource = opts.source; 52 | 53 | //Build list structure 54 | list = ''; 55 | 56 | for (var n = 0; n < obj.group.length; n++) { 57 | list += '
  • '; 58 | } 59 | 60 | this.wrap = $('
    ').addClass(opts.position).appendTo('body'); 61 | this.list = $('
      ' + list + '
    ').appendTo(this.wrap); 62 | 63 | //Load each thumbnail 64 | $.each(obj.group, function (i) { 65 | var href = thumbSource( obj.group[ i ] ); 66 | 67 | if (!href) { 68 | return; 69 | } 70 | 71 | $("").load(function () { 72 | var width = this.width, 73 | height = this.height, 74 | widthRatio, heightRatio, parent; 75 | 76 | if (!that.list || !width || !height) { 77 | return; 78 | } 79 | 80 | //Calculate thumbnail width/height and center it 81 | widthRatio = width / thumbWidth; 82 | heightRatio = height / thumbHeight; 83 | 84 | parent = that.list.children().eq(i).find('a'); 85 | 86 | if (widthRatio >= 1 && heightRatio >= 1) { 87 | if (widthRatio > heightRatio) { 88 | width = Math.floor(width / heightRatio); 89 | height = thumbHeight; 90 | 91 | } else { 92 | width = thumbWidth; 93 | height = Math.floor(height / widthRatio); 94 | } 95 | } 96 | 97 | $(this).css({ 98 | width : width, 99 | height : height, 100 | top : Math.floor(thumbHeight / 2 - height / 2), 101 | left : Math.floor(thumbWidth / 2 - width / 2) 102 | }); 103 | 104 | parent.width(thumbWidth).height(thumbHeight); 105 | 106 | $(this).hide().appendTo(parent).fadeIn(300); 107 | 108 | }).attr('src', href); 109 | }); 110 | 111 | //Set initial width 112 | this.width = this.list.children().eq(0).outerWidth(true); 113 | 114 | this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); 115 | }, 116 | 117 | beforeLoad: function (opts, obj) { 118 | //Remove self if gallery do not have at least two items 119 | if (obj.group.length < 2) { 120 | obj.helpers.thumbs = false; 121 | 122 | return; 123 | } 124 | 125 | //Increase bottom margin to give space for thumbs 126 | obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); 127 | }, 128 | 129 | afterShow: function (opts, obj) { 130 | //Check if exists and create or update list 131 | if (this.list) { 132 | this.onUpdate(opts, obj); 133 | 134 | } else { 135 | this.init(opts, obj); 136 | } 137 | 138 | //Set active element 139 | this.list.children().removeClass('active').eq(obj.index).addClass('active'); 140 | }, 141 | 142 | //Center list 143 | onUpdate: function (opts, obj) { 144 | if (this.list) { 145 | this.list.stop(true).animate({ 146 | 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) 147 | }, 150); 148 | } 149 | }, 150 | 151 | beforeClose: function () { 152 | if (this.wrap) { 153 | this.wrap.remove(); 154 | } 155 | 156 | this.wrap = null; 157 | this.list = null; 158 | this.width = 0; 159 | } 160 | } 161 | 162 | }(jQuery)); -------------------------------------------------------------------------------- /src/main/resources/static/js/fancybox/jquery.fancybox.css: -------------------------------------------------------------------------------- 1 | /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 2 | .fancybox-wrap, 3 | .fancybox-skin, 4 | .fancybox-outer, 5 | .fancybox-inner, 6 | .fancybox-image, 7 | .fancybox-wrap iframe, 8 | .fancybox-wrap object, 9 | .fancybox-nav, 10 | .fancybox-nav span, 11 | .fancybox-tmp 12 | { 13 | padding: 0; 14 | margin: 0; 15 | border: 0; 16 | outline: none; 17 | vertical-align: top; 18 | } 19 | 20 | .fancybox-wrap { 21 | position: absolute; 22 | top: 0; 23 | left: 0; 24 | z-index: 8020; 25 | } 26 | 27 | .fancybox-skin { 28 | position: relative; 29 | background: #f9f9f9; 30 | color: #444; 31 | text-shadow: none; 32 | -webkit-border-radius: 4px; 33 | -moz-border-radius: 4px; 34 | border-radius: 4px; 35 | } 36 | 37 | .fancybox-opened { 38 | z-index: 8030; 39 | } 40 | 41 | .fancybox-opened .fancybox-skin { 42 | -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 43 | -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 44 | box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 45 | } 46 | 47 | .fancybox-outer, .fancybox-inner { 48 | position: relative; 49 | } 50 | 51 | .fancybox-inner { 52 | overflow: hidden; 53 | } 54 | 55 | .fancybox-type-iframe .fancybox-inner { 56 | -webkit-overflow-scrolling: touch; 57 | } 58 | 59 | .fancybox-error { 60 | color: #444; 61 | font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 62 | margin: 0; 63 | padding: 15px; 64 | white-space: nowrap; 65 | } 66 | 67 | .fancybox-image, .fancybox-iframe { 68 | display: block; 69 | width: 100%; 70 | height: 100%; 71 | } 72 | 73 | .fancybox-image { 74 | max-width: 100%; 75 | max-height: 100%; 76 | } 77 | 78 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 79 | background-image: url('fancybox_sprite.png'); 80 | } 81 | 82 | #fancybox-loading { 83 | position: fixed; 84 | top: 50%; 85 | left: 50%; 86 | margin-top: -22px; 87 | margin-left: -22px; 88 | background-position: 0 -108px; 89 | opacity: 0.8; 90 | cursor: pointer; 91 | z-index: 8060; 92 | } 93 | 94 | #fancybox-loading div { 95 | width: 44px; 96 | height: 44px; 97 | background: url('fancybox_loading.gif') center center no-repeat; 98 | } 99 | 100 | .fancybox-close { 101 | position: absolute; 102 | top: -18px; 103 | right: -18px; 104 | width: 36px; 105 | height: 36px; 106 | cursor: pointer; 107 | z-index: 8040; 108 | } 109 | 110 | .fancybox-nav { 111 | position: absolute; 112 | top: 0; 113 | width: 40%; 114 | height: 100%; 115 | cursor: pointer; 116 | text-decoration: none; 117 | background: transparent url('blank.gif'); /* helps IE */ 118 | -webkit-tap-highlight-color: rgba(0,0,0,0); 119 | z-index: 8040; 120 | } 121 | 122 | .fancybox-prev { 123 | left: 0; 124 | } 125 | 126 | .fancybox-next { 127 | right: 0; 128 | } 129 | 130 | .fancybox-nav span { 131 | position: absolute; 132 | top: 50%; 133 | width: 36px; 134 | height: 34px; 135 | margin-top: -18px; 136 | cursor: pointer; 137 | z-index: 8040; 138 | visibility: hidden; 139 | } 140 | 141 | .fancybox-prev span { 142 | left: 10px; 143 | background-position: 0 -36px; 144 | } 145 | 146 | .fancybox-next span { 147 | right: 10px; 148 | background-position: 0 -72px; 149 | } 150 | 151 | .fancybox-nav:hover span { 152 | visibility: visible; 153 | } 154 | 155 | .fancybox-tmp { 156 | position: absolute; 157 | top: -99999px; 158 | left: -99999px; 159 | visibility: hidden; 160 | max-width: 99999px; 161 | max-height: 99999px; 162 | overflow: visible !important; 163 | } 164 | 165 | /* Overlay helper */ 166 | 167 | .fancybox-lock { 168 | overflow: hidden !important; 169 | width: auto; 170 | } 171 | 172 | .fancybox-lock body { 173 | overflow: hidden !important; 174 | } 175 | 176 | .fancybox-lock-test { 177 | overflow-y: hidden !important; 178 | } 179 | 180 | .fancybox-overlay { 181 | position: absolute; 182 | top: 0; 183 | left: 0; 184 | overflow: hidden; 185 | display: none; 186 | z-index: 8010; 187 | background: url('fancybox_overlay.png'); 188 | } 189 | 190 | .fancybox-overlay-fixed { 191 | position: fixed; 192 | bottom: 0; 193 | right: 0; 194 | } 195 | 196 | .fancybox-lock .fancybox-overlay { 197 | overflow: auto; 198 | overflow-y: scroll; 199 | } 200 | 201 | /* Title helper */ 202 | 203 | .fancybox-title { 204 | visibility: hidden; 205 | font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 206 | position: relative; 207 | text-shadow: none; 208 | z-index: 8050; 209 | } 210 | 211 | .fancybox-opened .fancybox-title { 212 | visibility: visible; 213 | } 214 | 215 | .fancybox-title-float-wrap { 216 | position: absolute; 217 | bottom: 0; 218 | right: 50%; 219 | margin-bottom: -35px; 220 | z-index: 8050; 221 | text-align: center; 222 | } 223 | 224 | .fancybox-title-float-wrap .child { 225 | display: inline-block; 226 | margin-right: -100%; 227 | padding: 2px 20px; 228 | background: transparent; /* Fallback for web browsers that doesn't support RGBa */ 229 | background: rgba(0, 0, 0, 0.8); 230 | -webkit-border-radius: 15px; 231 | -moz-border-radius: 15px; 232 | border-radius: 15px; 233 | text-shadow: 0 1px 2px #222; 234 | color: #FFF; 235 | font-weight: bold; 236 | line-height: 24px; 237 | white-space: nowrap; 238 | } 239 | 240 | .fancybox-title-outside-wrap { 241 | position: relative; 242 | margin-top: 10px; 243 | color: #fff; 244 | } 245 | 246 | .fancybox-title-inside-wrap { 247 | padding-top: 10px; 248 | } 249 | 250 | .fancybox-title-over-wrap { 251 | position: absolute; 252 | bottom: 0; 253 | left: 0; 254 | color: #fff; 255 | padding: 10px; 256 | background: #000; 257 | background: rgba(0, 0, 0, .8); 258 | } 259 | 260 | /*Retina graphics!*/ 261 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 262 | only screen and (min--moz-device-pixel-ratio: 1.5), 263 | only screen and (min-device-pixel-ratio: 1.5){ 264 | 265 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 266 | background-image: url('fancybox_sprite@2x.png'); 267 | background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/ 268 | } 269 | 270 | #fancybox-loading div { 271 | background-image: url('fancybox_loading@2x.gif'); 272 | background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/ 273 | } 274 | } -------------------------------------------------------------------------------- /src/main/resources/static/js/header.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | 3 | 4 | });//ready 5 | 6 | 7 | function loginUser() 8 | { 9 | $("#btnLogin").attr("disabled", "true"); 10 | var username = $("#txtUsername").val(); 11 | var password = $("#txtPassword").val(); 12 | 13 | var info = encodeURI("username="+username+"&password="+password); 14 | var uri = encodeURI(contextPath+"login"); 15 | 16 | $.ajax({ 17 | type: "GET", 18 | url: uri, 19 | data: info, 20 | success: function(data){ 21 | 22 | if(data.success) 23 | window.location = contextPath+"admin/"; 24 | else 25 | alert(data.message); 26 | 27 | $("#btnLogin").removeAttr('disabled'); 28 | 29 | } 30 | }); 31 | } 32 | 33 | 34 | function fireLoginUser(e) 35 | { 36 | var key = e.which||e.keyCode; 37 | 38 | if(key == 13){ 39 | $("#btnLogin").click(); 40 | } 41 | 42 | } 43 | 44 | function logoutUser() 45 | { 46 | 47 | var uri = encodeURI(contextPath+"logout"); 48 | 49 | $("#btnLogout").attr("disabled", "true"); 50 | 51 | $.ajax({ 52 | type: "GET", 53 | url: uri, 54 | data: "", 55 | success: function(data){ 56 | 57 | $("#btnLogout").removeAttr('disabled'); 58 | 59 | if(data.success) 60 | window.location = contextPath; 61 | else 62 | alert(data.message); 63 | } 64 | }); 65 | } -------------------------------------------------------------------------------- /src/main/resources/static/js/index.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(document).ready(function(){ 5 | 6 | 7 | 8 | });//ready 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_glass_0_f3f1f1_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_glass_0_f3f1f1_1x400.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_glass_80_e3eaf7_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_glass_80_e3eaf7_1x400.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_0_2C3E50_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_0_2C3E50_1x100.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery.mousewheel-3.0.6.pack.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) 2 | * Licensed under the MIT License (LICENSE.txt). 3 | * 4 | * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 5 | * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 6 | * Thanks to: Seamus Leahy for adding deltaX and deltaY 7 | * 8 | * Version: 3.0.6 9 | * 10 | * Requires: 1.2.2+ 11 | */ 12 | (function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]= 13 | d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); -------------------------------------------------------------------------------- /src/main/resources/static/js/server.js: -------------------------------------------------------------------------------- 1 | var interval = null; 2 | 3 | $(document).ready(function(){ 4 | 5 | interval = setInterval(updateDiv,1000); 6 | //getSeries(); 7 | 8 | });//ready 9 | 10 | function updateDiv(){ 11 | 12 | var uri = encodeURI(contextPath+"live"); 13 | $.ajax({ 14 | type: "GET", 15 | url: uri, 16 | data: null, 17 | success: function(data){ 18 | $('#divLive').html(data.message); 19 | }, 20 | error: function(){ 21 | clearInterval(interval); // stop the interval 22 | $('#divLive').html('Connection problems'); 23 | } 24 | }); 25 | } 26 | 27 | 28 | function getSeries(){ 29 | 30 | var uri = encodeURI(contextPath+"entities"); 31 | $.ajax({ 32 | type: "GET", 33 | url: uri, 34 | data: null, 35 | dataType: 'json', 36 | cache: false, 37 | success: function(data,status){ 38 | 39 | $.each(data.patients, function( index, value ) { 40 | console.log( index + ": " + value ); 41 | }); 42 | 43 | } 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/default-dark/32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/default-dark/32px.png -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/default-dark/40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/default-dark/40px.png -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/default-dark/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/default-dark/throbber.gif -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/default/32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/default/32px.png -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/default/40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/default/40px.png -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/default/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/default/throbber.gif -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/proton/30px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/proton/30px.png -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/proton/32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/proton/32px.png -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-bold-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-bold-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-bold-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-regular-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-regular-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/proton/fonts/titillium/titilliumweb-regular-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/js/vakata-jstree/dist/themes/proton/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mehmetsen80/EasyPACS/a5205c5551f8d9025c7bb75a6ccf2700a25a40b8/src/main/resources/static/js/vakata-jstree/dist/themes/proton/throbber.gif -------------------------------------------------------------------------------- /src/main/resources/static/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 |

    Navigation Front Page (Static)

    9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/templates/details.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Patient Details 5 | 6 | 7 | 8 | 9 | 10 |
    11 | 12 |
    13 | 16 | 17 |
    18 | 19 |
    20 | 21 |
    22 |
    23 |

    Entities

    24 |
    25 |
    26 | 27 | 28 |
    29 | 30 |
      31 |
    • 32 |
        33 |
      • 34 | 35 |
          36 |
        • 37 | 38 |
            39 |
          • 40 |
          41 |
        • 42 |
        43 |
      • 44 |
      45 |
    • 46 |
    47 |
    48 | 49 | 50 |
    51 |
    52 | 53 | 54 |
    55 |
    56 |

    Details

    57 |
    58 |
    59 |
    60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
    Patient
    Patient Name
    Patient ID
    Patient Sex
    Patient Age
    69 |
    70 | 71 | 72 |
    73 | 74 |
    75 | 76 |
    77 | 78 |
    79 | 80 |
    81 |
    82 |
    83 | 84 | 85 |
    86 | 87 |
    88 |
    89 | 94 |
    95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 149 | 150 | 151 |
    Patient
    107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 144 | 145 | 146 |
    Study
    118 |
    119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 139 | 140 | 141 |
    Series
    129 |
    130 | 132 | 133 | 134 | 135 |
    136 |
    137 | 138 |
    142 |
    143 |
    147 | 148 |
    152 | 153 | 154 |
    155 |
    156 |

    To do

    157 |
    158 |
    159 |

    To do

    160 |
    161 |
    162 | 163 |
    164 | 165 | 166 | 167 |
    168 | 169 | 170 | 171 | 172 | 173 |
    174 |
    175 | 176 |
    177 | 178 | 179 | -------------------------------------------------------------------------------- /src/main/resources/templates/fragments/footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/templates/fragments/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 | 5 | 6 | 7 | 8 | 68 | 69 | 70 | 71 | 72 |
    73 | 74 | 75 | -------------------------------------------------------------------------------- /src/main/resources/templates/fragments/pager.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Home Page 5 | 6 | 7 | 8 | 9 | 10 | 11 | hello world 12 | 13 |
    14 | 15 |
    16 |

    Easy PACS Repository

    17 |

    Easiest way to store and view Dicom Files

    18 |  Download Easy PACS 0.1v 19 |  Go to GitHub for Source Code 20 |
    21 | 22 | 23 |
    24 |

    Easy PACS

    25 |
    26 | 27 | 28 |
    29 |
    30 | 31 | Settings 32 | 33 |

    PACS Server

    34 |

    Easy PACS comes with a dicom listener that receives the dicom files and make them available online by converting them into jpeg image files. Please test the server with the latest version of

    35 | View 36 |
    37 |
    38 | 39 | Dicom Viewer 40 | 41 |

    Dicom Viewer

    42 |

    Lorem ipsum dolor sit amet, consectur adipiscing elit. Nunc suscipit convallis nisl, eget rutru lectues commodo at. Pellentesque mattis justo vel augue pretium euismod. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce eu turpis eros.

    43 | View 44 |
    45 |
    46 | 47 | Reports 48 | 49 |

    Reports

    50 |

    Lorem ipsum dolor sit amet, consectur adipiscing elit. Nunc suscipit convallis nisl, eget rutru lectues commodo at. Pellentesque mattis justo vel augue pretium euismod. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce eu turpis eros.

    51 | View 52 |
    53 |
    54 |
    55 |
    56 | 57 | 58 | -------------------------------------------------------------------------------- /src/main/resources/templates/layout/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Easy PACS 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 |
    73 |
    74 | 75 |
    76 |
    77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/main/resources/templates/server.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Dicom Server 5 | 6 | 7 | 8 | 9 | 10 |
    11 | 12 |
    13 | 17 | 18 |
    19 |
    20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
    Patients
    Pk Patient IdPatient NamePatient IDSexAgeCreated DateModified Date
    No patients found
    51 | 52 |
    53 | 54 |
    55 |
    56 | 57 | 58 | 59 |
    60 | 61 |
    62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/main/resources/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Lookup Patient 5 | 6 | 7 | 8 | 9 | 10 |
    11 | 12 |
    13 | 16 |
    17 | 18 |

    Lorem ipsum dolor sit amet, consectur adipiscing elit. Nunc suscipit convallis nisl, eget rutru lectues commodo at. Pellentesque mattis justo vel augue pretium euismod. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce eu turpis eros.

    19 |

    Features

    20 |
      21 |
    • Bootstrap 3
    • 22 |
    • Fully responsive
    • 23 |
    • One page scroll design
    • 24 |
    • HTML5 and CSS3
    • 25 |
    • Font Awesome Icons
    • 26 |
    • Google Web Fonts
    • 27 |
    28 |
    29 |
    30 |
    31 |
    32 |

    Theme Author

    33 |
    34 |
    35 | 36 |
    37 |
    38 |
    39 | 40 |
    41 | 42 |
    43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/main/resources/templates/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 |

    9 | 10 | -------------------------------------------------------------------------------- /src/test/java/org/easy/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package org.easy; 2 | 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import javax.persistence.EntityManagerFactory; 8 | import javax.sql.DataSource; 9 | 10 | import org.easy.handler.IncomingFileHandler; 11 | import org.easy.server.DicomServer; 12 | import org.slf4j.Logger; 13 | import org.slf4j.LoggerFactory; 14 | import org.springframework.beans.factory.annotation.Value; 15 | import org.springframework.boot.SpringApplication; 16 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 17 | import org.springframework.boot.autoconfigure.SpringBootApplication; 18 | import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; 19 | import org.springframework.boot.context.properties.ConfigurationProperties; 20 | 21 | 22 | import org.springframework.context.annotation.Bean; 23 | import org.springframework.context.annotation.ComponentScan; 24 | import org.springframework.context.annotation.Configuration; 25 | import org.springframework.context.annotation.Primary; 26 | import org.springframework.context.annotation.PropertySource; 27 | import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; 28 | import org.springframework.data.jpa.repository.config.EnableJpaRepositories; 29 | import org.springframework.orm.jpa.JpaTransactionManager; 30 | import org.springframework.orm.jpa.JpaVendorAdapter; 31 | import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; 32 | import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; 33 | import org.springframework.transaction.PlatformTransactionManager; 34 | import org.springframework.transaction.annotation.EnableTransactionManagement; 35 | 36 | import com.google.common.eventbus.AsyncEventBus; 37 | import com.google.common.eventbus.EventBus; 38 | 39 | 40 | 41 | @Configuration 42 | @ComponentScan 43 | @EnableAutoConfiguration 44 | @EnableTransactionManagement 45 | @EnableJpaRepositories(basePackages = {"org.easy.dao"}) // The package where dao classes reside 46 | @SpringBootApplication 47 | @PropertySource("classpath:application.properties") 48 | public class ApplicationTest { 49 | 50 | private static final Logger LOG = LoggerFactory.getLogger(ApplicationTest.class); 51 | 52 | public static void main(String[] args) { 53 | 54 | SpringApplication app = new SpringApplication(Application.class); 55 | app.setShowBanner(false); 56 | app.setWebEnvironment(true); 57 | app.run(args); 58 | 59 | LOG.info("Welcome to EasyPACS!"); 60 | } 61 | 62 | 63 | /************************** Handler for incoming files works with asynchronous event bus initiated by the DicomServer ****************************/ 64 | @Bean // only one incoming file handler. Even we have multiple DicomServer instances, they all forward files to the same handler... 65 | public IncomingFileHandler incomingFileHandler(){ 66 | return new IncomingFileHandler(); 67 | } 68 | 69 | @Bean //Guava asynch event bus that initiates 100 fixed thread pool 70 | public EventBus asyncEventBus(){ 71 | EventBus eventBus = new AsyncEventBus(java.util.concurrent.Executors.newFixedThreadPool(100)); 72 | return eventBus; 73 | } 74 | 75 | @Bean //dicom server takes storage output directory, ae title and ports. Server listens same number of ports with same ae title 76 | public Map dicomServers(@Value("${pacs.storage.dcm}") String storageDir, @Value("${pacs.aetitle}") String aeTitle, @Value("#{'${pacs.ports}'.split(',')}") List ports){ 77 | Map dicomServers = new HashMap<>(); 78 | for (int port:ports) { 79 | dicomServers.put("DICOM_SERVER_AT_" + port, DicomServer.init(null, port, aeTitle, storageDir, asyncEventBus())); 80 | } 81 | return dicomServers; 82 | } 83 | /************************** End of Handler for incoming files works with asynchronous event bus initiated by the DicomServer ****************************/ 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | /************************************************** Database JPA and Hibernate Settings ********************************************************/ 92 | @Bean //Creating and registering in spring context an entityManager 93 | public LocalContainerEntityManagerFactoryBean entityManagerFactory() { 94 | LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean(); 95 | em.setDataSource(primaryDataSource()); 96 | em.setPersistenceUnitName("dbdicom"); 97 | em.setPackagesToScan(new String[]{"org.easy.entity"}); // package where are the @Entity classes are located, usually your domain package 98 | JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter(); // JPA implementation 99 | em.setJpaVendorAdapter(vendorAdapter); 100 | 101 | return em; 102 | } 103 | 104 | @Bean 105 | @Primary //configure the primary database 106 | @ConfigurationProperties(prefix="datasource.primary") 107 | public DataSource primaryDataSource() { 108 | return DataSourceBuilder.create().build(); 109 | } 110 | 111 | @Bean //Configuring the transactionManager 112 | public PlatformTransactionManager transactionManager(EntityManagerFactory emf) { 113 | JpaTransactionManager transactionManager = new JpaTransactionManager(); 114 | transactionManager.setEntityManagerFactory(emf); 115 | return transactionManager; 116 | } 117 | 118 | @Bean 119 | public PersistenceExceptionTranslationPostProcessor exceptionTranslation() { 120 | return new PersistenceExceptionTranslationPostProcessor(); 121 | } 122 | 123 | /************************************************* End of Database JPA and Hibernate Settings ********************************************************/ 124 | 125 | 126 | } 127 | -------------------------------------------------------------------------------- /src/test/java/org/easy/ConnectionTest.java: -------------------------------------------------------------------------------- 1 | package org.easy; 2 | 3 | import java.sql.Connection; 4 | import java.sql.DriverManager; 5 | import java.sql.SQLException; 6 | 7 | import javax.transaction.Transactional; 8 | 9 | import junit.framework.TestCase; 10 | 11 | import org.junit.Ignore; 12 | import org.junit.Test; 13 | import org.junit.runner.RunWith; 14 | import org.slf4j.Logger; 15 | import org.slf4j.LoggerFactory; 16 | import org.springframework.boot.test.SpringApplicationConfiguration; 17 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 18 | import org.springframework.test.context.web.WebAppConfiguration; 19 | 20 | @Ignore 21 | @Transactional 22 | @RunWith(SpringJUnit4ClassRunner.class) 23 | @SpringApplicationConfiguration(classes = ApplicationTest.class) 24 | @WebAppConfiguration 25 | public class ConnectionTest extends TestCase{ 26 | 27 | private static final Logger LOG = LoggerFactory.getLogger(ConnectionTest.class); 28 | 29 | @Ignore 30 | @Test 31 | public void testMySQL(){ 32 | 33 | LOG.info("-------- MySQL JDBC Connection Testing ------------"); 34 | 35 | try { 36 | Class.forName("com.mysql.jdbc.Driver"); 37 | } catch (ClassNotFoundException e) { 38 | LOG.error("Where is your MySQL JDBC Driver? {}",e.getMessage()); 39 | return; 40 | } 41 | 42 | LOG.info("MySQL JDBC Driver Registered!"); 43 | Connection connection = null; 44 | 45 | try { 46 | connection = DriverManager 47 | .getConnection("jdbc:mysql://54.149.87.48:3306/dbdicom","dbdcmusr", "b9jHmY8LSH3yTcd9"); 48 | 49 | } catch (SQLException e) { 50 | LOG.error("Connection Failed! Check output console: {}",e.getMessage()); 51 | return; 52 | } 53 | 54 | if (connection != null) { 55 | LOG.info("You made it, take control your database now!"); 56 | } else { 57 | LOG.error("Failed to make connection!"); 58 | } 59 | } 60 | 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/test/java/org/easy/DBServiceTest.java: -------------------------------------------------------------------------------- 1 | package org.easy; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | 6 | import javax.transaction.Transactional; 7 | 8 | import junit.framework.TestCase; 9 | 10 | import org.easy.dao.EquipmentDao; 11 | import org.easy.dao.InstanceDao; 12 | import org.easy.server.DicomReader; 13 | import org.easy.service.DBService; 14 | import org.junit.Ignore; 15 | import org.junit.Test; 16 | import org.junit.runner.RunWith; 17 | import org.slf4j.Logger; 18 | import org.slf4j.LoggerFactory; 19 | import org.springframework.beans.factory.annotation.Autowired; 20 | import org.springframework.boot.test.SpringApplicationConfiguration; 21 | import org.springframework.test.annotation.Rollback; 22 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 23 | import org.springframework.test.context.web.WebAppConfiguration; 24 | 25 | @Ignore 26 | @Transactional 27 | @RunWith(SpringJUnit4ClassRunner.class) 28 | @SpringApplicationConfiguration(classes = ApplicationTest.class) 29 | @WebAppConfiguration 30 | public class DBServiceTest extends TestCase{ 31 | 32 | private static final Logger LOG = LoggerFactory.getLogger(DBServiceTest.class); 33 | 34 | @Autowired 35 | InstanceDao instanceDao; 36 | 37 | @Autowired 38 | EquipmentDao equipmentDao; 39 | 40 | @Autowired 41 | DBService dbService; 42 | 43 | @Ignore 44 | @Test 45 | @Rollback(false) 46 | public void testSingleInstanceDicomObject(){ 47 | 48 | //File file = new File("C:/Temp/1.3.12.2.1107.5.1.4.65710.30000014053020082123400002087"); 49 | File file = new File("C:/Temp/159.150.226.197_1.3.12.2.1107.5.1.4.55292.30000015032113073778100003743"); 50 | 51 | 52 | DicomReader dicomReader = null; 53 | try { 54 | dicomReader = new DicomReader(file); 55 | LOG.info(dicomReader.toString()); 56 | dbService.buildEntities(dicomReader); 57 | 58 | } catch (IOException e) { 59 | LOG.error(e.getMessage()); 60 | } 61 | } 62 | 63 | 64 | @Ignore 65 | @Test 66 | @Rollback(false) 67 | public void testBuildEntities(){ 68 | 69 | File folder = new File("C:/Temp/MARTIN^ZANE^_WM00227587_03-21-2015-20-39-01_2.16.840.1.114151.4.887.42082.8558.2202495/"); 70 | //File folder = new File("C:/Temp/test2/"); 71 | 72 | try{ 73 | if(folder.isDirectory()){ 74 | Integer row = 0; 75 | for(File file : folder.listFiles()){ 76 | DicomReader dicomReader = new DicomReader(file); 77 | dbService.buildEntities(dicomReader); 78 | LOG.info("{}- {} saved successfully!", ++row, file.getName()); 79 | } 80 | } 81 | } catch (IOException e) { 82 | LOG.error(e.getMessage()); 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/test/java/org/easy/Dcm2JpegTest.java: -------------------------------------------------------------------------------- 1 | package org.easy; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | 6 | import junit.framework.TestCase; 7 | 8 | import org.dcm4che3.tool.dcm2jpg.Dcm2Jpg; 9 | import org.junit.Ignore; 10 | import org.junit.Test; 11 | import org.junit.runner.RunWith; 12 | import org.slf4j.Logger; 13 | import org.slf4j.LoggerFactory; 14 | import org.springframework.boot.test.SpringApplicationConfiguration; 15 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 16 | import org.springframework.test.context.web.WebAppConfiguration; 17 | 18 | @RunWith(SpringJUnit4ClassRunner.class) 19 | @SpringApplicationConfiguration(classes = ApplicationTest.class) 20 | @WebAppConfiguration 21 | public class Dcm2JpegTest extends TestCase{ 22 | 23 | private static final Logger LOG = LoggerFactory.getLogger(Dcm2JpegTest.class); 24 | 25 | @Ignore 26 | @Test 27 | public void test2Jpeg() throws IOException{ 28 | 29 | try{ 30 | 31 | File src = new File("C:/Users/mehmet/Documents/workspace-sts-3.6.0.RELEASE/EasyPACS/tmp/dcm/1.3.12.2.1107.5.1.4.39115.30000014103112592382800014368.dcm"); 32 | File dest = new File("C:/Temp/1.3.12.2.1107.5.1.4.39115.30000014103112592382800014368.jpg"); 33 | 34 | Dcm2Jpg dcm2jpg = new Dcm2Jpg(); 35 | dcm2jpg.initImageWriter("JPEG", null, null, null, null); 36 | dcm2jpg.convert(src, dest); 37 | assertTrue(dest.exists()); 38 | 39 | }catch(IOException e){ 40 | LOG.error(e.getMessage()); 41 | }catch(Exception e){ 42 | LOG.error(e.getMessage()); 43 | } 44 | } 45 | 46 | @Test 47 | @Ignore 48 | public void testJavaEnv(){ 49 | 50 | LOG.info("Java Library Path: {}", System.getProperty("java.library.path")); 51 | LOG.info("Java Temp Dir: {}", System.getProperty("java.io.tmpdir")); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/test/java/org/easy/DicomReaderTest.java: -------------------------------------------------------------------------------- 1 | package org.easy; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | 6 | import junit.framework.TestCase; 7 | 8 | import org.easy.server.DicomReader; 9 | import org.junit.Ignore; 10 | import org.junit.Test; 11 | import org.junit.runner.RunWith; 12 | import org.slf4j.Logger; 13 | import org.slf4j.LoggerFactory; 14 | import org.springframework.boot.test.SpringApplicationConfiguration; 15 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 16 | import org.springframework.test.context.web.WebAppConfiguration; 17 | 18 | @Ignore 19 | @RunWith(SpringJUnit4ClassRunner.class) 20 | @SpringApplicationConfiguration(classes = ApplicationTest.class) 21 | @WebAppConfiguration 22 | public class DicomReaderTest extends TestCase{ 23 | 24 | private static final Logger LOG = LoggerFactory.getLogger(DicomReaderTest.class); 25 | 26 | 27 | @Ignore 28 | @Test 29 | public void testReader(){ 30 | 31 | File file = new File("C:/Temp/159.150.226.197_1.3.12.2.1107.5.1.4.55292.30000015032113073778100003743"); 32 | 33 | DicomReader dicomReader = null; 34 | try { 35 | dicomReader = new DicomReader(file); 36 | LOG.info(dicomReader.toString()); 37 | 38 | } catch (IOException e) { 39 | LOG.error(e.getMessage()); 40 | } 41 | } 42 | 43 | @Ignore 44 | @Test 45 | public void testStudyFolderForDifferentSeries(){ 46 | 47 | File folder = new File("C:/Temp/MARTIN^ZANE^_WM00227587_03-21-2015-20-39-01_2.16.840.1.114151.4.887.42082.8558.2202495/"); 48 | 49 | DicomReader dicomReader = null; 50 | 51 | try{ 52 | if(folder.isDirectory()){ 53 | Integer row = 0; 54 | for(File file : folder.listFiles()){ 55 | dicomReader = new DicomReader(file); 56 | LOG.info("{}- MS SOP InstanceUID: {} Study Instance UID: {} Series Instance UID: {} Series Number: {}", ++row, dicomReader.getMediaStorageSopInstanceUID(), dicomReader.getSeriesInstanceUID(), dicomReader.getSeriesInstanceUID(), dicomReader.getSeriesNumber()); 57 | } 58 | } 59 | } catch (IOException e) { 60 | LOG.error(e.getMessage()); 61 | } 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/test/java/org/easy/EquipmentTest.java: -------------------------------------------------------------------------------- 1 | package org.easy; 2 | 3 | import javax.transaction.Transactional; 4 | 5 | import junit.framework.TestCase; 6 | 7 | import org.easy.dao.EquipmentDao; 8 | import org.easy.entity.Equipment; 9 | import org.junit.Ignore; 10 | import org.junit.Test; 11 | import org.junit.runner.RunWith; 12 | import org.slf4j.Logger; 13 | import org.slf4j.LoggerFactory; 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.boot.test.SpringApplicationConfiguration; 16 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 17 | import org.springframework.test.context.web.WebAppConfiguration; 18 | 19 | @Ignore 20 | @Transactional 21 | @RunWith(SpringJUnit4ClassRunner.class) 22 | @SpringApplicationConfiguration(classes = ApplicationTest.class) 23 | @WebAppConfiguration 24 | public class EquipmentTest extends TestCase{ 25 | 26 | private static final Logger LOG = LoggerFactory.getLogger(EquipmentTest.class); 27 | 28 | @Autowired 29 | EquipmentDao equipmentDao; 30 | 31 | @Ignore 32 | @Test 33 | public void testfindByPKTBLSeriesID(){ 34 | 35 | Equipment equipment = equipmentDao.findByPkTBLSeriesID(3L); 36 | assertNotNull(equipment); 37 | LOG.info(equipment.toString()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/test/java/org/easy/InstanceTest.java: -------------------------------------------------------------------------------- 1 | package org.easy; 2 | 3 | import java.util.Calendar; 4 | import java.util.List; 5 | 6 | import javax.transaction.Transactional; 7 | 8 | import junit.framework.TestCase; 9 | 10 | import org.easy.dao.EquipmentDao; 11 | import org.easy.dao.InstanceDao; 12 | import org.easy.entity.Equipment; 13 | import org.easy.entity.Instance; 14 | import org.easy.entity.Patient; 15 | import org.easy.entity.Series; 16 | import org.easy.entity.Study; 17 | import org.easy.service.DBService; 18 | import org.junit.Ignore; 19 | import org.junit.Test; 20 | import org.junit.runner.RunWith; 21 | import org.slf4j.Logger; 22 | import org.slf4j.LoggerFactory; 23 | import org.springframework.beans.factory.annotation.Autowired; 24 | import org.springframework.boot.test.SpringApplicationConfiguration; 25 | import org.springframework.test.annotation.Rollback; 26 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 27 | import org.springframework.test.context.web.WebAppConfiguration; 28 | 29 | @Transactional 30 | @RunWith(SpringJUnit4ClassRunner.class) 31 | @SpringApplicationConfiguration(classes = ApplicationTest.class) 32 | @WebAppConfiguration 33 | public class InstanceTest extends TestCase{ 34 | 35 | private static final Logger LOG = LoggerFactory.getLogger(InstanceTest.class); 36 | 37 | @Autowired 38 | InstanceDao instanceDao; 39 | 40 | @Autowired 41 | EquipmentDao equipmentDao; 42 | 43 | @Autowired 44 | DBService dbService; 45 | 46 | @Ignore 47 | @Test 48 | public void testList() 49 | { 50 | List instances = instanceDao.findAll(1,10); 51 | 52 | if(instances.size() <= 0){ 53 | LOG.info("no instances found!"); 54 | }else{ 55 | for(Instance instance : instances){ 56 | //print instance 57 | LOG.info("instance: {}", instance); 58 | //get series 59 | Series series = instance.getSeries(); 60 | LOG.info("series: {}", series.toString()); 61 | //get study 62 | Study study = series.getStudy(); 63 | LOG.info("study: {}", study.toString()); 64 | //get patient 65 | Patient patient = study.getPatient(); 66 | LOG.info("patient: {}", patient.toString()); 67 | } 68 | } 69 | } 70 | 71 | @Ignore 72 | @Test 73 | public void testfindBySopInstanceUID(){ 74 | 75 | Instance instance = instanceDao.findBySopInstanceUID("1.3.12.2.1107.5.1.4.55292.30000015032113073778100003751"); 76 | assertNotNull(instance); 77 | LOG.info(instance.toString()); 78 | instance = instanceDao.findBySopInstanceUID("1.3.12.2.1107.5.1.4.55292.3000001503211307377810000375188888888"); 79 | assertNull(instance); 80 | } 81 | 82 | @Test 83 | @Ignore 84 | public void testFindByPKTBLSeriesID(){ 85 | 86 | List instances = instanceDao.findByPkTBLSeriesID(1L); 87 | 88 | for(Instance instance : instances){ 89 | //print instance 90 | LOG.info("instance: {}", instance); 91 | //get series 92 | Series series = instance.getSeries(); 93 | LOG.info("series: {}", series.toString()); 94 | //get study 95 | Study study = series.getStudy(); 96 | LOG.info("study: {}", study.toString()); 97 | //get patient 98 | Patient patient = study.getPatient(); 99 | LOG.info("patient: {}", patient.toString()); 100 | 101 | LOG.info("-----------------------------------------------------------------------------------------------------------------"); 102 | } 103 | } 104 | 105 | @Ignore 106 | @Test 107 | @Rollback(false) 108 | public void testInstanceObject(){ 109 | 110 | Instance instance = new Instance(); 111 | instance.setKvp("8"); 112 | instance.setPixelSpacing(2.56f); 113 | instance.setInstanceNumber(1); 114 | instance.setImageType("CT Image"); 115 | 116 | Series series = new Series(); 117 | series.setOperatorsName("Elizabeth Uranus"); 118 | series.setSeriesNumber(1); 119 | series.setSeriesDescription("CT Image with over 100 images"); 120 | 121 | 122 | Study study = new Study(); 123 | study.setReferringPhysicianName("Anderson Yola"); 124 | study.setStudyID("4593DB"); 125 | study.setStudyDateTime(Calendar.getInstance().getTime()); 126 | 127 | 128 | Patient patient = new Patient(); 129 | patient.setPatientID("451123"); 130 | patient.setPatientName("Nomine^Alerta"); 131 | patient.setPatientAge("45F"); 132 | patient.setPatientSex("F"); 133 | patient.setPatientBirthday(Calendar.getInstance().getTime()); 134 | 135 | study.setPatient(patient); 136 | series.setStudy(study); 137 | instance.setSeries(series); 138 | 139 | //IDs start as null 140 | assertEquals((Long) null, instance.getPkTBLInstanceID()); 141 | assertEquals((Long) null, series.getPkTBLSeriesID()); 142 | assertEquals((Long) null, study.getPkTBLStudyID()); 143 | assertEquals((Long) null, patient.getPkTBLPatientID()); 144 | 145 | 146 | testList(); 147 | instanceDao.save(instance); 148 | 149 | assertNotNull(instance.getPkTBLInstanceID()); 150 | assertNotNull(series.getPkTBLSeriesID()); 151 | assertNotNull(study.getPkTBLStudyID()); 152 | assertNotNull(patient.getPkTBLPatientID()); 153 | 154 | //you need to test Equipment separately because it is one-To-One 155 | Equipment equipment = new Equipment(); 156 | equipment.setInstitutionName("St. Vincent"); 157 | equipment.setDeviceSerialNumber("897423587"); 158 | equipment.setInstitutionalDepartmentName("Radiology Clinic"); 159 | equipment.setModality("CT"); 160 | equipment.setSeries(series);//set the Series to Equipment because we now have the pkTBLSeriesID 161 | 162 | //ID starts as null 163 | assertEquals((Long) null, equipment.getPkTBLEquipmentID()); 164 | equipmentDao.save(equipment);//save Equipment here after you get the pkTBLSeriesID 165 | assertNotNull(equipment.getPkTBLEquipmentID()); 166 | 167 | testList(); 168 | } 169 | 170 | @Ignore 171 | @Test 172 | public void testAllInstancesByPatientID(){ 173 | 174 | List instances = instanceDao.findAllByPkTBLPatientID(2L); 175 | assertEquals(0, instances.size()); 176 | 177 | instances = instanceDao.findAllByPkTBLPatientID(1L); 178 | assertTrue(instances.size() > 0); 179 | 180 | int i=0; 181 | for(Instance instance : instances){ 182 | //print instance 183 | LOG.info(++i + "- instance: {}", instance); 184 | //get series 185 | Series series = instance.getSeries(); 186 | LOG.info("series: {}", series.toString()); 187 | //get study 188 | Study study = series.getStudy(); 189 | LOG.info("study: {}", study.toString()); 190 | //get patient 191 | Patient patient = study.getPatient(); 192 | LOG.info("patient: {}", patient.toString()); 193 | } 194 | 195 | if(i==0) 196 | LOG.info("No instance found!"); 197 | } 198 | 199 | } 200 | -------------------------------------------------------------------------------- /src/test/java/org/easy/PatientTest.java: -------------------------------------------------------------------------------- 1 | package org.easy; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Calendar; 5 | import java.util.List; 6 | 7 | import javax.transaction.Transactional; 8 | 9 | import org.easy.dao.PatientDao; 10 | import org.easy.entity.Patient; 11 | import org.easy.entity.Study; 12 | import org.junit.Ignore; 13 | import org.junit.Test; 14 | import org.junit.runner.RunWith; 15 | import org.slf4j.Logger; 16 | import org.slf4j.LoggerFactory; 17 | import org.springframework.beans.factory.annotation.Autowired; 18 | import org.springframework.boot.test.SpringApplicationConfiguration; 19 | import org.springframework.test.annotation.Rollback; 20 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 21 | import org.springframework.test.context.web.WebAppConfiguration; 22 | 23 | import junit.framework.TestCase; 24 | 25 | @Ignore 26 | @Transactional 27 | @RunWith(SpringJUnit4ClassRunner.class) 28 | @SpringApplicationConfiguration(classes = ApplicationTest.class) 29 | @WebAppConfiguration 30 | public class PatientTest extends TestCase{ 31 | 32 | private static final Logger LOG = LoggerFactory.getLogger(PatientTest.class); 33 | 34 | @Autowired 35 | PatientDao patientDao; 36 | 37 | 38 | @Ignore 39 | @Test 40 | public void testList(){ 41 | 42 | List patients = patientDao.findAll(1,10); 43 | 44 | LOG.info("-----------------------------------------------------------------------------------------------------------------"); 45 | 46 | for(Patient p : patients){ 47 | LOG.info(p.toString()); 48 | } 49 | 50 | LOG.info("-----------------------------------------------------------------------------------------------------------------"); 51 | 52 | } 53 | 54 | @Ignore 55 | @Test 56 | @Rollback(false) 57 | public void testPatientObject(){ 58 | 59 | Patient p = new Patient(); 60 | p.setPatientID("TA147216"); 61 | p.setPatientName("Adam^Clay"); 62 | p.setPatientAge("49Y"); 63 | p.setPatientSex("M"); 64 | p.setPatientBirthday(Calendar.getInstance().getTime()); 65 | 66 | Study study = new Study(); 67 | study.setReferringPhysicianName("Holy Brown"); 68 | study.setStudyID("A114297"); 69 | study.setStudyDateTime(Calendar.getInstance().getTime()); 70 | 71 | List studies = new ArrayList(); 72 | studies.add(study); 73 | p.setStudy(studies);//this won't save because Study is only a collection mapped by Study not Patient object! 74 | patientDao.save(p); 75 | LOG.info(p.toString()); 76 | study = ((List) p.getStudy()).get(0); 77 | assertEquals((Long) null, study.getPkTBLStudyID()); 78 | 79 | testList(); 80 | } 81 | 82 | @Test 83 | public void testfindByPatientID(){ 84 | 85 | Patient patient = patientDao.findByPatientID("WM002275878"); 86 | assertNotNull(patient); 87 | LOG.info(patient.toString()); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/test/java/org/easy/SeriesTest.java: -------------------------------------------------------------------------------- 1 | package org.easy; 2 | 3 | import java.util.Calendar; 4 | import java.util.List; 5 | 6 | import javax.transaction.Transactional; 7 | 8 | import junit.framework.TestCase; 9 | 10 | import org.easy.dao.EquipmentDao; 11 | import org.easy.dao.SeriesDao; 12 | import org.easy.entity.Equipment; 13 | import org.easy.entity.Patient; 14 | import org.easy.entity.Series; 15 | import org.easy.entity.Study; 16 | import org.junit.Ignore; 17 | import org.junit.Test; 18 | import org.junit.runner.RunWith; 19 | import org.slf4j.Logger; 20 | import org.slf4j.LoggerFactory; 21 | import org.springframework.beans.factory.annotation.Autowired; 22 | import org.springframework.boot.test.SpringApplicationConfiguration; 23 | import org.springframework.test.annotation.Rollback; 24 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 25 | import org.springframework.test.context.web.WebAppConfiguration; 26 | 27 | 28 | @Transactional 29 | @RunWith(SpringJUnit4ClassRunner.class) 30 | @SpringApplicationConfiguration(classes = ApplicationTest.class) 31 | @WebAppConfiguration 32 | public class SeriesTest extends TestCase{ 33 | 34 | private static final Logger LOG = LoggerFactory.getLogger(SeriesTest.class); 35 | 36 | @Autowired 37 | SeriesDao seriesDao; 38 | 39 | @Autowired 40 | EquipmentDao equipmentDao; 41 | 42 | 43 | @Ignore 44 | @Test 45 | public void testList(){ 46 | 47 | List serieses = seriesDao.findAll(0,3);//show only the first 3 records 48 | 49 | if(serieses.size() <=0 ){ 50 | LOG.info("No Series record found!"); 51 | }else{ 52 | for(Series series : serieses){ 53 | Study study = series.getStudy(); 54 | LOG.info("study: {}", study.toString()); 55 | LOG.info("series: {}", series.toString()); 56 | 57 | Equipment eqp = series.getEquipment(); 58 | if(eqp != null){ 59 | LOG.info("equipment: {}", eqp.toString()); 60 | }else{ 61 | LOG.info("no equipment defined"); 62 | } 63 | 64 | LOG.info("-----------------------------------------------------------------------------------------------------------------"); 65 | } 66 | } 67 | } 68 | 69 | @Ignore 70 | @Test 71 | public void testCount(){ 72 | 73 | Long count = seriesDao.count(); 74 | LOG.info("count:{}",count); 75 | } 76 | 77 | @Ignore 78 | @Test 79 | @Rollback(false) 80 | public void testSeriesObject(){ 81 | 82 | Series series = new Series(); 83 | series.setOperatorsName("Michelle Kaitlin Aust"); 84 | series.setSeriesNumber(1); 85 | series.setSeriesDescription("Patient broke his leg"); 86 | 87 | 88 | 89 | Study study = new Study(); 90 | study.setReferringPhysicianName("Erin Zoela"); 91 | study.setStudyID("E321WQ"); 92 | study.setStudyDateTime(Calendar.getInstance().getTime()); 93 | 94 | 95 | Patient patient = new Patient(); 96 | patient.setPatientID("ABC98711"); 97 | patient.setPatientName("Alisa Bateley"); 98 | patient.setPatientAge("35F"); 99 | patient.setPatientSex("F"); 100 | patient.setPatientBirthday(Calendar.getInstance().getTime()); 101 | 102 | study.setPatient(patient); 103 | series.setStudy(study); 104 | 105 | //IDs start as null 106 | assertEquals((Long) null, series.getPkTBLSeriesID()); 107 | assertEquals((Long) null, study.getPkTBLStudyID()); 108 | assertEquals((Long) null, patient.getPkTBLPatientID()); 109 | 110 | 111 | testList(); 112 | seriesDao.save(series); 113 | 114 | assertNotNull(series.getPkTBLSeriesID()); 115 | assertNotNull(study.getPkTBLStudyID()); 116 | assertNotNull(patient.getPkTBLPatientID()); 117 | 118 | //you need to test Equipment separately because it is one-To-One 119 | Equipment equipment = new Equipment(); 120 | equipment.setInstitutionName("UAMS"); 121 | equipment.setDeviceSerialNumber("45093"); 122 | equipment.setInstitutionalDepartmentName("Radiology Clinic"); 123 | equipment.setModality("CT"); 124 | equipment.setSeries(series);//set the Series to Equipment because we now have the pkTBLSeriesID 125 | 126 | //ID starts as null 127 | assertEquals((Long) null, equipment.getPkTBLEquipmentID()); 128 | equipmentDao.save(equipment);//save Equipment here after you get the pkTBLSeriesID 129 | assertNotNull(equipment.getPkTBLEquipmentID()); 130 | 131 | testList(); 132 | } 133 | 134 | @Ignore 135 | @Test 136 | public void testfindBySeriesInstanceUID(){ 137 | 138 | Series series = seriesDao.findBySeriesInstanceUID("1.3.12.2.1107.5.1.4.55292.30000015032113073778100003742"); 139 | assertNotNull(series); 140 | series = seriesDao.findBySeriesInstanceUID("1.3.12.2.1107.5.1.4.55292.30000015032113073778100003742", 2); 141 | assertNotNull(series); 142 | LOG.info(series.toString()); 143 | } 144 | 145 | @Ignore 146 | @Test 147 | public void testFindByID(){ 148 | 149 | Series series = seriesDao.findById(1); 150 | assertNotNull(series); 151 | LOG.info(series.toString()); 152 | } 153 | 154 | @Test 155 | @Ignore 156 | public void testFindByStudyID(){ 157 | 158 | List serieses = seriesDao.findByPkTBLStudyID(1L); 159 | if(serieses.size() <=0 ){ 160 | LOG.info("No Series record found!"); 161 | }else{ 162 | for(Series series : serieses){ 163 | Study study = series.getStudy(); 164 | LOG.info("study: {}", study.toString()); 165 | LOG.info("series: {}", series.toString()); 166 | 167 | Equipment eqp = series.getEquipment(); 168 | if(eqp != null){ 169 | LOG.info("equipment: {}", eqp.toString()); 170 | }else{ 171 | LOG.info("no equipment defined"); 172 | } 173 | 174 | LOG.info("-----------------------------------------------------------------------------------------------------------------"); 175 | } 176 | } 177 | } 178 | 179 | @Ignore 180 | @Test 181 | public void testAllByPkPatientID(){ 182 | 183 | List serieses = seriesDao.findAllByPkTBLPatientID(2L); 184 | assertEquals(0, serieses.size()); 185 | 186 | serieses = seriesDao.findAllByPkTBLPatientID(1L); 187 | assertTrue(serieses.size() > 0); 188 | 189 | int i=0; 190 | for(Series series : serieses){ 191 | Study study = series.getStudy(); 192 | LOG.info("study: {}", study.toString()); 193 | LOG.info(++i + "- Series: {}", series.toString()); 194 | 195 | Equipment eqp = series.getEquipment(); 196 | if(eqp != null){ 197 | LOG.info("Equipment: {}", eqp.toString()); 198 | }else{ 199 | LOG.info("no equipment defined"); 200 | } 201 | 202 | LOG.info("-----------------------------------------------------------------------------------------------------------------"); 203 | } 204 | 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /src/test/java/org/easy/StudyTest.java: -------------------------------------------------------------------------------- 1 | package org.easy; 2 | 3 | import java.util.Calendar; 4 | import java.util.List; 5 | 6 | 7 | import javax.transaction.Transactional; 8 | import junit.framework.TestCase; 9 | 10 | import org.easy.dao.StudyDao; 11 | import org.easy.entity.Patient; 12 | import org.easy.entity.Study; 13 | import org.junit.Ignore; 14 | import org.junit.Test; 15 | import org.junit.runner.RunWith; 16 | import org.slf4j.Logger; 17 | import org.slf4j.LoggerFactory; 18 | import org.springframework.beans.factory.annotation.Autowired; 19 | import org.springframework.boot.test.SpringApplicationConfiguration; 20 | import org.springframework.test.annotation.Rollback; 21 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 22 | import org.springframework.test.context.web.WebAppConfiguration; 23 | 24 | 25 | @Transactional 26 | @RunWith(SpringJUnit4ClassRunner.class) 27 | @SpringApplicationConfiguration(classes = ApplicationTest.class) 28 | @WebAppConfiguration 29 | public class StudyTest extends TestCase{ 30 | 31 | private static final Logger LOG = LoggerFactory.getLogger(StudyTest.class); 32 | 33 | @Autowired 34 | StudyDao studyDao; 35 | 36 | @Ignore 37 | @Test 38 | public void testList(){ 39 | 40 | List studies = studyDao.findAll(1,10); 41 | 42 | for(Study study : studies){ 43 | Patient patient = study.getPatient(); 44 | LOG.info("Patient: {}", patient.toString()); 45 | LOG.info("Study: {}", study.toString()); 46 | LOG.info("-----------------------------------------------------------------------------------------------------------------"); 47 | } 48 | } 49 | 50 | @Test 51 | @Ignore 52 | @Rollback(false) 53 | public void testInsert(){ 54 | 55 | Study study = new Study(); 56 | study.setReferringPhysicianName("john doe"); 57 | study.setStudyID("Zra12344"); 58 | study.setStudyDateTime(Calendar.getInstance().getTime()); 59 | 60 | Patient patient = new Patient(); 61 | patient.setPatientID("RA299111"); 62 | patient.setPatientName("Albert Doe"); 63 | patient.setPatientAge("26M"); 64 | patient.setPatientSex("M"); 65 | patient.setPatientBirthday(Calendar.getInstance().getTime()); 66 | 67 | study.setPatient(patient); 68 | 69 | //IDs start as null 70 | assertEquals((Long) null, study.getPkTBLStudyID()); 71 | assertEquals((Long) null, patient.getPkTBLPatientID()); 72 | 73 | studyDao.save(study); 74 | 75 | testList(); 76 | } 77 | 78 | 79 | @Test 80 | @Ignore 81 | public void testFindByID(){ 82 | //test a null study object that does not exist 83 | Study study = studyDao.findById(3); 84 | LOG.info(study.toString()); 85 | assertNotNull(study); 86 | } 87 | 88 | @Ignore 89 | @Test 90 | public void testFindByStudyInstanceUID(){ 91 | Study study = studyDao.findByStudyInstanceUID("2.16.840.1.114151.4.887.42082.8558.2202495"); 92 | assertNotNull(study); 93 | LOG.info(study.toString()); 94 | } 95 | 96 | @Test 97 | @Ignore 98 | public void testFindByPatientID(){ 99 | List studies = studyDao.findByPkTBLPatientID(1L); 100 | for(Study study : studies){ 101 | Patient patient = study.getPatient(); 102 | LOG.info("Patient: {}", patient.toString()); 103 | LOG.info("Study: {}", study.toString()); 104 | LOG.info("-----------------------------------------------------------------------------------------------------------------"); 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/test/resources/META-INF/persistence2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.hibernate.jpa.HibernatePersistenceProvider 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/test/resources/application.properties: -------------------------------------------------------------------------------- 1 | # App 2 | app.name=Easy PACS Server 3 | app.description=${app.name} is a Dicom Server Application 4 | 5 | #thymeleaf cache; For Thymeleaf auto template reload configuration 6 | spring.thymeleaf.cache = false 7 | 8 | # DataSource settings: set here configurations for the database connection 9 | datasource.primary.url=jdbc:mysql://localhost:3306/dbdicom 10 | datasource.primary.username=[username] 11 | datasource.primary.password=[password] 12 | datasource.primary.driverClassName=com.mysql.jdbc.Driver 13 | datasource.primary.validation-query=SELECT 1 14 | datasource.primary.initialSize=10 15 | datasource.primary.maxActive=100 16 | datasource.primary.minIdle=20 17 | datasource.primary.maxWait=3000 18 | 19 | 20 | # Specify the DBMS 21 | spring.jpa.database = MYSQL 22 | # Show or not log for each sql query 23 | spring.jpa.show-sql = true 24 | # Hibernate settings are prefixed with spring.jpa.hibernate.* 25 | spring.jpa.hibernate.globally_quoted_identifiers=true 26 | spring.jpa.hibernate.ddl-auto = none 27 | spring.jpa.hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect 28 | spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.DefaultNamingStrategy 29 | spring.jpa.hibernate.show_sql = true 30 | spring.jpa.hibernate.format_sql = true 31 | spring.jpa.hibernate.generate_statistics = false 32 | spring.jpa.hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory 33 | 34 | 35 | # Pacs storage 36 | pacs.storage.dcm = ./tmp/dcm 37 | pacs.storage.image = ./tmp/img 38 | pacs.aetitle = * 39 | pacs.ports = 104 40 | 41 | # Server 42 | server.port=8085 43 | endpoints.shutdown.enabled=false --------------------------------------------------------------------------------