source: FOIAVistA/trunk/r/IMAGING-MAG-ZMAG/MAGGTUX1.m@ 1608

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

initial load of FOIAVistA 6/30/08 version

File size: 7.2 KB
Line 
1MAGGTUX1 ;WIOFO/GEK Imaging utility to track missing TYPE INDEX values.
2 ;;3.0;IMAGING;**59**;Nov 27, 2007;Build 20
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;; +---------------------------------------------------------------+
5 ;; | Property of the US Government. |
6 ;; | No permission to copy or redistribute this software is given. |
7 ;; | Use of unreleased versions of this software requires the user |
8 ;; | to execute a written test agreement with the VistA Imaging |
9 ;; | Development Office of the Department of Veterans Affairs, |
10 ;; | telephone (301) 734-0100. |
11 ;; | |
12 ;; | The Food and Drug Administration classifies this software as |
13 ;; | a medical device. As such, it may not be changed in any way. |
14 ;; | Modifications to this software may result in an adulterated |
15 ;; | medical device under 21CFR820, the use of which is considered |
16 ;; | to be a violation of US Federal Statutes. |
17 ;; +---------------------------------------------------------------+
18 ;;
19 Q
20REVIEW ;
21 N CHK,FIX,MAGN
22 S CHK=$D(^XTMP("MAGGTUXC"))
23 S FIX=$D(^XTMP("MAGGTUX"))
24 N EQ S $P(EQ,"=",78)=""
25 W !,EQ
26 I 'CHK,'FIX W !,"No reports to review." Q
27 S X=$S(FIX:"F",1:"C")
28 I CHK&FIX D
29 . W !,"Review last Report of Checked or Fixed Index terms: C/F //F :" R X:30
30 I "fF"[$E(X) W !,"Starting Review of last Fixed Report:" S MAGN="MAGGTUX"
31 E W !,"Starting Review of last Checked Report:" S MAGN="MAGGTUXC"
32 W !,"Summary of search for Images where TYPE INDEX = null"
33 N I,PKG,BT,ICT,CT,J,JCT,TCT,TTCT
34 S BT=0
35 D 3
36 ;
37 W !,"Last Image IEN missing a Type Index : ",$P($G(^XTMP(MAGN,0,"NT")),"-")
38 W ?41,$$FMTE^XLFDT($P($G(^XTMP(MAGN,0,"NT")),"-",2))
39 W !,"Last Image IEN missing All Index : ",$P($G(^XTMP(MAGN,0,"NI")),"-")
40 W ?41,$$FMTE^XLFDT($P($G(^XTMP(MAGN,0,"NI")),"-",2))
41 W !,"------------------------------"
42 S I="",TCT=0
43 W !,"Different settings of invalid INDEX Node"
44 W !,"Current Terms",?22,"Generated Terms",?50,"New Terms",!
45 F S I=$O(^XTMP(MAGN,"AAN40",I)) Q:I="" D
46 . S TCT=TCT+$G(^XTMP(MAGN,"AAN40",I))
47 . W !,I,?20,^XTMP(MAGN,"AAN40",I),?65,"= ",TCT
48 . S J="" F S J=$O(^XTMP(MAGN,"AAN40",I,"CVT",J)) Q:J="" D
49 . . W !,I,?20,"+ ",J,?45,"= ",^XTMP(MAGN,"AAN40",I,"CVT",J)
50 . Q
51 ;
52DISPLAY ; This is called after a CHECK or a FIX from MAGGTUX
53 N A
54 S A=$NA(^TMP($J,"MAGGTUX","RPT"))
55 D BUILD(A)
56 S I="" F S I=$O(@A@(I)) Q:I="" D MES^XPDUTL(^(I))
57 Q
58MAIL ; This will mail results to the MAG SERVER mail group.
59 N A,MAGDT
60 S MAGDT=$P($$FMTE^XLFDT($$NOW^XLFDT),"@",1)
61 S A=$NA(^TMP($J,"MAGQ"))
62 D BUILD(A)
63 N XMSUB S XMSUB="Image Index Validate "_MAGDT_": Report"
64 S @A@(1)=$$GET1^DIQ(200,$G(DUZ),.01)_" "_$$GET1^DIQ(4,$G(DUZ(2)),.01)
65 D MAILSHR^MAGQBUT1
66 Q
67BUILD(A) ;BUILD A TMP global of the report.
68 N CT
69 S CT=5 K @A
70 S CT=CT+1,@A@(CT)="================================================================="
71 S CT=CT+1,@A@(CT)="Start time : "_$$FMTE^XLFDT($P(^XTMP(MAGN,0),"^",2))
72 S CT=CT+1,@A@(CT)="End time : "_$P($G(^XTMP(MAGN,0,"END")),"^",1)
73 S CT=CT+1,@A@(CT)="Elapsed time : "_$P($G(^XTMP(MAGN,0,"END")),"^",2)
74 S CT=CT+1,@A@(CT)="Last Image IEN missing a Type Index : "_$P($G(^XTMP(MAGN,0,"NT")),"-")_" "_$$FMTE^XLFDT($P($G(^XTMP(MAGN,0,"NT")),"-",2))
75 S CT=CT+1,@A@(CT)="Last Image IEN missing All Index : "_$P($G(^XTMP(MAGN,0,"NI")),"-")_" "_$$FMTE^XLFDT($P($G(^XTMP(MAGN,0,"NI")),"-",2))
76 S CT=CT+1,@A@(CT)="Total Checked: "_$G(^XTMP(MAGN,"AATCHK"))
77 S CT=CT+1,@A@(CT)=" -- Entries Missing a Type Index -- "
78 S CT=CT+1,@A@(CT)="Total Study Groups & Single Images : "_+$G(^XTMP(MAGN,"AANT"))
79 S CT=CT+1,@A@(CT)="Total Group Images : "_$G(^XTMP(MAGN,"AAGRINT"))
80 S CT=CT+1,@A@(CT)=" -- Entries Missing all Index Terms -- "
81 S CT=CT+1,@A@(CT)="Total Study Groups & Single Images : "_+$G(^XTMP(MAGN,"AANI"))
82 S CT=CT+1,@A@(CT)="Total Group Images : "_$G(^XTMP(MAGN,"AAGRINI"))
83 S CT=CT+1,@A@(CT)=" -- Other Index checks -- "
84 S CT=CT+1,@A@(CT)=" Total Origin Index fixes : "_$G(^XTMP(MAGN,"AAOFX"))
85 S CT=CT+1,@A@(CT)=" CR -> CT fix : "_$G(^XTMP(MAGN,"AACRCT"))
86 S CT=CT+1,@A@(CT)=" Total DataBase Changes = "_+$G(^XTMP(MAGN,"AAFIX"))
87 S CT=CT+1,@A@(CT)=" "
88 S CT=CT+1,@A@(CT)="Also : Information gathered during Check/Fix"
89 S CT=CT+1,@A@(CT)=" - - - Generate Index Values and Merge - - - "
90 S CT=CT+1,@A@(CT)=" The Merged proc/spec not valid. No change.) "_$G(^XTMP(MAGN,"AANOMERG"))
91 S CT=CT+1,@A@(CT)=" The Merged proc/spec was okay. Changed. "_$G(^XTMP(MAGN,"AAOKMERG"))
92 S CT=CT+1,@A@(CT)=" - - - other - - - "
93 S CT=CT+1,@A@(CT)=" Total Groups of only 1 image "_$G(^XTMP(MAGN,"AAGO1"))
94 S CT=CT+1,@A@(CT)=" Total Groups of 0 images "_$G(^XTMP(MAGN,"AAGO0"))
95 S CT=CT+1,@A@(CT)=" Total Images w/No Patient "_$G(^XTMP(MAGN,"AANOPAT"))
96 S CT=CT+1,@A@(CT)=" Total Images w/No 0 node "_$G(^XTMP(MAGN,"AANOZ"))
97 S CT=CT+1,@A@(CT)=" Warnings: Generated Proc,Spec "_$G(^XTMP(MAGN,"AAINVG"))
98 S CT=CT+1,@A@(CT)=" Warnings: Entered Proc,Spec "_$G(^XTMP(MAGN,"AAINVO"))
99 S IEN=$P(^XTMP(MAGN,0),"^",3)
100 I +IEN D
101 . S CT=CT+1,@A@(CT)=" "
102 . S CT=CT+1,@A@(CT)="Last IEN Checked: "_IEN
103 . S CT=CT+1,@A@(CT)=" Capture Date: "_$$FMTE^XLFDT($P($G(^MAG(2005,IEN,2)),"^",1))
104 . Q
105 I IEN=0 D
106 . S CT=CT+1,@A@(CT)=" "
107 . S CT=CT+1,@A@(CT)="All Entries were checked"
108 . Q
109 S CT=CT+1,@A@(CT)=" "
110 S CT=CT+1,@A@(CT)="For a summary of the last Check or Fix process"
111 S CT=CT+1,@A@(CT)="Use the menu option: "
112 S CT=CT+1,@A@(CT)=" ""REV Review a Summary of the last Fix or Check process."""
113 S CT=CT+1,@A@(CT)="================================================================="
114 Q
115 ;
1163 ; called from above. Display the Spec - Proc problems
117 N MAIDX
118 S MAIDX="MAIDXG"
119 W !!,"Mismatch in the Generated Values of Specialty/SubSpec <-> Proc/Event",!
120 D 31
121 S MAIDX="MAIDXO"
122 W !!,"Mismatch in the User entered Values of Specialty/SubSpec <-> Proc/Event",!
123 D 31
124 Q
12531 ;
126 N IT,IS,IP
127 N I,SD,SUBO,I3,CT,J,MY
128 S IT="" F S IT=$O(^XTMP(MAGN,MAIDX,IT)) Q:IT="" D
129 . S IS="" F S IS=$O(^XTMP(MAGN,MAIDX,IT,IS)) Q:IS="" D
130 . . S IP="" F S IP=$O(^XTMP(MAGN,MAIDX,IT,IS,IP)) Q:IP="" D
131 . . . S CT=^(IP)
132 . . . K MY D VALTUX1^MAGGTUX3(.MY,IT,IS,IP) W !,CT," "
133 . . . S I="" F S I=$O(MY(I)) Q:I="" W ?7,MY(I),!
134 . . . I $L($O(^MAG(2005.85,IP,1,"B",""))) W ?35,"Valid specs: "
135 . . . S I3="" F S I3=$O(^MAG(2005.85,IP,1,"B",I3)) Q:'I3 D
136 . . . . W !,?35,$P(^MAG(2005.84,I3,0),"^")
137 . . . . S SUBO=$P(^MAG(2005.84,I3,0),"^",3)
138 . . . . I SUBO W " <",$P(^MAG(2005.84,SUBO,0),"^"),">"
139 . . . . Q
140 . . . K ^TMP($J,"MAGDCT")
141 . . . S SD="" F S SD=$O(^XTMP(MAGN,"MAIDSD",+IT,+IS,+IP,"SD",SD)) Q:SD="" D
142 . . . . S ^TMP($J,"MAGDCT",^XTMP(MAGN,"MAIDSD",+IT,+IS,+IP,"SD",SD))="Desc: "_SD
143 . . . S CT="" F J=1:1:5 S CT=$O(^TMP($J,"MAGDCT",CT),-1) Q:CT="" W !,?7,CT,?15,"Desc: ",^TMP($J,"MAGDCT",CT)
144 . . . W !
145 . . . Q
146 . . Q
147 . Q
148 Q
Note: See TracBrowser for help on using the repository browser.