source: FOIAVistA/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RARTUVR2.m@ 1446

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

initial load of FOIAVistA 6/30/08 version

File size: 4.1 KB
Line 
1RARTUVR2 ;HISC/FPT,SWM -Unverified Reports ;11/26/97 07:57
2 ;;5.0;Radiology/Nuclear Medicine;;Mar 16, 1998
3PRINT ; print entries
4 S RACNT(0)=RACNT(0)+1
5 D HDR
6 I $D(ZTQUEUED) D STOPCHK^RAUTL9 S:$G(ZTSTOP)=1 RAOUT=1 Q:RAOUT=1
7 I ^TMP($J,"RAUVR",RADIVNME,RAITNAME)=0 D NEGRPT D Q
8 . I RACNT(0)<RACNT S RAOUT=$$EOS^RAUTL5()
9 . Q
10 F RARS="S","R","U" Q:RAOUT!(RAOUT) D
11 . I ($Y+4)>IOSL S RAOUT=$$EOS^RAUTL5() Q:RAOUT D HDR
12 . S RASTRING=$S(RARS="S":"STAFF^STFCNT",RARS="R":"RESIDENT^RESCNT",1:"UNKNOWN^UNKCNT")
13 . D:RABD="B" HOURAGE
14 . W !,"* ",$P(RASTRING,U),": ",^TMP($J,RADIVNME,RAITNAME,$P(RASTRING,U,2))," *"
15 . S RAFL=0,RAIPNAME=""
16 . F S RAIPNAME=$O(^TMP($J,RADIVNME,RAITNAME,RARS,RAIPNAME)) Q:RAIPNAME="" D Q:RAOUT
17 .. I $D(ZTQUEUED) D STOPCHK^RAUTL9 S:$G(ZTSTOP)=1 RAOUT=1 Q:RAOUT=1
18 .. D PRTB
19 .. Q:RAOUT D:RABD="D" PRTD
20 .. Q
21 . W !!
22 . Q
23 W !
24 Q:RAOUT I RACNT(0)<RACNT S RAOUT=$$EOS^RAUTL5()
25 Q
26HDR ; header
27 W:$Y>0 @IOF W !?$S(IOM<81:20,1:IOM-90),">>>>> Unverified Reports ("_$S(RABD="B":"brief",1:"detailed")_") <<<<<" S RAPAGE=RAPAGE+1 W ?$S(IOM<81:70,1:IOM-10),"Page: ",RAPAGE
28 W !,"Division: ",?10,RADIVNME,?$S(IOM<81:43,1:IOM-37),"Report Date Range:",?$S(IOM<81:62,1:IOM-18),$$FMTE^XLFDT(BEGDATE)
29 W !,"Imaging Type: ",RAITNAME,?$S(IOM<81:62,1:IOM-18),$$FMTE^XLFDT(ENDDATE),!,"Run Date: ",RARUNDAT,?$S(IOM<81:45,1:IOM-35),"Total Unverified Reports: ",^TMP($J,"RAUVR",RADIVNME,RAITNAME),!
30 Q
31 ;
32NEGRPT ; negative reports
33 W !!?$S(IOM<81:26,1:IOM-84),"***************************"
34 W !?$S(IOM<81:26,1:IOM-84),"* No Unverified Reports *"
35 W !?$S(IOM<81:26,1:IOM-84),"***************************",!
36 Q
37PRTB I ($Y+4)>IOSL S RAOUT=$$EOS^RAUTL5() Q:RAOUT D HDR
38 I $D(ZTQUEUED) D STOPCHK^RAUTL9 S:$G(ZTSTOP)=1 RAOUT=1 Q:RAOUT=1
39 W:RABD="D" !,RAEQUAL
40 D:RABD="D" HOURAGE
41 S RA1=50+$L(RACUT(3))+21
42 W !,$J(^TMP($J,RADIVNME,RAITNAME,RARS,RAIPNAME),3)," "
43 W $E(RAIPNAME,1,20)
44 W ?29,$S($G(^TMP($J,RADIVNME,RAITNAME,RARS,RAIPNAME,"H",1)):$J(^(1),$L(RACUT(3))),1:$J(0,$L(RACUT(3)))),?39,$S($G(^(2)):$J(^(2),$L(RACUT(3))),1:$J(0,$L(RACUT(3))))
45 W ?49,$S($G(^(3)):$J(^(3),$L(RACUT(3))),1:$J(0,$L(RACUT(3)))),?59,$S($G(^(4)):$J(^(4),$L(RACUT(3))+2),1:$J(0,$L(RACUT(3))+2))
46 Q
47PRTD K ^TMP($J,"RA0") N RA1,RA2,RA3,RA4,RARPT,RADFN,RADTI,RACNI
48 Q:'+$O(^TMP($J,RADIVNME,RAITNAME,RARS,RAIPNAME,0))
49 S RARPT=0
50 F S RARPT=$O(^TMP($J,RADIVNME,RAITNAME,RARS,RAIPNAME,RARPT)) Q:'+RARPT S X=^(RARPT) D Q:RAOUT
51 . I $D(ZTQUEUED) D STOPCHK^RAUTL9 S:$G(ZTSTOP)=1 RAOUT=1 Q:RAOUT=1
52 . S RADFN=$P(X,U),RADTI=$P(X,U,2),RACNI=$P(X,U,3)
53 . S RA1=$G(^RARPT(RARPT,0)),RA2=$G(^RADPT(RADFN,"DT",RADTI,"P",RACNI,0))
54 . S RA3=$P(RA1,U,6) ;date report entered
55 . S DFN=RADFN D DEM^VADPT
56 . S ^TMP($J,"RA0",RA3)=$E(VADM(1))_$$SSN^RAUTL_U_$P(RA1,U,5) ;pc1=1st initial of last name_ssn, pc2=report status
57 . K VADM S X=$P(RA1,U,12) D SETX,APPEND ;pc3=pre-verif dt
58 . S X=$$FMTE^XLFDT($P(RA1,U,3)),X=$E($P(X,"@",2),1,5),X=$S(X]"":"@"_X,1:"")
59 . S X=$P(RA1,U)_X D APPEND ;pc4=day/case_exam hrmin
60 . S X=$P(RA2,U,11) S X=$S(+X:$P($G(^RAO(75.1,X,0)),U,21),1:"") D SETX,APPEND ; pc5=date desired from file 75.1
61 . S X=$P(RA2,U,2) D APPEND ;pc6=procedure pointer
62 . Q
63 S RA3=0 F S RA3=$O(^TMP($J,"RA0",RA3)) Q:RA3="" D Q:RAOUT W !
64 . I ($Y+4)>IOSL S RAOUT=$$EOS^RAUTL5() Q:RAOUT D HDR
65 . S X=RA3 D SETX
66 . W !,"Transcrip: ",X,?27,"ID: ",$P(^TMP($J,"RA0",RA3),U),?47
67 . S X=$P(^(RA3),U,2) W $S(X="D":"DRAFT",X="PD":"PROB/DRAFT",X="R":"RELEASE",X="V":"VERIFIED",1:"")
68 . W ?58,"Pre-ver: ",$P(^(RA3),U,3)
69 . W !,"Exam Date: ",$P(^TMP($J,"RA0",RA3),U,4),?31,"Order Date Desired: ",$P(^(RA3),U,5)
70 . I +$P(^(RA3),U,6) W:IOM<81 ! W ?$S(IOM<81:0,1:IOM-66),"Proc: ",$E($P($G(^RAMIS(71,$P(^(RA3),U,6),0)),U),1,60)
71 . S Y(0)=RA2 D PHYS^RARTUVR1
72 . Q
73 Q
74SETX I $L(X)=0 S X="" Q
75 S RA4=$E($P($$FMTE^XLFDT(X),"@",2),1,5),RA4=$S(RA4]"":"@"_RA4,1:"")
76 S X=$E(X,4,5)_$E(X,6,7)_$E(X,2,3)
77 S X=X_RA4
78 Q
79APPEND S ^(RA3)=^TMP($J,"RA0",RA3)_U_X Q
80HOURAGE W !,"Hours (age of report)",?29,$J(RACUT(1),$L(RACUT(3))),?39,$J(RACUT(2),$L(RACUT(3))),?49,$J(RACUT(3),$L(RACUT(3))),?59,">",$J(RACUT(3),$L(RACUT(3))+1)
81 W !?29,$E(RADASH,1,$L(RACUT(3))),?39,$E(RADASH,1,$L(RACUT(3))),?49,$E(RADASH,1,$L(RACUT(3))),?59,$E(RADASH,1,$L(RACUT(3))+2)
82 Q
Note: See TracBrowser for help on using the repository browser.