source: WorldVistAEHR/trunk/r/IMAGING-MAG-ZMAG/MAGGSPP.m@ 1604

Last change on this file since 1604 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.6 KB
Line 
1MAGGSPP ;WOIFO/GEK - Utilities for Post Processing of a new Image Entry
2 ;;3.0;IMAGING;**7,8,48**;Jan 11, 2005
3 ;; +---------------------------------------------------------------+
4 ;; | Property of the US Government. |
5 ;; | No permission to copy or redistribute this software is given. |
6 ;; | Use of unreleased versions of this software requires the user |
7 ;; | to execute a written test agreement with the VistA Imaging |
8 ;; | Development Office of the Department of Veterans Affairs, |
9 ;; | telephone (301) 734-0100. |
10 ;; | |
11 ;; | The Food and Drug Administration classifies this software as |
12 ;; | a medical device. As such, it may not be changed |
13 ;; | in any way. Modifications to this software may result in an |
14 ;; | adulterated medical device under 21CFR820, the use of which |
15 ;; | is considered to be a violation of US Federal Statutes. |
16 ;; +---------------------------------------------------------------+
17 ;;
18 Q
19ACTION(MAGRY,MAGIEN) ;RPC [MAG4 POST PROCESSING]
20 ; Post processing when Image is sucessfully created in Image
21 ; This is Pre 3.0.8
22 ; file and copied to Network.
23 ; MAGRY : is the Return Array
24 ; MAGRY(0) = 1^SUCCESS
25 ; OR 0^ERROR MESSAGE
26 ; MAGIEN : is the Internal Entry Number in the Image File.
27 ; This call is Post Processing depending on the Type of MAG DESCRIPTIVE CATEGORY
28 ; Does the Image Point to a MagDescriptive Category.
29 ;
30 I '+$G(^MAG(2005,MAGIEN,100)) S MAGRY(0)="1^No Post Processing required for Image ID: "_MAGIEN Q
31 N MAGCTG S MAGCTG=+^MAG(2005,MAGIEN,100)
32 I '+$G(^MAG(2005.81,MAGCTG,1)) S MAGRY(0)="1^No Post Processing required for Image ID: "_MAGIEN Q
33 ; SO here we know an action is in play for this Image Category
34 N MAGACT
35 S MAGACT=$P(^MAG(2005.81,MAGCTG,1),U,3,4)
36 ; D @(TAGRTN_"(.STAT)")
37 D @(MAGACT_"(.MAGRY,"_MAGIEN_")")
38 ;;
39 Q
40POSTACT(MAGRY,MAGIEN) ;RPC [MAG4 POST PROCESS ACTIONS]
41 ; Post processing when Image is sucessfully created in Image
42 ; file and copied to Network. Patch 3.0.8
43 ; MAGRY : is the Return Array
44 ; MAGRY(0) = 1^SUCCESS
45 ; OR 0^ERROR MESSAGE
46 ; Post Processing Action: depends on Image Type (fld #42 )
47 N TYPE,AIEN
48 S TYPE=+$P($G(^MAG(2005,MAGIEN,40)),"^",3) I 'TYPE D Q
49 . ; comment out, for backward compatibility
50 . ;S MAGRY(0)="1^No Post Processing required for Image ID: "_MAGIEN Q
51 . ;This is here so that the new code is backward compatible. If no value for TYPE INDEX, we have to
52 . ;check the MAG DESC CTG field.
53 . D ACTION(.MAGRY,MAGIEN)
54 . Q
55 I '$D(^MAG(2005.86,"ATYPE",TYPE)) S MAGRY(0)="1^No Post Processing required for "_$P(^MAG(2005.83,TYPE,0),U) Q
56 S AIEN=$O(^MAG(2005.86,"ATYPE",TYPE,""))
57 I '$P(^MAG(2005.86,AIEN,0),"^",2) S MAGRY(0)="1^Action: "_$P(^MAG(2005.86,AIEN,0),"^")_" is Not Active." Q
58 ; SO here we know an action is in play for this TYPE INDEX
59 N MAGACT
60 S MAGACT=$P(^MAG(2005.86,AIEN,0),"^",3,4)
61 D @(MAGACT_"(.MAGRY,"_MAGIEN_")")
62 Q
63HEC(MAGRY,MAGIEN) ; QUEING OF HEC IMAGES
64 S MAGRY(0)=$$GCC^MAGBAPI(MAGIEN,$$DA2PLC^MAGBAPIP(MAGIEN,"F")) ; DBI - SEB 9/23/2002
65 S MAGRY(1)=MAGIEN_" "_$$NOW^XLFDT
66 D ACTION^MAGGTAU("PPACT^"_$P(^MAG(2005,MAGIEN,0),"^",7)_"^"_MAGIEN_"|HEC-COPY using GCC^MAGBAPI",1)
67 ;ACTION(TXT,LOGTM,MAGSESS) ;Call to log actions for Imaging Session.
68 ; TXT is "^" delimited string
69 ; $P(1) is code $P(2) is DFN $P(3) is Image IEN
70 ; LOGTM - [1|0] Flag to indicate whether or not to log the time of the Action. Default = 0
71 ; MAGSESS - Session IEN where the action should be logged. Default to MAGJOB("SESSION")
72 ;
73 Q
Note: See TracBrowser for help on using the repository browser.