Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: MAGDQR00

MAGDQR00.m

Go to the documentation of this file.
  1. MAGDQR00 ;WOIFO/EdM,BT - Imaging RPCs for Query/Retrieve ; 04/05/2006 08:43
  1. ;;3.0;IMAGING;**51,54,118**;Mar 19, 2002;Build 4525;May 01, 2013
  1. ;; Per VHA Directive 2004-038, this routine should not be modified.
  1. ;; +---------------------------------------------------------------+
  1. ;; | Property of the US Government. |
  1. ;; | No permission to copy or redistribute this software is given. |
  1. ;; | Use of unreleased versions of this software requires the user |
  1. ;; | to execute a written test agreement with the VistA Imaging |
  1. ;; | Development Office of the Department of Veterans Affairs, |
  1. ;; | telephone (301) 734-0100. |
  1. ;; | The Food and Drug Administration classifies this software as |
  1. ;; | a medical device. As such, it may not be changed in any way. |
  1. ;; | Modifications to this software may result in an adulterated |
  1. ;; | medical device under 21CFR820, the use of which is considered |
  1. ;; | to be a violation of US Federal Statutes. |
  1. ;; +---------------------------------------------------------------+
  1. ;;
  1. Q
  1. ;
  1. ; Query/Retrieve
  1. ;
  1. ; Step 1: The application (Java system) receives a C-FIND request
  1. ;
  1. ; Step 2: The application interprets the DICOM message and
  1. ; calls an RPC on traditional VistA
  1. ;
  1. ; RPC name: MAG CFIND QUERY
  1. ; input: array of: tag | VR | flag | value
  1. ; input: scalar: batch-identifier, see below
  1. ; input: scalar: max # entities in response
  1. ; output: array of: header = # entities total | # in current batch
  1. ; followed by tag | VR | flag | value
  1. ; or <start sequence>
  1. ; or <end sequence>
  1. ;
  1. ; Batch-identifier:
  1. ; There are four kinds of calls:
  1. ; 1. initial call
  1. ; value of this parameter is "0"
  1. ; RPC will create result-set and start a background process to
  1. ; perform the query
  1. ; 2. "are you ready" call
  1. ; value of this parameter is "n|0"
  1. ; where 'n' identifies the result-set
  1. ; RPC will check if the query is ready and, when available, will
  1. ; return "initial batch" of responses
  1. ; 3. continuation call
  1. ; value of this parameter is "n|m"
  1. ; where 'n' identifies the result-set
  1. ; where 'm' identifies the sequence
  1. ; number of the first item to be returned RPC will return
  1. ; next batch of responses
  1. ; 4. final call
  1. ; value of this parameter is "n|-1"
  1. ; where 'n' identifies the result-set
  1. ; RPC will not return any responses but clean-up any storage used
  1. ; for result-set
  1. ;
  1. ; Suggested values for second parameter:
  1. ; 0 for initial call
  1. ; -1 for final call
  1. ; >0 (sequence number of first entity to be returned)
  1. ; for continuation call
  1. ; Result-set will also have a "time stamp of last access"
  1. ; so that an overall clean-up process can get rid of
  1. ; obsolete result-sets.
  1. ;
  1. ; Step 3: The application interprets the results from the RPC
  1. ; and will ask VistA which images belong to a
  1. ; study-UID:
  1. ;
  1. ; RPC name: MAG STUDY UID QUERY
  1. ; input: scalar study uid
  1. ; input: scalar flag: include routed copies in result
  1. ; input: scalar "my location" identifier
  1. ; output: array of: header = # of entities in response
  1. ; image# | path+file name | username | password
  1. ;
  1. ; Do we want to return the username and password in each
  1. ; result, or do we want two separate RPC calls: one to
  1. ; get path+filename for each file, and one that returns
  1. ; the username and password given a path?
  1. ;
  1. ; Step 4: The application will create new DICOM entities to transmit
  1. ; to its client. It has the information to access the
  1. ; image files that exist on VistA (either .dcm files or
  1. ; .txt + .tga pairs). It needs to ask VistA for the
  1. ; current and correct information to place in the headers
  1. ; of the DICOM entities to be transmitted:
  1. ;
  1. ; RPC name: MAG IMAGE CURRENT INFO
  1. ; input: scalar image #
  1. ; output: array of: header = # of entities in response
  1. ; tag | VS | flag | value
  1. ;
  1. ; Do we need an additional input array to specify the
  1. ; list of data-fields to be returned?
  1. ;
  1. ; Non-supported tags for Query/Retrieve
  1. ; 0008,1110 O Referenced Study Sequence
  1. ; 0008,1150 O >Referenced SOP Class UID
  1. ; 0008,1155 O >Referenced SOP Instance UID
  1. ; 0008,1120 O Referenced Patient Sequence
  1. ; 0008,1150 O >Referenced SOP Class UID
  1. ; 0008,1155 O >Referenced SOP Instance UID
  1. ; 0010,1020 O Patient's Size [field not populated]
  1. ; 0010,1030 O Patient's Weight [field not populated]
  1. ; 0020,1070 O Other Study Numbers
  1. ; 0020,1200 O Number of Patient Related Studies
  1. ; 0020,1202 O Number of Patient Related Series
  1. ; 0020,1204 O Number of Patient Related Instances
  1. ;
  1. ; Supported tags
  1. ; 0008,0020 R Study Date
  1. ; 0008,0030 R Study Time
  1. ; 0008,0050 R Accession Number
  1. ; 0010,0010 R Patient's Name
  1. ; 0010,0020 R Patient ID
  1. ; 0020,0010 R Study ID
  1. ; 0020,000D U Study Instance UID
  1. ; 0008,0018 U Image Instance UID
  1. ; 0020,000E U Series Instance UID
  1. ;
  1. ; 0008,0061 O Modalities in Study
  1. ; 0008,0090 O Referring Physician's Name
  1. ; 0008,1030 O Study Description
  1. ; 0008,1032 O Procedure Code Sequence
  1. ; 0008,0100 O >Code Value
  1. ; 0008,0102 O >Coding Scheme Designator
  1. ; 0008,0103 O >Coding Scheme Version
  1. ; 0008,0104 O >Code Meaning
  1. ; 0008,1060 O Name of Physician(s) Reading Study
  1. ; 0010,0030 O Patient's Birth Date
  1. ; 0010,0032 O Patient's Birth Time [probably always blank]
  1. ; 0010,0040 O Patient's Sex
  1. ; 0010,1000 O Other Patient IDs
  1. ; 0010,1001 O Other Patient Names
  1. ; 0010,1010 O Patient's Age
  1. ; 0010,2160 O Ethnic Group
  1. ; 0010,2180 O Occupation
  1. ; 0010,21B0 O Additional Patient History
  1. ; 0020,1206 O Number of Study Related Series
  1. ; 0020,1208 O Number of Study Related Instances
  1. ; 4008,010C O Interpretation Author
  1. ;
  1. ; Problem cases left over:
  1. ; 0008,0062 O SOP Classes in Study [supported?]
  1. ; 0008,1080 O Admitting Diagnoses Description
  1. ; 0010,4000 O Patient Comments
  1. ;
  1. ;
  1. HDRTAG() ; Result Header
  1. Q "0000,0902"
  1. ;
  1. STDESTAG() ; Study Description
  1. Q "0008,1030"
  1. ;
  1. STUIDTAG() ; Study UID
  1. Q "0020,000D"
  1. ;
  1. ACCNTAG() ; Accession Number
  1. Q "0008,0050"
  1. ;
  1. MODTAG() ; Modality
  1. Q "0008,0061"
  1. ;
  1. NSRSTAG() ; Number of Study Related Series
  1. Q "0020,1206"
  1. ;
  1. NSRITAG() ; Number of Study Related Instances
  1. Q "0020,1208"
  1. ;
  1. PTNAMTAG() ; Patient Name
  1. Q "0010,0010"