Welcome to EasyPACS.

Easy PACS allows you to setup a PACS Server with online dicom viewer. It uses dcm4che API tools re-written with the latest frameworks such as Spring Boot and Gradle Build Environment. No need to setup a server anymore, the jar file is the file you only need and it already contains the web-server within. Thanks to Spring Boot, it enables the jar file to become both the listener (server) and web at the same time.

Object Model

The server accepts all the dicom files and generates its entity data that is populated to relational database. The dicom entities are Patient, Study, Series, Equipment and Instance. They are reflected to your MYSQL database by the JPA Entity Manager. It converts the entities into re-usable object models.

Infrastructure

Easy PACS uses several frameworks and platforms such as Spring Boot Framework, JPA/Hibernate, Thymeleaf and Gradle. The source code will inspire other developers as well in terms of using a compact platform with less code and maximum efficiency. Remember that both server and web is contained by one single jar file that makes setup very easy.

Why EasyPACS?

Plenty of PACS servers exist in the market, so you might ask why another open-source PACS server? The PACS has right now $3 billion market size and they assume it will grow over $4 billion in 2018 with different archive models such as VNA (Vendor Neutral Archive). The problem is that the vendors charge too much mostly based on number of images just for standalone PACS servers.

Solution

The health facilities need a cheaper PACS server along with the ability to customize the PACS according to their workflow logic. As experienced PACS developers, we have been working on several PACSs for years and all of them needed different logic. Setting up a standalone PACS is usually not enough, especially not worth when it is very expensive. In short, we provide the cheapest and best customization of PACS solutions ever for the health organizations.

Dicom Standards

The standards of dicoms are specified by nema.org an association for the need of medical standards. PACS is known Picture Archiving and Communication System and several PACSs run in the market which most of them look very similar. They all rely on the same dicom standards with different enterprise approaches. We are familiar with the standards of dicom files. So, we created the most robust and easiest dicom entity model for you.

Database is MYSQL

We use MYSQL database for its flexibility and ease of usage. Please run the below sql queries to generate your data tables.

CREATE TABLE tbl_patient (pkTBLPatientID BIGINT AUTO_INCREMENT NOT NULL, createdDate DATETIME, modifiedDate DATETIME, patientAge VARCHAR(10), patientBirthday DATE, patientID VARCHAR(100), patientName VARCHAR(100), patientSex VARCHAR(10), PRIMARY KEY (pkTBLPatientID))
CREATE TABLE tbl_study (pkTBLStudyID BIGINT AUTO_INCREMENT NOT NULL, accessionNumber VARCHAR(30), additionalPatientHistory VARCHAR(300), admittingDiagnosesDescription VARCHAR(200), createdDate DATETIME, modifiedDate DATETIME, referringPhysicianName VARCHAR(100), studyDateTime DATETIME, studyDescription VARCHAR(300), studyID VARCHAR(50), studyInstanceUID VARCHAR(100), studyPriorityID VARCHAR(40), studyStatusID VARCHAR(40), pkTBLPatientID BIGINT, PRIMARY KEY (pkTBLStudyID))
CREATE TABLE tbl_series (pkTBLSeriesID BIGINT AUTO_INCREMENT NOT NULL, bodyPartExamined VARCHAR(40), createdDate DATETIME, laterality VARCHAR(100), modifiedDate DATETIME, operatorsName VARCHAR(50), patientPosition VARCHAR(30), protocolName VARCHAR(100), seriesDateTime DATETIME, seriesDescription VARCHAR(100), seriesInstanceUID VARCHAR(100), seriesNumber INTEGER, pkTBLStudyID BIGINT, PRIMARY KEY (pkTBLSeriesID))
CREATE TABLE tbl_equipment (pkTBLEquipmentID BIGINT AUTO_INCREMENT NOT NULL, conversionType VARCHAR(50), createdDate DATETIME, deviceSerialNumber VARCHAR(100), institutionAddress VARCHAR(150), institutionName VARCHAR(100), institutionalDepartmentName VARCHAR(50), manufacturer VARCHAR(100), manufacturerModelName VARCHAR(100), modality VARCHAR(50), modifiedDate DATETIME, softwareVersion VARCHAR(100), stationName VARCHAR(60), pkTBLSeriesID BIGINT, PRIMARY KEY (pkTBLEquipmentID))
CREATE TABLE tbl_instance (pkTBLInstanceID BIGINT AUTO_INCREMENT NOT NULL, acquisitionDateTime DATETIME, contentDateTime DATETIME, createdDate DATETIME, exposureTime INTEGER, imageOrientation VARCHAR(40), imagePosition VARCHAR(80), imageType VARCHAR(40), instanceNumber INTEGER, kvp VARCHAR(40), mediaStorageSopInstanceUID VARCHAR(100), modifiedDate DATETIME, patientOrientation VARCHAR(40), pixelSpacing FLOAT, sliceLocation FLOAT, sliceThickness FLOAT, sopClassUID VARCHAR(100), sopInstanceUID VARCHAR(100), transferSyntaxUID VARCHAR(100), windowCenter VARCHAR(40), windowWidth VARCHAR(40), xrayTubeCurrent INTEGER, pkTBLSeriesID BIGINT, PRIMARY KEY (pkTBLInstanceID))
ALTER TABLE tbl_study ADD CONSTRAINT FK_tbl_study_pkTBLPatientID FOREIGN KEY (pkTBLPatientID) REFERENCES tbl_patient (pkTBLPatientID)
ALTER TABLE tbl_series ADD CONSTRAINT FK_tbl_series_pkTBLStudyID FOREIGN KEY (pkTBLStudyID) REFERENCES tbl_study (pkTBLStudyID)
ALTER TABLE tbl_equipment ADD CONSTRAINT FK_tbl_equipment_pkTBLSeriesID FOREIGN KEY (pkTBLSeriesID) REFERENCES tbl_series (pkTBLSeriesID)
ALTER TABLE tbl_instance ADD CONSTRAINT FK_tbl_instance_pkTBLSeriesID FOREIGN KEY (pkTBLSeriesID) REFERENCES tbl_series (pkTBLSeriesID)

