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

LRMIBL.m

Go to the documentation of this file.
LRMIBL ;VA/AVAMC/REG - BATCH ORDERING/ACCESSION LOGING ;JUL 06, 2010 3:14 PM;
 ;;5.2;LAB SERVICE;**1003,1004,1018,1027**;NOV 01, 1997
 ;;5.2;LAB SERVICE;**121,153**;Sep 27, 1994
 ;from option LRMIBL
BEGIN S LRBLEND=0 D BLOG
END K %,A,DFN,DIC,DQ,DX,H8,J,K,L,LRAA,LRACC,LRAC,LRAN,LRBLEND,LRCCOM,LRCDT,LRCOM,LRCSN,LRDFN,LRDPF,LREAL,LREND,LREXP,LRIDT,LRIN,LRIX,LRLBLBP,LRLLOC,LRM,LRNT,LRORD,LROU,LROUTINE,LRPR,LRPRAC,LRRB,LRSN,LRSSP,LRSSX,LRST,LRSUM,LRSXN,LRTS,LRTSTNM
 ;K LRUNQ,LRWLC,LRWP,LRYR,PNM,S,SSN,X,X1,Y,Z,LRFIRST,DIC,LRSAME,LRSAMP,LRSPEC,LRORDR,LRECT,LRODT,LRURG,LRFLOG,LRCS,LROT,LRTN,LRTOP,LRTP,LRTSTN,LRTY,LRUR,LRUSNM,LRWL0,LRWPC,LRXL,S5
 ;----- BEGIN IHS MODIFICATIONS LR*5.2*1018
 K LRUNQ,LRWLC,LRWP,LRYR,PNM,S,SSN,HRCN,X,X1,Y,Z,LRFIRST,DIC,LRSAME,LRSAMP,LRSPEC,LRORDR,LRECT,LRODT,LRURG,LRFLOG,LRCS,LROT,LRTN,LRTOP,LRTP,LRTSTN,LRTY,LRUR,LRUSNM,LRWL0,LRWPC,LRXL,S5  ;IHS/ANMC/CLS 08/18/96
 ;----- END IHS MODIFICATIONS
 K LRTCOM,%H,%X,%Y,DIWL,DIWR,DO,DPF,I1,I2,I5,LABEL,LRADDTST,LRBED,LRCE,LRCSS,LRDAT,LRDTO,LRECOM,LRINFW,LRLWC,LRMAX,LRNCWL,LRNIDT,LROCN,LROID,LROLRDFN,LRORDER,LRORDTIM,LROSN,LRPHSET,LRPREF,LRSLIP,LRSNO,LRSPCDSC,LRSVSN,LRTEST,LRTJ
 K ^TMP("LRSTIK",$J)
 Q
BLOG K ^TMP("LRSTIK",$J),DIC,LRURG,LRSAME,LRCOM,LRTCOM S LRORDR="" D DT^LRX W !!,"  BATCH LOG-IN",!
 S LRODT=DT,U="^",LRECT=0,LROUTINE=$P(^LAB(69.9,1,3),U,2)
 F  W !!,"WANT TO ENTER COLLECTION TIMES" S %=1 D YN^DICN S LRECT=$S(%=2:0,1:1) S:%<0 LRBLEND=1 Q:%  W !,"Yes or No"
 Q:LRBLEND
G1 S LRWP=0 F  D GET Q:LRBLEND
 Q
