1 | RANMUTL1 ;HISC/SWM-Nuclear Medicine utilites ;8/6/97 08:48
|
---|
2 | ;;5.0;Radiology/Nuclear Medicine;**65**;Mar 16, 1998;Build 8
|
---|
3 | ;
|
---|
4 | ;Supported IA #10103 reference to FMTE^XLFDT
|
---|
5 | ;
|
---|
6 | SELIMG ; Select Imaging Type, if exists; code is from RAUTL7
|
---|
7 | ; Prompts user to select Imaging Type(s).
|
---|
8 | ; Creates ^TMP($J,"RA I-TYPE",Imaging Type name,Imaging Type IEN)=""
|
---|
9 | N RA,RAIMGNUM,RAONE S RA="",RAONE=$$IMG1^RAUTL7()
|
---|
10 | ; .... chk if only 1 img type is available
|
---|
11 | I $P(RAONE,"^")]"",('$D(^TMP($J,"RA D-TYPE"))) S RAQUIT=0 D Q
|
---|
12 | . S ^TMP($J,"RA I-TYPE",$P(RAONE,"^"),$P(RAONE,"^",2))=""
|
---|
13 | . Q
|
---|
14 | ; .... chk if only 1 img type within selectable division is available
|
---|
15 | ; raimgnum = number of selectable img types
|
---|
16 | I $D(^TMP($J,"RA D-TYPE")) D
|
---|
17 | . D SETUP1 S RAIMGNUM=$$IMGNUM^RAUTL7A()
|
---|
18 | . Q
|
---|
19 | I $D(^TMP($J,"RA D-TYPE")),(RAIMGNUM=1) D S RAQUIT=0 Q
|
---|
20 | . N RA0,RA1
|
---|
21 | . S RA1=+$O(^TMP($J,"DIV-IMG",0)),RA0=$P($G(^RA(79.2,RA1,0)),"^")
|
---|
22 | . S ^TMP($J,"RA I-TYPE",RA0,RA1)=""
|
---|
23 | . Q
|
---|
24 | S RADIC="^RA(79.2,",RADIC(0)="QEAMZ",RAUTIL="RA I-TYPE"
|
---|
25 | S RADIC("A")="Select Imaging Type: ",RADIC("B")="All"
|
---|
26 | I $D(^TMP($J,"RA D-TYPE")) D
|
---|
27 | . S RADIC("S")="I $D(^TMP($J,""DIV-IMG"",+Y)),($D(RACCESS(DUZ,""IMG"",+Y)))"
|
---|
28 | . Q
|
---|
29 | ; why do we need to check the alternative ? DIVLOC+3 prevents this
|
---|
30 | ; alternative from occurring.
|
---|
31 | E S RADIC("S")="I $D(RACCESS(DUZ,""IMG"",+Y))"
|
---|
32 | W !! D EN1^RASELCT(.RADIC,RAUTIL) K %W,%Y1,DIC,RADIC,RAUTIL,X,Y
|
---|
33 | Q
|
---|
34 | SELRADIO ; Setup ^TMP($J,"RA EITHER",ien file 50)
|
---|
35 | S RAINPUT=""
|
---|
36 | K DIR,X,Y S DIR(0)="YA",DIR("B")="Yes"
|
---|
37 | S DIR("A")="Do you wish to include all Radiopharms ? "
|
---|
38 | S DIR("?",1)="Enter 'Yes' to select all Radiopharms."
|
---|
39 | S DIR("?")="Enter 'No' to select a subset of Radiopharms."
|
---|
40 | W ! D ^DIR K DIR Q:$D(DIRUT)
|
---|
41 | S RAINPUT=+Y K DIROUT,DIRUT,DTOUT,DUOUT,X,Y
|
---|
42 | Q:RAINPUT
|
---|
43 | S RADIC="^PSDRUG(",RADIC(0)="QEAMZ"
|
---|
44 | S RADIC("A")="Select Radiopharm: "
|
---|
45 | W !! D EN2^RAPSAPI(.RADIC,"RA EITHER") K %W,%Y1,DIC,RADIC,RAUTIL,X,Y
|
---|
46 | Q
|
---|
47 | SELADMIN ; Setup ^TMP($J,"RA EITHER",ien file 50)
|
---|
48 | S RAINPUT=""
|
---|
49 | K DIR,X,Y S DIR(0)="YA",DIR("B")="Yes"
|
---|
50 | S DIR("A")="Do you wish to include all who administered dose ? "
|
---|
51 | S DIR("?",1)="Enter 'Yes' to select all who administered dose."
|
---|
52 | S DIR("?")="Enter 'No' to select some who administered dose."
|
---|
53 | W ! D ^DIR K DIR Q:$D(DIRUT)
|
---|
54 | S RAINPUT=+Y K DIROUT,DIRUT,DTOUT,DUOUT,X,Y
|
---|
55 | Q:RAINPUT
|
---|
56 | S RADIC="^VA(200,",RADIC(0)="QEAMZ",RAUTIL="RA EITHER"
|
---|
57 | S RADIC("A")="Select Person Who Admin Dose: "
|
---|
58 | ; passed parameters to circumvent person's inactive date
|
---|
59 | ; only the 4th param, 0, is really used to choose staff/resid/tech
|
---|
60 | S RADIC("S")="I $$VALADM^RADD1(1,+Y,1,0)" ;
|
---|
61 | W !! D EN1^RASELCT(.RADIC,RAUTIL) K %W,%Y1,DIC,RADIC,RAUTIL,X,Y
|
---|
62 | Q
|
---|
63 | SELDATES ; Define RADTBEG and RADTEND
|
---|
64 | S RAPOP=0 W !!,"**** Date Range Selection ****"
|
---|
65 | W ! S %DT="APEXT"
|
---|
66 | S %DT("A")=" Beginning DATE : "
|
---|
67 | S %DT("B")="T-1"
|
---|
68 | D ^%DT S:Y<0 RAPOP=1 Q:Y<0 S (%DT(0),RADTBEG)=Y
|
---|
69 | W ! S %DT="APEXT"
|
---|
70 | S %DT("A")=" Ending DATE : "
|
---|
71 | S %DT("B")="T-1@24:00"
|
---|
72 | D ^%DT K %DT S:Y<0 RAPOP=1 Q:Y<0 S RADTEND=Y
|
---|
73 | S RADTBEG("X")=$$FMTE^XLFDT(RADTBEG,1) ; for display in header
|
---|
74 | S RADTEND("X")=$$FMTE^XLFDT(RADTEND,1)
|
---|
75 | S:$P(RADTEND,".",2)="" RADTEND=RADTEND_".9999"
|
---|
76 | Q
|
---|
77 | SELSORT ; select sort order
|
---|
78 | W ! S RAPOP=0,RASORT=0
|
---|
79 | S DIR("A")="Sort Exam Date/Time before "_$S(RATITLE["Usage":"Radiopharm",1:"Who Admin Dose")_" ? : "
|
---|
80 | S DIR(0)="YAO",DIR("B")="NO" D ^DIR
|
---|
81 | I $D(DIRUT)!($D(DUOUT)) S RAPOP=1 Q
|
---|
82 | S RASORT=Y ; 1=YES, 0=NO
|
---|
83 | Q
|
---|
84 | SETUP1 ; Setup ^TMP($J,"DIV-IMG",Imaging Type IEN)=""
|
---|
85 | ; based upon ^TMP($J,"RA D-TYPE",Division name)
|
---|
86 | ; RACCESS "DIV-IMG"
|
---|
87 | ; elements.
|
---|
88 | N RAX,RAY,RAZ S RAX=""
|
---|
89 | F S RAX=$O(^TMP($J,"RA D-TYPE",RAX)) Q:RAX']"" D
|
---|
90 | . I $D(RACCESS(DUZ,"DIV-IMG",RAX)) D
|
---|
91 | .. S RAY="" F S RAY=$O(RACCESS(DUZ,"DIV-IMG",RAX,RAY)) Q:RAY']"" D
|
---|
92 | ... Q:$P($G(^RA(79.2,+$O(^RA(79.2,"B",RAY,0)),0)),U,5)'="Y" ;file 79.2's RADIOPHARM..USED
|
---|
93 | ... S RAZ=+$O(^RA(79.2,"B",RAY,0)),^TMP($J,"DIV-IMG",RAZ)=""
|
---|
94 | ... Q
|
---|
95 | .. Q
|
---|
96 | . Q
|
---|
97 | Q
|
---|