1 757 – DICOM Gateways Behind the Scenes John Di Lorenzo.

Post on 11-Jan-2016

213 views 1 download

Tags:

transcript

1

757 – DICOM GatewaysBehind the Scenes

757 – DICOM GatewaysBehind the Scenes

John Di Lorenzo

IntroductionIntroduction

VistA Imaging’s DICOM Gateways…• Major Hub of VistA Imaging

Processing• Responsible for a wide range of

DICOM communications• In fact, is the DICOM conduit• Questions at the end of class.

OutlineOutline

• VistA Imaging Overview• DICOM Overview• DICOM Gateway: Where it Fits In• DICOM Gateway: Pieces and Parts• DICOM Text Gateway• DICOM Image Gateway• Optimization, Disaster Recovery, and

Error Correcting

VistA Imaging OverviewVistA Imaging Overview

•VistA– Veterans Information System and

Technology Architecture.– Primary system for storing and maintaining

the patient electronic medical record. Text based – Not designed for Images

•Imaging– Parallel system linked with VistA

•Both systems use program code written in Mumps and run in the Cache’ Database environment.

Terms to KnowTerms to Know

• PACS – Picture Archiving and Communication System. System designed to store and retrieve a patient’s medical Images. Historically Radiology-centered.

• DICOM – Digital Imaging and COmmunication in Medicine.

• HL7 – Medical text communication protocol. (Health Level 7)

• Modality – Image capture/processing device that complies with DICOM.

• CPRS – Computerized Patient Record System (GUI for VistA)

DICOM FundamentalsDICOM Fundamentals

• To create a standard to allow a common set of rules and protocols between vendors in the medical field, specifically Radiology (at least initially).

• Originally called ACR-NEMA 1.0 (’85) and then 2.0 (’88), and finally DICOM 3.0 (’93).

• DICOM Standard available at: http://medical.nema.org/dicom/

DICOM – Parts of StandardDICOM – Parts of Standard

• 1-Introduction and Overview• 2-Conformance• 3-Information Object Definitions• 4-Service Class Specifications• 5-Data Structures and Encoding• 6-Data Dictionary• 7-Message Exchange• 8-Network Message Support for Message Exchange• 9- RETIRED*• 10-Media Storage and File Format for Media

Interchange• 11-Media Storage Application Profiles• 12-Media Formats and Physical Media for Media

Interchange

…etc…

DICOM FundamentalsDICOM Fundamentals

• SCU (Service Class User) – Device taking a client role (example: device that sends print jobs)

• SCP (Service Class Provider) – Device that takes a host role (Example: DICOM print server).

• AE Title (Application Entity Title) – DICOM name that distinguishes DICOM devices communicating with each other.

DICOM File FormatDICOM File Format

DICOM Images are a Composite Format– Image Data for the actual picture– A “Header” area at the beginning of the file

that contains the “DICOM Header” organized in “tags”. This area is for text data associated with the image, containing•Patient Identifying information•Exam information (date of exam,

accession number, case number)•Information about acquisition modality

(manufacturer, model)•Image information (geometry, attributes)•And lots of other stuff…

DICOM Header TagsDICOM Header Tags

• A Tag represents a single piece of information.

• Tags are unique identifiers denoted with a Group and Element number.

• Group and Element numbers are in Hexadecimal format.

• Part 6 of the DICOM Standard – Data Dictionary.

DICOM Header TagsDICOM Header Tags

DICOM Header – “Private” TagsDICOM Header – “Private” Tags

• Uses Odd Group numbers. (i.e. 0009,xxxx)

• Not recognized or defined by the DICOM Standard.

• Generally used for vendor proprietary information.

• VI cannot use any of this information.

DICOM AssociationDICOM Association

SCU SCP

Associate-Request

Associate-Accept

Message

Release-Request

Release-Response

Info Required for AssociationInfo Required for Association

• AET • IP Address• Port #

Good idea to keep a spreadsheet with above info

DICOM AssociationDICOM Association

