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

LRHYBLD.m

Go to the documentation of this file.
  1. LRHYBLD ;VA/DALOI/HOAK - PRINT ORDER LABELS FOR HOWDY ; 13-Aug-2013 09:16 ; MKK
  1. ;;5.2;LAB SERVICE;**405,1033**;NOV 01, 1997
  1. ;
  1. ; This routine has been modified by the
  1. ; NTXHCS VALOR Clinical Applications Team to be used
  1. ; with the Howdy Phlebotomy Patient Log-in Process.
  1. ;
  1. ; from LRHYA
  1. ENT ;
  1. ; Howdy routine for printing order labels
  1. ; Make sure printer is ID'd sufficiently
  1. ;
  1. D ^LRHYBL1 ; get subtype of printer
  1. ;
  1. ID I $G(LRLABLIO)="" D
  1. . S LRLABLIO=$P(^%ZIS(1,LRDEV,0),U)
  1. . I $G(LRLABSTP)'="" S LRLABLIO=LRLABLIO_";"_LRLABSTP
  1. . E S LRLABLIO=LRLABLIO_";P-OTC560/BARCODE;132;30"
  1. ;
  1. ;
  1. S ZTRTN="BACK^LRHYBLD",ZTDTH=$H,ZTDESC="LAB LABELS"
  1. S ZTIO=LRLABLIO,ZTSAVE("LR*")=""
  1. S:$D(ZTQUEUED) ZTREQ="@" D ^%ZTLOAD
  1. QUIT
  1. ;
  1. ;
  1. BACK ;
  1. ; after task come back here
  1. ;
  1. ; find the best label routine
  1. I $D(ZTQUEUED) S ZTREQ="@"
  1. ; from site file
  1. S LRLABEL="^LRLABEL"_$S($D(^LAB(69.9,1,3)):$P(^(3),U,3),1:"")
  1. ; from Howdy site file
  1. I $G(^LRHY(69.86,LRHYSITE,11))'="" S LRLABEL="^"_$G(^LRHY(69.86,LRHYSITE,11)) ;order label rtn
  1. ; default printer routine
  1. ;
  1. N X S X=$P(LRLABEL,U,2) X ^%ZOSF("TEST") I '$T S LRLABEL="^LRLABEL"_$S($D(^LAB(69.9,1,3)):$P(^(3),U,3),1:"")
  1. BC ;
  1. S LRBAR0=$S($L($G(^%ZIS(2,+IOST(0),"BAR0"))):^("BAR0"),1:"$C(32)")
  1. S LRBAR1=$S($L($G(^%ZIS(2,+IOST(0),"BAR1"))):^("BAR1"),1:"$C(32)")
  1. K LRBAR S LRLABLIO=IO
  1. ;
  1. ;
  1. ; SET all variables for label routine
  1. TST ;
  1. S LRTST=LRTSTS
  1. D INIT
  1. K ZTQUEUED,ZTREQ,LRBAR,LRLABEL,LRLABLIO
  1. QUIT
  1. INIT ;
  1. K PNM,SSN,LRDPF D PT^LRX S LRDAT=$$Y2K^LRX(LR3DTN)
  1. S LRORD=$G(^LRO(69,LR3DTN,1,LR3SN,.1))
  1. S LRAN=$G(LRORD)
  1. S LRUID=$G(LRORD)
  1. S LRXL="" S LRPREF=$G(LRPREF,0)
  1. S LRACC=$G(LRACC,LRORD)
  1. S LRINFW=$G(LRINFW,1)
  1. S LRCE=LRORD
  1. S LRTUBE=$P(^LRO(69,LR3DTN,1,LR3SN,0),U,3)
  1. S LRTUBE=$E($P(^LAB(62,LRTUBE,0),U),1,11)
  1. S LRTNM=$E($P(^LAB(60,LRTST,0),U),1,10) S LRURGT="ROUTINE"
  1. S LRURGA=LRURGT
  1. S LRURG=LRURGT
  1. S LRTXT=LRTNM
  1. S LRTOP=LRTUBE,LRTS(LRTST)=LRTNM
  1. S LRLLOC="LAB"
  1. D @LRLABEL
  1. QUIT
  1. Q