source: FOIAVistA/trunk/r/RECORD_TRACKING-RT/RTQ41.m@ 757

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1RTQ41 ;MJK/TROY ISC;Record Request Option; ; 5/5/87 8:42 AM ;
2 ;;v 2.0;Record Tracking;;10/22/91
33 ;Cancel a Request
4 S RTPGM="CANCEL"
531 I '$D(RTAPL) D APL2^RTPSET D NEXT3:$D(RTAPL) K RTAPL,RTSYS Q
6NEXT3 D PND^RTRPT
7L3 K RTY S RTSEL="S",DIC(0)="IAEMQ",DIC("S")="S Z=^(0) I $P(Z,U,6)=""r""!($P(Z,U,6)=""n"") D SCRN^RTQ"
8 D ^RTDPA2 K RT,RTSEL,RTE,RTQ D:$D(RTY) @RTPGM
9Q3 K RTY,RTPGM,RTWND,RTSEL,RTESC
10 K I,%DT,D0,DA,DIE,N,RTC,X1,X,Y,DR,DIC,J Q
115 ;;Reprint a Request
12 S RTPGM="REPRT" G 31
13 ;
14REPRT S RTION="" F RTY=0:0 S RTY=$O(RTY(RTY)) Q:'RTY S RTQ=+RTY(RTY) D RTQ^RTL1
15 K RTION,RTQ Q
16 ;
17CANCEL S RTRD(1)="Yes^cancel",RTRD(2)="No^not cancel",RTRD("B")=2,RTRD(0)="S",RTRD("A")="Are you sure you want to cancel "_$S(RTC=1:"this request",1:"these requests")_"? " D SET^RTRD K RTRD G CANCELQ:$E(X)'="Y"
18 S RTSTAT="x" F RTY=0:0 S RTY=$O(RTY(RTY)) Q:'RTY S DA=+RTY(RTY),DIE="^RTV(190.1,",DR="[RT CHANGE REQUEST STATUS]" D ^DIE,BUL^RTUTL6 K DE,DQ W !?3,"...request #",DA," has been cancelled."
19CANCELQ K RTSTAT Q
20 ;
21 ;
22FILL ;Entry pt with RTQ defined ;if rtplty=3
23 S X="TRANSFER RETIRE" D TYPE^RTT Q:'$D(RTMV)!('$D(^RTV(190.1,RTQ,0))) S RT=+^(0),RTSTAT="c",RTB=^TMP($J,"RTREQUESTS","RTB")
24 ;S RTB=+$P(Y,"^",5),RT=+Y,RTPROV=+$P(Y,"^",14)
25 S RTINACFL=1
26 I $S('$D(^RT(RT,"CL")):1,'$D(^RTV(195.9,+$P(^("CL"),"^",5),0)):1,$P(^(0),"^")="2;DIC(195.4,":0,1:1) D CHG^RTT I '$D(Y) S DIE="^RTV(190.1,",DR="[RT CHANGE REQUEST STATUS]",DA=RTQ D ^DIE
27 K DE,DQ,RTSTAT,RTMV,RTMV0,RTPROV,RT Q
28 ;
29PERP ;create appl default perpetual records from rr pull list
30 I '$D(^TMP($J,"RTE")) Q
31 I $D(^DIC(195.1,+RTAPL,4)),$P(^(4),"^",5) S RTRTY=$P(^(4),"^",5)
32 E Q
33 S RTCOUNT=0
34 S Y=RTRTY,C=$P(^DD(195.1,45,0),"^",2) D Y^DIQ S RTCOUNT("TY")=Y
35 W !!,"Creating '",Y,"' records from RR Pull lists charged out",!!
36 ;log record creation, print labels
37 K RTBKGRD S RTADM=""
38 S RTRE=0 F N=0:0 S RTRE=$O(^TMP($J,"RTE",RTRE)) Q:'RTRE S RTE=RTRE,RTTY=+RTRTY,RTVOL=1,RTPAR="" I '$D(^RT("AT",RTTY,RTE)) D SET^RTDPA1 S RTCOUNT=RTCOUNT+1
39 W !!," Total '",RTCOUNT("TY"),"' records created = ",RTCOUNT,!!
40 K RTADM,RTCOUNT,RTRE,RTRTY,RTE,RTTY,RTVOL,RTPAR Q
Note: See TracBrowser for help on using the repository browser.