Dicom Entities

The well known dicom standard is known as Patient --> NxStudy --> MxSeries --> ZxInstances . Normally, all these data types are contained per dicom file. So, it is up to the vendor how the dicom data is processed. We created an additional entity next to the Series called 'Equipment' that shows the details of the modality being used by the dicom sender. The modality can be the CT, X-Ray or Ultrasound machine etc. Another important note is that Instance can be either the image or SR document. Here, we only use images, so we keep the instance as images on the server level.

Remember each dicom file keeps the hierarchy but is dependent on the vendor how to parse the file.

Patient --> NxStudy --> MxSeries --> ZxInstances 
Series --> Equipment
1 Patient can contain N of Studies, 
1 Study can contain M of Series
1 Series can contain Z of Instances
1 Series can contain 1 Equipment

Entity Diagram

The relationship between the entities is illustrated as below:

Easy PACS Entity Diagram

How to Setup Java Environment

Java platform is tricky. It uses 32 bit Java environment along with needed **clib**_ files to enable the image file conversions. Please download and copy paste the below clib files under your jdk folder.

  1. Put 32 bit clib_jiio.dll, clib_jiio_sse2.dll, clib_jiio_util.dll dll files under C:\Program Files (x86)\Java\jdk1.8.0_45\bin
  2. Put clibwrapper_jiio.jar, jai_imageio.jar jar files under C:\Program Files (x86)\Java\jdk1.8.0_45\jre\lib\ext\

Environmental Variables:

Make sure that your Java Environmental Variables are setup correctly

User Defined
Variable Name:  JAVA_HOME
Variable Value: C:\Program Files (x86)\Java\jdk1.8.0_45
System variables
Variable Name:  CLASSPATH
Variable Value: %JAVA_HOME%\jre\bin

Let's Download & run our jar file!

First download the folder template EasyPACS.zip file. It contains tmp directory that stores the dicom and image files. It also contains 2 files; application.properties and easy.pacs-0.0.1-SNAPSHOT.jar files. Please replace the jar file with latest versionversion.

application.properties

Please follow the below instructions to modify your application.properties file. Update your MYSQL connection string username, password and url address. Please replace localhost with your ip address if needed.

datasource.primary.url=jdbc:mysql://localhost:3306/dbdicom
datasource.primary.username=[username]
datasource.primary.password=[password]

Change PACS port number if needed (make sure port 104 is not being used) Your dicom PACS server will listen this port

pacs.ports = 104

You can also update your ae title. Here we put '*' that refers to any name of ae title

pacs.aetitle = *

Likewise, you can change the dicom and image storage paths if needed

pacs.storage.dcm = ./tmp/dcm
pacs.storage.image = ./tmp/img

You can also update your web server's port. You will access your server from http://localhost:8085

server.port=8085 

Now, we are finished with our simple settings, we can run now from the command line!

# java -jar easy.pacs-0.0.1-SNAPSHOT.jar

THAT IS IT!

Make sure that your database connection string is right, otherwise it will give hibernate error!

EasyPACS Home Page

Let's send some dicom files to the server

Our server is listening on port 104 with any name of AE Title on the localhost. We can now send dicom files to the server.

Please download the latest version of dcm4che3 toolkit. Unzip it in your disk and go to the bin directory. Use it as shown below:

# storescu -c WHATEVER@localhost:104 "C:\dcmsamples\MARTIN^ZANE^"\*

It means you send the dicom files of MARTIN^ZANE^ to the AE Title WHATEVER [it can be any name because we setup AE Title as star], to the port 104 on localhost (you can write your ip if you send remotely)

Below is the screenshot that shows how it is used on console

storescu command

If you need sample dcm files, here you can download the test dcm files of MARTIN^ZANE^. Don't worry about the HIPAA rules, it is just a test patient file.

Our server receives the incoming dicom files and starts to create the entities. This is the server page that lists the received patients. In this page, you will see the monitor messages as well that indicates the incoming patient transfers.

Patient MARTIN^ZANE^ has been received, the images will appended per dicom request

Server Page

And finally, this is the patient page that lists the latest study, series and images (instances). Remember that dicom files are saved on tmp\dcm and images are saved on tmp\img. The images are populated in real time based on existence of dicom files. So, as long as the the dicom files are there, the images will be shown per page load that means deleting jpeg images won't effect the system.

Patient

You can click the dicom thumbnail image and view in bigger mode

view image