source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRLABXOL.m@ 1783

Last change on this file since 1783 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1LRLABXOL ;RVAMC/PLS/DALISC/FHS - REPRINT ACCESSION LABELS FOR ENTIRE ORDER ; 5/19/93 07:40
2 ;;5.2;LAB SERVICE;**11,121,161**;Sep 27, 1994
3 ; Will print all the required labels for a entire order.
4EN K ZTSK
5 D IOCHK^LRLABXT G END:'$D(LRLABLIO)
6 D PSET^LRLABLD
7 S LRHDR="Select Order Number: "
81 U IO(0)
9 W !!,LRHDR R LRORD:DTIME G:'$T END G:(LRORD="")!(LRORD="^") END I LRORD?.AP!(LRORD<1) W !,"Enter a whole number for the order number." G 1
10 S LRORD=+LRORD
11 S LRODT=$O(^LRO(69,"C",LRORD,0))
12 I +LRODT<1 W " ORDER NUMBER NOT FOUND" G 1
13 I '$$GOT^LROE(LRORD,LRODT) W !!,"All tests for this order have been canceled." H 1 G 1
14 I $D(LRLABLIO("Q")) D G END
15 . S ZTIO=LRLABLIO,ZTRTN="QUE^LRLABXOL",ZTDESC="LAB ORDER LABELS",ZTSAVE("LR*")=""
16 . D ^%ZTLOAD
17 . W !,"Labels have been tasked to print ",!
18 D QUE
19 K LRORD
20 U IO(0) W !?10,"Label(s) Printed",! S LRHDR="Another Order Number: "
21 G 1
22 ;
23QUE ;
24 S LRODT=0
25 F S LRODT=$O(^LRO(69,"C",LRORD,LRODT)) Q:LRODT<1 D 2,PRINT
26 I $D(ZTQUEUED) S ZTREQ="@"
27 Q
28 ;
292 ;
30 S LRSN=0
31 F S LRSN=+$O(^LRO(69,"C",LRORD,LRODT,LRSN)) Q:LRSN<1 D SQ
32 Q
33 ;
34SQ ; Search for accession numbers and build LRORD array 'ORD #(SEQ #,ACC AREA,ACC DATE, ACC #)=""'
35 Q:'$D(^LRO(69,LRODT,1,LRSN,2,0))
36 S SEQ=0
37 F S SEQ=+$O(^LRO(69,LRODT,1,LRSN,2,SEQ)) Q:SEQ<1 D
38 . S X=$G(^LRO(69,LRODT,1,LRSN,2,SEQ,0)),LRAD=$P(X,U,3),LRAA=$P(X,U,4),LRAN=$P(X,U,5)
39 . I LRAA,LRAD,LRAN S LRORD(LRSN,LRAA,LRAD,LRAN)=""
40 Q
41 ;
42PRINT ; Loop thru array and print labels.
43 U IO
44 S LRAA=""
45 F S LRX=$Q(LRORD) Q:LRX="" Q:$QS(LRX,0)'="LRORD" D
46 . S LRSN=$QS(LRX,1)
47 . I LRAA'=$QS(LRX,2) S LRAA=$QS(LRX,2) D LBLTYP^LRLABLD
48 . S LRAD=$QS(LRX,3),LRAN=$QS(LRX,4)
49 . K LRORD(LRSN,LRAA,LRAD,LRAN)
50 . N LRORD,LRX
51 . D PRINT^LRLABXT
52 Q
53 ;
54END ;
55 K LRHDR,LRORD,SEQ,ZTSK
56 D K^LRLABXT
57 Q
Note: See TracBrowser for help on using the repository browser.