source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRARU1.m@ 1211

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

initial load of WorldVistAEHR

File size: 2.7 KB
RevLine 
[613]1LRARU1 ;DALISC/CKA - LAB ARCHIVING MISC. CONT.;4/19/95
2 ;;5.2;LAB SERVICE;**59,162**;Sep 27, 1994
3UPDATE ;UPDATE LAB ARCHIVAL ACTIVITY FILE
4 ;CALLED FROM LRARWKD,LRARWKD1,LRARLMW,LRARLMW1,LRARBI,LRARBI1
5 ;LRAR=ARCHIVING STATUS
6 I LRAR=2 S DR="9////"_DT_$S($D(^VA(200)):";5////"_DUZ,1:"")
7 I LRAR=90 S DR="10////"_DT_$S($D(^VA(200)):";8////"_DUZ,1:"")
8 S DA=LRARC,DIE="^LAB(95.11,"
9 I LRAR=2!(LRAR=90) S DR=DR_";7////"_LRAR
10 E S DR="7////"_LRAR
11 D ^DIE
12 Q
13COMP ;ARCHIVING ACTION COMPLETED
14 ;CALLED FROM LRARWKD,LRARWKD1,LRARLMW,LRARLMW1,LRARBI,LRARBI1
15 S DA=LRARC,DIE="^LAB(95.11,",DR="12////@;13///@;14////@;18////@"
16 D ^DIE
17 K DA,DIE,DR Q
18SAVESEL ;SAVE SELECTION CRITERIA IN LAB ARCHIVAL ACTIVITY FILE
19 ;CALLED FROM LRARWKD,LRARLMW
20 S DA=LRARC,DIE="^LAB(95.11,",X=""
21 S X=X_"19////"_LRPBD_";20////"_LRPED
22 S DR=X D ^DIE
23 K DA,DIE,DR,X Q
24MRK ;SET FIELDS TO LOCK OUT OTHER USERS DURING ARCHIVING ACTIVITY
25 D NOW^%DTC S DIE="^LAB(95.11,",DA=LRARC,DR="12////"_LRAR_";13////"_%_$S($D(^VA(200)):";14////"_DUZ,1:"")
26 D ^DIE
27 Q
28TASK ;SET ARCHIVE TASK NUMBER FIELD
29 S DR="18////"_ZTSK,DIE="^LAB(95.11,",DA=LRARC
30 D ^DIE
31 Q
32WRITE ;WRITE DATA TO OFF-LINE MEDIA
33 ;called by LRAR WRITE MEDIA options
34 W !!,"The site manager should determine the method of data storage of the"
35 I LRART=64.1 W !,"Archived Wkld Data File 64.19999"
36 I LRART=65 W !,"Archived Blood Inventory File 65.9999"
37 I LRART=67.9 W !,"Archived Lab Monthly Workloads 67.99999"
38 S LRAR=100,LRARC=0,LRARC=$O(^LAB(95.11,"O",2,LRART,LRARC)) D:LRARC=""
39 . W !!,$C(7),"I cannot find an archival activity for this file in the archived status."
40 . S LRARC=0,LRARC=$O(^LAB(95.11,"O",1,LRART,LRARC)) D:LRARC=""
41 .. W !!,$C(7),"I cannot find an archival activity for this file in the selected status either."
42 G:LRARC="" EXIT D FILE^LRARU G:'$D(LRARC) EXIT
43 ;CHECK STATUS OF ARCHIVING TASK
44 S ZTSK=$P(^LAB(95.11,LRARC,2),U,2)
45 I ZTSK'="" D STAT^%ZTLOAD D G EXIT
46 . I ZTSK(0)=1,ZTSK(1)=3 D
47 .. S LRARFL1=1 D DEV^LRARU
48 . I ZTSK(1)=1!(ZTSK(1)=2) W !,ZTSK," IS ",ZTSK(2) D
49 .. W !!,$C(7),"The archiving task must finish before you write data to off-line media!"
50 . I ZTSK(1)=5 W !!,$C(7),"Please check for errors. The archiving task abnormally ended!"
51 I ZTSK="" D DEV^LRARU
52EXIT K DA,DIC,DIE,DIR,DR,DTOUT,DUOUT,LRAR,LRARC,LRARFL1,LRART
53 D CLN
54 Q
55CLN K %DT,%ZIS,BY,C,D0,DA,DD,DHD,DIAXF,DIAXGR,DIAXSCR,DIAXST,DIAXT,DIC,DIE,DIK,DINUM,DIQ,DIR,DIRUT
56 K DIWF,DIWL,DIWR,DLAYGO,DO,DR,DTOUT,DUOUT,END,ERR,FLDS,FR,L,LRADATE,LRADIV,LRADIVN,LRAI,LRAIEN,LRAIFN
57 K LRAINST,LRAJ,LRAK,LRANUM,LRAR,LRARC,LRARCEX,LRARCX,LRARF,LRARFL,LRARFL1,LRARI,LRARID,LRARN,LRARNRB,LRARP
58 K LRARST,LRART,LRARU,LRARX,LRBD,LRDAT,LRED,LRID,LRIFN,LRINST,LRPBD,LRPED,LRSCR,PAGE,POP,TO,X,X1,X2,Y,Z,ZTDESC
59 K ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTSK
60 Q
Note: See TracBrowser for help on using the repository browser.