├── .gitignore ├── dcm4chee-arc-conf ├── src │ ├── test │ │ ├── resources │ │ │ └── cacerts.jks │ │ ├── filters │ │ │ ├── opendj.properties │ │ │ ├── apacheds.properties │ │ │ └── slapd.properties │ │ └── resources-ldap │ │ │ └── ldap.properties │ └── main │ │ ├── config │ │ ├── ldap │ │ │ ├── init-baseDN.ldif │ │ │ ├── init-config.ldif │ │ │ ├── opendj │ │ │ │ └── 03-rfc2587.ldif │ │ │ ├── sample-device.ldif │ │ │ └── unldif.sed │ │ └── configuration │ │ │ └── dcm4chee-arc │ │ │ ├── key.jks │ │ │ ├── ldap.properties │ │ │ ├── hl7-adt2dcm.xsl │ │ │ ├── nullify-pn.xsl │ │ │ └── ensure-pid.xsl │ │ └── java │ │ └── org │ │ └── dcm4chee │ │ └── archive │ │ └── conf │ │ ├── Entity.java │ │ └── AttributeFilter.java └── pom.xml ├── dcm4chee-arc-service └── src │ ├── main │ ├── webapp │ │ ├── images │ │ │ ├── spritemap.png │ │ │ └── spritemap@2x.png │ │ ├── WEB-INF │ │ │ ├── beans.xml │ │ │ ├── web.xml │ │ │ └── ejb-jar.xml │ │ ├── upload.html │ │ ├── css │ │ │ └── web.css │ │ ├── upload.js │ │ └── browse.html │ └── java │ │ └── org │ │ └── dcm4chee │ │ └── archive │ │ ├── exception │ │ ├── PatientMismatchException.java │ │ ├── PatientMergedException.java │ │ ├── EntityAlreadyExistsException.java │ │ ├── PatientCircularMergedException.java │ │ └── NonUniquePatientException.java │ │ ├── ArchiveMBean.java │ │ ├── mpps │ │ └── dao │ │ │ └── PPSWithIAN.java │ │ ├── util │ │ ├── FileUtils.java │ │ └── BeanLocator.java │ │ ├── wado │ │ ├── BulkDataOutput.java │ │ ├── ZipOutput.java │ │ ├── DecompressedPixelDataOutput.java │ │ └── CompressedPixelDataOutput.java │ │ ├── ArchiveApplication.java │ │ ├── dao │ │ └── CodeService.java │ │ └── query │ │ └── dao │ │ ├── AbstractQuery.java │ │ └── PatientQuery.java │ └── test │ ├── resources │ ├── query-ejb-jar.xml │ ├── mwlquery-ejb-jar.xml │ ├── testdata │ │ ├── fuzzy-4.xml │ │ ├── mods-in-study-5.xml │ │ ├── fuzzy-3.xml │ │ ├── birthdate-3.xml │ │ ├── date-range-7.xml │ │ ├── mods-in-study-1.xml │ │ ├── mods-in-study-3.xml │ │ ├── mods-in-study-2.xml │ │ ├── mods-in-study-4.xml │ │ ├── proc-code-seq-3.xml │ │ ├── fuzzy-1.xml │ │ ├── fuzzy-5.xml │ │ ├── concept-name-code-seq-3.xml │ │ ├── date-range-5.xml │ │ ├── date-range-6.xml │ │ ├── birthdate-1.xml │ │ ├── birthdate-2.xml │ │ ├── accno-issuer-3.xml │ │ ├── fuzzy-2.xml │ │ ├── date-range-1.xml │ │ ├── date-range-2.xml │ │ ├── date-range-3.xml │ │ ├── date-range-4.xml │ │ ├── mwl-ct-1.xml │ │ ├── mwl-mr-2.xml │ │ ├── mwl-mr-1.xml │ │ ├── person-name-1.xml │ │ ├── accno-issuer-1.xml │ │ ├── accno-issuer-2.xml │ │ ├── proc-code-seq-1.xml │ │ ├── proc-code-seq-2.xml │ │ ├── concept-name-code-seq-1.xml │ │ ├── concept-name-code-seq-2.xml │ │ ├── req-attrs-seq-3.xml │ │ ├── store-ct-1.xml │ │ ├── store-ct-2.xml │ │ ├── store-pr-1.xml │ │ ├── req-attrs-seq-1.xml │ │ ├── req-attrs-seq-2.xml │ │ ├── mpps-set.xml │ │ ├── verifying-observer-seq-1.xml │ │ └── mpps-create.xml │ └── arquillian.xml │ └── java │ └── org │ └── dcm4chee │ └── archive │ └── test │ └── util │ └── Deployments.java ├── dcm4chee-arc-entity └── src │ └── main │ ├── resources-db2 │ └── META-INF │ │ └── persistence.xml │ ├── resources-h2 │ └── META-INF │ │ └── persistence.xml │ ├── resources-oracle │ └── META-INF │ │ └── persistence.xml │ ├── resources-psql │ └── META-INF │ │ └── persistence.xml │ ├── resources-sqlserver │ └── META-INF │ │ └── persistence.xml │ ├── resources-firebird │ └── META-INF │ │ └── persistence.xml │ ├── resources-mysql │ └── META-INF │ │ └── persistence.xml │ └── java │ └── org │ └── dcm4chee │ └── archive │ └── entity │ ├── FileSystemStatus.java │ ├── BlobCorruptedException.java │ ├── dialect │ ├── PatchedFirebirdDialect.java │ └── PatchedMySQL5InnoDBDialect.java │ ├── PatientStudySeriesAttributes.java │ ├── ScheduledStationAETitle.java │ ├── EntityLogger.java │ ├── SOPInstanceReference.java │ └── Availability.java ├── dcm4chee-arc-assembly ├── pom.xml └── src │ └── main │ └── assembly │ └── dist.xml └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | .project 3 | .settings/ 4 | target/ 5 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/test/resources/cacerts.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gunterze/dcm4chee-arc/HEAD/dcm4chee-arc-conf/src/test/resources/cacerts.jks -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/test/filters/opendj.properties: -------------------------------------------------------------------------------- 1 | ldap-url=ldap://localhost:1389/dc=example,dc=com 2 | user-dn=cn=Directory Manager 3 | password=secret 4 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/test/filters/apacheds.properties: -------------------------------------------------------------------------------- 1 | ldap-url=ldap://localhost:10389/dc=example,dc=com 2 | user-dn=uid=admin,ou=system 3 | password=secret 4 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/main/config/ldap/init-baseDN.ldif: -------------------------------------------------------------------------------- 1 | dn: dc=example,dc=com 2 | objectclass: dcObject 3 | objectclass: organization 4 | o: example 5 | dc: example 6 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/test/filters/slapd.properties: -------------------------------------------------------------------------------- 1 | ldap-url=ldap://localhost:389/dc=example,dc=com 2 | user-dn=cn=Manager,dc=example,dc=com 3 | password=secret 4 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/webapp/images/spritemap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gunterze/dcm4chee-arc/HEAD/dcm4chee-arc-service/src/main/webapp/images/spritemap.png -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/webapp/images/spritemap@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gunterze/dcm4chee-arc/HEAD/dcm4chee-arc-service/src/main/webapp/images/spritemap@2x.png -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/main/config/configuration/dcm4chee-arc/key.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gunterze/dcm4chee-arc/HEAD/dcm4chee-arc-conf/src/main/config/configuration/dcm4chee-arc/key.jks -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/test/resources-ldap/ldap.properties: -------------------------------------------------------------------------------- 1 | java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory 2 | java.naming.ldap.attributes.binary=dicomVendorData 3 | java.naming.provider.url=${ldap-url} 4 | java.naming.security.principal=${user-dn} 5 | java.naming.security.credentials=${password} 6 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/main/config/configuration/dcm4chee-arc/ldap.properties: -------------------------------------------------------------------------------- 1 | java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory 2 | java.naming.ldap.attributes.binary=dicomVendorData 3 | java.naming.provider.url=ldap://localhost:1389/dc=example,dc=com 4 | java.naming.security.principal=cn=Directory Manager 5 | java.naming.security.credentials=secret 6 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/main/config/configuration/dcm4chee-arc/hl7-adt2dcm.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/main/config/configuration/dcm4chee-arc/nullify-pn.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/main/config/ldap/init-config.ldif: -------------------------------------------------------------------------------- 1 | version: 1 2 | 3 | dn: cn=DICOM Configuration,dc=example,dc=com 4 | objectClass: dicomConfigurationRoot 5 | objectClass: top 6 | cn: DICOM Configuration 7 | 8 | dn: cn=Devices,cn=DICOM Configuration,dc=example,dc=com 9 | objectClass: dicomDevicesRoot 10 | objectClass: top 11 | cn: Devices 12 | 13 | dn: cn=Unique AE Titles Registry,cn=DICOM Configuration,dc=example,dc=com 14 | objectClass: dicomUniqueAETitlesRegistryRoot 15 | objectClass: top 16 | cn: Unique AE Titles Registry 17 | 18 | dn: cn=Unique HL7 Application Names Registry,cn=DICOM Configuration,dc=example,dc=com 19 | objectClass: hl7UniqueApplicationNamesRegistryRoot 20 | cn: Unique HL7 Application Names Registry 21 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/main/config/configuration/dcm4chee-arc/ensure-pid.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | DCM4CHEE-ARC 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/webapp/upload.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | dcm4chee-arc ${project.version} 8 | 9 | 10 | 14 |
15 | AE Title: 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/main/config/ldap/opendj/03-rfc2587.ldif: -------------------------------------------------------------------------------- 1 | # This file contains schema definitions from RFC 2587 (PKI). 2 | dn: cn=schema 3 | objectClass: top 4 | objectClass: ldapSubentry 5 | objectClass: subschema 6 | objectClasses: ( 2.5.6.21 NAME 'pkiUser' 7 | DESC 'X.509 PKI User' 8 | SUP top AUXILIARY 9 | MAY userCertificate 10 | X-ORIGIN 'RFC 2587' ) 11 | objectClasses: ( 2.5.6.22 NAME 'pkiCA' 12 | DESC 'X.509 PKI Certificate Authority' 13 | SUP top AUXILIARY 14 | MAY ( 15 | authorityRevocationList $ 16 | certificateRevocationList $ 17 | cACertificate $ 18 | crossCertificatePair ) 19 | X-ORIGIN 'RFC 2587' ) 20 | objectClasses: ( 2.5.6.23 NAME 'deltaCRL' 21 | DESC 'X.509 delta CRL' 22 | SUP top AUXILIARY 23 | MAY deltaRevocationList 24 | X-ORIGIN 'RFC 2587' ) 25 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/exception/PatientMismatchException.java: -------------------------------------------------------------------------------- 1 | package org.dcm4chee.archive.exception; 2 | 3 | import org.dcm4chee.archive.entity.Patient; 4 | 5 | public class PatientMismatchException extends RuntimeException { 6 | 7 | private static final long serialVersionUID = 6053634947778779905L; 8 | 9 | public PatientMismatchException(Object source, Patient expected, Patient actual) { 10 | super("Expected " + expected + " associated by " + source 11 | + ", but was actually " + actual); 12 | } 13 | 14 | public static void check(Object source, Patient expected, Patient actual) { 15 | if (actual.getPk() != expected.getPk()) 16 | throw new PatientMismatchException(source, expected, actual); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/resources-db2/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | ${ds} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/resources-h2/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | ${ds} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/resources-oracle/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | ${ds} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/resources-psql/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | ${ds} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/resources-sqlserver/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | ${ds} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/resources-firebird/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | ${ds} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/resources-mysql/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | ${ds} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/query-ejb-jar.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | QueryService 9 | org.dcm4chee.archive.query.dao.QueryService 10 | 11 | jdbc/dataSource 12 | javax.sql.DataSource 13 | ${ds} 14 | 15 | org.dcm4chee.archive.query.dao.QueryService 16 | dataSource 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/mwlquery-ejb-jar.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | MWLQueryService 9 | org.dcm4chee.archive.mwl.dao.MWLQueryService 10 | 11 | jdbc/dataSource 12 | javax.sql.DataSource 13 | ${ds} 14 | 15 | org.dcm4chee.archive.mwl.dao.MWLQueryService 16 | dataSource 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/webapp/css/web.css: -------------------------------------------------------------------------------- 1 | .nav { 2 | background-color: #333333; 3 | margin: 0; 4 | } 5 | 6 | .nav a { 7 | color: #AAAAAA; 8 | font-weight: bold; 9 | text-decoration: none 10 | } 11 | 12 | .nav span,a:hover { 13 | color: #FFFFFF; 14 | font-weight: bold; 15 | text-decoration: none 16 | } 17 | 18 | table { 19 | width: 100%; 20 | border-collapse: collapse; 21 | margin: 0; 22 | } 23 | 24 | table,td,th { 25 | border: 1px solid black; 26 | } 27 | 28 | th { 29 | text-align: left; 30 | vertical-align: center; 31 | } 32 | 33 | td { 34 | text-align: left; 35 | vertical-align: top; 36 | } 37 | 38 | tr.attributes td { 39 | padding: 0; 40 | } 41 | 42 | tr.attributes td table{ 43 | margin: -1px; 44 | } 45 | 46 | tr.study,tr.study+tr.attributes td table tbody tr { 47 | background-color: #66A366; 48 | } 49 | 50 | tr.series,tr.series+tr.attributes td table tbody tr { 51 | background-color: #99C299; 52 | } 53 | 54 | tr.instance,tr.instance+tr.attributes td table tbody tr { 55 | background-color: #CCE0CC; 56 | } -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | dcm4chee-arc 10 | 11 | dcm4chee-arc 12 | org.dcm4chee.archive.ArchiveServlet 13 | 14 | ldapPropertiesURL 15 | ${jboss.server.config.url}/dcm4chee-arc/ldap.properties 16 | 17 | 18 | deviceName 19 | dcm4chee-arc 20 | 21 | 22 | jmxName 23 | org.dcm4chee.archive:type=Service 24 | 25 | 1 26 | 27 | 28 | browse.html 29 | 30 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/webapp/upload.js: -------------------------------------------------------------------------------- 1 | Dropzone.autoDiscover = false; 2 | (function () { 3 | var upload = document.getElementById("upload"), 4 | clear = document.getElementById("clear"), 5 | aetField = document.getElementById("aet"), 6 | dropzone = new Dropzone(".dropzone", { 7 | url: "rs/stow/DCM4CHEE/studies", 8 | uploadMultiple: true, 9 | autoProcessQueue: false, 10 | addRemoveLinks: true, 11 | parallelUploads: 1000 12 | // previewTemplate: "
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
" 13 | }); 14 | 15 | upload.onclick = function () { 16 | dropzone.options.url = "rs/stow/" + aetField.value + "/studies"; 17 | dropzone.processQueue(); 18 | }; 19 | clear.onclick = function () { 20 | dropzone.removeAllFiles(false); 21 | }; 22 | 23 | }()); 24 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/main/config/ldap/sample-device.ldif: -------------------------------------------------------------------------------- 1 | version: 1 2 | 3 | dn: dicomAETitle=AET_XYZ,cn=Unique AE Titles Registry,cn=DICOM Configuration,dc=example,dc=com 4 | objectClass: dicomUniqueAETitle 5 | dicomAETitle: AET_XYZ 6 | 7 | dn: dicomDeviceName=DEVICE_XYZ,cn=Devices,cn=DICOM Configuration,dc=example,dc=com 8 | objectClass: dicomDevice 9 | dicomDeviceName: DEVICE_XYZ 10 | dicomInstalled: TRUE 11 | 12 | dn: cn=dicom,dicomDeviceName=DEVICE_XYZ,cn=Devices,cn=DICOM Configuration,dc=example,dc=com 13 | objectClass: dicomNetworkConnection 14 | cn: dicom 15 | dicomHostname: localhost 16 | dicomPort: 11112 17 | 18 | dn: cn=dicom-tls,dicomDeviceName=DEVICE_XYZ,cn=Devices,cn=DICOM Configuration,dc=example,dc=com 19 | cn: dicom-tls 20 | objectClass: dicomNetworkConnection 21 | dicomHostname: localhost 22 | dicomPort: 2763 23 | dicomTLSCipherSuite: TLS_RSA_WITH_AES_128_CBC_SHA 24 | dicomTLSCipherSuite: SSL_RSA_WITH_3DES_EDE_CBC_SHA 25 | 26 | dn: dicomAETitle=AET_XYZ,dicomDeviceName=DEVICE_XYZ,cn=Devices,cn=DICOM Configuration,dc=example,dc=com 27 | objectClass: dicomNetworkAE 28 | dicomAETitle: AET_XYZ 29 | dicomNetworkConnectionReference: cn=dicom,dicomDeviceName=DEVICE_XYZ,cn=Devices,cn=DICOM Configuration,dc=example,dc=com 30 | dicomNetworkConnectionReference: cn=dicom-tls,dicomDeviceName=DEVICE_XYZ,cn=Devices,cn=DICOM Configuration,dc=example,dc=com 31 | dicomAssociationInitiator: TRUE 32 | dicomAssociationAcceptor: TRUE 33 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/main/config/ldap/unldif.sed: -------------------------------------------------------------------------------- 1 | #!/bin/sed -nf 2 | # Disclaimer and Terms: You may use these scripts for commercial or 3 | # non-commercial use at your own risk, as long as you retain the 4 | # copyright statements in the source code. These scripts are provided 5 | # "AS IS" with no warranty whatsoever and are FREE for as long as you 6 | # want to use them. You can edit and adapt them to your requirements 7 | # without seeking permission from me. I only ask that you retain the 8 | # credits where they are due. 9 | # 10 | # Author: Vishal Goenka 11 | # 12 | # Unfold LDIF (LDAP Data Interchange Format) lines 13 | # Version 1.0 14 | # 15 | # Usage: unldif.sed 16 | # or 17 | # cat | unldif.sed 18 | # and if /bin/sed is not available, 19 | # sed -nf unldif.sed 20 | # 21 | # Most LDIF generators will fold a long field on multiple lines by 22 | # inserting a line separator (either a linefeed or carriage 23 | # return/linefeed pair) followed by a space. Processing such ldif 24 | # files through another script becomes much easier if such lines were 25 | # unfolded. That is exactly what this script does. It unfolds ldif 26 | # entries that are folded (broken) across lines and writes them on a 27 | # single line. 28 | # 29 | { 30 | 1{ 31 | h; 32 | n; 33 | } 34 | /^ /!{ 35 | H; 36 | g; 37 | s,\n.*,,p; 38 | g; 39 | s,.*\n,,; 40 | h; 41 | } 42 | /^ /{ 43 | H; 44 | g; 45 | s,\n ,,; 46 | h; 47 | } 48 | ${ 49 | g; 50 | s,\n ,,; 51 | p; 52 | } 53 | } 54 | 55 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/webapp/WEB-INF/ejb-jar.xml: -------------------------------------------------------------------------------- 1 | 6 | dcm4chee-arc 7 | 8 | 9 | QueryService 10 | org.dcm4chee.archive.query.dao.QueryService 11 | 12 | jdbc/dataSource 13 | javax.sql.DataSource 14 | ${ds} 15 | 16 | org.dcm4chee.archive.query.dao.QueryService 17 | dataSource 18 | 19 | 20 | 21 | 22 | MWLQueryService 23 | org.dcm4chee.archive.mwl.dao.MWLQueryService 24 | 25 | jdbc/dataSource 26 | javax.sql.DataSource 27 | ${ds} 28 | 29 | org.dcm4chee.archive.mwl.dao.MWLQueryService 30 | dataSource 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/fuzzy-4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.31.1.1 8 | 9 | 10 | OT 11 | 12 | 13 | Test data for fuzzy person name matching 14 | 15 | 16 | FUZZY_NONE 17 | 18 | 19 | DCM4CHEE_TESTDATA 20 | 21 | 22 | 1.2.40.0.13.1.1.99.31 23 | 24 | 25 | 1.2.40.0.13.1.1.99.31.1 26 | 27 | 28 | FUZZY_NONE 29 | 30 | 31 | 1 32 | 33 | 34 | 1 35 | 36 | 37 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/mods-in-study-5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.18.1.1 8 | 9 | 10 | 11 | Test data for modalities in study matching 12 | 13 | 14 | 15 | 16 | Test Modalities in Study 17 | 18 | 19 | 20 | 21 | MODS_IN_STUDY 22 | 23 | 24 | DCM4CHEE_TESTDATA 25 | 26 | 27 | 1.2.40.0.13.1.1.99.18 28 | 29 | 30 | 1.2.40.0.13.1.1.99.18.1 31 | 32 | 33 | NO_MODALITY 34 | 35 | 36 | 1 37 | 38 | 39 | 1 40 | 41 | 42 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/fuzzy-3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.30.1.1 8 | 9 | 10 | OT 11 | 12 | 13 | Test data for fuzzy person name matching 14 | 15 | 16 | 17 | 18 | Luke 19 | 20 | 21 | 22 | 23 | FUZZY_LUKE 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 1.2.40.0.13.1.1.99.30 30 | 31 | 32 | 1.2.40.0.13.1.1.99.30.1 33 | 34 | 35 | FUZZY_LUC 36 | 37 | 38 | 1 39 | 40 | 41 | 1 42 | 43 | 44 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/birthdate-3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.26.1.1 8 | 9 | 10 | OT 11 | 12 | 13 | Test data for patient DOB matching 14 | 15 | 16 | 17 | 18 | Test DOB NONE 19 | 20 | 21 | 22 | 23 | DOB_NONE 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 1.2.40.0.13.1.1.99.26 30 | 31 | 32 | 1.2.40.0.13.1.1.99.26.1 33 | 34 | 35 | DOB_NONE 36 | 37 | 38 | 1 39 | 40 | 41 | 1 42 | 43 | 44 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/date-range-7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.9.1.1 8 | 9 | 10 | OT 11 | 12 | 13 | Test data for date range matching 14 | 15 | 16 | 17 | 18 | Test Range Matching 19 | 20 | 21 | 22 | 23 | RANGE-MATCHING 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 1.2.40.0.13.1.1.99.9 30 | 31 | 32 | 1.2.40.0.13.1.1.99.9.1 33 | 34 | 35 | DT_NONE 36 | 37 | 38 | 1 39 | 40 | 41 | 1 42 | 43 | 44 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/mods-in-study-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.2 5 | 6 | 7 | 1.2.40.0.13.1.1.99.16.1.1 8 | 9 | 10 | CT 11 | 12 | 13 | Test data for modalities in study matching 14 | 15 | 16 | 17 | 18 | Test Modalities in Study 19 | 20 | 21 | 22 | 23 | MODS_IN_STUDY 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 1.2.40.0.13.1.1.99.16 30 | 31 | 32 | 1.2.40.0.13.1.1.99.16.1 33 | 34 | 35 | CT+PR 36 | 37 | 38 | 1 39 | 40 | 41 | 1 42 | 43 | 44 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/mods-in-study-3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.4 5 | 6 | 7 | 1.2.40.0.13.1.1.99.17.1.1 8 | 9 | 10 | MR 11 | 12 | 13 | Test data for modalities in study matching 14 | 15 | 16 | 17 | 18 | Test Modalities in Study 19 | 20 | 21 | 22 | 23 | MODS_IN_STUDY 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 1.2.40.0.13.1.1.99.17 30 | 31 | 32 | 1.2.40.0.13.1.1.99.17.1 33 | 34 | 35 | MR+PR 36 | 37 | 38 | 1 39 | 40 | 41 | 1 42 | 43 | 44 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/mods-in-study-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.11.1 5 | 6 | 7 | 1.2.40.0.13.1.1.99.16.2.1 8 | 9 | 10 | PR 11 | 12 | 13 | Test data for modalities in study matching 14 | 15 | 16 | 17 | 18 | Test Modalities in Study 19 | 20 | 21 | 22 | 23 | MODS_IN_STUDY 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 1.2.40.0.13.1.1.99.16 30 | 31 | 32 | 1.2.40.0.13.1.1.99.16.2 33 | 34 | 35 | CT+PR 36 | 37 | 38 | 2 39 | 40 | 41 | 1 42 | 43 | 44 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/mods-in-study-4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.11.1 5 | 6 | 7 | 1.2.40.0.13.1.1.99.17.2.1 8 | 9 | 10 | PR 11 | 12 | 13 | Test data for modalities in study matching 14 | 15 | 16 | 17 | 18 | Test Modalities in Study 19 | 20 | 21 | 22 | 23 | MODS_IN_STUDY 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 1.2.40.0.13.1.1.99.17 30 | 31 | 32 | 1.2.40.0.13.1.1.99.17.2 33 | 34 | 35 | MR+PR 36 | 37 | 38 | 2 39 | 40 | 41 | 1 42 | 43 | 44 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/proc-code-seq-3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.21.1.1 8 | 9 | 10 | OT 11 | 12 | 13 | Test data for Procedure Code Sequence 14 | 15 | 16 | 17 | 18 | Test Procedure Code Sequence 19 | 20 | 21 | 22 | 23 | PROC_CODE_SEQ 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 1.2.40.0.13.1.1.99.21 30 | 31 | 32 | 1.2.40.0.13.1.1.99.21.1 33 | 34 | 35 | NO_PROC_CODE 36 | 37 | 38 | 1 39 | 40 | 41 | 1 42 | 43 | 44 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/fuzzy-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.28.1.1 8 | 9 | 10 | OT 11 | 12 | 13 | Test data for fuzzy person name matching 14 | 15 | 16 | 17 | 18 | Lucas 19 | George 20 | 21 | 22 | 23 | 24 | FUZZY_GEORGE 25 | 26 | 27 | DCM4CHEE_TESTDATA 28 | 29 | 30 | 1.2.40.0.13.1.1.99.28 31 | 32 | 33 | 1.2.40.0.13.1.1.99.28.1 34 | 35 | 36 | FUZZY_GEORGE 37 | 38 | 39 | 1 40 | 41 | 42 | 1 43 | 44 | 45 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/fuzzy-5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.32.1.1 8 | 9 | 10 | OT 11 | 12 | 13 | Test data for fuzzy person name matching 14 | 15 | 16 | 17 | 18 | 123 19 | 456 20 | 21 | 22 | 23 | 24 | FUZZY_NUMERICAL 25 | 26 | 27 | DCM4CHEE_TESTDATA 28 | 29 | 30 | 1.2.40.0.13.1.1.99.32 31 | 32 | 33 | 1.2.40.0.13.1.1.99.32.1 34 | 35 | 36 | FUZZY_NUMERICAL 37 | 38 | 39 | 1 40 | 41 | 42 | 1 43 | 44 | 45 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/concept-name-code-seq-3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.104.1 5 | 6 | 7 | 1.2.40.0.13.1.1.99.22.1.3 8 | 9 | 10 | DOC 11 | 12 | 13 | Test data for Concept Name Code Sequence 14 | 15 | 16 | 17 | 18 | Test Concept Name Code Sequence 19 | 20 | 21 | 22 | 23 | CONCEPT_NAME_CODE_SEQ 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 1.2.40.0.13.1.1.99.22 30 | 31 | 32 | 1.2.40.0.13.1.1.99.22.1 33 | 34 | 35 | CONCEPT_NAME 36 | 37 | 38 | 1 39 | 40 | 41 | 3 42 | 43 | 44 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/arquillian.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/date-range-5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.7.1.1 8 | 9 | 10 | 20100620 11 | 12 | 13 | OT 14 | 15 | 16 | Test data for date range matching 17 | 18 | 19 | 20 | 21 | Test Range Matching 22 | 23 | 24 | 25 | 26 | RANGE-MATCHING 27 | 28 | 29 | DCM4CHEE_TESTDATA 30 | 31 | 32 | 1.2.40.0.13.1.1.99.7 33 | 34 | 35 | 1.2.40.0.13.1.1.99.7.1 36 | 37 | 38 | DT_20100620 39 | 40 | 41 | 1 42 | 43 | 44 | 1 45 | 46 | 47 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/date-range-6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.8.1.1 8 | 9 | 10 | 20110620 11 | 12 | 13 | OT 14 | 15 | 16 | Test data for date range matching 17 | 18 | 19 | 20 | 21 | Test Range Matching 22 | 23 | 24 | 25 | 26 | RANGE-MATCHING 27 | 28 | 29 | DCM4CHEE_TESTDATA 30 | 31 | 32 | 1.2.40.0.13.1.1.99.8 33 | 34 | 35 | 1.2.40.0.13.1.1.99.8.1 36 | 37 | 38 | DT_20110620 39 | 40 | 41 | 1 42 | 43 | 44 | 1 45 | 46 | 47 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/birthdate-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.24.1.1 8 | 9 | 10 | OT 11 | 12 | 13 | Test data for patient DOB matching 14 | 15 | 16 | 17 | 18 | Test DOB 20010101 19 | 20 | 21 | 22 | 23 | DOB_20010101 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 20010101 30 | 31 | 32 | 1.2.40.0.13.1.1.99.24 33 | 34 | 35 | 1.2.40.0.13.1.1.99.24.1 36 | 37 | 38 | DOB_20010101 39 | 40 | 41 | 1 42 | 43 | 44 | 1 45 | 46 | 47 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/birthdate-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.25.1.1 8 | 9 | 10 | OT 11 | 12 | 13 | Test data for patient DOB matching 14 | 15 | 16 | 17 | 18 | Test DOB 20020202 19 | 20 | 21 | 22 | 23 | DOB_20020202 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 20020202 30 | 31 | 32 | 1.2.40.0.13.1.1.99.25 33 | 34 | 35 | 1.2.40.0.13.1.1.99.25.1 36 | 37 | 38 | DOB_20020202 39 | 40 | 41 | 1 42 | 43 | 44 | 1 45 | 46 | 47 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/accno-issuer-3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.12.1.1 8 | 9 | 10 | A1234 11 | 12 | 13 | OT 14 | 15 | 16 | Test data for Issuer of Accession Number 17 | 18 | 19 | 20 | 21 | Test Issuer of Accession Number 22 | 23 | 24 | 25 | 26 | ISSUER_OF_ACCNO 27 | 28 | 29 | DCM4CHEE_TESTDATA 30 | 31 | 32 | 1.2.40.0.13.1.1.99.12 33 | 34 | 35 | 1.2.40.0.13.1.1.99.12.1 36 | 37 | 38 | NO_ACCNO_ISSUER 39 | 40 | 41 | 1 42 | 43 | 44 | 1 45 | 46 | 47 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/fuzzy-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ISO_IR 100 5 | 6 | 7 | 1.2.840.10008.5.1.4.1.1.7 8 | 9 | 10 | 1.2.40.0.13.1.1.99.29.1.1 11 | 12 | 13 | OT 14 | 15 | 16 | Test data for fuzzy person name matching 17 | 18 | 19 | 20 | 21 | Lukas 22 | Jörg 23 | 24 | 25 | 26 | 27 | FUZZY_JOERG 28 | 29 | 30 | DCM4CHEE_TESTDATA 31 | 32 | 33 | 1.2.40.0.13.1.1.99.29 34 | 35 | 36 | 1.2.40.0.13.1.1.99.29.1 37 | 38 | 39 | FUZZY_JOERG 40 | 41 | 42 | 1 43 | 44 | 45 | 1 46 | 47 | 48 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/date-range-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.3.1.1 8 | 9 | 10 | 20110620 11 | 12 | 13 | 1030 14 | 15 | 16 | OT 17 | 18 | 19 | Test data for date range matching 20 | 21 | 22 | 23 | 24 | Test Range Matching 25 | 26 | 27 | 28 | 29 | RANGE-MATCHING 30 | 31 | 32 | DCM4CHEE_TESTDATA 33 | 34 | 35 | 1.2.40.0.13.1.1.99.3 36 | 37 | 38 | 1.2.40.0.13.1.1.99.3.1 39 | 40 | 41 | DT_20110620_1030 42 | 43 | 44 | 1 45 | 46 | 47 | 1 48 | 49 | 50 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/date-range-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.4.1.1 8 | 9 | 10 | 20110620 11 | 12 | 13 | 1430 14 | 15 | 16 | OT 17 | 18 | 19 | Test data for date range matching 20 | 21 | 22 | 23 | 24 | Test Range Matching 25 | 26 | 27 | 28 | 29 | RANGE-MATCHING 30 | 31 | 32 | DCM4CHEE_TESTDATA 33 | 34 | 35 | 1.2.40.0.13.1.1.99.4 36 | 37 | 38 | 1.2.40.0.13.1.1.99.4.1 39 | 40 | 41 | DT_20110620_1430 42 | 43 | 44 | 1 45 | 46 | 47 | 1 48 | 49 | 50 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/date-range-3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.5.1.1 8 | 9 | 10 | 20100620 11 | 12 | 13 | 1030 14 | 15 | 16 | OT 17 | 18 | 19 | Test data for date range matching 20 | 21 | 22 | 23 | 24 | Test Range Matching 25 | 26 | 27 | 28 | 29 | RANGE-MATCHING 30 | 31 | 32 | DCM4CHEE_TESTDATA 33 | 34 | 35 | 1.2.40.0.13.1.1.99.5 36 | 37 | 38 | 1.2.40.0.13.1.1.99.5.1 39 | 40 | 41 | DT_20100620_1030 42 | 43 | 44 | 1 45 | 46 | 47 | 1 48 | 49 | 50 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/date-range-4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.6.1.1 8 | 9 | 10 | 20100620 11 | 12 | 13 | 1430 14 | 15 | 16 | OT 17 | 18 | 19 | Test data for date range matching 20 | 21 | 22 | 23 | 24 | Test Range Matching 25 | 26 | 27 | 28 | 29 | RANGE-MATCHING 30 | 31 | 32 | DCM4CHEE_TESTDATA 33 | 34 | 35 | 1.2.40.0.13.1.1.99.6 36 | 37 | 38 | 1.2.40.0.13.1.1.99.6.1 39 | 40 | 41 | DT_20100620_1430 42 | 43 | 44 | 1 45 | 46 | 47 | 1 48 | 49 | 50 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/mwl-ct-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MWL_TEST 5 | 6 | 7 | CT 8 | 9 | 10 | 11 | 12 | Test Modality Worklist 13 | 14 | 15 | 16 | 17 | MWL_TEST 18 | 19 | 20 | DCM4CHEE_TESTDATA 21 | 22 | 23 | 1.2.40.0.13.1.1.99.33 24 | 25 | 26 | AET_CT 27 | 28 | 29 | 20111024 30 | 31 | 32 | 1430 33 | 34 | 35 | 36 | 37 | ScheduledPerformingPhysicianName1 38 | 39 | 40 | 41 | 42 | 9933.1 43 | 44 | 45 | DEPARTED 46 | 47 | 48 | P-9933 49 | 50 | 51 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/java/org/dcm4chee/archive/entity/FileSystemStatus.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.entity; 40 | 41 | public enum FileSystemStatus { 42 | RW, 43 | Rw, 44 | RO 45 | } 46 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/mwl-mr-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MWL_TEST 5 | 6 | 7 | MR 8 | 9 | 10 | 11 | 12 | Test Modality Worklist 13 | 14 | 15 | 16 | 17 | MWL_TEST 18 | 19 | 20 | DCM4CHEE_TESTDATA 21 | 22 | 23 | 1.2.40.0.13.1.1.99.34 24 | 25 | 26 | AET_MR2 27 | 28 | 29 | 20111025 30 | 31 | 32 | 1530 33 | 34 | 35 | 36 | 37 | ScheduledPerformingPhysicianName3 38 | 39 | 40 | 41 | 42 | 9934.2 43 | 44 | 45 | SCHEDULED 46 | 47 | 48 | P-9934 49 | 50 | 51 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/mwl-mr-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MWL_TEST 5 | 6 | 7 | MR 8 | 9 | 10 | 11 | 12 | Test Modality Worklist 13 | 14 | 15 | 16 | 17 | MWL_TEST 18 | 19 | 20 | DCM4CHEE_TESTDATA 21 | 22 | 23 | 1.2.40.0.13.1.1.99.34 24 | 25 | 26 | AET_MR1 27 | AET_MR2 28 | 29 | 30 | 20111025 31 | 32 | 33 | 1430 34 | 35 | 36 | 37 | 38 | ScheduledPerformingPhysicianName2 39 | 40 | 41 | 42 | 43 | 9934.1 44 | 45 | 46 | READY 47 | 48 | 49 | P-9934 50 | 51 | 52 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/person-name-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ISO 2022 IR 6 5 | ISO 2022 IR 87 6 | 7 | 8 | 1.2.840.10008.5.1.4.1.1.7 9 | 10 | 11 | 1.2.40.0.13.1.1.99.33.1.1 12 | 13 | 14 | OT 15 | 16 | 17 | Test data for literal person name matching 18 | 19 | 20 | 21 | 22 | oomiya 23 | shougo 24 | 25 | 26 | 大宮 27 | 省吾 28 | 29 | 30 | オオミヤ 31 | ショウゴ 32 | 33 | 34 | 35 | 36 | OOMIYA_SHOUGO 37 | 38 | 39 | DCM4CHEE_TESTDATA 40 | 41 | 42 | 1.2.40.0.13.1.1.99.33 43 | 44 | 45 | 1.2.40.0.13.1.1.99.33.1 46 | 47 | 48 | PERSON_NAME 49 | 50 | 51 | 1 52 | 53 | 54 | 1 55 | 56 | 57 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/accno-issuer-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.10.1.1 8 | 9 | 10 | A1234 11 | 12 | 13 | 14 | 15 | DCM4CHEE_TESTDATA_ACCNO_ISSUER_1 16 | 17 | 18 | 19 | 20 | OT 21 | 22 | 23 | Test data for Issuer of Accession Number 24 | 25 | 26 | 27 | 28 | Test Issuer of Accession Number 29 | 30 | 31 | 32 | 33 | ISSUER_OF_ACCNO 34 | 35 | 36 | DCM4CHEE_TESTDATA 37 | 38 | 39 | 1.2.40.0.13.1.1.99.10 40 | 41 | 42 | 1.2.40.0.13.1.1.99.10.1 43 | 44 | 45 | ACCNO_ISSUER_1 46 | 47 | 48 | 1 49 | 50 | 51 | 1 52 | 53 | 54 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/accno-issuer-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.11.1.1 8 | 9 | 10 | A1234 11 | 12 | 13 | 14 | 15 | DCM4CHEE_TESTDATA_ACCNO_ISSUER_2 16 | 17 | 18 | 19 | 20 | OT 21 | 22 | 23 | Test data for Issuer of Accession Number 24 | 25 | 26 | 27 | 28 | Test Issuer of Accession Number 29 | 30 | 31 | 32 | 33 | ISSUER_OF_ACCNO 34 | 35 | 36 | DCM4CHEE_TESTDATA 37 | 38 | 39 | 1.2.40.0.13.1.1.99.11 40 | 41 | 42 | 1.2.40.0.13.1.1.99.11.1 43 | 44 | 45 | ACCNO_ISSUER_2 46 | 47 | 48 | 1 49 | 50 | 51 | 1 52 | 53 | 54 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/main/java/org/dcm4chee/archive/conf/Entity.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.conf; 40 | 41 | /** 42 | * @author Gunter Zeilinger 43 | */ 44 | public enum Entity { 45 | Patient, 46 | Study, 47 | Series, 48 | Instance, 49 | Visit, 50 | ServiceRequest, 51 | RequestedProcedure, 52 | ScheduledProcedureStep, 53 | PerformedProcedureStep 54 | } 55 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/exception/PatientMergedException.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.exception; 40 | 41 | 42 | /** 43 | * @author Gunter Zeilinger 44 | */ 45 | public class PatientMergedException extends RuntimeException { 46 | 47 | private static final long serialVersionUID = 3937535085752305999L; 48 | 49 | public PatientMergedException(String message) { 50 | super(message); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/exception/EntityAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.exception; 40 | 41 | /** 42 | * @author Gunter Zeilinger 43 | */ 44 | public class EntityAlreadyExistsException extends RuntimeException { 45 | 46 | private static final long serialVersionUID = 8766498222010631052L; 47 | 48 | public EntityAlreadyExistsException(String message) { 49 | super(message); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/java/org/dcm4chee/archive/entity/BlobCorruptedException.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.entity; 40 | 41 | import java.io.IOException; 42 | 43 | /** 44 | * @author Gunter Zeilinger 45 | */ 46 | public class BlobCorruptedException extends RuntimeException { 47 | 48 | private static final long serialVersionUID = 6928826487883256011L; 49 | 50 | public BlobCorruptedException(IOException e) { 51 | super(e); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/exception/PatientCircularMergedException.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.exception; 40 | 41 | 42 | /** 43 | * @author Gunter Zeilinger 44 | */ 45 | public class PatientCircularMergedException extends RuntimeException { 46 | 47 | private static final long serialVersionUID = 3937535085752305999L; 48 | 49 | public PatientCircularMergedException(String message) { 50 | super(message); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/proc-code-seq-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.19.1.1 8 | 9 | 10 | OT 11 | 12 | 13 | Test data for Procedure Code Sequence 14 | 15 | 16 | 17 | 18 | PROC_CODE_1 19 | 20 | 21 | 99DCM4CHEE_TEST 22 | 23 | 24 | Meaning of PROC_CODE_1 25 | 26 | 27 | 28 | 29 | 30 | Test Procedure Code Sequence 31 | 32 | 33 | 34 | 35 | PROC_CODE_SEQ 36 | 37 | 38 | DCM4CHEE_TESTDATA 39 | 40 | 41 | 1.2.40.0.13.1.1.99.19 42 | 43 | 44 | 1.2.40.0.13.1.1.99.19.1 45 | 46 | 47 | PROC_CODE_1 48 | 49 | 50 | 1 51 | 52 | 53 | 1 54 | 55 | 56 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/proc-code-seq-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.20.1.1 8 | 9 | 10 | OT 11 | 12 | 13 | Test data for Procedure Code Sequence 14 | 15 | 16 | 17 | 18 | PROC_CODE_2 19 | 20 | 21 | 99DCM4CHEE_TEST 22 | 23 | 24 | Meaning of PROC_CODE_2 25 | 26 | 27 | 28 | 29 | 30 | Test Procedure Code Sequence 31 | 32 | 33 | 34 | 35 | PROC_CODE_SEQ 36 | 37 | 38 | DCM4CHEE_TESTDATA 39 | 40 | 41 | 1.2.40.0.13.1.1.99.20 42 | 43 | 44 | 1.2.40.0.13.1.1.99.20.1 45 | 46 | 47 | PROC_CODE_2 48 | 49 | 50 | 1 51 | 52 | 53 | 1 54 | 55 | 56 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/java/org/dcm4chee/archive/entity/dialect/PatchedFirebirdDialect.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2012 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.entity.dialect; 40 | 41 | import java.sql.Types; 42 | 43 | import org.hibernate.dialect.FirebirdDialect; 44 | 45 | /** 46 | * @author Gunter Zeilinger 47 | * 48 | */ 49 | public class PatchedFirebirdDialect extends FirebirdDialect { 50 | 51 | public PatchedFirebirdDialect() { 52 | registerColumnType(Types.BOOLEAN, "smallint"); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/exception/NonUniquePatientException.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.exception; 40 | 41 | import org.dcm4chee.archive.common.IDWithIssuer; 42 | 43 | /** 44 | * @author Gunter Zeilinger 45 | */ 46 | public class NonUniquePatientException extends RuntimeException { 47 | 48 | private static final long serialVersionUID = -770538934731527268L; 49 | 50 | public NonUniquePatientException(IDWithIssuer pid) { 51 | super(pid.toString()); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/concept-name-code-seq-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.104.1 5 | 6 | 7 | 1.2.40.0.13.1.1.99.22.1.1 8 | 9 | 10 | DOC 11 | 12 | 13 | Test data for Concept Name Code Sequence 14 | 15 | 16 | 17 | 18 | Test Concept Name Code Sequence 19 | 20 | 21 | 22 | 23 | CONCEPT_NAME_CODE_SEQ 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 1.2.40.0.13.1.1.99.22 30 | 31 | 32 | 1.2.40.0.13.1.1.99.22.1 33 | 34 | 35 | CONCEPT_NAME 36 | 37 | 38 | 1 39 | 40 | 41 | 1 42 | 43 | 44 | 45 | 46 | CONCEPT_NAME_1 47 | 48 | 49 | 99DCM4CHEE_TEST 50 | 51 | 52 | Meaning of CONCEPT_NAME_1 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/concept-name-code-seq-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.104.1 5 | 6 | 7 | 1.2.40.0.13.1.1.99.22.1.2 8 | 9 | 10 | DOC 11 | 12 | 13 | Test data for Concept Name Code Sequence 14 | 15 | 16 | 17 | 18 | Test Concept Name Code Sequence 19 | 20 | 21 | 22 | 23 | CONCEPT_NAME_CODE_SEQ 24 | 25 | 26 | DCM4CHEE_TESTDATA 27 | 28 | 29 | 1.2.40.0.13.1.1.99.22 30 | 31 | 32 | 1.2.40.0.13.1.1.99.22.1 33 | 34 | 35 | CONCEPT_NAME 36 | 37 | 38 | 1 39 | 40 | 41 | 2 42 | 43 | 44 | 45 | 46 | CONCEPT_NAME_2 47 | 48 | 49 | 99DCM4CHEE_TEST 50 | 51 | 52 | Meaning of CONCEPT_NAME_2 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/ArchiveMBean.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2012 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive; 40 | 41 | import javax.ws.rs.GET; 42 | import javax.ws.rs.Path; 43 | 44 | /** 45 | * @author Gunter Zeilinger 46 | * 47 | */ 48 | @Path("/") 49 | public interface ArchiveMBean { 50 | 51 | @GET 52 | @Path("running") 53 | boolean isRunning(); 54 | 55 | @GET 56 | @Path("start") 57 | void start() throws Exception; 58 | 59 | @GET 60 | @Path("stop") 61 | void stop(); 62 | 63 | @GET 64 | @Path("reload") 65 | void reload() throws Exception; 66 | 67 | } 68 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/mpps/dao/PPSWithIAN.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2012 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.mpps.dao; 40 | 41 | import java.util.List; 42 | 43 | import org.dcm4che.data.Attributes; 44 | import org.dcm4chee.archive.entity.PerformedProcedureStep; 45 | 46 | /** 47 | * @author Gunter Zeilinger 48 | */ 49 | public class PPSWithIAN { 50 | 51 | public final PerformedProcedureStep pps; 52 | public final List ians; 53 | 54 | public PPSWithIAN(PerformedProcedureStep pps, List ians) { 55 | this.pps = pps; 56 | this.ians = ians; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /dcm4chee-arc-assembly/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | org.dcm4che.dcm4chee-arc 5 | dcm4chee-arc-parent 6 | 4.1.0.Alpha3 7 | 8 | dcm4chee-arc-assembly 9 | pom 10 | Assemble dcm4chee-arc distribution packages 11 | 12 | dcm4chee-arc-${project.version}-${db} 13 | 14 | 15 | maven-assembly-plugin 16 | 2.3 17 | 18 | 19 | src/main/assembly/dist.xml 20 | 21 | false 22 | false 23 | 24 | 25 | 26 | package 27 | 28 | single 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | org.dcm4che.dcm4chee-arc 38 | dcm4chee-arc-service 39 | ${project.version} 40 | ${db} 41 | war 42 | 43 | 44 | org.dcm4che 45 | dcm4che-jboss-modules 46 | ${dcm4che.version} 47 | zip 48 | 49 | 50 | org.dcm4che 51 | querydsl-jboss-modules 52 | ${querydsl.version} 53 | zip 54 | 55 | 56 | org.dcm4che 57 | jdbc-jboss-modules 58 | 1.0.0 59 | ${db} 60 | zip 61 | 62 | 63 | org.dcm4che 64 | jai_imageio-jboss-modules 65 | 1.2-pre-dr-b04 66 | zip 67 | 68 | 69 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/util/FileUtils.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | package org.dcm4chee.archive.util; 39 | 40 | import java.io.File; 41 | import java.security.SecureRandom; 42 | 43 | /** 44 | * @author Gunter Zeilinger 45 | * 46 | */ 47 | public class FileUtils { 48 | 49 | private static final SecureRandom random = new SecureRandom(); 50 | 51 | public static File ensureNotExists(File file) { 52 | while (file.exists()) { 53 | int n = random.nextInt(); 54 | file = new File(file.getParent(), 55 | Integer.toString(n < 0 ? -(n+1) : n)); 56 | } 57 | return file; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/req-attrs-seq-3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.15.1.1 8 | 9 | 10 | 11 | OT 12 | 13 | 14 | Test data for Request Attributes Sequence 15 | 16 | 17 | 18 | 19 | Test Request Attributes Sequence 20 | 21 | 22 | 23 | 24 | REQ_ATTRS_SEQ 25 | 26 | 27 | DCM4CHEE_TESTDATA 28 | 29 | 30 | 1.2.40.0.13.1.1.99.15 31 | 32 | 33 | 1.2.40.0.13.1.1.99.15.1 34 | 35 | 36 | NO_ACCNO_ISSUER 37 | 38 | 39 | 1 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | 47 | A1234 48 | 49 | 50 | 1.2.40.0.13.1.1.99.15 51 | 52 | 53 | 9915.1 54 | 55 | 56 | P-9915 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/store-ct-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.2 5 | 6 | 7 | 1.2.40.0.13.1.1.99.20110607.1.1 8 | 9 | 10 | A-20110607 11 | 12 | 13 | CT 14 | 15 | 16 | 17 | 18 | 1.2.840.10008.3.1.2.3.3 19 | 20 | 21 | 1.2.40.0.13.1.1.99.20120130 22 | 23 | 24 | 25 | 26 | 27 | 28 | Test StoreService 29 | 30 | 31 | 32 | 33 | STORE_SERVICE_TEST 34 | 35 | 36 | DCM4CHEE_TESTDATA 37 | 38 | 39 | 1.2.40.0.13.1.1.99.20110607 40 | 41 | 42 | 1.2.40.0.13.1.1.99.20110607.1 43 | 44 | 45 | STORE_SERVICE_TEST 46 | 47 | 48 | 1 49 | 50 | 51 | 1 52 | 53 | 54 | 55 | 56 | SPS-20110607 57 | 58 | 59 | P-20110607 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/store-ct-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.2 5 | 6 | 7 | 1.2.40.0.13.1.1.99.20110607.1234.1.2 8 | 9 | 10 | A-20110607 11 | 12 | 13 | CT 14 | 15 | 16 | 17 | 18 | 1.2.840.10008.3.1.2.3.3 19 | 20 | 21 | 1.2.40.0.13.1.1.99.20120130 22 | 23 | 24 | 25 | 26 | 27 | 28 | Test StoreService 29 | 30 | 31 | 32 | 33 | STORE_SERVICE_TEST 34 | 35 | 36 | DCM4CHEE_TESTDATA 37 | 38 | 39 | 1.2.40.0.13.1.1.99.20110607 40 | 41 | 42 | 1.2.40.0.13.1.1.99.20110607.1 43 | 44 | 45 | TEST-REPLACE 46 | 47 | 48 | 0 49 | 50 | 51 | 2 52 | 53 | 54 | 55 | 56 | SPS-20110607 57 | 58 | 59 | P-20110607 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/store-pr-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.11.1 5 | 6 | 7 | 1.2.40.0.13.1.1.99.20110607.2.1 8 | 9 | 10 | A-20110607 11 | 12 | 13 | PR 14 | 15 | 16 | 17 | 18 | 1.2.840.10008.3.1.2.3.3 19 | 20 | 21 | 1.2.40.0.13.1.1.99.20120130 22 | 23 | 24 | 25 | 26 | 27 | 28 | Test StoreService 29 | 30 | 31 | 32 | 33 | STORE_SERVICE_TEST 34 | 35 | 36 | DCM4CHEE_TESTDATA 37 | 38 | 39 | 1.2.40.0.13.1.1.99.20110607 40 | 41 | 42 | 1.2.40.0.13.1.1.99.20110607.2 43 | 44 | 45 | TEST-REPLACE 46 | 47 | 48 | 2 49 | 50 | 51 | 1 52 | 53 | 54 | 55 | 56 | SPS-20110607 57 | 58 | 59 | P-20110607 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DCM4CHEE Archive 4.x 2 | ==================== 3 | Sources: https://github.com/dcm4che/dcm4chee-arc 4 | Binaries: https://sourceforge.net/projects/dcm4che/files/dcm4chee-arc4 5 | Issue Tracker: http://www.dcm4che.org/jira/browse/ARCH 6 | 7 | DICOM Archive Java EE application running in JBoss AS 7. 8 | 9 | This is a complete rewrite of [DCM4CHEE Archive 2.x](http://www.dcm4che.org/confluence/display/ee2/Home). 10 | 11 | One major improvement to 2.x is the use of LDAP as central configuration, 12 | compliant to the DICOM Application Configuration Management Profile, 13 | specified in [DICOM 2011, Part 15][1], Annex H. 14 | 15 | This Alpha version supports DICOM and HL7 Services required for 16 | compliance with IHE Radiology Workflow Integration Profiles: 17 | 18 | - [Scheduled Workflow (SWF)][2] 19 | - [Patient Information Reconciliation (PIR)][3] 20 | - [Imaging Object Change Management (IOCM)][4] 21 | 22 | for IHE Actor Image Manager/Archive, including the new 23 | 24 | - [Multiple Identity Resolution Option][5] 25 | 26 | for these Profiles. 27 | 28 | Additionally it supports 29 | 30 | - compression/decompression of images 31 | - WADO URI Service 32 | - [WADO by means of RESTful Services (WADO-RS)][6] 33 | - [Store Over the Web by RESTful Services (STOW-RS)][7] 34 | - [Query based on ID for DICOM Objects by RESTful Services (QIDO-RS)][8] 35 | 36 | There are still major gaps compared to the functionality of DCM4CHEE Archive 2.x: 37 | 38 | - no Web-interface for administration 39 | - no auto-routing 40 | - no auto-switch of storage filesystems 41 | - no HSM support 42 | - no import of HL7 ORM messages in DICOM Modality Worklist 43 | 44 | In long term, 4.x will provide the functionality of 2.x, and there will 45 | be migration tools to upgrade existing installations of 2.x to 4.x. 46 | 47 | Build 48 | ----- 49 | After installation of [Maven 3](http://maven.apache.org): 50 | 51 | > mvn install -D db={db2|firebird|h2|mysql|oracle|psql|sqlserver} 52 | 53 | Installation 54 | ------------ 55 | See [INSTALL.md](https://github.com/dcm4che/dcm4chee-arc/blob/master/INSTALL.md). 56 | 57 | License 58 | ------- 59 | * [Mozilla Public License Version 1.1](http://www.mozilla.org/MPL/1.1/) 60 | 61 | [1]: ftp://medical.nema.org/medical/dicom/2011/11_15pu.pdf 62 | [2]: http://wiki.ihe.net/index.php?title=Scheduled_Workflow 63 | [3]: http://wiki.ihe.net/index.php?title=Patient_Information_Reconciliation 64 | [4]: http://www.ihe.net/Technical_Framework/upload/IHE_RAD_Suppl_IOCM_Rev1-1_TI_2011-05-17.pdf 65 | [5]: http://www.ihe.net/Technical_Framework/upload/IHE_RAD_Suppl_MIMA.pdf 66 | [6]: ftp://medical.nema.org/medical/dicom/final/sup161_ft.pdf 67 | [7]: ftp://medical.nema.org/medical/dicom/Final/sup163_ft3.pdf 68 | [8]: ftp://medical.nema.org/medical/dicom/supps/LB/sup166_lb.pdf 69 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/req-attrs-seq-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.13.1.1 8 | 9 | 10 | 11 | OT 12 | 13 | 14 | Test data for Request Attributes Sequence 15 | 16 | 17 | 18 | 19 | Test Request Attributes Sequence 20 | 21 | 22 | 23 | 24 | REQ_ATTRS_SEQ 25 | 26 | 27 | DCM4CHEE_TESTDATA 28 | 29 | 30 | 1.2.40.0.13.1.1.99.13 31 | 32 | 33 | 1.2.40.0.13.1.1.99.13.1 34 | 35 | 36 | ACCNO_ISSUER_1 37 | 38 | 39 | 1 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | 47 | A1234 48 | 49 | 50 | 51 | 52 | DCM4CHEE_TESTDATA_ACCNO_ISSUER_1 53 | 54 | 55 | 56 | 57 | 1.2.40.0.13.1.1.99.13 58 | 59 | 60 | 9913.1 61 | 62 | 63 | P-9913 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/req-attrs-seq-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.7 5 | 6 | 7 | 1.2.40.0.13.1.1.99.14.1.1 8 | 9 | 10 | 11 | OT 12 | 13 | 14 | Test data for Request Attributes Sequence 15 | 16 | 17 | 18 | 19 | Test Request Attributes Sequence 20 | 21 | 22 | 23 | 24 | REQ_ATTRS_SEQ 25 | 26 | 27 | DCM4CHEE_TESTDATA 28 | 29 | 30 | 1.2.40.0.13.1.1.99.14 31 | 32 | 33 | 1.2.40.0.13.1.1.99.14.1 34 | 35 | 36 | ACCNO_ISSUER_2 37 | 38 | 39 | 1 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | 47 | A1234 48 | 49 | 50 | 51 | 52 | DCM4CHEE_TESTDATA_ACCNO_ISSUER_2 53 | 54 | 55 | 56 | 57 | 1.2.40.0.13.1.1.99.14 58 | 59 | 60 | 9914.1 61 | 62 | 63 | P-9914 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/webapp/browse.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | dcm4chee-arc ${project.version} 7 | 8 | 9 | 13 |
14 | 15 | 16 | 17 | 22 | 34 | 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 |
18 | S 19 | < 20 | 21 | 23 | AE Title: 24 | 25 | Limit: 26 | 27 | Order By: 28 | 33 | Study Date 35 | Study Time 36 | 37 | Fuzzy Matching 38 | Combined Date/Time Matching 39 | Time Zone Adjustment 40 |
Patient NamePatient ID>>Accession NumberModalitiesStudy Description#S#I
<<
66 |
67 | 68 | 69 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/java/org/dcm4chee/archive/entity/PatientStudySeriesAttributes.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | package org.dcm4chee.archive.entity; 39 | 40 | import org.dcm4che.data.Attributes; 41 | 42 | 43 | /** 44 | * @author Gunter Zeilinger 45 | * 46 | */ 47 | public class PatientStudySeriesAttributes { 48 | 49 | private final byte[] seriesAttrs; 50 | private final byte[] studyAttrs; 51 | private final byte[] patientAttrs; 52 | 53 | public PatientStudySeriesAttributes( 54 | byte[] seriesAttributes, 55 | byte[] studyAttributes, 56 | byte[] patientAttributes) { 57 | this.seriesAttrs = seriesAttributes; 58 | this.studyAttrs = studyAttributes; 59 | this.patientAttrs = patientAttributes; 60 | } 61 | 62 | public Attributes getAttributes() { 63 | Attributes attrs = new Attributes(); 64 | Utils.decodeAttributes(attrs, patientAttrs); 65 | Utils.decodeAttributes(attrs, studyAttrs); 66 | Utils.decodeAttributes(attrs, seriesAttrs); 67 | return attrs; 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/wado/BulkDataOutput.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | package org.dcm4chee.archive.wado; 39 | 40 | import java.io.IOException; 41 | import java.io.InputStream; 42 | import java.io.OutputStream; 43 | 44 | import javax.ws.rs.WebApplicationException; 45 | import javax.ws.rs.core.StreamingOutput; 46 | 47 | import org.dcm4che.data.BulkData; 48 | import org.dcm4che.util.SafeClose; 49 | import org.dcm4che.util.StreamUtils; 50 | 51 | /** 52 | * @author Gunter Zeilinger 53 | * 54 | */ 55 | public class BulkDataOutput implements StreamingOutput { 56 | 57 | private final BulkData bulkData; 58 | 59 | public BulkDataOutput(BulkData bulkData) { 60 | this.bulkData = bulkData; 61 | } 62 | 63 | @Override 64 | public void write(OutputStream out) throws IOException, 65 | WebApplicationException { 66 | InputStream in = bulkData.openStream(); 67 | try { 68 | StreamUtils.skipFully(in, bulkData.offset); 69 | StreamUtils.copy(in, out, bulkData.length); 70 | } finally { 71 | SafeClose.close(in); 72 | } 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/wado/ZipOutput.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | package org.dcm4chee.archive.wado; 39 | 40 | import java.io.IOException; 41 | import java.io.OutputStream; 42 | import java.util.ArrayList; 43 | import java.util.zip.ZipEntry; 44 | import java.util.zip.ZipOutputStream; 45 | 46 | import javax.ws.rs.WebApplicationException; 47 | import javax.ws.rs.core.StreamingOutput; 48 | 49 | /** 50 | * @author Gunter Zeilinger 51 | * 52 | */ 53 | public class ZipOutput implements StreamingOutput { 54 | 55 | private final ArrayList entries = 56 | new ArrayList(); 57 | 58 | @Override 59 | public void write(OutputStream out) throws IOException, 60 | WebApplicationException { 61 | ZipOutputStream zout = new ZipOutputStream(out); 62 | int count = 0; 63 | for (StreamingOutput entry : entries) { 64 | zout.putNextEntry(new ZipEntry(++count + ".dcm")); 65 | entry.write(zout); 66 | zout.closeEntry(); 67 | } 68 | zout.finish(); 69 | } 70 | 71 | public void addEntry(StreamingOutput entry) { 72 | entries.add(entry); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/mpps-set.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20120130 5 | 6 | 7 | 1100 8 | 9 | 10 | COMPLETED 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 1.2.840.10008.5.1.4.1.1.2 22 | 23 | 24 | 1.2.40.0.13.1.1.99.20110607.1.1 25 | 26 | 27 | 28 | 29 | 1.2.840.10008.5.1.4.1.1.2 30 | 31 | 32 | 1.2.40.0.13.1.1.99.20110607.1234.1.2 33 | 34 | 35 | 36 | 37 | UNKNOWN 38 | 39 | 40 | 1.2.40.0.13.1.1.99.20110607.1 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 1.2.840.10008.5.1.4.1.1.11.1 52 | 53 | 54 | 1.2.40.0.13.1.1.99.20110607.2.1 55 | 56 | 57 | 58 | 59 | UNKNOWN 60 | 61 | 62 | 1.2.40.0.13.1.1.99.20110607.2 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/java/org/dcm4chee/archive/entity/ScheduledStationAETitle.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.entity; 40 | 41 | import java.io.Serializable; 42 | 43 | import javax.persistence.Basic; 44 | import javax.persistence.Column; 45 | import javax.persistence.Entity; 46 | import javax.persistence.GeneratedValue; 47 | import javax.persistence.GenerationType; 48 | import javax.persistence.Id; 49 | import javax.persistence.Table; 50 | 51 | /** 52 | * @author Gunter Zeilinger 53 | */ 54 | @Entity 55 | @Table(name = "sps_station_aet") 56 | public class ScheduledStationAETitle implements Serializable { 57 | 58 | private static final long serialVersionUID = -145604862103707241L; 59 | 60 | public ScheduledStationAETitle() {} 61 | 62 | public ScheduledStationAETitle(String aeTitle) { 63 | this.aeTitle = aeTitle; 64 | } 65 | 66 | @Id 67 | @GeneratedValue(strategy=GenerationType.IDENTITY) 68 | @Column(name = "pk") 69 | private long pk; 70 | 71 | @Basic(optional = false) 72 | @Column(name = "station_aet") 73 | private String aeTitle; 74 | 75 | public long getPk() { 76 | return pk; 77 | } 78 | 79 | public String getAETitle() { 80 | return aeTitle; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/java/org/dcm4chee/archive/test/util/Deployments.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2012 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.test.util; 40 | 41 | import java.io.File; 42 | 43 | import org.jboss.shrinkwrap.api.ShrinkWrap; 44 | import org.jboss.shrinkwrap.api.spec.WebArchive; 45 | import org.jboss.shrinkwrap.resolver.api.maven.Maven; 46 | import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; 47 | 48 | /** 49 | * @author Gunter Zeilinger 50 | * 51 | */ 52 | public abstract class Deployments { 53 | 54 | private static final String DCM4CHEE_ARC_CONF = 55 | "org.dcm4che.dcm4chee-arc:dcm4chee-arc-conf"; 56 | 57 | private static final String DCM4CHEE_ARC_ENTITY = 58 | System.getProperty("dcm4chee-arc-entity"); 59 | 60 | public static WebArchive createWebArchive() { 61 | PomEquippedResolveStage resolver = Maven.resolver().loadPomFromFile("pom.xml"); 62 | 63 | return ShrinkWrap.create(WebArchive.class, "test.war") 64 | .addAsLibraries( 65 | resolver.resolve(DCM4CHEE_ARC_CONF).withoutTransitivity().as(File.class)) 66 | .addAsLibraries( 67 | resolver.resolve(DCM4CHEE_ARC_ENTITY).withoutTransitivity().as(File.class)); 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/verifying-observer-seq-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.2.840.10008.5.1.4.1.1.88.11 5 | 6 | 7 | 1.2.40.0.13.1.1.99.23.1.1 8 | 9 | 10 | 20110629 11 | 12 | 13 | 20110629 14 | 15 | 16 | 1300 17 | 18 | 19 | 1430 20 | 21 | 22 | SR 23 | 24 | 25 | Test Verifying Observer Sequence 26 | 27 | 28 | 29 | 30 | Test Verifying Observer Sequence 31 | 32 | 33 | 34 | 35 | VERIFYING_OBSERVER_SEQ 36 | 37 | 38 | DCM4CHEE_TESTDATA 39 | 40 | 41 | 1.2.40.0.13.1.1.99.23 42 | 43 | 44 | 1.2.40.0.13.1.1.99.23.1 45 | 46 | 47 | VERIFYING_OBSERV 48 | 49 | 50 | 1 51 | 52 | 53 | 2 54 | 55 | 56 | 57 | 58 | CONCEPT_NAME_1 59 | 60 | 61 | 99DCM4CHEE_TEST 62 | 63 | 64 | Meaning of CONCEPT_NAME_1 65 | 66 | 67 | 68 | 69 | PARTIAL 70 | 71 | 72 | UNVERIFIED 73 | 74 | 75 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/ArchiveApplication.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | package org.dcm4chee.archive; 39 | 40 | import java.util.Collections; 41 | import java.util.HashSet; 42 | import java.util.Set; 43 | 44 | import javax.ws.rs.ApplicationPath; 45 | import javax.ws.rs.core.Application; 46 | 47 | import org.dcm4chee.archive.qido.QidoRS; 48 | import org.dcm4chee.archive.resteasy.LogInterceptor; 49 | import org.dcm4chee.archive.stow.StowRS; 50 | import org.dcm4chee.archive.wado.WadoRS; 51 | import org.dcm4chee.archive.wado.WadoURI; 52 | 53 | /** 54 | * @author Gunter Zeilinger 55 | * 56 | */ 57 | @ApplicationPath("/rs") 58 | public class ArchiveApplication extends Application { 59 | 60 | private final Set> classes = new HashSet>(4); 61 | 62 | public ArchiveApplication() { 63 | classes.add(WadoURI.class); 64 | classes.add(WadoRS.class); 65 | classes.add(StowRS.class); 66 | classes.add(QidoRS.class); 67 | classes.add(LogInterceptor.class); 68 | } 69 | 70 | @Override 71 | public Set getSingletons() { 72 | return Collections.singleton((Object) Archive.getInstance()); 73 | } 74 | 75 | @SuppressWarnings({ "unchecked", "rawtypes" }) 76 | @Override 77 | public Set getClasses() { 78 | return classes; 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /dcm4chee-arc-assembly/src/main/assembly/dist.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | ${db} 6 | 7 | zip 8 | 9 | 10 | 11 | .. 12 | 13 | INSTALL.md 14 | README.md 15 | LICENSE.txt 16 | 17 | . 18 | dos 19 | 20 | 21 | ../dcm4chee-arc-conf/src/main/config 22 | . 23 | 24 | configuration/dcm4chee-arc/ldap.properties 25 | configuration/dcm4chee-arc/*.xsl 26 | ldap/** 27 | prefs/** 28 | 29 | 30 | ldap/unldif.sed 31 | 32 | dos 33 | 34 | 35 | ../dcm4chee-arc-conf/src/main/config 36 | . 37 | 38 | ldap/unldif.sed 39 | 40 | unix 41 | 42 | 43 | ../dcm4chee-arc-conf/src/main/config 44 | . 45 | 46 | configuration/dcm4chee-arc/key.jks 47 | 48 | keep 49 | 50 | 51 | ../dcm4chee-arc-entity/src/main 52 | 53 | sql/create-index.ddl 54 | 55 | . 56 | dos 57 | 58 | 59 | ../dcm4chee-arc-entity/target 60 | 61 | create-table-${db}.ddl 62 | 63 | sql 64 | dos 65 | 66 | 67 | 68 | 69 | deploy 70 | 71 | org.dcm4che.dcm4chee-arc:dcm4chee-arc-service 72 | 73 | false 74 | 75 | 76 | jboss-module 77 | 78 | org.dcm4che:dcm4che-jboss-modules 79 | org.dcm4che:querydsl-jboss-modules 80 | org.dcm4che:jdbc-jboss-modules 81 | org.dcm4che:jai-imageio-jboss-modules 82 | 83 | false 84 | 85 | 86 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/java/org/dcm4chee/archive/entity/EntityLogger.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.entity; 40 | 41 | import org.slf4j.Logger; 42 | import org.slf4j.LoggerFactory; 43 | 44 | /** 45 | * @author Damien Evans 46 | * @author Justin Falk 47 | * @author Gunter Zeilinger 48 | */ 49 | public class EntityLogger { 50 | 51 | private Logger getLogger(Object entity) { 52 | return LoggerFactory.getLogger(entity.getClass()); 53 | } 54 | 55 | public void onPrePersist(Object entity) { 56 | getLogger(entity).debug("Creating {}", entity); 57 | } 58 | 59 | public void onPostPersist(Object entity) { 60 | getLogger(entity).debug("Created {}", entity); 61 | } 62 | 63 | public void onPostLoad(Object entity) { 64 | getLogger(entity).debug("Loaded {}", entity); 65 | } 66 | 67 | public void onPreUpdate(Object entity) { 68 | getLogger(entity).debug("Updating {}", entity); 69 | } 70 | 71 | public void onPostUpdate(Object entity) { 72 | getLogger(entity).debug("Updated {}", entity); 73 | } 74 | 75 | public void onPreRemove(Object entity) { 76 | getLogger(entity).debug("Deleting {}", entity); 77 | } 78 | 79 | public void onPostRemove(Object entity) { 80 | getLogger(entity).debug("Deleted {}", entity); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/wado/DecompressedPixelDataOutput.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | package org.dcm4chee.archive.wado; 39 | 40 | import java.io.IOException; 41 | import java.io.OutputStream; 42 | 43 | import javax.imageio.stream.ImageInputStream; 44 | import javax.ws.rs.WebApplicationException; 45 | import javax.ws.rs.core.StreamingOutput; 46 | 47 | import org.dcm4che.imageio.codec.Decompressor; 48 | import org.dcm4che.util.SafeClose; 49 | 50 | /** 51 | * @author Gunter Zeilinger 52 | * 53 | */ 54 | public class DecompressedPixelDataOutput implements StreamingOutput { 55 | 56 | private final Decompressor decompressor; 57 | private final int frameIndex; 58 | 59 | public DecompressedPixelDataOutput(Decompressor decompressor, int frameIndex) { 60 | this.decompressor = decompressor; 61 | this.frameIndex = frameIndex; 62 | } 63 | 64 | @Override 65 | public void write(OutputStream output) throws IOException, 66 | WebApplicationException { 67 | if (frameIndex == -1) 68 | decompressor.writeTo(output); 69 | else { 70 | ImageInputStream iis = decompressor.createImageInputStream(); 71 | try { 72 | decompressor.writeFrameTo(iis, frameIndex, output); 73 | } finally { 74 | SafeClose.close(iis); 75 | } 76 | } 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/util/BeanLocator.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2012 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.util; 40 | 41 | import javax.naming.InitialContext; 42 | import javax.naming.NamingException; 43 | 44 | /** 45 | * @author Gunter Zeilinger 46 | * 47 | */ 48 | public class BeanLocator { 49 | 50 | private static final String GLOBAL_JNDI = "java:global/dcm4chee-arc/"; 51 | 52 | public static T lookup(Class beanClass) { 53 | return lookup(beanClass, GLOBAL_JNDI + beanClass.getSimpleName()); 54 | } 55 | 56 | public static T lookup(Class beanClass, String jndiName) { 57 | return beanClass.cast(lookup(jndiName)); 58 | } 59 | 60 | public static Object lookup(String jndiName) { 61 | InitialContext ctx = null; 62 | try { 63 | ctx = new InitialContext(); 64 | return ctx.lookup(jndiName); 65 | } catch (NamingException e) { 66 | throw new IllegalStateException( 67 | "Cannot lookup: " + jndiName + ". Reason: " + e, 68 | e.getCause()); 69 | } finally { 70 | try { 71 | ctx.close(); 72 | } catch (NamingException e) { 73 | throw new IllegalStateException( 74 | "Cannot close InitialContext. Reason: " + e, 75 | e.getCause()); 76 | } 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/dao/CodeService.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2012 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.dao; 40 | 41 | import javax.ejb.Stateless; 42 | import javax.persistence.EntityManager; 43 | import javax.persistence.NoResultException; 44 | import javax.persistence.PersistenceContext; 45 | import javax.persistence.TypedQuery; 46 | 47 | import org.dcm4chee.archive.entity.Code; 48 | 49 | /** 50 | * @author Gunter Zeilinger 51 | * 52 | */ 53 | @Stateless 54 | public class CodeService { 55 | 56 | @PersistenceContext 57 | private EntityManager em; 58 | 59 | public Code findOrCreate(Code code) { 60 | try { 61 | String codingSchemeVersion = code.getCodingSchemeVersion(); 62 | TypedQuery query = em.createNamedQuery( 63 | codingSchemeVersion == null 64 | ? Code.FIND_BY_CODE_VALUE_WITHOUT_SCHEME_VERSION 65 | : Code.FIND_BY_CODE_VALUE_WITH_SCHEME_VERSION, 66 | Code.class) 67 | .setParameter(1, code.getCodeValue()) 68 | .setParameter(2, code.getCodingSchemeDesignator()); 69 | if (codingSchemeVersion != null) 70 | query.setParameter(3, codingSchemeVersion); 71 | return query.getSingleResult(); 72 | } catch (NoResultException e) { 73 | em.persist(code); 74 | em.flush(); 75 | em.refresh(code); 76 | return code; 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/java/org/dcm4chee/archive/entity/dialect/PatchedMySQL5InnoDBDialect.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2012 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.entity.dialect; 40 | 41 | import java.sql.Types; 42 | 43 | import org.hibernate.dialect.MySQL5InnoDBDialect; 44 | import org.hibernate.internal.util.StringHelper; 45 | 46 | /** 47 | * @author Torsten Krah 48 | * @see https://hibernate.onjira.com/browse/HHH-6935 49 | * 50 | */ 51 | public class PatchedMySQL5InnoDBDialect extends MySQL5InnoDBDialect { 52 | 53 | public PatchedMySQL5InnoDBDialect() { 54 | registerColumnType(Types.BOOLEAN, "bit"); 55 | } 56 | 57 | // Avoid explicit creation of index, so MySQL will drop the implicit 58 | // created index on later explicit creation of another index that can be 59 | // used to enforce the foreign key constraint. 60 | @Override 61 | public String getAddForeignKeyConstraintString(String constraintName, 62 | String[] foreignKey, String referencedTable, String[] primaryKey, 63 | boolean referencesPrimaryKey) { 64 | String cols = StringHelper.join(", ", foreignKey); 65 | return new StringBuilder(30) 66 | .append(" add constraint ") 67 | .append(constraintName) 68 | .append(" foreign key (") 69 | .append(cols) 70 | .append(") references ") 71 | .append(referencedTable) 72 | .append(" (") 73 | .append( StringHelper.join(", ", primaryKey) ) 74 | .append(')') 75 | .toString(); 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/test/resources/testdata/mpps-create.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CT 5 | 6 | 7 | 8 | 9 | 10 | Test StoreService 11 | 12 | 13 | 14 | 15 | STORE_SERVICE_TEST 16 | 17 | 18 | DCM4CHEE_TESTDATA 19 | 20 | 21 | 22 | 23 | TEST-20110607 24 | 25 | 26 | SOURCE_AET 27 | 28 | 29 | 30 | 31 | 20120130 32 | 33 | 34 | 1050 35 | 36 | 37 | 38 | 39 | IN PROGRESS 40 | 41 | 42 | PPS-20120130 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | A-20110607 51 | 52 | 53 | 54 | 1.2.40.0.13.1.1.99.20110607 55 | 56 | 57 | 58 | 59 | SPS-20110607 60 | 61 | 62 | P-20110607 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/query/dao/AbstractQuery.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.query.dao; 40 | 41 | import org.dcm4che.data.Attributes; 42 | import org.dcm4chee.archive.common.QueryParam; 43 | import org.hibernate.ScrollMode; 44 | import org.hibernate.ScrollableResults; 45 | 46 | import com.mysema.query.jpa.hibernate.HibernateQuery; 47 | import com.mysema.query.types.Expression; 48 | 49 | /** 50 | * @author Gunter Zeilinger 51 | */ 52 | abstract class AbstractQuery { 53 | 54 | protected final QueryService queryService; 55 | protected final QueryParam queryParam; 56 | private final HibernateQuery query; 57 | private final Expression[] select; 58 | private final boolean optionalKeyNotSupported; 59 | 60 | protected AbstractQuery(QueryService queryService, HibernateQuery query, 61 | QueryParam queryParam, boolean optionalKeyNotSupported, 62 | Expression... select) { 63 | this.queryService = queryService; 64 | this.query = query; 65 | this.select = select; 66 | this.queryParam = queryParam; 67 | this.optionalKeyNotSupported = optionalKeyNotSupported; 68 | } 69 | 70 | public ScrollableResults execute() { 71 | return query.scroll(ScrollMode.FORWARD_ONLY, select); 72 | } 73 | 74 | public final HibernateQuery getQuery() { 75 | return query; 76 | } 77 | 78 | public final boolean optionalKeyNotSupported() { 79 | return optionalKeyNotSupported; 80 | } 81 | 82 | protected abstract Attributes toAttributes(ScrollableResults results); 83 | 84 | } 85 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/java/org/dcm4chee/archive/entity/SOPInstanceReference.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | package org.dcm4chee.archive.entity; 39 | 40 | /** 41 | * @author Gunter Zeilinger 42 | * 43 | */ 44 | public class SOPInstanceReference { 45 | 46 | public final String studyInstanceUID; 47 | public final String performedProcedureStepClassUID; 48 | public final String performedProcedureStepInstanceUID; 49 | public final String seriesInstanceUID; 50 | public final String sopClassUID; 51 | public final String sopInstanceUID; 52 | public final Availability availability; 53 | public final String retrieveAETs; 54 | public final String externalRetrieveAET; 55 | 56 | public SOPInstanceReference(String studyInstanceUID, 57 | String performedProcedureStepClassUID, 58 | String performedProcedureStepInstanceUID, 59 | String seriesInstanceUID, 60 | String sopClassUID, 61 | String sopInstanceUID, 62 | Availability availability, 63 | String retrieveAETs, 64 | String externalRetrieveAET) { 65 | this.studyInstanceUID = studyInstanceUID; 66 | this.performedProcedureStepClassUID = performedProcedureStepClassUID; 67 | this.performedProcedureStepInstanceUID = performedProcedureStepInstanceUID; 68 | this.seriesInstanceUID = seriesInstanceUID; 69 | this.sopClassUID = sopClassUID; 70 | this.sopInstanceUID = sopInstanceUID; 71 | this.availability = availability; 72 | this.retrieveAETs = retrieveAETs; 73 | this.externalRetrieveAET = externalRetrieveAET; 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /dcm4chee-arc-entity/src/main/java/org/dcm4chee/archive/entity/Availability.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.entity; 40 | 41 | /** 42 | * @author Damien Evans 43 | * @author Justin Falk 44 | * @author Gunter Zeilinger 45 | */ 46 | public enum Availability { 47 | ONLINE, 48 | NEARLINE, 49 | OFFLINE, 50 | REJECTED_FOR_QUALITY_REASONS_REJECTION_NOTE, 51 | REJECTED_FOR_QUALITY_REASONS, 52 | REJECTED_FOR_PATIENT_SAFETY_REASONS_REJECTION_NOTE, 53 | REJECTED_FOR_PATIENT_SAFETY_REASONS, 54 | INCORRECT_MODALITY_WORKLIST_ENTRY_REJECTION_NOTE, 55 | INCORRECT_MODALITY_WORKLIST_ENTRY, 56 | DATA_RETENTION_PERIOD_EXPIRED_REJECTION_NOTE, 57 | DATA_RETENTION_PERIOD_EXPIRED; 58 | 59 | public String toCodeString() { 60 | return available() ? name() : "UNAVAILABLE"; 61 | } 62 | 63 | public boolean available() { 64 | return compareTo(OFFLINE) <= 0; 65 | } 66 | 67 | public static Availability availabilityOfRejectedObject(Availability avail) { 68 | switch (avail) { 69 | case REJECTED_FOR_QUALITY_REASONS_REJECTION_NOTE: 70 | return REJECTED_FOR_QUALITY_REASONS; 71 | case REJECTED_FOR_PATIENT_SAFETY_REASONS_REJECTION_NOTE: 72 | return REJECTED_FOR_PATIENT_SAFETY_REASONS_REJECTION_NOTE; 73 | case INCORRECT_MODALITY_WORKLIST_ENTRY_REJECTION_NOTE: 74 | return INCORRECT_MODALITY_WORKLIST_ENTRY; 75 | case DATA_RETENTION_PERIOD_EXPIRED_REJECTION_NOTE: 76 | return DATA_RETENTION_PERIOD_EXPIRED; 77 | default: 78 | throw new IllegalArgumentException("availability: " + avail); 79 | } 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/wado/CompressedPixelDataOutput.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | package org.dcm4chee.archive.wado; 39 | 40 | import java.io.IOException; 41 | import java.io.InputStream; 42 | import java.io.OutputStream; 43 | import java.util.Iterator; 44 | 45 | import javax.ws.rs.WebApplicationException; 46 | import javax.ws.rs.core.StreamingOutput; 47 | 48 | import org.dcm4che.data.BulkData; 49 | import org.dcm4che.data.Fragments; 50 | import org.dcm4che.util.SafeClose; 51 | import org.dcm4che.util.StreamUtils; 52 | 53 | /** 54 | * @author Gunter Zeilinger 55 | * 56 | */ 57 | public class CompressedPixelDataOutput implements StreamingOutput { 58 | 59 | private final Fragments fragments; 60 | 61 | public CompressedPixelDataOutput(Fragments fragments) { 62 | this.fragments = fragments; 63 | } 64 | 65 | @Override 66 | public void write(OutputStream out) throws IOException, 67 | WebApplicationException { 68 | Iterator iter = fragments.iterator(); 69 | iter.next(); // skip frame offset table 70 | BulkData fragment = (BulkData) iter.next(); 71 | InputStream in = fragment.openStream(); 72 | try { 73 | StreamUtils.skipFully(in, fragment.offset); 74 | StreamUtils.copy(in, out, fragment.length); 75 | while (iter.hasNext()) { 76 | long streamPosition = fragment.offset + fragment.length; 77 | fragment = (BulkData) iter.next(); 78 | StreamUtils.skipFully(in, fragment.offset - streamPosition); 79 | StreamUtils.copy(in, out, fragment.length); 80 | } 81 | } finally { 82 | SafeClose.close(in); 83 | } 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | org.dcm4che.dcm4chee-arc 5 | dcm4chee-arc-parent 6 | 4.1.0.Alpha3 7 | 8 | dcm4chee-arc-conf 9 | dcm4chee-arc-conf 10 | 11 | true 12 | 13 | 14 | 15 | org.dcm4che 16 | dcm4che-conf-ldap-hl7 17 | 18 | 19 | org.dcm4che 20 | dcm4che-conf-prefs-hl7 21 | 22 | 23 | org.dcm4che 24 | dcm4che-net-hl7 25 | 26 | 27 | org.dcm4che 28 | dcm4che-net-imageio 29 | 30 | 31 | org.dcm4che 32 | dcm4che-soundex 33 | 34 | 35 | org.dcm4che 36 | dcm4che-conf-ldap-imageio 37 | 38 | 39 | org.dcm4che 40 | dcm4che-conf-prefs-imageio 41 | 42 | 43 | org.dcm4che 44 | dcm4che-conf-ldap-audit 45 | test 46 | 47 | 48 | org.dcm4che 49 | dcm4che-conf-prefs-audit 50 | test 51 | 52 | 53 | 54 | 55 | 56 | maven-jar-plugin 57 | 2.3.2 58 | 59 | 60 | 61 | org.dcm4che.conf.ldap-hl7, org.dcm4che.conf.prefs-hl7, org.dcm4che.net-hl7, org.dcm4che.soundex 62 | 63 | 64 | 65 | 66 | 67 | org.apache.maven.plugins 68 | maven-surefire-plugin 69 | 2.12 70 | 71 | ${skipTests} 72 | 73 | 74 | 75 | 76 | 77 | 78 | prefs 79 | true 80 | 81 | 82 | ldap 83 | ldap 84 | 85 | 86 | src/test/filters/${ldap}.properties 87 | 88 | 89 | 90 | src/test/resources 91 | 92 | 93 | src/test/resources-ldap 94 | true 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /dcm4chee-arc-service/src/main/java/org/dcm4chee/archive/query/dao/PatientQuery.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.query.dao; 40 | 41 | import org.dcm4che.data.Attributes; 42 | import org.dcm4chee.archive.common.IDWithIssuer; 43 | import org.dcm4chee.archive.common.QueryParam; 44 | import org.dcm4chee.archive.entity.QPatient; 45 | import org.dcm4chee.archive.entity.Utils; 46 | import org.dcm4chee.archive.util.query.Builder; 47 | import org.hibernate.ScrollableResults; 48 | import org.hibernate.StatelessSession; 49 | 50 | import com.mysema.query.BooleanBuilder; 51 | import com.mysema.query.jpa.hibernate.HibernateQuery; 52 | 53 | /** 54 | * @author Gunter Zeilinger 55 | */ 56 | class PatientQuery extends AbstractQuery { 57 | 58 | public PatientQuery(QueryService queryService, IDWithIssuer[] pids, 59 | Attributes keys, QueryParam queryParam) { 60 | super(queryService, query(queryService.session(), pids, keys, queryParam), 61 | queryParam, false, 62 | QPatient.patient.pk, 63 | QPatient.patient.encodedAttributes); 64 | } 65 | 66 | private static HibernateQuery query(StatelessSession session, IDWithIssuer[] pids, 67 | Attributes keys, QueryParam queryParam) { 68 | BooleanBuilder builder = new BooleanBuilder(); 69 | Builder.addPatientLevelPredicates(builder, pids, keys, queryParam); 70 | return new HibernateQuery(session) 71 | .from(QPatient.patient) 72 | .where(builder); 73 | } 74 | 75 | @Override 76 | protected Attributes toAttributes(ScrollableResults results) { 77 | Attributes attrs = new Attributes(); 78 | Utils.decodeAttributes(attrs, results.getBinary(1)); 79 | return attrs; 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /dcm4chee-arc-conf/src/main/java/org/dcm4chee/archive/conf/AttributeFilter.java: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * The contents of this file are subject to the Mozilla Public License Version 5 | * 1.1 (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * http://www.mozilla.org/MPL/ 8 | * 9 | * Software distributed under the License is distributed on an "AS IS" basis, 10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 | * for the specific language governing rights and limitations under the 12 | * License. 13 | * 14 | * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 15 | * Java(TM), hosted at https://github.com/gunterze/dcm4che. 16 | * 17 | * The Initial Developer of the Original Code is 18 | * Agfa Healthcare. 19 | * Portions created by the Initial Developer are Copyright (C) 2011 20 | * the Initial Developer. All Rights Reserved. 21 | * 22 | * Contributor(s): 23 | * See @authors listed below 24 | * 25 | * Alternatively, the contents of this file may be used under the terms of 26 | * either the GNU General Public License Version 2 or later (the "GPL"), or 27 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 | * in which case the provisions of the GPL or the LGPL are applicable instead 29 | * of those above. If you wish to allow use of your version of this file only 30 | * under the terms of either the GPL or the LGPL, and not to allow others to 31 | * use your version of this file under the terms of the MPL, indicate your 32 | * decision by deleting the provisions above and replace them with the notice 33 | * and other provisions required by the GPL or the LGPL. If you do not delete 34 | * the provisions above, a recipient may use your version of this file under 35 | * the terms of any one of the MPL, the GPL or the LGPL. 36 | * 37 | * ***** END LICENSE BLOCK ***** */ 38 | 39 | package org.dcm4chee.archive.conf; 40 | 41 | import java.io.Serializable; 42 | import java.util.Arrays; 43 | 44 | import org.dcm4che.data.Attributes; 45 | import org.dcm4che.data.ValueSelector; 46 | 47 | /** 48 | * @author Gunter Zeilinger 49 | */ 50 | public class AttributeFilter implements Serializable { 51 | 52 | private static final long serialVersionUID = -2417549681350544302L; 53 | 54 | private final int[] selection; 55 | private ValueSelector customAttribute1; 56 | private ValueSelector customAttribute2; 57 | private ValueSelector customAttribute3; 58 | 59 | public AttributeFilter(int... selection) { 60 | Arrays.sort(this.selection = selection); 61 | } 62 | 63 | public int[] getSelection() { 64 | return selection; 65 | } 66 | 67 | public static String selectStringValue(Attributes attrs, ValueSelector selector, String defVal) { 68 | return selector != null ? selector.selectStringValue(attrs, defVal) : defVal; 69 | } 70 | 71 | public void setCustomAttribute1(ValueSelector customAttribute1) { 72 | this.customAttribute1 = customAttribute1; 73 | } 74 | 75 | public ValueSelector getCustomAttribute1() { 76 | return customAttribute1; 77 | } 78 | 79 | public void setCustomAttribute2(ValueSelector customAttribute2) { 80 | this.customAttribute2 = customAttribute2; 81 | } 82 | 83 | public ValueSelector getCustomAttribute2() { 84 | return customAttribute2; 85 | } 86 | 87 | public void setCustomAttribute3(ValueSelector customAttribute3) { 88 | this.customAttribute3 = customAttribute3; 89 | } 90 | 91 | public ValueSelector getCustomAttribute3() { 92 | return customAttribute3; 93 | } 94 | 95 | } 96 | --------------------------------------------------------------------------------