source: WorldVistAEHR/trunk/r/RECORD_TRACKING-RT/RTCX.m@ 1800

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

initial load of WorldVistAEHR

File size: 2.7 KB
Line 
1RTCX ; GENERATED FROM 'RT PENDING REQUESTS' PRINT TEMPLATE (#478) ; 07/15/96 ; (FILE 190.1, MARGIN=132)
2 G BEGIN
3D I Y=DITTO(C) S Y="" Q
4 S DITTO(C)=Y
5 Q
6N W !
7T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
8 S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
9 Q
10DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
11 I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12) Q
12 W Y Q
13M D @DIXX
14 Q
15BEGIN ;
16 S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
17 S X=$G(^RTV(190.1,D0,0)) D N:$X>0 Q:'DN W ?0 S Y=$P(X,U,1),C=1 D D S C=$P(^DD(190.1,.01,0),U,2) D Y^DIQ:Y S C="," W $E(Y,1,15)
18 S I(100)="^RT(",J(100)=190 S I(0,0)=D0 S DIP(1)=$S($D(^RTV(190.1,D0,0)):^(0),1:"") S X=$P(DIP(1),U,1),X=X S D(0)=+X S D0=D(0) I D0>0 D A1
19 G A1R
20A1 ;
21 S I(200)="^DPT(",J(200)=2 S I(100,0)=D0 S DIP(101)=$S($D(^RT(D0,0)):^(0),1:"") S X=$P(DIP(101),U,9),X=X S D(0)=+X S D0=D(0) I D0>0 D A2
22 G A2R
23A2 ;
24 D N:$X>16 Q:'DN W ?16 S DIP(201)=$S($D(^DPT(D0,0)):^(0),1:"") S X=$P(DIP(201),U,9),DIP(202)=X S X=6,DIP(203)=X S X=10,X=$E(DIP(202),DIP(203),X) K DIP K:DN Y S Y=X,C=2 D D S X=Y W X
25 Q
26A2R ;
27 K J(200),I(200) S:$D(I(100,0)) D0=I(100,0)
28 S I(200)="^DIC(195.2,",J(200)=195.2 S I(100,0)=D0 S DIP(101)=$S($D(^RT(D0,0)):^(0),1:"") S X=$P(DIP(101),U,3),X=X S D(0)=+X S D0=D(0) I D0>0 D B2
29 G B2R
30B2 ;
31 S X=$G(^DIC(195.2,D0,0)) D N:$X>22 Q:'DN W ?22,$E($P(X,U,2),1,3)
32 Q
33B2R ;
34 K J(200),I(200) S:$D(I(100,0)) D0=I(100,0)
35 S DIP(101)=$S($D(^RT(D0,0)):^(0),1:"") S X=""_$P(DIP(101),U,7) K DIP K:DN Y W X
36 D N:$X>29 Q:'DN W ?29 S Y=D0 W:Y]"" $J(Y,10,0)
37 S X=$G(^RT(D0,"CL")) D N:$X>41 Q:'DN W ?41 S Y=$P(X,U,5) S C=$P(^DD(190,105,0),U,2) D Y^DIQ:Y S C="," W $E(Y,1,15)
38 S I(200)="^RTV(195.9,",J(200)=195.9 S I(100,0)=D0 S DIP(101)=$S($D(^RT(D0,"CL")):^("CL"),1:"") S X=$P(DIP(101),U,5),X=X S D(0)=+X S D0=D(0) I D0>0 D C2
39 G C2R
40C2 ;
41 S X=$G(^RTV(195.9,D0,0)) D N:$X>59 Q:'DN W ?59,$E($P(X,U,7),1,15)
42 Q
43C2R ;
44 K J(200),I(200) S:$D(I(100,0)) D0=I(100,0)
45 Q
46A1R ;
47 K J(100),I(100) S:$D(I(0,0)) D0=I(0,0)
48 D N:$X>84 Q:'DN W ?84,$E(D0,1,9)
49 S X=$G(^RTV(190.1,D0,0)) D N:$X>95 Q:'DN W ?95 S Y=$P(X,U,5) S C=$P(^DD(190.1,5,0),U,2) D Y^DIQ:Y S C="," W $E(Y,1,15)
50 D N:$X>112 Q:'DN W ?112 S Y=$P(X,U,4) D DT
51 S:$D(RTCOUNT) RTCOUNT=RTCOUNT+1 K DIP K:DN Y
52 K Y
53 Q
54HEAD ;
55 W !,?41,"CURRENT",?112,"DATE/TIME RECORD"
56 W !,?0,"NAME",?22,"TYPE",?35,"REC#",?41,"LOCATION",?59,"Phone/Room",?84,"REQ#",?95,"REQUESTOR",?112,"NEEDED"
57 W !,"------------------------------------------------------------------------------------------------------------------------------------",!!
Note: See TracBrowser for help on using the repository browser.