• Use option 4-1-2 to view DICOM message log to see association details****************************************************************** Connection with 127.0.0.1 on AUG 06, 2002 at 08:01:13 ****************************************************************** Recving PDU Type: 01H (A-ASSOCIATE-RQ) PDU len=206d:\DICOM\DATA1\LOGDCM.292\INCOMING.PDU ********************************************************************** Receiving A-ASSOCIATE-REQUEST on AUG 06, 2002 at 08:01:13 ********************************************************************** PDU Type: 01H (A-ASSOCIATE-RQ) Length=206Version=1 Called AE: "DICOM_STORAGE" Calling AE: "DICOM_ECHO"ITEM Type: 10H (Application Context Item) Length=21Application Context: 1.2.840.10008.3.1.1.1 (DICOM Application Context Name)ITEM Type: 20H (Presentation Context Item) Length=46Presentation Context ID: 1 Result=0 -- Transfer Syntax(es) --SUBITEM Type: 30H (Abstract Syntax Sub-Item) Length=17Presentation Context: 1.2.840.10008.1.1 (Verification SOP Class)SUBITEM Type: 40H (Transfer Syntax Sub-Item) Length=17Transfer Syntax: 1.2.840.10008.1.2 (Implicit VR Little Endian) -- End of Transfer Syntax(es) –

DICOM Association - ReleaseDICOM Association - Release

• Whoever initiated the connection must also close it…

Sending PDU Type: 04H (P-DATA-TF) Length: 90 (90)d:\DICOM\DATA1\LOGDCM.292\OUTGOING.DCM PDU len=96 PDV hdr=3, pc=1,

len=90 Recving PDU Type: 05H (A-RELEASE-RQ) PDU len=4d:\DICOM\DATA1\LOGDCM.292\INCOMING.PDU Sending PDU Type: 06H (A-RELEASE-RP) Length: 4d:\DICOM\DATA1\LOGDCM.292\OUTGOING.PDU

DICOM Gateway-Where It Fits In DICOM Gateway-Where It Fits In

Optical Archive

Patient One

DICOM Text Gateway

Patient Two

VistA

Image Storage(RAID -

Magnetic)

DICOM Image

Gateway

Patient Two

Patient Two

Patient Two

000-28-1665

X:2056

Y:1998

Patient, Two

000-28-1665

X:2056

Y:1998

Worklist Image Capture

QA/Storage

Background

Processor

Patient Two

000-28-1665

X:2056

Y:1998

??Patient Two

000-28-1665

X:2056

Y:1998

HL7

DICOM

VistA Imaging DICOM GatewaysVistA Imaging DICOM Gateways

• Characteristics:– Runs on Windows 2003 Server– Runs using the VHAxxxIA account– Runs on Cache by Intersystems

• Database Environment compatible with VistA• Provides communication with VistA (M2M

Broker) to share information.

– Image Gateway, Text Gateway, and Routing Gateway CAN be on the same box, but…

– Typically 1 Text, Multiple Image, running routing

Roles of the DICOM GatewaysRoles of the DICOM Gateways

• DICOM Text Gateway • DICOM Imaging Gateway • DICOM Secondary Storage • Image Routing• DICOM Query/Retrieve*

All the above use the same software; functionality is turned on and off as needed.

The DICOM Gateway Pieces/PartsThe DICOM Gateway Pieces/Parts

• Cache Database (Brains of the Operation)

• Telnet Windows – Window into the Cache operations

• DICOM Storage Servers (on Image Gateways)

The DICOM Gateway ConsoleThe DICOM Gateway Console

• When Caché is inactive, this icon is grey:

• When Caché is active, this icon is blue:

• This icon can be used to start and stop the Caché server. Under normal circumstances, the Caché server is started automatically when the computer is restarted, and users only need to stop and restart Caché when this is needed for maintenance purposes.

The DICOM Gateway ConsoleThe DICOM Gateway Console

GUI based management tools.

The DICOM Gateway ConsoleThe DICOM Gateway Console

The DICOM Gateway ConsoleThe DICOM Gateway Console

• Log Files

Telnet WindowsTelnet Windows

• Separate shortcuts for each gateway function (processing, status, etc.)

• Points to 127.0.0.1 (self)• Can be used remotely (be careful!)• HOST file entries associate 127.0.0.1

with a named entry• Shortcuts include menu path to

appropriate entry– Process DICOM Images 2-3

