Index: FOIAVistA/tag/r/HEALTH_LEVEL_SEVEN-HL/HLOUSR.m
===================================================================
--- FOIAVistA/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLOUSR.m	(revision 631)
+++ FOIAVistA/tag/r/HEALTH_LEVEL_SEVEN-HL/HLOUSR.m	(revision 636)
@@ -1,25 +1,24 @@
-HLOUSR ;ALB/CJM -ListManager Screen for viewing system status;12 JUN 1997 10:00 am ;07/30/2007
- ;;1.6;HEALTH LEVEL SEVEN;**126,130,134,137**;Oct 13, 1995;Build 21
+HLOUSR ;ALB/CJM -ListManager Screen for viewing system status;12 JUN 1997 10:00 am ;02/07/2007
+ ;;1.6;HEALTH LEVEL SEVEN;**126,130,134**;Oct 13, 1995;Build 30
  ;Per VHA Directive 2004-038, this routine should not be modified.
  ;
 EN ;
  ;
- N HLSCREEN,TESTOPEN,HLRFRSH,HLPARMS
+ N HLSCREEN,TESTOPEN,HLRFRSH
  D WAIT^DICD
  D EN^VALM("HLO SYSTEM MONITOR")
  Q
  ;
-BRIEF ;
+BRIEF ;Init variables and list array
  N COUNT,LINK,QUE,FROM,TIME,STATUS,TEMP,DIR,TODAY,LIST
  S HLRFRSH="BRIEF^HLOUSR"
  S (HLSCREEN,VALMSG)="Brief System Status"
- S VALMCNT=16
+ S VALMCNT=8
  ;K @VALMAR
  D CLEAN^VALM10
  S VALMBG=1
  S VALMBCK="R"
- S VALMDDF("COL 1")="COL1^1^80^"
  K VALMDDF("COL 2"),VALMDDF("COL 3"),VALMDDF("COL 4"),VALMDDF("COL 5")
- D CHGCAP^VALM("COL 1"," Brief Operational Overview")
+ D CHGCAP^VALM("COL 1","Brief Operational Overview")
  S @VALMAR@(1,0)="SYSTEM STATUS:             "_$S($$CHKSTOP^HLOPROC:"STOPPED",1:"RUNNING")
  S @VALMAR@(2,0)="PROCESS MANAGER:           "_$S($$RUNNING:"RUNNING",1:"STOPPED")
@@ -55,5 +54,5 @@
  ..S TEMP=$G(^HLC("QUEUECOUNT","OUT",LINK,QUE))
  ..S:TEMP>0 COUNT=COUNT+TEMP
- S @VALMAR@(8,0)="MESSAGES PENDING ON OUT QUEUES:    "_$$RJ(+COUNT,7)_"     ON SEQUENCE QUEUES:  "_$$RJ(+$G(^HLC("QUEUECOUNT","SEQUENCE")),7)
+ S @VALMAR@(8,0)="MESSAGES PENDING TRANSMISSION:      "_+COUNT
  S TEMP="STOPPED OUTGOING QUEUES: "
  S COUNT=0,QUE=""
@@ -66,5 +65,5 @@
  ..S TEMP=$G(^HLC("QUEUECOUNT","IN",QUE,FROM))
  ..S:TEMP>0 COUNT=COUNT+TEMP
- S @VALMAR@(10,0)="MESSAGES PENDING ON APPLICATIONS: "_$$RJ(+COUNT,7)
+ S @VALMAR@(10,0)="MESSAGES PENDING ON APPLICATIONS:   "_+COUNT
  S TEMP="STOPPED INCOMING QUEUES: "
  S COUNT=0,QUE=""
@@ -93,14 +92,15 @@
  Q TOTAL
  ;
-HELP ;
+HELP ;Help code
  S X="?" D DISP^XQORM1 W !!
  Q
  ;
-EXIT ;
+EXIT ;Exit code
  D CLEAN^VALM10
  D CLEAR^VALM1
