source: WorldVistAEHR/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RAXSTAT.m@ 1093

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

initial load of WorldVistAEHR

File size: 6.5 KB
Line 
1RAXSTAT ;HIRMFO/GJC-Examination Status List (Print) ;7/24/97 15:18
2 ;;5.0;Radiology/Nuclear Medicine;**31**;Mar 16, 1998
3EN1 ; Display Exam Status data by I-Type
4 K RAVRAD
5VEN1 K RADIC,RAQUIT,RAUTIL
6 S RADIC="^RA(79.2,",RADIC(0)="QEAMZ"
7 S RADIC("A")="Select Imaging Type: ",RAUTIL="RA XAM STAT"
8 K ^TMP($J,RAUTIL),^TMP($J,"RA ASK"),^TMP($J,"RA REQ")
9 D EN1^RASELCT(.RADIC,RAUTIL,"","")
10 K RADIC,RAUTIL I RAQUIT K RAQUIT,I,POP Q
11 K RAQUIT
12DEV ; Device selection
13 W ! S %ZIS="QM",%ZIS("A")="Select Device: "
14 D ^%ZIS I POP K DTOUT,DUOUT,POP Q
15 I $D(IO("Q")) D Q
16 . S ZTRTN="START^RAXSTAT"
17 . S ZTDESC="Rad/Nuc Med Display Examination Status List."
18 . S ZTSAVE("^TMP($J,""RA XAM STAT"",")=""
19 . I $D(RAVRAD)#2 S ZTRTN="STARTV^RAXSTAT",ZTDESC="Rad/Nuc Med Display VistaRad Category List.",ZTSAVE("RAVRAD")=""
20 . D ^%ZTLOAD
21 . I +$G(ZTSK("D"))>0 W !?5,"Request Queued, Task #: ",$G(ZTSK)
22 . D HOME^%ZIS K %X,%XX,%Y,%YY,IO("Q"),X,Y,ZTSK
23 . D EXIT
24 . Q
25 I $D(RAVRAD)#2 D STARTV Q ; VistaRad Category only
26 D START,EXIT
27 Q
28START ; Display output
29 N I,J,K,RA1,RA72,RAFF,RAFLD,RAFLG,RAHD1,RAHD2,RAIEN,RAIT,RALINE,RANODE
30 N RAORD,RAPCE,RAPG,RAR,RAREQ,RAREQL,RASK,RASKL,RAST,RAWORK,RAWORKL
31 N RAXIT S (RAFLG,RAPG,RAXIT)=0
32 S:$D(ZTQUEUED) ZTREQ="@" U IO S RAHD1="Examination Statuses"
33 S RAHD2="Run Date: "_$$FMTE^XLFDT($$NOW^XLFDT(),"1P")
34 S RASK="ASK ON STATUS TRACKING:",$P(RASKL,"-",($L(RASK)+1))=""
35 S RAREQ="REQUIRED FOR CHANGE TO THIS STATUS:"
36 S $P(RAREQL,"-",($L(RAREQ)+1))=""
37 S RAWORK="WORKLOAD REPORTS THAT USE THIS STATUS IN ITS COMPLETION:"
38 S $P(RAWORKL,"-",($L(RAWORK)+1))=""
39 S $P(RALINE,"-",(IOM+1))="" S (RA1,RAIT)=""
40 F S RAIT=$O(^TMP($J,"RA XAM STAT",RAIT)) Q:RAIT']"" D Q:RAXIT
41 . S RA1=1,RAORD="" S:RAFLG RAXIT=$$EOS^RAUTL5() Q:RAXIT
42 . D HDR ; Form feed for every I-Type encountered
43 . F S RAORD=$O(^RA(72,"AA",RAIT,RAORD)) Q:RAORD']"" D Q:RAXIT
44 .. S RAIEN=0
45 .. F S RAIEN=+$O(^RA(72,"AA",RAIT,RAORD,RAIEN)) Q:RAIEN'>0 D Q:RAXIT
46 ... D FORMAT
47 ... Q
48 .. Q
49 . Q
50 Q:RAXIT
51 I 'RAFLG D HDR W !!,$$CJ^XLFSTR("*** No records to print! ***",IOM)
52 Q
53EXIT ; Kill variables
54 W ! D ^%ZISC K ^TMP($J,"RA XAM STAT")
55 K %XX,%YY,Y,POP,I,DISYS,RAVRAD
56 S X=$$EOS^RAUTL5() K X
57 Q
58FORMAT ; Format the output
59 S RAFF=0,RAFLG=1
60 S RA72(0)=$G(^RA(72,RAIEN,0)),RA72(.1)=$G(^RA(72,RAIEN,.1))
61 S RA72(.2)=$G(^RA(72,RAIEN,.2)),RA72(.3)=$G(^RA(72,RAIEN,.3))
62 S RA72(.5)=$G(^RA(72,RAIEN,.5)),RA72(.6)=$G(^RA(72,RAIEN,.6))
63 K ^TMP($J,"RA ASK"),^TMP($J,"RA REQ")
64 D SET(.RA72) ; set TMP globals to display parameters 'Ask On Status
65 ; Tracking' & 'Required For Change To This Status' in a column format
66 ; (side by side)
67 I RA1 W !?10,"Type Of Imaging: ",RAIT S RA1=0
68 W !!,"Status: ***",$P(RA72(0),"^")_"***",?54,"Order: ",RAORD
69 W !,"Default Next Status: ",$$GET1^DIQ(72,+$P(RA72(0),"^",2)_",",.01)
70 W ?54,"User Key Needed: ",$$GET1^DIQ(72,RAIEN_",",4)
71 I $Y>(IOSL-4) S RAXIT=$$EOS^RAUTL5() Q:RAXIT D HDR
72 W !,"Generate Examined HL7 Message: ",$$GET1^DIQ(72,RAIEN_",",8)
73 I $Y>(IOSL-4) S RAXIT=$$EOS^RAUTL5() Q:RAXIT D HDR
74 W !,"Generate Exam Alert: ",$$GET1^DIQ(72,RAIEN_",",1)
75 W ?54,"Allow Cancelling?: ",$$GET1^DIQ(72,RAIEN_",",6)
76 I $Y>(IOSL-4) S RAXIT=$$EOS^RAUTL5() Q:RAXIT D HDR
77 W !,"Appear On Status Tracking?: ",$$GET1^DIQ(72,RAIEN_",",5)
78 W ?54,"Print Dosage Ticket: ",$$GET1^DIQ(72,RAIEN_",",.611)
79 I $Y>(IOSL-4) S RAXIT=$$EOS^RAUTL5() Q:RAXIT D HDR
80 W !,"VistaRad Category: ",$$GET1^DIQ(72,RAIEN_",",9),!
81 I $Y>(IOSL-4) S RAXIT=$$EOS^RAUTL5() Q:RAXIT D HDR
82 W !,RASK,?39,RAREQ,!,RASKL,?39,RAREQL,!
83 S (RAST,RAR)=.001
84 F D Q:'RAST&('RAR) Q:RAXIT
85 . I $Y>(IOSL-4) S RAXIT=$$EOS^RAUTL5() Q:RAXIT D
86 .. S RAFF=0 D HDR W !,RASK,?39,RAREQ,!,RASKL,?39,RAREQL,!
87 .. Q
88 . W:RAFF ! D ASK:RAST,REQ:RAR S RAFF=1
89 . Q
90 Q:RAXIT W !?9,RAWORK,!?9,RAWORKL
91 F K=.31,.32,.33,.34,.35,.36,.37,.38,.39,.311,.312,.313,.314,.315 D Q:RAXIT
92 . S RAFLD=$P($G(^DD(72,K,0)),"^") Q:RAFLD=""
93 . S RANODE=$E(K,1,2),RAPCE=$E(K,3,999999)
94 . I $Y>(IOSL-4) S RAXIT=$$EOS^RAUTL5() Q:RAXIT D
95 .. D HDR W !?9,RAWORK,!?9,RAWORKL
96 .. Q
97 . I $$UP^XLFSTR($P(RA72(RANODE),"^",RAPCE))="Y" D
98 .. W !?14,$P(RAFLD," REPORT?")
99 .. Q
100 . Q
101 W ! K ^TMP($J,"RA ASK"),^TMP($J,"RA REQ")
102 Q
103ASK ; Display 'Ask on Status Tracking' parameters (if any)
104 S RAST=$O(^TMP($J,"RA ASK",RAST)) Q:RAST'>0
105 W ?4,$G(^TMP($J,"RA ASK",RAST))
106 Q
107HDR ; Header
108 D:'$D(IOF) HOME^%ZIS W:$Y @IOF
109 S RAPG=RAPG+1 W !?(IOM-$L(RAHD1)\2),RAHD1
110 W ?$S(IOM=132:120,1:68),"Page: ",RAPG
111 W !,$$CJ^XLFSTR(RAHD2,IOM),!,RALINE
112 I $D(ZTQUEUED) D STOPCHK^RAUTL9 S:$G(ZTSTOP)=1 RAXIT=1
113 Q
114REQ ; Display 'Required For Change To This Status' parameters (if any)
115 S RAR=$O(^TMP($J,"RA REQ",RAR)) Q:RAR'>0
116 W ?44,$G(^TMP($J,"RA REQ",RAR))
117 Q
118SET(RA72) ; set TMP globals so we can display parameters 'Ask On Status
119 ; Tracking' & 'Required For Change To This Status' in a column format
120 ; (side by side)
121 ; Input Variable: 'Y' ien of file 72
122 F I=.21,.22,.23,.24,.25,.26,.27,.28,.211,.213,.214,.61,.63,.64,.65,.67,.68,.69 D
123 . S RAFLD=$P($G(^DD(72,I,0)),"^") Q:RAFLD=""
124 . S RANODE=$E(I,1,2),RAPCE=$E(I,3,999999)
125 . I $$UP^XLFSTR($P(RA72(RANODE),"^",RAPCE))="Y" D
126 .. S:RAFLD["ASK FOR " RAFLD=$P(RAFLD,"ASK FOR ",2)
127 .. S:RAFLD["ASK " RAFLD=$P(RAFLD,"ASK ",2)
128 .. S ^TMP($J,"RA ASK",I)=$P(RAFLD,"?")
129 .. Q
130 . Q
131 F J=.11,.12,.13,.14,.15,.16,.111,.112,.116,.113,.114,.51,.53,.54,.55,.57,.58,.59 D
132 . S RAFLD=$P($G(^DD(72,J,0)),"^") Q:RAFLD=""
133 . S RANODE=$E(J,1,2),RAPCE=$E(J,3,999999)
134 . I $$UP^XLFSTR($P(RA72(RANODE),"^",RAPCE))="Y" D
135 .. S:RAFLD[" REQUIRED?" RAFLD=$P(RAFLD," REQUIRED?")
136 .. S ^TMP($J,"RA REQ",J)=RAFLD
137 .. Q
138 . Q
139 Q
140STARTV ;Display VistaRad Category only
141 N RA1,RA72,RAFLG,RAHD1,RAHD2,RAIEN,RAIT,RAORD,RAPG,RALINE
142 N RAXIT S (RAFLG,RAPG,RAXIT)=0
143 S:$D(ZTQUEUED) ZTREQ="@" U IO S RAHD1="VistaRad Categories"
144 S RAHD2="Run Date: "_$$FMTE^XLFDT($$NOW^XLFDT(),"1P")
145 S $P(RALINE,"-",(IOM+1))="" S (RA1,RAIT)=""
146 F S RAIT=$O(^TMP($J,"RA XAM STAT",RAIT)) Q:RAIT']"" D Q:RAXIT
147 . S RA1=1,RAORD=""
148 . D:'RAPG HDR ; Form feed 1st page
149 . F S RAORD=$O(^RA(72,"AA",RAIT,RAORD)) Q:RAORD']"" D Q:RAXIT
150 .. S RAIEN=0
151 .. F S RAIEN=+$O(^RA(72,"AA",RAIT,RAORD,RAIEN)) Q:RAIEN'>0 D Q:RAXIT
152 ... S RAFLG=1
153 ... S RA72(0)=$G(^RA(72,RAIEN,0))
154 ... I RA1 D HDR3 S RA1=0 Q:RAXIT
155 ... I $Y>(IOSL-4) S RAXIT=$$EOS^RAUTL5() Q:RAXIT D HDR
156 ... W !,$P(RA72(0),"^"),?30,RAORD,?35,$$GET1^DIQ(72,RAIEN_",",9)
157 .. Q
158 . Q
159 D EXIT
160 Q
161VRADP I '$$IMAGE^RARIC1() W !!,"Current system is not running Vista Imaging -- nothing done.",! Q
162 S RAVRAD=1 G VEN1
163HDR3 I $Y>(IOSL-10) S RAXIT=$$EOS^RAUTL5() Q:RAXIT D HDR
164 W !!?10,"Type Of Imaging: ",RAIT,!,"Status",?27,"Order",?35,"VistaRad Category",!
165 Q
Note: See TracBrowser for help on using the repository browser.