source: FOIAVistA/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RANMUSE1.m

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1RANMUSE1 ;HISC/SWM-Nuclear Medicine Usage reports ;9/3/97 14:37
2 ;;5.0;Radiology/Nuclear Medicine;;Mar 16, 1998
3EN1 ;
4 N RADIVNAM,RAIMGNAM,RADIOPH,RAXMDTM,RAPRCNAM,RAPATNAM,RACN,DFN,I
5 N P02,P03,S3,S4,VA,VAERR
6 D KIL
7 S RATITLE="Radiopharmaceutical "_RATITLE,RAPG=0
8 S X="NOW",%DT="T" D ^%DT K %DT D D^RAUTL S RATDY=Y,$P(RALN,"-",133)=""
9 K DIR
10 ;****W @IOF,!?3,RATITLE,!?3,$E(RALN,1,$L(RATITLE)),!
11 S DIR(0)="YA",DIR("A")="Do you wish only the summary report? ",DIR("B")="No",DIR("?")="Enter 'Yes' for a summary report, or 'No' for a detailed report."
12 D ^DIR K DIR I $D(DIRUT) G OUT
13 S RASUM=+Y ; =1 summary rpt only
14 K DIROUT,DIRUT,DTOUT,DUOUT
15 I $O(RACCESS(DUZ,""))="" D SETVARS^RAPSET1(0)
16 N X S X=$$SETUPDI^RAUTL7() Q:X
17 D SELDIV^RAUTL7 ; <-------------- Select Rad division(s)
18 I '$D(^TMP($J,"RA D-TYPE"))!(RAQUIT) D G OUT
19 . K RACCESS(DUZ,"DIV-IMG"),^TMP($J,"DIV-IMG")
20 . Q
21 ; selection of img type should be based on
22 ; (1) loc access and/or RA ALLOC key
23 ; (2) img type must have RADIOPHARMS USED = Y
24 D SELIMG^RANMUTL1 ; <-------------- Select Imaging type
25 I '$D(^TMP($J,"RA I-TYPE"))!(RAQUIT) D G OUT
26 . K RACCESS(DUZ,"DIV-IMG"),^TMP($J,"DIV-IMG")
27 . Q
28 I RATITLE["Usage" D SELRADIO^RANMUTL1 Q:RAINPUT="" ; <-------------- Select Radiopharm(s)
29 I RATITLE["Admin" D SELADMIN^RANMUTL1 Q:RAINPUT="" ; <-------------- Select Dose Administerer
30 G:RAQUIT OUT
31 I RAINPUT=0,'$D(^TMP($J,"RA EITHER")) G OUT
32 D SELDATES^RANMUTL1 ; <-------------- Select date range
33 G:RAPOP OUT
34 D SELSORT^RANMUTL1 ; <-------------- Select sort order
35 G:RAPOP OUT
36 ; ^tmp($j,"ra",
37 ; subscr 3 - div's numerical sort order
38 ; subscr 4 - img typ's numerical sort order
39 ;
40 ; 3rd & 4th sorts are interchangeable, depending on user's choice
41 ; If user chooses to sort by exam date/time later :
42 ; subscr 5 - radiopharm name OR who admin dose
43 ; subscr 6 - exam date/time
44 ;
45 ; If user chooses to sort by exam date/time earlier :
46 ; subscr 5 - exam date/time
47 ; subscr 6 - radiopharm name OR who admin dose
48 ;
49 ; subscr 7 - patient name
50 ; subscr 8 - case number
51 ; subscr 9 - radiopharm (would be a repeat for Usage rpt)
52 ;
53 S ZTRTN="START^RANMUSE1"
54 S ZTSAVE("^TMP($J,""RA"",")=""
55 S ZTSAVE("^TMP($J,""RA D-TYPE"",")=""
56 S ZTSAVE("^TMP($J,""RA I-TYPE"",")=""
57 S ZTSAVE("^TMP($J,""RA EITHER"",")=""
58 F I="RACCESS*","RAINPUT","RADTBEG*","RADTEND*","RALN","RASORT","RASUM","RAPG","RATDY","RATITLE" S ZTSAVE(I)=""
59 W !!?5,"***",?57,"***",!?5,"*** This report requires a 132 column output device ***",!?5,"***",?57,"***"
60 W ! D ZIS^RAUTL
61 I RAPOP G OUT
62START ;
63 K RATDRAWN,RATDOSE,RATRADIO,RATOUTSD,RATUNIQ,RAHDTYP
64 ; RATDRAWN() total dose drawn
65 ; RATADMIN() total dose administered
66 ; RATRADIO() total cases using this radiopharm
67 ; RATOUTSD() total cases where admin dose fell outside of dosage range
68 D SET^RANMUSE2
69 D ZERO^RANMUSE3
70 U IO
71 D:'RASUM WRT^RANMUSE2 G:$G(RAXIT) OUT
72 D SUM^RANMUSE3
73OUT ;
74 S:$D(ZTQUEUED) ZTREQ="@"
75 D CLOSE^RAUTL
76 D KIL
77 Q
78KIL ;
79 K ^TMP($J,"RA"),^("RASUM"),^("RATUNIQ"),^("RA D-TYPE"),^("RA I-TYPE"),^("RA EITHER"),^("DIV-IMG")
80 K ^TMP($J,"RATOUTSD"),^("RATDRAWN"),^("RATDOSE"),^("RATRADIO")
81 K RA0,RA1,RA2,RASTERSK,RASORT,RADTBEG,RADTEND,RASUM,RAPG,RAUNIQ,RAFIRST
82 K RADFN,RADTI,RACNI,RAN0,RANUC,RALONGCN,RATDY,RALN,RAINPUT
83 K RAXIT,RAWHO,RAXMDTM,RASSN,RASEQD,RAPRC0,RASEQI,RAQUIT,RAPOP
84 K RANUMI,RANUMD,RANUC1,RALOW,RAHIGH,RAHDTYP,RADRAWN,RADOSE,RAMES
85 K RAEITHER,DIR,I
86 Q
87RADUSE ; Entry point for Radiopharm usage report
88 N ZTDESC S ZTDESC="Rad/Nuc Med Radiopharmaceutical Usage Report"
89 N RATITLE S RATITLE="Usage" G EN1
90 Q
91RADADM ; Entry point for Radiopharm administerer report
92 N ZTDESC S ZTDESC="Rad/Nuc Med Radiopharmaceutical Administerer Report"
93 N RATITLE S RATITLE="Administration" G EN1
94 Q
Note: See TracBrowser for help on using the repository browser.