source: FOIAVistA/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RAORD6.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 7.6 KB
Line 
1RAORD6 ;HISC/CAH - AISC/RMO-Print A Request Cont. ;2/2/98 15:28
2 ;;5.0;Radiology/Nuclear Medicine;**5,10,15,18,27,45,41,75,85**;Mar 16, 1998;Build 4
3 ; 3-p75 10/12/2006 GJC RA*5*75 print Reason for Study
4 ; 4-p75 10/12/2006 KAM RA*5*75 display the request print date in the header
5 ; 5-p75 10/12/2006 KAM RA*5*75 update header "Age" to "Age at req"
6 ; 6-p85 06/20/2007 KAM RA*5*85 Reason for Study/Bar Code print issue
7 ; Remedy Call - 193859
8 D HD Q:RAX["^"
9 I $P(RADPT0,U,2)="F" D ;display pregnancy status for females ptch 45
10 .W !,"Pregnancy Status: ",?22,$S($P(RAORD0,"^",13)="y":"Patient is Pregnant",$P(RAORD0,"^",13)="n":"Patient not pregnant at time of order",1:"Unknown")
11 .Q
12 W:$P(RAORD0,"^",24)="y" !!?12,"*** Universal Isolation Precautions ***"
13 W:$D(RA("VDT")) !!?8,"** Note Request Associated with Visit on ",RA("VDT")," **"
14 W !!,"Requested:",?18,RA("PRC INFO")
15 I $D(^TMP($J,"RA DIFF PRC")),('$D(RAFOERR)),('$D(RAOPT("REG"))),('$D(RAOPT("ORDEREXAM"))),('$D(RAOPT("ADDEXAM"))) D Q:RAX["^"
16 . ; don't print registered procedure info (CPT, Proc Type, Imaging
17 . ; Type) if entering through 'Request An Exam', 'Register Patient
18 . ; for Exams' or 'Add Exams To Last Visit'. Don't print if ordered
19 . ; through ANY version of OE/RR. If ordered through OE/RR, RAFOERR
20 . ; will be defined. (Set in RAORD1 & RAO7RO)
21 . N RAT,RA18NLIN S RAT="",RA18NLIN=0 W !,"Registered:"
22 . F S RAT=$O(^TMP($J,"RA DIFF PRC",RAT)) Q:RAT="" D Q:RAX["^"
23 .. D HD:($Y+6)>IOSL Q:RAX["^"
24 .. W:RA18NLIN ! W ?12,RAT
25 .. S RA18NLIN=1
26 .. Q
27 . Q
28 I $G(RACMFLG("O"))'="" W !?12,"** The requested procedure has contrast media assigned **"
29 I $G(RACMFLG("R"))'="" W !?12,"** A registered procedure uses contrast media **"
30 W:$D(RA("MOD")) !,"Procedure Modifiers:",?22,RA("MOD")
31 I RA("PRC MSG") D Q:RAX["^"
32 . N A,B,C,X S (A,C)=0 W !,"Procedure Message: ",!
33 . F S A=$O(^RAMIS(71,+$P(RAORD0,"^",2),3,A)) Q:A'>0!(RAX["^") D
34 .. S B=+$G(^RAMIS(71,+$P(RAORD0,"^",2),3,A,0))
35 .. S X=$G(^RAMIS(71.4,B,0))
36 .. W:'C ?3,"-" W:C !?3,"-"
37 .. D OUTTEXT^RAUTL9(X,"",5,80,4,"","!")
38 .. D HD:($Y+6)>IOSL S C=C+1
39 .. Q
40 . Q
41 W !,"Request Status:",?22,$E(RA("OST"),1,24)
42 I $P(RAORD0,"^",5)=1!($P(RAORD0,"^",5)=3) D Q:RAX["^"
43 . W !,"Reason ",$S($P(RAORD0,"^",5)=1:"Cancelled",1:"Held"),":"
44 . W ?22,$S($D(^RA(75.2,+$P(RAORD0,"^",10),0)):$E($P(^(0),"^"),1,50),$P(RAORD0,"^",27)]"":$E($P(RAORD0,"^",27),1,50),1:"UNKNOWN")
45 . D HD:($Y+6)>IOSL Q:RAX["X"
46 . I $D(^RAO(75.1,RAOIFN,1)) D Q:RAX["^"
47 .. N X,I,RAXX
48 .. K ^UTILITY($J,"W")
49 .. W !,"Hold Description:",!
50 .. S I=0 F S I=$O(^RAO(75.1,RAOIFN,1,I)) Q:'I S (RAXX,X)=^(I,0) D HD:($Y+6)>IOSL Q:RAX["^" S X=RAXX D ^DIWP
51 .. Q:RAX["^"
52 .. D HD:($Y+6)>IOSL Q:RAX["X"
53 .. D ^DIWW:$D(RAXX)
54 .. D HD:($Y+6)>IOSL Q:RAX["X"
55 . I $P(RAORD0,"^",5)=1 D
56 .. W !!,?(IOM-(IOM/2+15)),"*********************",!,?(IOM-(IOM/2+15)),"* C A N C E L L E D *",!,?(IOM-(IOM/2+15)),"*********************"
57 W:$P(RAORD0,"^",5)=6&($D(RA("ST"))) !,"Exam Status:",?22,RA("ST")
58 W:$P(RAORD0,"^",5)=8&($D(RA("SDT"))) !,"Exam Scheduled:",?22,RA("SDT")
59 D HD:($Y+6)>IOSL Q:RAX["^"
60 W !!,"Requester:",?22,$E(RA("PHY"),1,20)
61 W:RA("PHY")'="UNKNOWN" !?1,"Tel/Page/Dig Page: ",$G(RA("RPHOINFO"))
62 D HD:($Y+6)>IOSL Q:RAX["^"
63 W !,"Attend Phy Current:",?22,$E(RA("ATTEN"),1,20)
64 W:RA("ATTEN")'="UNKNOWN" !?1,"Tel/Page/Dig Page: ",$G(RA("APHOINFO"))
65 D HD:($Y+6)>IOSL Q:RAX["^"
66 W !,"Prim Phy Current:",?22,$E(RA("PRIM"),1,20)
67 W:RA("PRIM")'="UNKNOWN" !?1,"Tel/Page/Dig Page: ",$G(RA("PPHOINFO"))
68 K RAPASS1,RAPASS2
69 S RAPASS1=RA("ATTEN"),RAPASS2=RA("OATTEN")
70 D HD:($Y+6)>IOSL Q:RAX["^"
71 I $$ID^RAORD6(RAPASS1,RAPASS2) D
72 . W !,"Attend Phy At Order:",?22,$E(RA("OATTEN"),1,20)
73 . W:RA("OATTEN")'="UNKNOWN" !?1,"Tel/Page/Dig Page: ",$G(RA("OAPHOINFO"))
74 . Q
75 S RAPASS1=RA("PRIM"),RAPASS2=RA("OPRIM")
76 I $$ID^RAORD6(RAPASS1,RAPASS2) D
77 . W !,"Prim Phy At Order:",?22,$E(RA("OPRIM"),1,20)
78 . W:RA("OPRIM")'="UNKNOWN" !?1,"Tel/Page/Dig Page: ",$G(RA("OPPHOINFO"))
79 . Q
80 K RAPASS1,RAPASS2
81 I +$P(RAORD0,"^",8) D
82 . N RAPPRAD S RAPPRAD=+$P(RAORD0,"^",8)
83 . S:$P($G(^VA(200,RAPPRAD,20)),"^",2)]"" RAPPRAD=$P(^(20),"^",2)
84 . S:RAPPRAD=+RAPPRAD RAPPRAD=$P(^VA(200,RAPPRAD,0),"^")
85 . W !,"Approved by: ",?22,RAPPRAD
86 . Q
87 D HD:($Y+6)>IOSL Q:RAX["^"
88 W !,"Date/Time Ordered:",?22,$S($D(RA("ODT")):RA("ODT"),1:"")," by ",$E(RA("USR"),1,20)
89 W:$D(RA("RDT")) !,"Date Desired:",?22,RA("RDT")
90 D:$P(RAORD0,"^",5)=1 USERCAN^RAORD3
91 D HD:($Y+6)>IOSL Q:RAX["^"
92 W:$D(RA("PDT")) !,"Pre-op Date/Time:",?22,RA("PDT"),!!?26,"**** P R E - O P ****",!
93BAR ;Print bar-coded SSN on request form if term type has bar code setup
94 I $G(RASSN)'?3N1"-"2N1"-".E G CONT
95 S X3=$E(RASSN,1,3)_$E(RASSN,5,6)_$E(RASSN,8,11)
96 ; 06/20/2007 KAM/BAY RA*5*85 Added 2 line feeds
97 D PSET^%ZISP I IOBARON]"",(IOBAROFF]"") W !!!?49,@IOBARON,X3,@IOBAROFF,!
98 D PKILL^%ZISP
99 ;
100CONT D HD:($Y+6)>IOSL Q:RAX["^" D ODX^RABWUTL(RAOIFN) ; * Billing Aware *
101 D HD:($Y+6)>IOSL Q:RAX["^"
102 ; 06/20/2007 KAM/BAY RA*5*85 Added line feed to the next line
103 I $L(RA("STY_REA")) W ! D DIWP^RAUTL5(1,68,"Reason for Study: "_RA("STY_REA")) ;3-p75
104 D HD:($Y+6)>IOSL Q:RAX["^" K ^UTILITY($J,"W"),^(1) W !,"Clinical History:",! K RAXX F RAV=0:0 S RAV=$O(^RAO(75.1,RAOIFN,"H",RAV)) Q:'RAV I $D(^(RAV,0)) S RAXX=^(0) D HD:($Y+6)>IOSL Q:RAX["^" S X=RAXX D ^DIWP
105 Q:RAX["^" D HD:($Y+6)>IOSL Q:RAX["^" D ^DIWW:$D(RAXX),HD:($Y+6)>IOSL Q:RAX["^" D WORK ;always print bottom section of form 012601
106 W ! S BOT=IOSL-($Y+4) S:($E(IOST,1,6)="P-BROW"&($D(DDBRZIS))) BOT=5 F BT=1:1:BOT W !
107 K BOT,BT
108 W !,"VA Form 519a-ADP"
109 Q
110 ;
111WORK W !,RALNE,!,"Date Performed: ________________________",?46
112 I $O(^RADPT("AO",RAOIFN,0))="" W "Case No.: ______________________"
113 E W "Case No.: ______see above_______"
114 D HD:($Y+6)>IOSL Q:RAX["^"
115 W !,"Technologist Initials: _________________"
116 D HD:($Y+6)>IOSL Q:RAX["^"
117 W !?46,"Number/Size Films: _____________",!,"Interpreting Phys. Initials: ___________",?65,"_____________",!?65,"_____________",!
118 D HD:($Y+6)>IOSL Q:RAX["^"
119 W !,"Comments:"
120 ;
121TC D EN30^RAO7PC1(RAOIFN),TC^RAORD61 Q:RAX["^"
122 ;
123DASHLN W ! F I=1:1:5 D HD:($Y+6)>IOSL Q:RAX["^" W !,RALNE ;P18
124 Q
125 ;
126HD S:'$D(RAPGE) RAPGE=0 D CRCHK Q:$G(RAX)["^" S RATAB=$S($D(RA("ILC")):1,1:16)
127 ;10/12/2006 KAM Remedy tk 162508 Changed next line added "Printed:"
128 W:$Y @IOF W !?RATAB,">>"_$S($D(RACRHD):"Discontinued ",1:"")_"Rad/NM Consultation" W:$D(RA("ILC")) " for ",$E(RA("ILC"),1,17) W "<<Printed:" S X="NOW",%DT="T" D ^%DT K %DT D D^RAUTL W ?52,Y ;P18 4-P74
129 S RAPGE=RAPGE+1 W ?71,"Page ",RAPGE ;P18
130 W !,RALNE1,!,"Name : ",RA("NME"),?46,"Urgency : ",RA("OUG") W:$D(RA("PORTABLE")) " *PORTABLE*"
131 W !,"Pt ID Num : ",RASSN,?46,"Transport : ",RA("TRAN")
132 S Y=RA("DOB") D D^RAUTL W !,"Date of Birth: ",Y,?46,"Patient Loc: ",$E(RA("HLC"),1,20)
133 ;10/12/2006 KAM Remedy Ticket 162508 changed next line
134 W !,"Age at req : ",RA("AGE"),?46,"Phone Ext : ",RA("HPH") ;5-P75
135 W !,"Sex : ",$S(RA("SEX")="M":"MALE",1:"FEMALE") W:$D(RA("ROOM-BED")) ?46,"Room-Bed : ",RA("ROOM-BED") W !,RALNE1
136 W:$P(RAORD0,U,5)=1 !,"***C A N C E L L E D***",?56,"***C A N C E L L E D***"
137 Q
138 ;
139CRCHK I RAPGE,$E(IOST)="C" W !!,$C(7),"Press RETURN to continue or '^' to stop " R X:DTIME S RAX=X
140 Q
141ID(X,Y) ; Checks for the following condition:
142 ; 1) Attending Phy. Current & Attending Phy. At Order are the same.
143 ; 2) Primary Phy. Current & Primary Phy. At Order are the same.
144 ; Input Variables:
145 ; 'X'-> Attending/Primary Phy. Current
146 ; 'Y'-> Attending/Primary Phy. At Order
147 I X']""!(Y']"") Q 0
148 I $$UP^XLFSTR(X)="UNKNOWN",($$UP^XLFSTR(Y)="UNKNOWN") Q 0
149 N A,B,Z S A=+$O(^VA(200,"B",X,"")),B=+$O(^VA(200,"B",Y,""))
150 I A>0,(B>0),(A=B) S Z=0
151 E S Z=1
152 Q Z ; $S(Z=1:"different physician",Z=0:"same physician")
Note: See TracBrowser for help on using the repository browser.