source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRSETUP.m@ 841

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

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1LRSETUP ;SLC/CJS/DALISC/FHS - REINITIALIZE DATA FILES ;2/6/91 14:34 ;
2 ;;5.2;LAB SERVICE;;Sep 27, 1994
3 W !!,">> I WILL DO SOME FILE CHECKING AND THIS MAY TAKE A LITTLE WHILE <<",!!
4 I $D(^LAB(62.4,1,0))[0 D
5 . F L +^LAB(62.4):1 Q:$T W !!?7,"Someone else is editing the Automated Instrument file ",!!,$C(7) H 30
6 . S ^(0)="^LABDATA",DIE="^LAB(62.4,",DR=".01///LSI#1;2///LAB",DA=1 D ^DIE W !,"I have added a LSI controller #1 to the auto instrument file",!,"Please check this entry after the init is finished",!,$C(7)
7 . L -^LAB(62.4)
8 F I=0:0 S I=$O(^LRO(68.2,I)) Q:I'>0 F J=0:0 S J=$O(^LRO(68.2,I,10,J)) Q:J'>0 F K=0:0 S K=$O(^LRO(68.2,I,10,J,1,K)) Q:K'>0 I $S($D(^(K,0)):$E($P(^(0),"^",3),1),1:0)="Y" S $P(^(0),"^",3)=1
9 S $P(^LAB(64.5,1,1,0),"^")="MAJOR HEADER"
10 Q
11FRESH I '$D(^XUSEC("LRLIASON",DUZ)) W !,"Not cleared for this option." Q
12POST W !!,"This procedure will purge/kill all entries in the ^LR( global"
13 W !,"and the ^LRO( global. This should not be ran by any site already"
14 W !,"running the Laboratory Package. It should only be used by First"
15 W !,"Time Installation Sites. If your are not a First Time installation"
16 W !,"DO NOT RUN this routine. If you have questions, contact your "
17 W !,"Information Systems Center (ISC) before continuing"
18 W !!?10,"Do you Wish to continue "
19 S %=2 D YN^DICN G:%=0 POST Q:%'=1
20 W !!?10,"ARE YOU CERTAIN - LAST CHANCE " S %=2 D YN^DICN G:%=0 POST Q:%'=1
21 W !!,"In order to continue, you must answer the next prompt by"
22 W !,"entering 'YES' -- A simple 'Y' will not work",!
23 W !!,"IF YOU ARE READY ANSWER 'YES' " R ANS:100 Q:'$T Q:ANS'="YES"
24 W !!?5,"This will take a while ",!
25 K ^LR("AAU"),^("AAUA"),^("ACY"),^("ACYA"),^("AEM"),^("AEMA"),^("ASP"),^("ASPA"),^("B"),^("AD") S ^LR(0)=$P(^LR(0),"^",1,2) S I=0 F S I=$O(^LR(I)) Q:I<1 K ^LR(I)
26 I $D(^LRD(65,0)) S X=$P(^LRD(65,0),"^",1,2),^LRD(65,0)=X,I=0 F A=0:0 S I=$O(^LRD(65,I)) Q:I="" K ^(I)
27 I $D(^LRE(0)) K ^LRE("AD"),^LRE("AT"),^LRE("B"),^("C"),^("D"),^("G"),^("G4") S ^LRE(0)=$P(^LRE(0),"^",1,2) S I=0 F S I=$O(^LRE(I)) Q:I<1 K ^LRE(I)
28 S I=0 F S I=$O(^DPT(I)) Q:I<1 I $D(^DPT(I,"LR")) K ^DPT(I,"LR")
29 F I=0:0 S I=$O(^LAB(62.3,I)) Q:I<1 S X=$P(^(I,0),U) I '$D(^LAB(62.3,"B",X)) K ^LAB(62.3,I)
30 S LRDPF="62.3^LAB(62.3," S I=0 F S I=$O(^LAB(62.3,I)) Q:I<1 K ^LAB(62.3,I,"LR") S DFN=I D END^LRDPA
31 F F=67,67.1,67.2,67.3 S I=0 F S I=$O(^LRT(F,I)) Q:I<1 K ^LRT(F,I,"LR")
32 S X=$P(^LRO(67.9,0),U,1,2) K ^LRO(67.9) S ^LRO(67.9,0)=X
33 S I=0 F S I=$O(^LRO(68,I)) Q:I<1 K ^LRO(68,I,1)
34 S I=0 F S I=$O(^LRO(69.2,I)) Q:I<1 S J=0 F S J=$O(^LRO(69.2,I,J)) Q:J<1 K ^LRO(69.2,I,J)
35 S ^LAC(0)="" F I=0:0 S I=$O(^LAC(I)) Q:I="" K ^(I)
36 K ^LRO(68,"AA"),^("AC"),^("MI"),^("AVS"),^LAC("LRAC"),^("LRPHSET"),^("LGOT"),^("DEV") S ^LAC("LRAC",0)="CUMULATIVE^64.7",X=$P(^LRO(69,0),"^",1,2) K ^LRO(69) S ^LRO(69,0)=X
37 F I=0:0 S I=$O(^LRO(68.2,I)) Q:I<1 K ^(I,1)
38 S X=$P(^LRO(69.1,0),U,1,2) K ^LRO(69.1) S ^LRO(69.1,0)=X
39 S X=$P(^LRO(69.2,0),U,1,2) K ^LRO(69.2) S ^LRO(69.2,0)=X
40 S X=$P(^LRO(64.1,0),U,1,2) K ^LRO(64.1) S ^LRO(64.1,0)=X
41 W !!?10,"Your files have been purged to day 1 status",!!
42 Q
Note: See TracBrowser for help on using the repository browser.