2. Image Gateway3. Process DICOM Images

DICOM Storage ServersDICOM Storage Servers

• “Serves” connection from DICOM Instruments

• Uses MAG_CSTORE.exe to receive Image(s)

• More later…

DICOM Text Gateway DICOM Text Gateway

• Supplies Modality Worklist from order entry in VistA to DICOM modalities.

• Continuously updates worklist database from VistA's MAGDHL7 global into the local global called MAGDWLST.

• Provides stored worklist items upon request from modality worklist query

DICOM Text Processing(Modality Worklist)DICOM Text Processing(Modality Worklist)

DICOM Text Gateway 1-1DICOM Text Gateway 1-1

DICOM Text Gateway – Status 1-4DICOM Text Gateway – Status 1-4

Calling AET

Number of Queries for the Day

Number of Matches on LAST query – number of active orders.

DICOM Text Processing(Modality Worklist)DICOM Text Processing(Modality Worklist)

VistA DICOM Text Gateway -- Huntington DICOM Text Gateway

1 Start Processing Text Messages from HIS 2 (Send DICOM Text Messages to Commercial PACS or Broker) 3 Display Text Gateway Statistics 4 Display Modality Worklist Statistics 5 Modality Worklist Query 6 Display a HL7 Message 7 Display a DICOM Message 8 Modify the HL7 Message Pointer 9 Generate a Daily Summary Report 10 Purge Old Modality Worklist Entries 11 Purge Old DICOM Message Files 12 Purge Old HL7 Transaction Global Nodes 13 Purge Old Audit Records

OPTION:

DICOM Dictionaries – Worklist.DICDICOM Dictionaries – Worklist.DIC

TOPCON|123|CON|OPHTH|LONG|TOPCON Eye CameraPicker_1||RAD|MRI|SHORT|Philips RF room #1ECAM1|123|RAD|NM|LONG|Siemens Rm. 3A118XR1CR950|123|RAD|RAD|LONG/NODASH|Kodak CR1

Field 1 – Application Entity Title of Modality (Calling AET). Field 2 – Site code or Location. Field 3 – Imaging Service (Either RAD or CON). Field 4 – Imaging Type

• RAD – General Radiology• CT – Computed Tomography• MRI – Magnetic Resonance

Field 5 – Accession Number Format/dashes or no dashes in SSN

Accession number SHORT = radiology case number only (1234) LONG = date–case number (031106-

1234) Field 6 – Description

DICOM Dictionaries - ImportingDICOM Dictionaries - Importing

Option 4-2-8

DICOM Dictionaries - ImportingDICOM Dictionaries - Importing

Ready to build all of the DICOM Master Files? YES// yes

Building the DICOM Element Dictionary -- ^MAGDICOM(2006.51)Ready to read dictionary file "C:\DICOM\DICT\ELEMENT.DIC"? y// yes

Building the DICOM Message Template Dictionary -- ^MAGDICOM(2006.52)Ready to read dictionary file "C:\DICOM\DICT\TEMPLATE.DIC"? y// yes

*** PASS 1 STARTED ****** PASS 2 STARTED ***- DONE -

Building the DICOM UID Dictionary -- ^MAGDICOM(2006.53)Ready to read dictionary file "C:\DICOM\DICT\UID.DIC"? y// yes

Updating the extended SOP negotiation table... done!

Updating the PDU TYPE table... done!

Building the HL7 dictionary in ^MAGDICOM(2006.57).Ready to read dictionary file "C:\DICOM\DICT\HL7.dic"? y// yes

done!

DICOM Dictionaries – Worklist.DICDICOM Dictionaries – Worklist.DIC

File path of Query messages.

DICOM Dictionaries – Worklist.DICDICOM Dictionaries – Worklist.DIC

DICOM Image GatewayDICOM Image Gateway

• Receives DICOM Images for storage to VistA Imaging

• Process corrections for Images that fail to process

• Components– Cache Console– Modality Instrument SCP (Provider)– Storage Processor– Image Status: Indicates Corrections

DICOM Image ProcessingDICOM Image Processing

DICOM Image Processing – CStore ServerDICOM Image Processing – CStore Server

• Storage Server receives image from modality

