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

LRWU1.m

Go to the documentation of this file.
  1. LRWU1 ;DALOI/RWF/WTY - ORDERING/ACCESSION UTILITIES;12/08/04
  1. ;;5.2;LAB SERVICE;**153,272,291**;Sep 27, 1994
  1. ; Reference to ^DIC supported by IA #10007
  1. ; Reference to ^%DT supported by IA #10003
  1. ; Reference to YN^DICN supported by IA #10009
  1. ; Reference to INP^VADPT supported by IA #10061
  1. ; Reference to ^VA(200 supported by IA #10060
  1. ; Reference to $$ORESKEY^ORWDBA1 supported by IA #4569
  1. ; Reference to ^XUSEC("PROVIDER" supported by IA #10076
  1. ; Reference to $$ACTIVE^XUSER supported by IA #2343
  1. ;
  1. URGG W !,"For ",$P(LRSTIK(LRSSX),U,2) D URG^LRORD2 Q
  1. MICRO W !,"Is there one sample for this patient's order" S %=1 D YN^DICN I %=2!(%=-1) Q
  1. I %=0 W !,"The collection sample and site/specimen will be used for all tests ordered",!,"at this time for this patient." G MICRO
  1. D GSNO^LRORD3 Q:LREND
  1. I +LRSAMP=-1&(LRSPEC=-1) W !,"Incompletely defined." G MICRO
  1. S LRSAME=LRSAMP_U_LRSPEC
  1. S LRECOM=0 D GCOM^LRORD2
  1. Q
  1. TIME ;
  1. N LRMSG
  1. S %DT="ET" R !,"Collection Date@Time: NOW//",X:DTIME
  1. I '$T!(X="^") S LRCDT=-1 G TE
  1. S:X="" X="N"
  1. I X["?" D
  1. .S LRMSG="You may enter ""T@U"" or just ""U"", for Today at Unknown "
  1. .S LRMSG=LRMSG_"time."
  1. .W !!,LRMSG,!!
  1. I X["@U",$P(X,"@U",2)="" D G TIME:Y<1 Q
  1. .S X=$P(X,"@U",1) D ^%DT
  1. .Q:Y<1
  1. .S LRCDT=+Y_"^1"
  1. .D TE
  1. S:X="U" LRCDT=DT_"^1",Y=DT
  1. I X'="U" D ^%DT G TIME:X["?" S LRCDT=+Y_"^" G TIME:Y'["."
  1. TE K %DT
  1. Q
  1. PRAC ;
  1. I $G(LRORDRR)="R" D Q
  1. . S LRPRAC="REF:"_+LRRSITE("RSITE")
  1. N %
  1. D:'$D(LRPARAM) ^LRPARAM K DIC S LREND=0,(VA200,DIC("B"))=""
  1. S DFN=$P(^LR(LRDFN,0),U,3) S LRDPF=$P(^LR(LRDFN,0),U,2)
  1. I LRDPF=2,$L($G(VAIN(2))) S DIC("B")=$P(VAIN(2),U)
  1. I LRDPF=2,'$D(VAIN(2)) D
  1. . N I,Y,X,N D INP^VADPT S (DIC("B"),LRPRAC)=$P(VAIN(2),U)
  1. I $D(LRLABKY),'DIC("B"),$P(LRPARAM,U,16) S DIC("B")=$S($D(^LR(LRDFN,.2)):+^(.2),1:"")
  1. P1 I $D(^VA(200,+DIC("B"),0))#2 S:'$D(^VA(200,"AK.PROVIDER",$P($G(^VA(200,+DIC("B"),0)),U))) DIC("B")=""
  1. S DIC("B")=$P($G(^VA(200,+DIC("B"),0)),U) D P S:Y>0 (^LR(LRDFN,.2),LRPRAC)=+Y
  1. Q
  1. P ;Prompt for PROVIDER
  1. S DIC="^VA(200,",DIC(0)="AMNEQ",LRPRAC=""
  1. S DIC("S")="I $D(^VA(200,""AK.PROVIDER"",$P(^(0),U))),"
  1. S DIC("S")=DIC("S")_"$$ACTIVE^XUSER(Y),"
  1. S DIC("S")=DIC("S")_"$D(^XUSEC(""PROVIDER"",Y))"
  1. S DIC("A")="PROVIDER: ",D="AK.PROVIDER"
  1. S DIC("W")="Q" D ^DIC K DIC
  1. I Y<0 D QUIT Q
  1. S LRPRAC=+Y
  1. Q
  1. QUIT S LREND=1 Q