LRSORB ;DALOI/RWF/RLM-SCAN PART OF LRSORA ;7/3/86 12:47 PM
;;5.2;LAB SERVICE;**272**;Sep 27, 1994
; Reference to $$FMTE^XLFDT supported by IA #10103
; Reference to $$NOW^XLFDT supported by IA #10103
; Reference to ^DPT supported by DBIA #10035
; Reference to ^%ZISC supported by IA #10089
S LREND=0 G LRLONG:$D(LRLONG) U IO D HDR
DT F LRPDT=LREDT-.01:0 S LRPDT=$O(^LRO(69,LRPDT)) Q:LRPDT<LREDT!(LRPDT>LRSDT) D LOC Q:LREND
D ^%ZISC Q
LOC S LRLLOC="" F LRLOX=0:0 S LRLLOC=$O(^LRO(69,LRPDT,1,"AN",LRLLOC)) Q:LRLLOC="" D PT Q:LREND
Q
PT F LRDFN=0:0 S LRDFN=$O(^LRO(69,LRPDT,1,"AN",LRLLOC,LRDFN)) Q:LRDFN<1 D LRIDT Q:LREND
Q
LRIDT F LRIDT=0:0 S LRIDT=$O(^LRO(69,LRPDT,1,"AN",LRLLOC,LRDFN,LRIDT)) Q:LRIDT<1 D LOOK Q:LREND
Q
LOOK K V S L0=$S($D(^LR(LRDFN,"CH",LRIDT,0)):^(0),1:"") Q:L0=""
F I=1:1:LRTEST X LRTEST(I) I $T S V(I)=@LRTEST(I,3)
D PRINT:$O(V(0))'=""
Q
PRINT S X=^LR(LRDFN,0),LRDPF=$P(X,U,2),DFN=$P(X,U,3) D PT^LRX
S LRSPEC=+$P(L0,U,5)
D HDR:$Y>IOSL Q:LREND W !,PNM,?35,SSN," " W:LRDPF=2 $S($D(^DPT(DFN,.1)):^(.1),1:LRLLOC) W ?60,$P(L0,U,6)
F I=0:0 S I=$O(V(I)) Q:I<1 W !,?5,LRTEST(I,1),?20," ",$J($P(V(I),U,1),8),$J($P(V(I),U,2),3)," ",$S($D(^LAB(61,LRSPEC,0)):$P(^(0),U,1),1:"") D:$Y>(IOSL-7) HDR Q:LREND
Q
HDR U IO D WAIT Q:LREND W @IOF,"SPECIAL REPORT: SEARCHING FOR ",?30,LRTEST(1,1)," ",LRTEST(1,2)," ",$$FMTE^XLFDT($$NOW^XLFDT,"")
I LRTEST>1 F I=2:1:LRTEST W:I>1 !,?25," or" W ?30,LRTEST(I,1)," ",LRTEST(I,2)
D DASH^LRX
Q
LRLONG U IO D HDR Q:LREND S LRSDT=9999999-LRSDT,LREDT=9999999-LREDT
F LRDFN=0:0 S LRDFN=$O(^LR(LRDFN)) Q:LRDFN<1 D NIDT Q:LREND
END K %H,%ZIS,DIC,DTOUT,I,L0,LAST,LRAA,LRAD,LRDFN,LRDPF,LREDT,LREND,LRFAN,LRIDT,LRLAN,LRLLOC,LRLONG,LRLOX,LRPDT,LRSB,LRSDT,LRSPEC,LRSTAR,LRTEST
K ^TMP("LR",$J,"T"),LRTSTS,LRWDTL,PNM,POP,SSN,V,Y
D ^%ZISC Q
NIDT F LRIDT=LRSDT:0 S LRIDT=$O(^LR(LRDFN,"CH",LRIDT)) Q:LRIDT=""!(LRIDT>LREDT) S LRLLOC=$P(^(LRIDT,0),"^",11) D LOOK Q:LREND
Q
WAIT Q:$E(IOST,1,2)'="C-" W $C(7) R !!?20,"Press any key to continue, ""^"" to quit.",X:DTIME S:X["^" LREND=1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRSORB 2080 printed Nov 22, 2024@17:30:34 Page 2
LRSORB ;DALOI/RWF/RLM-SCAN PART OF LRSORA ;7/3/86 12:47 PM
+1 ;;5.2;LAB SERVICE;**272**;Sep 27, 1994
+2 ; Reference to $$FMTE^XLFDT supported by IA #10103
+3 ; Reference to $$NOW^XLFDT supported by IA #10103
+4 ; Reference to ^DPT supported by DBIA #10035
+5 ; Reference to ^%ZISC supported by IA #10089
+6 SET LREND=0
if $DATA(LRLONG)
GOTO LRLONG
USE IO
DO HDR
DT FOR LRPDT=LREDT-.01:0
SET LRPDT=$ORDER(^LRO(69,LRPDT))
if LRPDT<LREDT!(LRPDT>LRSDT)
QUIT
DO LOC
if LREND
QUIT
+1 DO ^%ZISC
QUIT
LOC SET LRLLOC=""
FOR LRLOX=0:0
SET LRLLOC=$ORDER(^LRO(69,LRPDT,1,"AN",LRLLOC))
if LRLLOC=""
QUIT
DO PT
if LREND
QUIT
+1 QUIT
PT FOR LRDFN=0:0
SET LRDFN=$ORDER(^LRO(69,LRPDT,1,"AN",LRLLOC,LRDFN))
if LRDFN<1
QUIT
DO LRIDT
if LREND
QUIT
+1 QUIT
LRIDT FOR LRIDT=0:0
SET LRIDT=$ORDER(^LRO(69,LRPDT,1,"AN",LRLLOC,LRDFN,LRIDT))
if LRIDT<1
QUIT
DO LOOK
if LREND
QUIT
+1 QUIT
LOOK KILL V
SET L0=$SELECT($DATA(^LR(LRDFN,"CH",LRIDT,0)):^(0),1:"")
if L0=""
QUIT
+1 FOR I=1:1:LRTEST
XECUTE LRTEST(I)
IF $TEST
SET V(I)=@LRTEST(I,3)
+2 if $ORDER(V(0))'=""
DO PRINT
+3 QUIT
PRINT SET X=^LR(LRDFN,0)
SET LRDPF=$PIECE(X,U,2)
SET DFN=$PIECE(X,U,3)
DO PT^LRX
+1 SET LRSPEC=+$PIECE(L0,U,5)
+2 if $Y>IOSL
DO HDR
if LREND
QUIT
WRITE !,PNM,?35,SSN," "
if LRDPF=2
WRITE $SELECT($DATA(^DPT(DFN,.1)):^(.1),1:LRLLOC)
WRITE ?60,$PIECE(L0,U,6)
+3 FOR I=0:0
SET I=$ORDER(V(I))
if I<1
QUIT
WRITE !,?5,LRTEST(I,1),?20," ",$JUSTIFY($PIECE(V(I),U,1),8),$JUSTIFY($PIECE(V(I),U,2),3)," ",$SELECT($DATA(^LAB(61,LRSPEC,0)):$PIECE(^(0),U,1),1:"")
if $Y>(IOSL-7)
DO HDR
if LREND
QUIT
+4 QUIT
HDR USE IO
DO WAIT
if LREND
QUIT
WRITE @IOF,"SPECIAL REPORT: SEARCHING FOR ",?30,LRTEST(1,1)," ",LRTEST(1,2)," ",$$FMTE^XLFDT($$NOW^XLFDT,"")
+1 IF LRTEST>1
FOR I=2:1:LRTEST
if I>1
WRITE !,?25," or"
WRITE ?30,LRTEST(I,1)," ",LRTEST(I,2)
+2 DO DASH^LRX
+3 QUIT
LRLONG USE IO
DO HDR
if LREND
QUIT
SET LRSDT=9999999-LRSDT
SET LREDT=9999999-LREDT
+1 FOR LRDFN=0:0
SET LRDFN=$ORDER(^LR(LRDFN))
if LRDFN<1
QUIT
DO NIDT
if LREND
QUIT
END KILL %H,%ZIS,DIC,DTOUT,I,L0,LAST,LRAA,LRAD,LRDFN,LRDPF,LREDT,LREND,LRFAN,LRIDT,LRLAN,LRLLOC,LRLONG,LRLOX,LRPDT,LRSB,LRSDT,LRSPEC,LRSTAR,LRTEST
+1 KILL ^TMP("LR",$JOB,"T"),LRTSTS,LRWDTL,PNM,POP,SSN,V,Y
+2 DO ^%ZISC
QUIT
NIDT FOR LRIDT=LRSDT:0
SET LRIDT=$ORDER(^LR(LRDFN,"CH",LRIDT))
if LRIDT=""!(LRIDT>LREDT)
QUIT
SET LRLLOC=$PIECE(^(LRIDT,0),"^",11)
DO LOOK
if LREND
QUIT
+1 QUIT
WAIT if $EXTRACT(IOST,1,2)'="C-"
QUIT
WRITE $CHAR(7)
READ !!?20,"Press any key to continue, ""^"" to quit.",X:DTIME
if X["^"
SET LREND=1
+1 QUIT