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

LROW2P.m

Go to the documentation of this file.
  1. LROW2P ;VA/SLC/TGA - PRINTS WARD COLLECT ORDER IN LAB ; 22-Oct-2013 09:22 ; MKK
  1. ;;5.2;LAB SERVICE;**1027,1028,1033**;NOV 01, 1997;Build 46
  1. ;;5.2;LAB SERVICE;**100,121,338**;NOV 01, 1997
  1. ;S ZTRTN="ENT^LROW2P",ZTIO=ION,ZTDTH=$H,ZTSAVE("LRSN")="",ZTSAVE("LRODT")="",ZTDESC="PRINTS WARD COLLECT ORDER" I ION]"" D ^%ZTLOAD
  1. S ZTRTN="ENT^LROW2P",ZTIO=ION,ZTDTH=$H,ZTSAVE("LRSN")="",ZTSAVE("LRODT")="",ZTDESC="PRINTS WARD/CLINIC COLLECT ORDER" I ION]"" D ^%ZTLOAD ;IHS/OIRM TUC/AAB 3/20/97
  1. K ZTSK,ZTRTN,ZTIO,ZTDTH,ZTSAVE,ZTDESC
  1. Q
  1. ENT ;
  1. S U="^" S:$D(ZTQUEUED) ZTREQ="@"
  1. ENT2 ;from LRORDST, LROW2
  1. Q:'$D(^LRO(69,LRODT,1,LRSN,0))
  1. N LRSAMP,GOT,I S GOT=0
  1. S I=0 F S I=$O(^LRO(69,LRODT,1,LRSN,2,I)) Q:I<1 I $D(^(I,0)),'$P(^(0),"^",11) S GOT=1
  1. Q:'GOT
  1. S X=^LRO(69,LRODT,1,LRSN,0),LRCSS=$S($D(^(4,1)):^(1,0),1:0),LRDFN=$P(X,U),(LRSAMP,LRCS)=$P(X,U,3),LRLWC=$P(X,U,4),LRDTO=$P(X,U,5),LRPR=$P(X,U,6),LRLLOC=$P(X,U,7),LRORDTIM=$P($P(X,U,8),".",2),LRDUZ=$P(X,U,2)
  1. S LRCSS=$S($D(^LAB(61,+LRCSS,0)):$P(^(0),U),1:""),LRCS=$S($D(^LAB(62,+LRCS,0)):^(0),1:"")
  1. S LRDPF=$P(^LR(LRDFN,0),U,2),DFN=$P(^(0),U,3),X=^DIC(LRDPF,0,"GL")_DFN_",0)",PNM=$S($D(@X):$P(@X,U),1:"UNKNOWN"),SSN=$S($D(@X):$P(@X,U,9),1:"UNKNOWN") S X=^DIC(LRDPF,0,"GL")_DFN_",.101)" S LRBED=$S($D(@X):^(.101),1:"")
  1. D:SSN SSN^LRU
  1. W !!,?23,"LABORATORY: ",^DD("SITE") ;IHS/ANMC/CLS 08/18/96
  1. ;W !!,?23,$S(LRLWC="SP":"Send Patient",LRLWC="WC":"Ward Collect",LRLWC="I":"Immed Lab Collect ",1:"Lab Collect")," ORDER FOR " S Y=LRODT D DD^LRX W Y
  1. W !,?23,$S(LRLWC="SP":"Send Patient",LRLWC="WC":"Ward/Clinic Collect",LRLWC="I":"Immed Lab Collect ",1:"Lab Collect")," ORDER FOR " S Y=LRODT D DD^LRX W Y ;IHS/ANMC/CLS 08/18/96 AAB/3/20/97
  1. W !,?23,"ORDER: ",$S($D(^LRO(69,LRODT,1,LRSN,.1)):^(.1),1:""),?40,"LOCATION: ",LRLLOC W:$L(LRBED) " BED: ",LRBED
  1. D ENTRYAUD^BLRUTIL("ENT2^LROW2P 4.0","VADM")
  1. I $G(DOB)="" D PT^LRX ; IHS/OIT/MKK - LR*5.2*1028
  1. ; W !,PNM,?40,SSN,!,"ENTERED BY: " S X=LRDUZ D DUZ^LRX K LRDUZ W LRUSNM,?40 S Y=LRDTO D DD^LRX W Y
  1. ; ----- BEGIN IHS/OIT/MKK - LR*5.2*1027 -- Add in HRCN, DOB & SEX
  1. W !!,$E(PNM,1,33),?35,$G(HRCN)
  1. W ?46,"DOB:" W:$G(DOB)'="" $$FMTE^XLFDT(DOB,"5DZ")
  1. W ?65,"SEX:",$G(SEX)
  1. W !,"ENTERED BY: " S X=LRDUZ D DUZ^LRX K LRDUZ W LRUSNM,?40 S Y=LRDTO D DD^LRX W Y
  1. ; ----- END IHS/OIT/MKK - LR*5.2*1027
  1. I $L(LRPR) W !,"PRACTITIONER: " W $S($D(^VA(200,LRPR,0)):$P(^(0),"^"),1:"UNKNOWN")
  1. I LRORDTIM S Y=LRODT_"."_LRORDTIM D DD^LRX W ?32,$S(LRLWC="I":"REQUESTED ",1:" Est.")_" Collect Time: ",Y
  1. W !,"Collection sample: ",$P(LRCS,U)," ",$P(LRCS,U,3) W:$P(LRCS,U)'[LRCSS ?32," Site/Specimen: ",LRCSS
  1. S T=0 F S T=$O(^LRO(69,LRODT,1,LRSN,2,T)) Q:T<1 S LRTP=^(T,0) D:'$P(LRTP,"^",11) TEST
  1. ;W !!!,"TIME OF COLLECTION:__________"
  1. W !!!,"DATE/TIME OF COLLECTION:__________" ;IHS/ANMC/CLS 08/18/96
  1. I $G(LRLWC)="WC" W !!,"COLLECTED BY:_____________________________" ;IHS/ANMC/CLS 08/18/96
  1. I $D(^LRO(69,LRODT,1,LRSN,6,0)) W !!,"Order comment: " F I=0:0 S I=$O(^LRO(69,LRODT,1,LRSN,6,I)) Q:I<1 W !?2,^(I,0)
  1. I $G(LRLWC)="SP" W !!,"** PLEASE BRING THIS WITH YOU TO THE LAB **",! ;IHS/ANMC/CLS 08/18/96
  1. W ! W:$E(IOST)="P" @IOF D ^%ZISC Q
  1. TEST W !,"TEST/PROCEDURE: ",$P(^LAB(60,+LRTP,0),U) S LRUR=+$P(LRTP,U,2) W:LRUR ?48,$P(^LAB(62.05,LRUR,0),U)
  1. I $D(^LAB(60,+LRTP,3,"B",+LRSAMP)) S X=$O(^(+LRSAMP,0)) I X,$D(^LAB(60,+LRTP,3,X,1)) N I S I=0 D
  1. . W !,"Ward Instructions:"
  1. . F S I=$O(^LAB(60,+LRTP,3,X,1,I)) Q:I<1 W !?2,^(I,0)
  1. I $O(^LRO(69,LRODT,1,LRSN,2,T,1,0)) W !,"Ward Comments:"
  1. S I=0 F S I=$O(^LRO(69,LRODT,1,LRSN,2,T,1,I)) Q:I<1 W !?2,^(I,0)
  1. ;
  1. ;----- BEGIN IHS/OIT/MKK - LR*5.2*1027 -- PRINT OUT 'SIGN OR SYMPTOM' LAB POV
  1. S LRTPTR=$P($G(^LRO(69,LRODT,1,LRSN,2,T,0)),U) ;TEST POINTER
  1. S:LRTPTR'="" LRTNAME=$P($G(^LAB(60,LRTPTR,0)),U)
  1. ; W !,"Sign or Symptom for test "_$G(LRTNAME)_" : ",$G(^LRO(69,LRODT,1,LRSN,2,T,9999999)),!!
  1. W !,"Clinical Indication for test "_$G(LRTNAME)_" : ",$G(^LRO(69,LRODT,1,LRSN,2,T,9999999)),!! ; IHS/MSC/MKK - LR*5.2*1033
  1. K LRTPTR
  1. ;----- END IHS/OIT/MKK - LR*5.2*1027
  1. Q