650 likes | 990 Views
757 – DICOM Gateways Behind the Scenes. John Di Lorenzo. Introduction. 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. Outline. VistA Imaging Overview
E N D
757 – DICOM GatewaysBehind the Scenes John Di Lorenzo
Introduction 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.
Outline • 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 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 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 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 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 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 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 Tags • A Tag represents a single piece of information. • Tags are unique identifiers denoted with a Group and Elementnumber. • Groupand Element numbers are in Hexadecimal format. • Part 6 of the DICOM Standard – Data Dictionary.
DICOM 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 Association Associate-Request SCU SCP Associate-Accept Message Release-Request Release-Response
Info Required for Association • AET • IP Address • Port # Good idea to keep a spreadsheet with above info
DICOM 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=206 d:\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=206 Version=1 Called AE: "DICOM_STORAGE" Calling AE: "DICOM_ECHO" ITEM Type: 10H (Application Context Item) Length=21 Application Context: 1.2.840.10008.3.1.1.1 (DICOM Application Context Name) ITEM Type: 20H (Presentation Context Item) Length=46 Presentation Context ID: 1 Result=0 -- Transfer Syntax(es) -- SUBITEM Type: 30H (Abstract Syntax Sub-Item) Length=17 Presentation Context: 1.2.840.10008.1.1 (Verification SOP Class) SUBITEM Type: 40H (Transfer Syntax Sub-Item) Length=17 Transfer Syntax: 1.2.840.10008.1.2 (Implicit VR Little Endian) -- End of Transfer Syntax(es) –
DICOM 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=4 d:\DICOM\DATA1\LOGDCM.292\INCOMING.PDU Sending PDU Type: 06H (A-RELEASE-RP) Length: 4 d:\DICOM\DATA1\LOGDCM.292\OUTGOING.PDU
DICOM Gateway-Where It Fits In Patient One DICOM HL7 Optical Archive Worklist Image Capture QA/Storage Patient Two 000-28-1665 X:2056 Y:1998 ? Patient Two Patient Two 000-28-1665 X:2056 Y:1998 Patient, Two 000-28-1665 X:2056 Y:1998 DICOM Text Gateway DICOM Image Gateway Background Processor Patient Two Image Storage (RAID - Magnetic) VistA Patient Two 000-28-1665 X:2056 Y:1998 Patient Two
VistA 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 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/Parts • Cache Database (Brains of the Operation) • Telnet Windows – Window into the Cache operations • DICOM Storage Servers (on Image Gateways)
The 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 Console GUI based management tools.
The DICOM Gateway Console • Log Files
Telnet 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 • Image Gateway • Process DICOM Images
DICOM Storage Servers • “Serves” connection from DICOM Instruments • Uses MAG_CSTORE.exe to receive Image(s) • More later…
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 Gateway – Status 1-4 Calling AET Number of Matches on LAST query – number of active orders. Number of Queries for the Day
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.DIC TOPCON|123|CON|OPHTH|LONG|TOPCON Eye Camera Picker_1||RAD|MRI|SHORT|Philips RF room #1 ECAM1|123|RAD|NM|LONG|Siemens Rm. 3A118 XR1CR950|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 - Importing Option 4-2-8
DICOM 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.DIC File path of Query messages.
DICOM 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 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_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.DIC ##Computed Radiography CR1|Kodak CR|642|RAD|60100|A CR2|Kodak CR|642|RAD|60101|A DR1|Kodak DR|642|RAD|60110|A ##DR2|Kodak DR|642|RAD|60111|A ##Ultrasound US1|Philips iu22|642|RAD|60300|A US2|ATL|642|RAD|60301|A Port # Imaging Type Mnemonic Description Site Code Machine ID • Dictionaries are Text files • Config values may require support to set • Recommend all DIC’s reside on shared network drive.
DICOM 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 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 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 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 Processing • Displaying DICOM Text Header
DICOM Image Processing • Displaying DICOM Text Header
DICOM 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