• Stores incoming DCM file in Image_IN folder, ready for next step.

• Uses Instrument.DIC for configuration.• First place to look for failed

transmissions

DICOM Image Processing – Image_InDICOM Image Processing – Image_In

• Image_In folder should contain files only during processing. Older files probably need corrected.

• Recommend: Move to a subfolder rather than deleting!

DICOM Dictionaries – Instrument.DICDICOM Dictionaries – Instrument.DIC

##Computed RadiographyCR1|Kodak CR|642|RAD|60100|ACR2|Kodak CR|642|RAD|60101|ADR1|Kodak DR|642|RAD|60110|A##DR2|Kodak DR|642|RAD|60111|A

##UltrasoundUS1|Philips iu22|642|RAD|60300|A

US2|ATL|642|RAD|60301|A

• Dictionaries are Text files• Config values may require support to

set• Recommend all DIC’s reside on

shared network drive.

Mnemonic

Site CodeDescription

Imaging Type

Port #

Machine ID

DICOM Image ProcessingDICOM Image Processing

• Text Window: Option 2,3• As Images appear in Image_IN…

– Reads DICOM Header– Checks VistA for a match on Name, SSN,

and Accession # (ALL must match)– Puts portion of DICOM header in TXT file– Creates ABS, TGA, and DCM files.– Stores Image set (TXT, ABS, DCM, etc)

on RAID– Notifies VistA of path to image files.

DICOM Dictionaries - Modality.DICDICOM Dictionaries - Modality.DIC

DICOM Dictionaries - Modality.DICDICOM Dictionaries - Modality.DIC

DICOM vs TGA ProcessingDICOM vs TGA Processing

• Image Gateway parses the original DCM file

• Pulls Text from header into TXT file• Generates a thumbnail (ABS, or

Abstract) from Image data• Creates object Image for retrieval• Object image may be either DICOM

or TGA format• Determined by Modality.DIC entry

DICOM vs TGA ProcessingDICOM vs TGA Processing

TGA (Targa) Processing• Object Image is a TGA format,

uncompressed Image bits from DICOM file

• TGA file– Whole image from lower res images (CT,

US, smaller CR)– Reduced Image from higher res images

• BIG file– Whole image from higher res images

• Pre DICOM solution. Not ideal.

DICOM vs TGA Processing DICOM vs TGA Processing

DICOM Processing• Stores the Original DICOM Image

file (DCM)• Ideal because it preserves the

original image as sent from the Modality

• Still creates a TXT file• Still creates an ABS file

DICOM Image ProcessingDICOM Image Processing

• Displaying DICOM Text Header

DICOM Image ProcessingDICOM Image Processing

• Displaying DICOM Text Header

DICOM CorrectionsDICOM Corrections

• Image Processing requires 3 pieces– SSN– Name– Assession Number (071308-012)

• Only EXACT match of ALL elements allows storage.

• If there is an error, Image will be “stuck” on the DICOM Image Gateway

• Must either Correct or Delete• Can be corrected via VistA Option

MAGD FIX

DICOM Corrections – Within VistADICOM Corrections – Within VistA

You have 3 new messages. (Last arrival: 11/01/05@08:39)Select Systems Manager Menu Option: correct RAD-DICOM File Entries Select one of the following: P Patient L Loop thru file D Specify a Date Range Update entries by: Loop thru file**************Processing entry********** PATIENT: Patient, One SSN: 000000000RADIOLOGY CASE #: 000000-0000 Equipment: CEMAX Model: CT Date Processed: NOV 1,2005 Problem with: BAD CASE # Comment: Correcting file on Image gateway server ID: A D:\DICOM\IMAGE_IN\A0089914.DCMDo you want to Correct this entry? (Y/N/D/Q/P)// y Lookup by case number or patient nameEnter patient or case number: 8401PATIENT: Patient, One SSN: 000000000Case No. Procedure Location Exam Date________ _________ ________________ ________+8401 CT PELVIS W/O CONT CT SCAN 11/01/05Exam status: EXAMINED

DICOM Corrections - ContinuedDICOM Corrections - Continued

