source: WorldVistAEHR/trunk/r/RECORD_TRACKING-RT/RTPCAN.m@ 1742

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

initial load of WorldVistAEHR

File size: 1.1 KB
Line 
1RTPCAN ;RPW/BUF,PKE/TROY-Cancel All pull lists for a clinic ; 9-17-87
2 ;;v 2.0;Record Tracking;**25**;10/22/91
3ALL D:'$D(DT) DT^DICRW
4 S DIC=44,DIC(0)="AEQMZ",DIC("A")="Select Clinic: ",DIC("S")="I $P(^(0),U,3)=""C""" D ^DIC K DIC("A"),DIC("S") G Q4:Y<0 S RTCLNAM=$P(Y,U,2)
5 W !!,*7,"Are you sure you want to DELETE ALL Pull lists for the " S DIR("A")=" "_RTCLNAM_" clinic: ",DIR(0)="YA",DIR("B")="NO" D ^DIR G:Y'=1 Q4
6 ;
7 S RTPNAM=RTCLNAM_" [",N=0
8 F RTN=0:0 S RTPNAM=$O(^RTV(194.2,"B",RTPNAM)) Q:(RTPNAM="")!($P(RTPNAM," [")]RTCLNAM)!($P(RTPNAM," [")'=RTCLNAM) S RTPULL=$O(^(RTPNAM,0)) D CHK G Q4:$E(X)="^"
9 W !,?3,N," Pull lists were cancelled"
10Q4 K N,RTPULL,RTSTAT,RTPNAM,RTCLNAM,%
11 K DIC,DIR,Y,X Q
12 ;
13CHK Q:'$D(^RTV(194.2,RTPULL,0)) Q:$P(^(0),U,2)'>DT Q:$P(^(0),U,6)'="r"
14 S RTSTAT="x"
15 ;
16CAN F RTQ=0:0 S RTQ=$O(^RTV(190.1,"AP",RTPULL,RTQ)) Q:'RTQ I $D(^RTV(190.1,RTQ,0)),$P(^(0),"^",6)="r"!($P(^(0),"^",6)="n") S DA=RTQ,DIE="^RTV(190.1,",DR="[RT CHANGE REQUEST STATUS]" D ^DIE K DE,DQ
17 K RTQ D STAT W !!?3,RTPNAM,"...pull list has been cancelled" S N=N+1 Q
18 Q
19STAT S DA=RTPULL,DR="[RT CHANGE PULL LIST STATUS]",DIE="^RTV(194.2," D ^DIE K DE,DQ Q
Note: See TracBrowser for help on using the repository browser.