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

MAGGSPP.m

Go to the documentation of this file.
  1. MAGGSPP ;WOIFO/GEK - Utilities for Post Processing of a new Image Entry
  1. ;;3.0;IMAGING;**7,8,48**;Jan 11, 2005
  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. ;; | |
  1. ;; | The Food and Drug Administration classifies this software as |
  1. ;; | a medical device. As such, it may not be changed |
  1. ;; | in any way. Modifications to this software may result in an |
  1. ;; | adulterated medical device under 21CFR820, the use of which |
  1. ;; | is considered to be a violation of US Federal Statutes. |
  1. ;; +---------------------------------------------------------------+
  1. ;;
  1. Q
  1. ACTION(MAGRY,MAGIEN) ;RPC [MAG4 POST PROCESSING]
  1. ; Post processing when Image is sucessfully created in Image
  1. ; This is Pre 3.0.8
  1. ; file and copied to Network.
  1. ; MAGRY : is the Return Array
  1. ; MAGRY(0) = 1^SUCCESS
  1. ; OR 0^ERROR MESSAGE
  1. ; MAGIEN : is the Internal Entry Number in the Image File.
  1. ; This call is Post Processing depending on the Type of MAG DESCRIPTIVE CATEGORY
  1. ; Does the Image Point to a MagDescriptive Category.
  1. ;
  1. I '+$G(^MAG(2005,MAGIEN,100)) S MAGRY(0)="1^No Post Processing required for Image ID: "_MAGIEN Q
  1. N MAGCTG S MAGCTG=+^MAG(2005,MAGIEN,100)
  1. I '+$G(^MAG(2005.81,MAGCTG,1)) S MAGRY(0)="1^No Post Processing required for Image ID: "_MAGIEN Q
  1. ; SO here we know an action is in play for this Image Category
  1. N MAGACT
  1. S MAGACT=$P(^MAG(2005.81,MAGCTG,1),U,3,4)
  1. ; D @(TAGRTN_"(.STAT)")
  1. D @(MAGACT_"(.MAGRY,"_MAGIEN_")")
  1. ;;
  1. Q
  1. POSTACT(MAGRY,MAGIEN) ;RPC [MAG4 POST PROCESS ACTIONS]
  1. ; Post processing when Image is sucessfully created in Image
  1. ; file and copied to Network. Patch 3.0.8
  1. ; MAGRY : is the Return Array
  1. ; MAGRY(0) = 1^SUCCESS
  1. ; OR 0^ERROR MESSAGE
  1. ; Post Processing Action: depends on Image Type (fld #42 )
  1. N TYPE,AIEN
  1. S TYPE=+$P($G(^MAG(2005,MAGIEN,40)),"^",3) I 'TYPE D Q
  1. . ; comment out, for backward compatibility
  1. . ;S MAGRY(0)="1^No Post Processing required for Image ID: "_MAGIEN Q
  1. . ;This is here so that the new code is backward compatible. If no value for TYPE INDEX, we have to
  1. . ;check the MAG DESC CTG field.
  1. . D ACTION(.MAGRY,MAGIEN)
  1. . Q
  1. I '$D(^MAG(2005.86,"ATYPE",TYPE)) S MAGRY(0)="1^No Post Processing required for "_$P(^MAG(2005.83,TYPE,0),U) Q
  1. S AIEN=$O(^MAG(2005.86,"ATYPE",TYPE,""))
  1. I '$P(^MAG(2005.86,AIEN,0),"^",2) S MAGRY(0)="1^Action: "_$P(^MAG(2005.86,AIEN,0),"^")_" is Not Active." Q
  1. ; SO here we know an action is in play for this TYPE INDEX
  1. N MAGACT
  1. S MAGACT=$P(^MAG(2005.86,AIEN,0),"^",3,4)
  1. D @(MAGACT_"(.MAGRY,"_MAGIEN_")")
  1. Q
  1. HEC(MAGRY,MAGIEN) ; QUEING OF HEC IMAGES
  1. S MAGRY(0)=$$GCC^MAGBAPI(MAGIEN,$$DA2PLC^MAGBAPIP(MAGIEN,"F")) ; DBI - SEB 9/23/2002
  1. S MAGRY(1)=MAGIEN_" "_$$NOW^XLFDT
  1. D ACTION^MAGGTAU("PPACT^"_$P(^MAG(2005,MAGIEN,0),"^",7)_"^"_MAGIEN_"|HEC-COPY using GCC^MAGBAPI",1)
  1. ;ACTION(TXT,LOGTM,MAGSESS) ;Call to log actions for Imaging Session.
  1. ; TXT is "^" delimited string
  1. ; $P(1) is code $P(2) is DFN $P(3) is Image IEN
  1. ; LOGTM - [1|0] Flag to indicate whether or not to log the time of the Action. Default = 0
  1. ; MAGSESS - Session IEN where the action should be logged. Default to MAGJOB("SESSION")
  1. ;
  1. Q