Index: FOIAVistA/tag/r/LEXICON_UTILITY-LEX-GMPT/LEXXFI.m
===================================================================
--- FOIAVistA/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXXFI.m	(revision 631)
+++ FOIAVistA/tag/r/LEXICON_UTILITY-LEX-GMPT/LEXXFI.m	(revision 636)
@@ -1,12 +1,12 @@
-LEXXFI ; ISL/KER - File Info                     ; 04/22/2008
- ;;2.0;LEXICON UTILITY;**32,46,49,41**;Sep 23, 1996;Build 34
+LEXXFI ; ISL/KER - File Info                     ; 02/22/2007
+ ;;2.0;LEXICON UTILITY;**32,46,49**;Sep 23, 1996;Build 3
  Q
- ;
+ ;                   
  ; Global Variables
  ;   ^LEXM(0
- ;   ^TMP("LEX*",$J    SACC 2.3.2.5.1
- ;
+ ;   ^TMP("LEX*",$J    SACC 2.3.2.5.1  
+ ;             
  ; External References
- ;   DBIA 10086  HOME^%ZIS
+ ;   DBIA 10086  HOME^%ZIS           
  ;   DBIA 10089  ^%ZISC
  ;   DBIA 10063  ^%ZTLOAD
@@ -17,5 +17,5 @@
  ;   DBIA 10070  ^XMD
  ;   DBIA  4409  $$DTIME^XUP
- ;
+ ;             
  ; Newed by Post-Install LEX20nnP
  ;   LEXBUILD  Build
@@ -25,14 +25,11 @@
  ;   LEXREQP   Required Patches
  ;   LEXSHORT  Flag for Summary Install Message
- ;
+ ;                
  ; XPDA        Newed by KIDS during Install
  ; LEXCOUNT    Flag Checked $D() and not used
- ;
+ ;             
  ; Checksums/Counts
 EN ;   For One or More File(s)
- N LEXENV,LEXMET,LEXID
- S LEXENV=$$ENV
- Q:+LEXENV'>0
- S LEXMET=$$MT^LEXXFI7
+ N LEXENV,LEXMET,LEXID S LEXENV=$$ENV Q:+LEXENV'>0  S LEXMET=$$MT^LEXXFI7
  I '$L(LEXMET) W !!," Checksum Files (One or All) not Selected" Q
  I $L($T(@(LEXMET_"^LEXXFI")))>0 W ! D @LEXMET
@@ -46,6 +43,5 @@
  S LEXLDR=$$LDR^LEXXFI8(LEXFI),LEXMOD=LEXMOD+($$MOD^LEXXFI8(LEXFI))
  S LEXNM=$$FN^LEXXFI8(LEXFI),LEXTT=" "
- W !
- D ONE^LEXXFI2(LEXFI),ONE^LEXXFI3(LEXFI),ONE^LEXXFI5(LEXFI)
+ W ! D ONE^LEXXFI2(LEXFI),ONE^LEXXFI3(LEXFI),ONE^LEXXFI5(LEXFI)
  S LEXEND=$$TIC^LEXXFI8,LEXELP=$$ELAP^LEXXFI8(LEXBEG,LEXEND)
  S:LEXELP="" LEXELP="00:00:00"
@@ -69,49 +65,32 @@
  D KILL
  Q
- ;
+ ;              
 POST ; Entry Point for Post-Install Message
  N LEXPOST S LEXPOST=""
- ;
+ ;            
 SEND ; Send Message
  N LEXDESC,LEXENV,LEXP,LEXACCT,LEXPRO,LEXPRON,LEXSEND,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTSK,ZTQUEUED,ZTREQ
- S LEXP=0,LEXENV=$$ENV
- Q:+LEXENV'>0
- S LEXSEND="",LEXPRON="LEXICAL SERVICES UPDATE",LEXPRO=$G(^LEXM(0,"PRO"))
- S:+LEXPRO>0 LEXPRO=$$FMTE^XLFDT(LEXPRO,"1"),LEXP=1
- S LEXACCT=$$U^LEXXFI7 S ZTSAVE("LEXACCT")=""
- S ZTRTN="ALL^LEXXFI",ZTSAVE("LEXSEND")="",ZTSAVE("LEXPOST")=""
- S:$D(LEXCOUNT) ZTSAVE("LEXCOUNT")=""
- I $L($G(LEXPRO)),$L($G(LEXPRON)),+$G(LEXP)>0 S ZTSAVE("LEXPRO")="",ZTSAVE("LEXPRON")=""
- S:$D(LEXLREV) ZTSAVE("LEXLREV")=""
- S:$D(LEXREQP) ZTSAVE("LEXREQP")=""
- S:$D(LEXBUILD) ZTSAVE("LEXBUILD")=""
- S:$D(LEXSHORT) ZTSAVE("LEXSHORT")=""
- S:$D(LEXIGHF) ZTSAVE("LEXIGHF")=""
- S:$D(LEXCRE) ZTSAVE("LEXCRE")=""
- S:$D(LEXID) ZTSAVE("LEXID")=""
- S:$D(XPDA) ZTSAVE("XPDA")=""
- S (LEXDESC,ZTDESC)="Post-Install File Counts "
- S:$D(LEXSHORT) (LEXDESC,ZTDESC)="Post-Install Summary"
- S ZTDTH=$H
- S ZTIO=""
- D ^%ZTLOAD
- W:+($G(ZTSK))>0 !!,"  ",LEXDESC,!,"  Queued Task #",+($G(ZTSK)) W !
- D ^%ZISC
+ S LEXP=0,LEXENV=$$ENV Q:+LEXENV'>0  S LEXSEND="",LEXPRON="LEXICAL SERVICES UPDATE",LEXPRO=$G(^LEXM(0,"PRO"))
+ S:+LEXPRO>0 LEXPRO=$$FMTE^XLFDT(LEXPRO,"1"),LEXP=1 S LEXACCT=$$U^LEXXFI7 S ZTSAVE("LEXACCT")=""
+ S ZTRTN="ALL^LEXXFI",ZTSAVE("LEXSEND")="",ZTSAVE("LEXPOST")="" S:$D(LEXCOUNT) ZTSAVE("LEXCOUNT")=""
+ S:$L($G(LEXPRO))&($L($G(LEXPRON)))&(+($G(LEXP))>0) ZTSAVE("LEXPRO")="",ZTSAVE("LEXPRON")=""
+ S:$D(LEXLREV) ZTSAVE("LEXLREV")="" S:$D(LEXREQP) ZTSAVE("LEXREQP")="" S:$D(LEXBUILD) ZTSAVE("LEXBUILD")=""
+ S:$D(LEXSHORT) ZTSAVE("LEXSHORT")="" S:$D(LEXIGHF) ZTSAVE("LEXIGHF")="" S:$D(LEXCRE) ZTSAVE("LEXCRE")=""
+ S:$D(LEXID) ZTSAVE("LEXID")="" S:$D(XPDA) ZTSAVE("XPDA")=""
+ S (LEXDESC,ZTDESC)="Post-Install File Counts " S:$D(LEXSHORT) (LEXDESC,ZTDESC)="Post-Install Summary",ZTDTH=$H
+ S ZTIO="" D ^%ZTLOAD W:+($G(ZTSK))>0 !!,"  ",LEXDESC,!,"  Queued Task #",+($G(ZTSK)) W ! D ^%ZISC
  Q
 MAIL ; Mail global array in message
  N DIFROM,LEXPRI,LEXADR,LEXI,LEXM,LEXSUB,XCNP,XMDUZ,XMSCR,XMSUB,XMTEXT,XMY,XMZ
- I '$D(LEXSHORT),+$G(^TMP("LEXCS",$J,0))'>0 G MAILQ
- K ^TMP("LEXMSG",$J)
+ G:'$D(LEXSHORT)&(+($G(^TMP("LEXCS",$J,0)))'>0) MAILQ K ^TMP("LEXMSG",$J)
  S LEXSUB="Lexicon/ICD/CPT Installation"
  S:$L($G(LEXBUILD)) LEXSUB=$G(LEXBUILD)_" Installation"
- S LEXPRI=$$ADR^LEXXFI8
- G:'$L(LEXPRI) MAILQ
+ S LEXPRI=$$ADR^LEXXFI8 G:'$L(LEXPRI) MAILQ
  S LEXPRI="G.LEXINS@"_LEXPRI
- S LEXADR=$$GET1^DIQ(200,+($G(DUZ)),.01)
- G:'$L(LEXADR) MAILQ
+ S LEXADR=$$GET1^DIQ(200,+($G(DUZ)),.01) G:'$L(LEXADR) MAILQ
  S U="^",XMSUB="LEX/ICD/CPT File Checksums - "_$$FMTE^XLFDT($$NOW^XLFDT)
  S:$D(LEXCOUNT) XMSUB="LEX/ICD/CPT File Checksums/Counts - "_$$FMTE^XLFDT($$NOW^XLFDT)
  S:$L($G(LEXBUILD)) XMSUB=$G(LEXBUILD)_" File Checksums"
- I $L($G(LEXBUILD)),$D(LEXCOUNT) S XMSUB=$G(LEXBUILD)_" File Checksums/Counts"
+ S:$L($G(LEXBUILD))&($D(LEXCOUNT)) XMSUB=$G(LEXBUILD)_" File Checksums/Counts"
  S:$D(LEXPOST) XMSUB=LEXSUB
  S LEXI=0 F  S LEXI=$O(^TMP("LEXKID",$J,LEXI)) Q:+LEXI=0  D
@@ -127,7 +106,7 @@
  S XMY(LEXPRI)="",XMY(LEXADR)="",XMTEXT="^TMP(""LEXMSG"",$J,",XMDUZ=.5 D ^XMD
 MAILQ ; Quit Mail
- D KILL K XCNP,XMSCR,XMDUZ,XMY,XMZ,XMSUB,XMY,XMTEXT,XMDUZ
+ D KILL K %Z,XCNP,XMSCR,XMDUZ,XMY,XMZ,XMSUB,XMY,XMTEXT,XMDUZ
  Q
- ;
+ ;               
  ; Miscellaneous
 HDR ;   Header
@@ -161,6 +140,5 @@
  N LEXNM D HOME^%ZIS S U="^",DT=$$DT^XLFDT
  I +($G(DUZ))'>0 W !!,"    User (DUZ) not defined",! Q 0
- S LEXNM=$$GET1^DIQ(200,+($G(DUZ)),.01)
- I '$L(LEXNM) W !!,"    Invalid User (DUZ) defined",! Q 0
+ S LEXNM=$$GET1^DIQ(200,+($G(DUZ)),.01) I '$L(LEXNM) W !!,"    Invalid User (DUZ) defined",! Q 0
  S DTIME=$$DTIME^XUP(+($G(DUZ)))
  Q 1
