source: FOIAVistA/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEX2052P.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 3.3 KB
Line 
1LEX2052P ;ISL/KER - LEX*2.0*52 Pre/Post Install ;08/18/2007
2 ;;2.0;LEXICON UTILITY;**52**;Sep 23, 1996;Build 25
3 ;
4 ; Global Variables
5 ; ^%ZOSF("DEL" DBIA 10096
6 ; ^%ZOSF("TEST" DBIA 10096
7 ; ^TMP("LEXCNT" SACC 2.3.2.5.1
8 ; ^TMP("LEXCS" SACC 2.3.2.5.1
9 ; ^TMP("LEXI" SACC 2.3.2.5.1
10 ; ^TMP("LEXINS" SACC 2.3.2.5.1
11 ; ^TMP("LEXKID" SACC 2.3.2.5.1
12 ; ^TMP("LEXMSG" SACC 2.3.2.5.1
13 ;
14 ; External References
15 ; HOME^%ZIS DBIA 10086
16 ; ^DIM DBIA 10016
17 ; $$GET1^DIQ DBIA 2056
18 ; $$DT^XLFDT DBIA 10103
19 ; $$FMTE^XLFDT DBIA 10103
20 ; $$NOW^XLFDT DBIA 10103
21 ; $$DTIME^XUP DBIA 4490
22 ;
23 Q
24POST ; LEX*2.0*52 Post-Install
25 N ENV,LEXBEG,LEXEND,LEXELP,LEXRTN,ZTREQ,X,Y S ENV=$$ENV Q:'ENV S LEXBEG=$$NOW^XLFDT
26 K ^TMP("LEXCS",$J),^TMP("LEXCNT",$J),^TMP("LEXI",$J),^TMP("LEXMSG",$J),^TMP("LEXINS",$J),^TMP("LEXKID",$J)
27 N LEXEDT,LEXCHG,LEXSCHG,LEXMUMPS,LEXSHORT,LEXPOST,LEXBLDS,LEXBUILD,LEXBLD,LEXID,LEXSUB,X D EN^LEX2052A,EN^LEX2052E,EN^LEX2052F,EN^LEX2052G
28 I $D(^%ZOSF("DEL")) F LEXRTN="LEX2052A","LEX2052B","LEX2052C","LEX2052D","LEX2052E","LEX2052F","LEX2052G","LEX2052H" D
29 . N EXC,X,Y I +($$ROK(LEXRTN))>0 S (EXC,X)=$G(^%ZOSF("DEL")) D ^DIM I $D(X) S X=LEXRTN X EXC
30 S LEXSHORT=1,(LEXID,LEXSUB)="LEXKID",(LEXBUILD,LEXBLD)="LEX*2.0*52",LEXPOST=1
31 S LEXEND=$$NOW^XLFDT,LEXELP=$$EP^LEXXII(LEXBEG,LEXEND)
32 D MSG,RX
33 Q
34MSG ; Send a Install Message
35 S:$D(ZTQUEUED) ZTREQ="@"
36 N LEXFC,LEXMOD,LEXMUL,LEXTCS,LEXTND,ZTQUEUED,LEXT,LEXI
37 S LEXMUL=1,(LEXTND,LEXTCS,LEXMOD,LEXFC,ZTQUEUED)=0
38 D HDR^LEXXFI,EN^LEXXII I $L($G(LEXID)) S LEXI=0 F S LEXI=$O(^TMP(LEXID,$J,LEXI)) Q:+LEXI'>0 D
39 . S:$G(^TMP(LEXID,$J,LEXI))=" Lexicon/ICD/CPT Installation" ^TMP(LEXID,$J,LEXI)=" CPT Modifier 51 Update",^TMP(LEXID,$J,(LEXI+1))=" ======================"
40 I $G(LEXBEG)?7N1".".N S LEXT="" S LEXT=" Started: "_$TR($$FMTE^XLFDT($G(LEXBEG),"1Z"),"@"," ") D TL^LEXXII(LEXT)
41 I $G(LEXEND)?7N1".".N S LEXT="" S LEXT=" Finished: "_$TR($$FMTE^XLFDT($G(LEXEND),"1Z"),"@"," ") D TL^LEXXII(LEXT)
42 I $G(LEXBEG)?7N1".".N!$G(LEXEND)?7N1".".N!($L($G(LEXELP))&($G(LEXELP)[":")) S LEXT="" S LEXT=" Elapsed: "_$$ED^LEXXII($G(LEXELP)) D TL^LEXXII(LEXT),BL^LEXXII
43 D MAIL^LEXXFI,KILL^LEXXFI
44 Q
45RX ; Re-Index
46 N Y,ZTSK,ZTDESC,ZTDTH,ZTIO,ZTSAVE,ZTRTN,ZTREQ,ZTQUEUED
47 S ZTRTN="RXT^LEX2052P",ZTDESC="Re-Index CPT Modifier file 81.3",ZTIO="",ZTDTH=$H D ^%ZTLOAD
48 D:+($G(ZTSK))>0 BMES^XPDUTL((" Re-Indexing CPT Modified file 81.3 (Task #"_+($G(ZTSK))_")"))
49 D HOME^%ZIS K Y,ZTSK,ZTDESC,ZTDTH,ZTIO,ZTSAVE,ZTRTN
50 Q
51RXT ; Re-Index (tasked)
52 S:$D(ZTQUEUED) ZTREQ="@" N MIEN,DA,DIK S MIEN=0 F S MIEN=$O(^DIC(81.3,MIEN)) Q:+MIEN'>0 D
53 . K ^DIC(81.3,MIEN,10,"B"),^DIC(81.3,MIEN,"M")
54 . N RIEN S RIEN=0 F S RIEN=$O(^DIC(81.3,MIEN,10,RIEN)) Q:+RIEN'>0 D
55 . . N DA,DIK S DA(1)=MIEN,DA=RIEN,DIK="^DIC(81.3,"_DA(1)_",10," D IX1^DIK
56 . K DA S DA=MIEN,DIK="^DIC(81.3," D IX1^DIK
57 F DA=3,11,46,47 S DIK="^DIC(81.3," D IX1^DIK
58 F DA=643,644,645,646,647 S DIK="^DIC(81.3," D IX1^DIK
59 Q
60ROK(X) ; Routine OK
61 S X=$G(X) Q:'$L(X) 0 Q:$L(X)>8 0 X ^%ZOSF("TEST") Q:$T 1
62 Q 0
63ENV(X) ; Environment check
64 N LEXNM D HOME^%ZIS S U="^",DT=$$DT^XLFDT,LEXNM=$$GET1^DIQ(200,+($G(DUZ)),.01),DTIME=$$DTIME^XUP(+($G(DUZ))) Q:+($G(DUZ))'>0!('$L(LEXNM)) 0
65 Q 1
Note: See TracBrowser for help on using the repository browser.