source: WorldVistAEHR/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RAERRPT.m@ 1240

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

initial load of WorldVistAEHR

File size: 1.7 KB
RevLine 
[613]1RAERRPT ;HIRMFO/GJC-Access erroneous Rad/Nuc Med reports ;10/23/97 12:39
2 ;;5.0;Radiology/Nuclear Medicine;;Mar 16, 1998
3EN1 ; Beginning entry point
4 K ^TMP($J,"RAEX") D SETVARS^RART1
5 I $G(RAIMGTY)="" K XQUIT D KILL Q ; no sign-on imaging loc specified
6 S DIC(0)="QEAMZ",DIC("A")="Select Patient: " D ^RADPA G:Y<0 KILL
7 S RADFN=+Y,RAPAT=Y(0,0),RAHEAD="**** Patient's Exams ****"
8 D ^RAPTLU G:+X'>0 KILL ; user did not select an exam
9 S RA74=$P(^TMP($J,"RAEX",X),"^",10) ; ien for file 74
10 S ZTDESC="Rad/Nuc Med Erroneous Reports",ZTRTN="START^RAERRPT"
11 F I="RA74","RAPAT" S ZTSAVE(I)=""
12 D ZIS^RAUTL
13 I RAPOP D KILL Q
14START ; Start processing data
15 S:$D(ZTQUEUED) ZTREQ="@"
16 U IO S (RAIEN,RAXIT)=0
17 S RAHD="*** Uncorrected Reports for: "_RAPAT_" ***"
18 S $P(RALINE,"-",(IOM+1))="",RAPG=0,RADT=$$FMTE^XLFDT(DT,"1D")
19 S RAHD1="Run Date: "_RADT D HDH^RAERRPT G:RAXIT KILL
20 F S RAIEN=$O(^RARPT(RA74,"ERR",RAIEN)) Q:RAIEN'>0 D Q:RAXIT
21 . S RAERR(0)=$G(^RARPT(RA74,"ERR",RAIEN,0))
22 . W !?3,"Date/Time Uncorrected Report retained: "
23 . W $$FMTE^XLFDT($P(RAERR(0),"^"),"1P"),! S RAI=0
24 . F S RAI=$O(^RARPT(RA74,"ERR",RAIEN,"RPT",RAI)) Q:RAI'>0 D Q:RAXIT
25 .. S RAERRPT=$G(^RARPT(RA74,"ERR",RAIEN,"RPT",RAI,0))
26 .. I $Y>(IOSL-4) S RAXIT=$$EOS^RAUTL5() Q:RAXIT D HDH^RAERRPT
27 .. Q:RAXIT W !,RAERRPT
28 .. Q
29 . Q
30 W ! D ^%ZISC,KILL
31 Q
32HDH ; Header
33 W:$Y @IOF S RAPG=RAPG+1 W !,$$CJ^XLFSTR(RAHD,IOM)
34 W !,RAHD1,?$S(IOM=132:121,1:68),"Page: ",RAPG,!,RALINE
35 I $D(ZTQUEUED) D STOPCHK^RAUTL9 S:$G(ZTSTOP)=1 RAXIT=1
36 Q
37KILL ; Reset, Kill & quit
38 D HOME^%ZIS
39 K %W,%X,%XX,%Y,%YY,C,DIC,DIPGM,I,RA74,RACN,RACNI,RADATE,RADFN,RADT
40 K RADTE,RADTI,RAERR,RAERRPT,RAHD,RAHD1,RAHEAD,RAI,RAIEN,RALINE,RANME
41 K RAPAT,RAPG,RAPOP,RAPRC,RARPT,RASSN,RAST,RAXIT,X,Y,Z
42 K POP,RAMES,ZTDESC,ZTRTN,ZTSAVE,DUOUT
43 Q
Note: See TracBrowser for help on using the repository browser.