GET S DIC="^LAB(60,",DIC(0)="AEMOQ",DIC("S")="I ""AUSP""'[$P(^(0),U,4)!($P(^(0),U,4)="""")"_$S('$D(^XUSEC("LRLAB",DUZ)):"&(""NO""'[$P(^(0),U,3))",1:"")
 D ^DIC K DIC("S") S:Y<1 LRBLEND=1 Q:LRBLEND  S LRWP=LRWP+1,^TMP("LRSTIK",$J,LRWP)=$P(Y,U,1,2),^TMP("LRSTIK",$J,"B",LRWP)=LRWP
 S LRTSTS=+^TMP("LRSTIK",$J,LRWP) D GS^LRORD3 S:+LRSAMP=-1&(LRSPEC=-1) LRBLEND=1 Q:LRBLEND  S ^TMP("LRSTIK",$J,LRWP)=^TMP("LRSTIK",$J,LRWP)_U_LRSAMP_U_U_LRSPEC
G5 S:'$D(^LRO(69,LRODT,0)) ^(0)=$P(^LRO(69,0),U,1,2)_U_LRODT_U_(1+$P(^(0),U,4)),^LRO(69,LRODT,0)=LRODT,^LRO(69,"B",LRODT,LRODT)=""
 S LRSSX=LRWP,LRST=0,LRSAMP=$P(^TMP("LRSTIK",$J,LRSSX),U,3),LRSPEC=$P(^TMP("LRSTIK",$J,LRSSX),U,5),LRTSTS=+^TMP("LRSTIK",$J,LRSSX) D Q20,URGG
 ;S LRM=0,PNM="",SSN="" D ENSTIK^LROW3 Q:'$D(LROT)  S:'$D(%) LRWP=0 Q:'$D(%)  S:%["N" LRBLEND=1 Q:LRBLEND  S %X="LROT(",%Y="LROU(" D %XY^%RCR
 ;----- BEGIN IHS MODIFICATION LR*5.2*1018
 S LRM=0,PNM="",SSN="",HRCN="" D ENSTIK^LROW3 Q:'$D(LROT)  S:'$D(%) LRWP=0 Q:'$D(%)  S:%["N" LRBLEND=1 Q:LRBLEND  S %X="LROT(",%Y="LROU(" D %XY^%RCR  ;IHS/ANMC/CLS 08/18/96
 ;----- END IHS MODIFICATIONS
 F  D L2 Q:LRBLEND
 Q
L2 ; K LRSAME,LRGCOM,DFN,DIC S PNM="",DIC(0)="EMQ"_$S($P(LRPARAM,U,6)&$D(^XUSEC("LRLAB",DUZ)):"L",1:"") W ! D ^LRDPA I (LRDFN=-1)!$D(DUOUT)!$D(DTOUT) S LRBLEND=1 Q
 ; ----- BEGIN IHS/OIT/MKK - LR*5.2*1027
 K LRSAME,LRGCOM,DFN,DIC
 S PNM=""
 S DIC(0)="EMQ"_$S($P($G(LRPARAM),U,6)&$D(^XUSEC("LRLAB",DUZ)):"L",1:"")
 W !
 D ^LRDPA
 I (LRDFN=-1)!$D(DUOUT)!$D(DTOUT) S LRBLEND=1 Q
 ; ----- END IHS/OIT/MKK - LR*5.2*1027
 S LRDPF=$P(^LR(LRDFN,0),U,2),DFN=$P(^(0),U,3)
 D LOC^LRWU D:LREND DROP Q:LREND  D PRAC^LRWU1 I LREND D DROP Q
 D ORDER^LROW2
 S II=0
 F  S II=$O(LROT(II)) Q:II<1  D
 . S J=0
 . F  S J=$O(LROT(II,J)) Q:J<1  D
 . . S K=0
 . . F  S K=$O(LROT(II,J,K)) Q:K<1  S ^LRO(69,LRODT,1,"AB",$S($D(^TMP("LRSTIK",$J,K)):+^TMP("LRSTIK",$J,K),1:+LROT(II,J,K)),J,LRDFN)=""
 I LRECT D TIME^LRWU1 I LRCDT<1 D DROP Q
 S LRORDTIM=$P($H,",",2)\3600*100+($P($H,",",2)\60#60)/10000,LRNT=LRORDTIM+DT,LRORDTIM=$P(LRORDTIM,".",2) S:'LRECT LRCDT=LRNT_"^1"
 S LRIDT=9999999-LRCDT
 S %X="LROU(",%Y="LROT(" D %XY^%RCR D ^LRORDST
 Q
Q20 D:LRSAMP="" GSS^LRORD3 I (LRSAMP<1)!(LRSPEC<1) W !,"Sample and source incompletely defined, test skipped." K LRSAME Q
 S LROT(LRSAMP,LRSPEC,LRSSX)=LRTSTS D:LRST URGG
 S LREXP=$S($D(^LAB(60,LRTSTS,3,+LRSAMP,0)):$P(^(0),U,6),$P(^LAB(60,LRTSTS,0),U,19):$P(^(0),U,19),1:0) S:LREXP LROT(LRSAMP,LRSPEC,LRSSX,2)=LREXP
 Q
URGG W !,"For ",$P(^TMP("LRSTIK",$J,LRWP),U,2) D URG^LRORD2
 Q
DROP W !!,"ORDER CANCELED",$C(7),!!
 Q
 ;LRORDR =TYPE OF ORDER, LRECT =ASK COLECTION TIME
 ;LRFLOG =ACCESSION TEST GROUP, IF DEFINED ON ENTRY, PRESELECTS GROUP