source: FOIAVistA/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RARTUTL1.m@ 1757

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1RARTUTL1 ;HIRMFO/GJC-Utility to display Pharm & Radiopharm data ;11/18/97 13:28
2 ;;5.0;Radiology/Nuclear Medicine;;Mar 16, 1998
3 ;
4RDIO1(RADA) ; Display Radiopharmaceutical default data for Report displays
5 ; Input: RADA -> ien of the Nuc Med Exam Data record (file 70.2)
6 ; Output: 'X' -> $S(X'="":'abnormal exit',1:'full display')
7 ; *** Called only if $P(^RADPT(RADFN,"DT",RADTI,"P",RACNI,0),U,28)>0 ***
8 N RADARY,RAXIT,Y S RAXIT=0,X=""
9 D GETS^DIQ(70.2,RADA_",","**","NE","RADARY") Q:'$D(RADARY) ""
10 D WAIT^RART1:($Y+6)>IOSL&('$D(RARTVERF)) Q:X="T"!(X="P")!(X="^") X
11 I X="C" W @IOF S X=""
12 N RAIENS S RAIENS=""
13 F S RAIENS=$O(RADARY(70.21,RAIENS)) Q:RAIENS="" D Q:RAXIT
14 . N RADOSE S RADOSE=$S($G(RADARY(70.21,RAIENS,7,"E"))]"":", "_$G(RADARY(70.21,RAIENS,7,"E"))_" mCi",1:"")
15 . D WAIT^RART1:($Y+6)>IOSL&('$D(RARTVERF)) S:X="T"!(X="P")!(X="^") RAXIT=1
16 . Q:RAXIT
17 . I X="C" W @IOF S X=""
18 . W !," Radiopharmaceutical: "_$G(RADARY(70.21,RAIENS,.01,"E"))_RADOSE
19 . D WAIT^RART1:($Y+6)>IOSL&('$D(RARTVERF)) S:X="T"!(X="P")!(X="^") RAXIT=1
20 . Q:RAXIT
21 . I X="C" W @IOF S X=""
22 . Q:$G(RADARY(70.21,RAIENS,8,"E"))=""&($G(RADARY(70.21,RAIENS,9,"E"))="")&($G(RADARY(70.21,RAIENS,11,"E"))="")&($G(RADARY(70.21,RAIENS,12,"E"))="")
23 . N RACNT,RALNGTH S RACNT=0
24 . F RADFLDS=8,9,11,12 D
25 .. W:'RACNT&(RADFLDS=8) ! ; initial line feed, spacing
26 .. I $G(RADARY(70.21,RAIENS,RADFLDS,"E"))]"" D
27 ... W:RACNT=2 ! S:RACNT=2 RACNT=0 ; NEW LINE
28 ... S RACNT=RACNT+1
29 ... W:RADFLDS=8 $S(RACNT=2:" Adm'd on ",1:" Adm'd on ")
30 ... W:RADFLDS=9 $S(RACNT=2:" by ",1:" by ")
31 ... W:RADFLDS=11 $S(RACNT=2:" Route ",1:" Route ")
32 ... W:RADFLDS=12 $S(RACNT=2:" Site ",1:" Site ")
33 ... S RALNGTH=$L($G(RADARY(70.21,RAIENS,RADFLDS,"E")))
34 ... I RACNT=2,((RALNGTH+$X)>IOM) D
35 .... W $E($G(RADARY(70.21,RAIENS,RADFLDS,"E")),1,(IOM-($X-1)))
36 .... Q
37 ... E W $G(RADARY(70.21,RAIENS,RADFLDS,"E"))
38 ... Q
39 .. Q
40 . Q
41 Q $G(X)
Note: See TracBrowser for help on using the repository browser.