Difference between revisions of "MAGGADDIMAGE"

From VistApedia
Jump to: navigation, search
Line 42: Line 42:
 
  gleaned from reviewing the code:
 
  gleaned from reviewing the code:
 
  The input array MAGGZ may hold the following key:data pairs.  Note: the index in
 
  The input array MAGGZ may hold the following key:data pairs.  Note: the index in
  MAGGZ (i.e. MAGGZ(1) vs MAGGZ9(2)) is not important. And "xxx" below means a data
+
  MAGGZ (i.e. MAGGZ(1) vs MAGGZ9(2)) is not important.  
 
  value
 
  value
 
   
 
   
Line 70: Line 70:
 
  "DATETIME" => 7^NOW                          //field# 7=DATE/TIME IMAGE SAVED
 
  "DATETIME" => 7^NOW                          //field# 7=DATE/TIME IMAGE SAVED
 
  "magDFN" => 5^ + (Patient DFN)              //field# 5=PATIENT
 
  "magDFN" => 5^ + (Patient DFN)              //field# 5=PATIENT
 
+
 
  --KT edit--
 
  --KT edit--
 
  I think he means something like this:
 
  I think he means something like this:

Revision as of 00:47, 25 September 2005

To VistA Imaging Issues


MAGGADDIMAGE

NUMBER: 938                             
 NAME: MAGGADDIMAGE
 TAG: ADD                              
 ROUTINE: MAGGTIA
 RETURN VALUE TYPE: SINGLE VALUE       
 AVAILABILITY: RESTRICTED
 DESCRIPTION:
     RPC Call to add new entry to Image File using UPDATE^DIE.
 INPUT PARAMETER: MAGGZ                  
 PARAMETER TYPE: LIST
 REQUIRED: YES                         
 SEQUENCE NUMBER: 1
 DESCRIPTION:
  MAGGZ is an array of fields and their entries.
   i.e. MAGGZ(1)=".5^38"   field .5   data is 38

   If Long Description is included in fields, we create a new array to hold
   the text, and pass that to UPDATE^DIE.

   If this entry is an object group then MAGGZ(n)="2005.04^344"
   (The field 2005.04 is the OBJECT GROUP MULTIPLE.)

   Special processing is done to 'coded' entries.
   i.e. MAGGZ(n)="ABS^STUFFONLY"  The "ABS" code tells routine to take extra
   action depending on piece 2, "STUFFONLY", which says to NOT schedule the
   abstract to be created by the background processor.
 RETURN PARAMETER DESCRIPTION:
  MAGGRY - Ret variable (Single Variable)
    If successful   MAGGRY = IEN^Drive:Dir ^ FILE NAME
      IEN is Internal Entry Number of ^MAG(2005.
      Drive:Dir is the Drive and Directory where the image file is saved.
      FILE NAME is what the application will name the image file.
    If UNsuccessful MAGGRY = 0^Error desc
Kevin Toppenberg Notes:
The above REMOTE PROCEDURE file description is not complete.  Below is more info
gleaned from reviewing the code:
The input array MAGGZ may hold the following key:data pairs.  Note: the index in
MAGGZ (i.e. MAGGZ(1) vs MAGGZ9(2)) is not important. 
value

 MAGGZ(1)="5^DataValue"
 MAGGZ(2)="2005.4^DataValue"
 MAGGZ(3)="IEN^DataValue"
 MAGGZ(...)="EXT^DataValue"
 MAGGZ(...)="ABS^DataValue"
 MAGGZ(...)="ABS^STUFFONLY
 MAGGZ(...)="JB^DataValue"
 MAGGZ(...)="WRITE^DataValue"
 MAGGZ(...)="BIG^DataValue"
 MAGGZ(...)="DICOMSN^DataValue"
 MAGGZ(...)="DICOMIN^DataValue"
 MAGGZ(...)="FieldNameFromFile# 2005^DataValue"
 

Todd Berman wrote:

As far as RPC usage, to add an image we do the following:

Call MAGGADDIMAGE with a key-value parameter with the values as follows:
                                             //KT Notes:
"NETLOCABS" => ABS^STUFFONLY                 
"OBJTYPE" => 3^1                             //field# 3=OBJECT TYPE, ptr 2005.2
"FileExt" => EXT^JPG
"DUZ" => 8^ + (Users DUZ)                    //field# 3=IMAGE SAVED BY, ptr 200
"DATETIME" => 7^NOW                          //field# 7=DATE/TIME IMAGE SAVED
"magDFN" => 5^ + (Patient DFN)               //field# 5=PATIENT

--KT edit--
I think he means something like this:
MAGGZ(1)="ABS^STUFFONLY"
MAGGZ(2)="EXT^JPG"
MAGGZ(3)="3^1"
MAGGZ(4)="5^4567"
MAGGZ(5)="7^NOW"
MAGGZ(6)="8^123"
--end KT edit--

that returns a string that is in the following format:

image_ien^location^filename 

Note, the "'s in the above info are important, and the 8^ + (Users DUZ)
for a User with a DUZ of 1008 means the string 8^1008 (Same for DFN).

We then upload the file and thumbnail data to the place as directed
(after converting \ to /, and changing the extension to ABS for the
thumbnail data).

Then an RPC call of MAG3 TIU IMAGE is called with 2 parameters, first
the image_ien returned from the first call, and 2nd the ien of the
document you wish to associate.

Hope this helps.