Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RTP32

RTP32.m

Go to the documentation of this file.
  1. RTP32 ;MJK/TROY ISC;Detailed Non-fillable List ; 5/15/87 4:41 PM ;
  1. ;;v 2.0;Record Tracking;;10/22/91
  1. S RTDTEND=RTDT,X="T-100",%DT="" D ^%DT K %DT S RTDTX=Y
  1. I '$D(RTPULL) F RTDTE=RTBEG:0 S RTDTE=$O(^RTV(194.2,"C",RTDTE)) Q:RTDTEND<$P(RTDTE,".")!('RTDTE) F RTP=0:0 S RTP=$O(^RTV(194.2,"C",RTDTE,RTP)) Q:'RTP I $D(^RTV(194.2,RTP,0)),$P(^(0),"^",10)=1 D RTQ
  1. I $D(RTPULL) S RTP=RTPULL D RTQ
  1. K RTP,RTDTE,RTDTEND,RTDTX Q
  1. ;
  1. RTQ Q:'$D(^RTV(194.2,RTP,0)) S X=^(0) Q:$P(X,"^",6)="x"!($P(X,"^",15)'=+RTAPL) S RTB=+$P(X,"^",5)
  1. F RTQ=0:0 S RTQ=$O(^RTV(190.1,"AP",RTP,RTQ)) Q:'RTQ I $D(^RTV(190.1,RTQ,0)) S RTQ0=^(0) I $P(RTQ0,"^",6)="n",$P(RTQ0,"^",5)=RTB,$D(^RT(+RTQ0,0)),$P(^(0),"^")["DPT(" S RTE=$P(^(0),"^"),DFN=+^(0),RTDT=RTDTX D START^RTNQ3 S RTNONE=""
  1. K RTB,RTQ,RTE,DFN,RTDT Q
  1. ;
  1. DATE ;get date from parameters
  1. S RTPCE=20 D WINDOW^RTRPT
  1. S X1=DT,X2=-1 D C^%DTC
  1. I X=RTWND S RTWND=""
  1. Q
  1. ;
  1. BAR S RTIFN=RT S:$D(X) RTXSAV=X
  1. Q:'$D(^RT(RT,0)) S X=$P(^(0),U,3),T=5 Q:'$D(RTWND(X)) I $P(^(0),U,8)'<RTWND(X) Q
  1. D FMT^RTL1 I RTFMT S RTQSAV=RTQ,RTNUM=1 D PRT^RTL1
  1. S RTQ=RTQSAV S:$D(RTXSAV) X=RTXSAV
  1. K RTQSAV,RTXSAV,RTNUM Q
  1. ;
  1. DEV ;select barcode device
  1. D DATE Q:'RTWND Q:$D(RTIRE)
  1. S RTDEV=$P(RTFR,U,4) ;,IOP="HOME" D ^%ZIS K IOP
  1. S RTTASK=1 W !,"Select Barcode Printer ",!
  1. S RTDESC="Clinic List Labels ["_$P($P(RTAPL,U),";",2)_"]"
  1. 1 S RTVAR="RTDV^RTSORT^RTAPL^RTDT^RTLIST"_$S($D(RTPULL):"^RTPULL^RTPULL0",1:"")_"^RTTASK"_"^RTWND"
  1. I RTWND F JA=0:0 S JA=$O(RTWND(JA)) Q:'JA S RTVAR=RTVAR_"^RTWND("_JA_")"
  1. K JA S RTPGM="START^RTP3" D ZIS^RTUTL
  1. Q