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

LRHYPL.m

Go to the documentation of this file.
LRHYPL ;VA/DALOI/HOAK - LAB PHLEB AND COLLECTION TIME UPDATER ; 13-Aug-2013 09:16 ; MKK
 ;;5.2;LAB SERVICE;**405,1033**;NOV 01, 1997
 ;
 ; Reference to ^DIC supported by DBIA #916
 ;
 ;
 ; This routine will be used to capture the phlebotomist and the
 ; specimen collection time.
 ;
 ; The barcoded specimen tubes will be waunded.
 ; The phlebotomist ID will then be waunded.
 ;
CONTROL ;
 K DIC,LRHYTECH,LRHYDUZ,LRPHLEB,LRRECVR
 K DIR,DIC,DIE,LRARIVE,LRDRAW
 K DIC,LRHYTECH,LRHYDUZ,LRPHLEB
 K DIR,DIC,DIE,LRARIVE,LRDRAW
 S LRPL=1
 S LREND=0
 D TECH
 S LRCNTX=0
 I U[X D END QUIT
 Q:X=""  D SINGLE
 K LRPL
 G CONTROL
 QUIT
FINDER ; Get the phlebotomist
 S DIC="^VA(200,"
 S DIC(0)="AEMQZ"
 S DIC("A")="Please enter employee number: "
 D ^DIC
 QUIT
TECH ; Get the phlebotomist
 K DIC,LRHYTECH,LRHYDUZ,LRPHLEB,LRRECVR
 K DIR,DIC,DIE,LRARIVE,LRDRAW
 W @IOF
 ;
 X ^%ZOSF("EOFF")
 D NINE^LRHYU
 X ^%ZOSF("EON")
 I U[X QUIT
 I $L(X)'=9 K DIC,LRHYTECH,LRHYDUZ,LRPHLEB,LRRECV G TECH
 ;
 ;
 ;
 K DIC,LRHYTECH,LRHYDUZ
 K Y
 S DIC=200
 S DIC(0)="MQZ"
 D ^DIC
 W Y
 ;
 I U[X QUIT
 I Y<0 G CONTROL
 S (LRHYDUZ,LRHYTECH,LRPHLEB,LRRECVR)=+Y
 S LRHYDUZ=$P($G(^VA(200,LRHYDUZ,0)),U)
 QUIT
 ;
TIME ;
 ;
 ;
 ;
 S LREND=0
 S DIC="^DPT("
 S DIC(0)="AEMQZ"
 D ^DIC
 S DFN=+Y
 S LRDFN=$G(^DPT(DFN,"LR"))
 D ^VADPT,INP^VADPT
 ;
 QUIT
 ;
SINGLE ;
 S LRCNTX=LRCNTX+1
 ; This block calls up the testing demographics.
 ;  LRHYD123 IS LRUID
 W !!,"RECORDING UID: ",LRCNTX
 S LRACC=""
 ;
 ;
 K LRHYD123
 ;
 K LRHN0,LRHNODE,LRN0,LR0NODE,LRPHLEB
 D ^LRHYU4
 I LRAN<1 QUIT
 ;
 I '$D(^LRO(68,LRAA,1,LRAD,1,LRAN,0)) W !,"Doesn't exist." G SINGLE
 S LRUNC=1
 S LRORDT1=$P(^LRO(68,LRAA,1,LRAD,1,LRAN,0),U,4)
 S LRHYD123=$G(^LRO(68,LRAA,1,LRAD,1,LRAN,.3))
 ;  mdofied by Hoak per Joe for prior to free t-4
 D NOW^%DTC
 S LRDRAW=%
 S LRSN=$P(^LRO(68,LRAA,1,LRAD,1,LRAN,0),U,5)
 I '$G(LRDAT) S LRDAT=$P(^LRO(68,LRAA,1,LRAD,1,LRAN,0),U,4)
 ;
 ;
 S $P(^TMP("LRHYHOW1",$J,LRHYD123),U,3)=%
 S $P(^TMP("LRHYHOW1",$J,LRHYD123),U,11)=LRHYTECH
 S $P(^TMP("LRHYHOW1",$J,LRHYD123),U,12)=%
 S $P(^TMP("LRHYHOW1",$J,LRHYD123),U,13)=$G(LRHYTECH)
 S $P(^TMP("LRHYHOW1",$J,LRHYD123),U,14)=$G(%)
 S $P(^TMP("LRHYHOW1",$J,LRHYD123),U,9)="PL"
 ;
 I '^TMP("LRHYHOW1",$J,LRHYD123) S ^(LRHYD123)=$G(LRDRAW)
 ; USE NEW SPECIMEN DEMOGRAPHICS FILE #69.87
 D SETFILE^LRHYBC1
 H 2
 K LRAN,LRHYD123,LRAN,LRAA,LRADT,LRDRAW
 G SINGLE
 QUIT
END ;
 K %,LRDAT,LRAN,LRAD,LRAA,LRDFN,LRDRAW,LRHYTECH,LRHYDUZ
 ;