- Q
- ;
-EXPND ;
+ ;
+ Q
+ ;
+EXPND ;Expand code
  Q
  ;
@@ -111,5 +111,4 @@
  S VALMCNT=0
  S VALMBCK="R"
- S VALMDDF("COL 1")="COL1^1^34^"
  S VALMDDF("COL 2")="COL 2^35^10^MIN^H"
  S VALMDDF("COL 3")="COL 3^47^10^MAX^H"
@@ -194,5 +193,5 @@
  S VALMBCK="R"
  ;
- ;currently HL7 (Optimized) only does TCP
+ ;currently HL7 (Optimized) only does TCP, when serial added a change is needed here
  S LINK=$$ASKLINK
  Q:LINK=""
@@ -215,5 +214,5 @@
  Q $$RJ^XLFSTR($E(STRING,1,LEN),LEN)
  ;
-RUNNING() ;Process Manager running?
+RUNNING() ;Is the Process Manager running?
  N RUNNING
  L +^HLTMP("PROCESS MANAGER"):0
@@ -257,31 +256,27 @@
  Q
  ;
-UPDMODE ;realtime
+UPDMODE ;update mode
  Q:'$L(HLRFRSH)
- N TOP,BOTTOM,DX,DY,IOTM,IOBM,LINE,OLD,OLDCNT
- S OLDCNT=VALMCNT
- W !!!!!,IOINHI,"Hit any key to escape realtime display mode...",IOINORM
- S IOTM=20,IOBM=23 W @IOSTBM
+ N QUIT,NEW,TOP,BOTTOM,DX,DY,IOTM,IOBM,I
+ W !!,IOINHI,"Hit any key to escape realtime display mode...",IOINORM
+ S IOTM=3,IOBM=23
+ W @IOSTBM
+ S DX=1,DY=$S(VALMCNT<17:VALMCNT+1,1:17) X IOXY
+ I VALMCNT>16 F I=17:1:$S(VALMCNT<22:VALMCNT,1:21) W !,@VALMAR@(I,0)
+ S QUIT=0
  S TOP=VALMBG
- S BOTTOM=TOP+20
- F LINE=TOP:1:BOTTOM D
- .I LINE>VALMCNT S @VALMAR@(LINE,0)=$$LJ(" ",80) Q
- .S @VALMAR@(LINE,0)=$$LJ(@VALMAR@(LINE,0),80)
- F LINE=TOP:1:BOTTOM D
- .S OLD(LINE)=@VALMAR@(LINE,0)
- F LINE=17:1:BOTTOM D
- .S DX=50,DY=22 X IOXY W !
- .D WRITE^VALM10(LINE)
- D  F  R *C:4 Q:$T  D
+ S BOTTOM=TOP+23
+ S OLD=VALMAR
+ S VALMAR="NEW"
+ S VALMCNT=0
+ F  D  Q:QUIT
+ .N LINE
+ .R *C:3 I $T S QUIT=1
+ .S (VALMCNT,I)=0
  .D @HLRFRSH
- .F LINE=TOP:1:BOTTOM D
- ..I LINE>VALMCNT S @VALMAR@(LINE,0)=$$LJ(" ",80) Q
- ..S @VALMAR@(LINE,0)=$$LJ(@VALMAR@(LINE,0),80)
- .S VALMCNT=BOTTOM
- .F LINE=TOP:1:BOTTOM IF OLD(LINE)'=@VALMAR@(LINE,0) D
- ..S OLD(LINE)=@VALMAR@(LINE,0)
- ..S DX=50,DY=22 X IOXY W !
+ .F LINE=TOP:1:BOTTOM IF $G(@OLD@(LINE,0))'=$G(@VALMAR@(LINE,0)) D
+ ..S:'$D(@VALMAR@(LINE,0)) @VALMAR@(LINE,0)=" "
  ..D WRITE^VALM10(LINE)
- S VALMCNT=OLDCNT
- S VALMBCK="R"
- Q
+ K @OLD M @OLD=@VALMAR S VALMAR=OLD
+ S VALMBCK="R"
+ Q