****Please review the following: ***** Previous name: Patient, One New name: Patient, One Previous ssn: 000000000 New ssn: 000000000 Previous case #: 00000-0000 New case #: 00000-0000Radiology case number different. Update? (Y/N/D/Q/P)// yWill change the following: ****Please review the following: ***** Previous name: Patient, One New name: Patient, One Previous ssn: 000000000 New ssn: 000000000 Previous case #: 0000000-0000 New case #: 0000000-0000Are you sure you want to correct this entry? ? No// y

(Yes)Updating the file....

Image RoutingImage Routing

• Facilitates transmission of Images to remote reading stations (VistaRad, Telerad servers, etc)

• Autorouting Process – Automatically pushes images as acquired based on rules. (Route.DIC)

• Route on Demand – Images are sent by selecting on VistaRad.

• Uses two processors: One to queue the autoroute images, another to transmit.

• Use one transmission processor per destination.

Optimization StrategiesOptimization Strategies

• Text/Image Processing – Keep them separate

• Modality Separation – Volume of Images (Illustrate

processing speed of Storage server vs Imaging Processor)

– Multi-slice Modalities

• Redundancy• Isolation – Must be dedicated (don't

put on storage servers!)

Disaster Recovery/PMDisaster Recovery/PM

• Plan to Fail - Don't Fail to Plan! • REALLY good idea to have a spare

DIG.   Use for testing purposes, patch pre-install, etc.

• Along with other Imaging Components, requires DAILY monitoring.

• Don’t assume silence is golden• Ignorance is not Bliss!!!

Gateway AlertingGateway Alerting

• Option 4,2,2 Gateway Configuration Parameters:

Send emergency e-mail notices to: G.IRMNOTIFY @HUNTINGTON.MED.VA.GOV

• Use a group for ease of maintenance• Messages are not particularly

descriptive, but the alert itself is valuable.

Text Gateway FailureText Gateway Failure

• Ensure failed Text Gateway is down• Add Text Gateway IP address to the

emergency DIG• Add Text Processing role to

emergency DIG• Start Worklist Processing and Test• Set HL7 Pointer to Catch up

Image Gateway FailureImage Gateway Failure

• Ensure failed system is down• Add Failed IP to recovery DIG(s)• Edit Modality.DIC appropriately

(remember balance!)• Regenerate storage server shortcuts• Execute Added servers and test

Common ErrorsCommon Errors

• 1) The writing of image file "\\VHAxxxCLUA\IMAGE3$\J0\85\88\J0858809.TGA"

• failed"• "The error message was "-53 (Unknown Error

Code)""• "Imaging entry 858809 successfully removed"• Resolution:• Gateway was temporarily unable to access the share

- probably due to some network "bobble". Site restarted DICOM Process window and image processed.

• Other possible causes:• Permission problem – VHAxxxIA (account on

gateways) is not getting access to the cluster shares.• Steps:• Ping share• Map share using IA account.

Common ErrorsCommon Errors

DICOM IMAGE PROCESSING ERROR The writing of image file "\\VHABHSCLU2A\IMAGE1$\

Q7\53\10\Q7531063.ABS" failed The error Message was "1" Imaging entry 7531063 successfully removed Please call Support Personnel Routine: ^MAGDIR2BMeaning:• The error message describes a scenario in which the Image

Gateway is unable to completely process the image successfully. This can be caused by numerous reasons (network, corrupt image, permission problem to the shares, etc.).

• The “entry removed” is actually the deletion of ^MAG(2005,IEN) initially created within Vista.

Steps:• CTR-C DICOM Process Window first.• Restart Process_DICOM_Images_2_3

Common ErrorsCommon Errors

If it still fails, you may need to bump the Image Pointer value past that image. Run option 2 - Image Gateway, then 4 - Increment DICOM Image Input pointer

VistA DICOM Image Gateway -- TEST MACHINE4 Increment DICOM Image Input Pointer OPTION: 4

The last image in the "C:\DICOM\IMAGE_IN" directory is number 294.There are no images waiting to be processed.

The current image processing pointer value is 293.Do you wish to increment the image processing pointer? n// y -- INCREMENTEDPress <Enter> to continue...

****Use the DICOM header dump capability in Option 9 to determine Patient Name, SSN, and accession number. The image then can be resent from the modality.

Questions?