source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LA7ADLS.m@ 1800

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1LA7ADLS ;DALISC/JMC - Select Accessions for Auto Downloading ; 3/7/95 0:900;
2 ;;5.2;LAB MESSAGING;**23,27**;Sep 27, 1994
3 ;
4EN ; Select Accessions to resend.
5 I '$D(^LAB(62.4,"AE")) D G EXIT
6 . W !,$C(7),"No instruments currently flagged for automatic downloading."
7 . W !,"Use build and download a load/worklist options to download."
8 . S DIR(0)="E",DIR("A")="Enter RETURN to continue" D ^DIR
9 D EXIT ; Housekeeping before we start.
10 S (LA7CNT,LA7QUIT)=0
11 S DIR(0)="SO^1:Range of Accessions;2:Selected Accessions",DIR("A")="Selection Method",DIR("B")=1
12 D ^DIR
13 I $D(DIRUT) G EXIT
14 S LA7TYPE=+Y
15 S LRACC=1,LREXMPT=1 ; Set flags used by LRWU4.
16 I LA7TYPE=1 D
17 . D ^LRWU4 ; Get list of accession numbers.
18 . I LRAN<1 S LA7QUIT=1 Q ; User aborted selection.
19 . S FIRST=LRAN,X=$O(^LRO(68,LRAA,1,LRAD,1,":"),-1)
20 . W !
21 . S DIR(0)="NO^"_LRAN_":"_X_":0",DIR("A")="Download from "_LRAN_" to",DIR("B")=LRAN
22 . D ^DIR K DIR
23 . I $D(DIRUT) S LA7QUIT=1 Q
24 . S LRAN=FIRST-1,LAST=Y
25 . F S LRAN=$O(^LRO(68,LRAA,1,LRAD,1,LRAN)) Q:'LRAN!(LRAN>LAST) D
26 . . W:$X>(IOM-1) ! W "." ; Let user know we're looking.
27 . . D SETTMP
28 I LA7TYPE=2 F D Q:LA7QUIT!(LRAN<1)
29 . D ^LRWU4
30 . I $D(DTOUT)!($D(DUOUT)) S LA7QUIT=1 Q
31 . I LRAN<1 S:'$D(^TMP($J)) LA7QUIT=1 Q
32 . D SETTMP
33 I LA7QUIT D EXIT Q
34 I '$D(^TMP($J)) D G EXIT
35 . W $C(7),!!,"No accessions found to download"
36 . S DIR(0)="E" D ^DIR
37 W !!,"Found ",LA7CNT," accessions that can be downloaded."
38 S DIR(0)="YO",DIR("A")="Ready to download",DIR("B")="NO" D ^DIR
39 I Y'=1 G EXIT ; User aborted retransmission.
40 W !
41 S LA7CNT=0,LA7UID=""
42 F S LA7UID=$O(^TMP($J,LA7UID)) Q:LA7UID="" D
43 . D EN^LA7ADL(LA7UID) S LA7CNT=LA7CNT+1
44 . W:$X>(IOM-1) ! W "." ; Let user know we're looking.
45 W !!,"Done - ",LA7CNT," accession",$S(LA7CNT>1:"s",1:"")," scheduled for downloading!",!!
46 D EXIT
47 Q
48 ;
49SETTMP ; Setup TMP global with accession to download.
50 S LA7UID=$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,.3)),U)
51 I $L(LA7UID) S LA7CNT=LA7CNT+1,^TMP($J,LA7UID)=""
52 Q
53 ;
54EXIT ; Housekeeping - clean up.
55 K ^TMP($J)
56 K LA7CNT,LA7QUIT,LA7TYPE,LA7UID,FIRST,LAST
57 K LRAA,LRACC,LRAD,LRAN,LREXMPT,LRIDIV,LRX
58 K %DT,DA,DIC,DIR,DIRUT,DTOUT,DUOUT,X,Y
59 Q
Note: See TracBrowser for help on using the repository browser.