Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: HMPMON

HMPMON.m

Go to the documentation of this file.
  1. HMPMON ;ASMR/BL, eHMP monitor main routine ;Sep 13, 2016 20:03:08
  1. ;;2.0;ENTERPRISE HEALTH MANAGEMENT PLATFORM;**2,3**;April 14,2016;Build 15
  1. ;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. Q ; no entry from top
  1. ;DE6526, DE6644 - routine refactored, 25 August 2016
  1. ;
  1. ; main routine for the eHMP monitor
  1. ; all other HMPMON* routines are invoked from this routine (see below)
  1. ; PROMPT^HMPMONA issues the ^DIR action prompts in the monitor
  1. ;
  1. OPTION ; entry point from OPTION file (#19) entry HMPMON DASHBOARD
  1. ;
  1. D HOME^%ZIS ; set IO* variables
  1. ; HMPACT - user selected action
  1. ; HMPCALLS - values used for ^DIR calls
  1. ; HMPMNTR array used throughout HMPMON* routines, subscripts indicate intent
  1. ; HMPRATE - "refresh" rate for displaying screen, used as ^DIR timeout
  1. ; HMPROMPT - prompt group for ^DIR calls (see HMPMONR routine)
  1. N D,HMPACT,HMPCALLS,HMPMNTR,HMPRATE,HMPROMPT,LNTAG
  1. D CALLIST^HMPMONR(.HMPCALLS)
  1. ; line tag/routine to call
  1. ; HMPACT - user-selected action
  1. S HMPROMPT="MNTR" ; Monitor Action Prompt group
  1. S HMPRATE=$$RATE^HMPMONC ; auto-update rate
  1. S HMPMNTR("server")=$$GETSRVR^HMPMONM ; subscription server
  1. ; if there are NO subscriptions, display help and quit
  1. I 'HMPMNTR("server") D NOSRVR^HMPMONM Q
  1. S HMPMNTR("exit")=0 ; flag to exit monitor
  1. S HMPMNTR("site hash")=$$SYS^HMPUTILS,HMPMNTR("site name")=$$KSP^XUPARAM("WHERE")
  1. ;
  1. F D Q:HMPROMPT=U!HMPMNTR("exit") ; monitor option's main loop
  1. . S HMPMNTR("default")="U" ; default to update
  1. . S HMPMNTR("zero node")=$G(^HMP(800000,HMPMNTR("server"),0)) ; used for display
  1. . ; 1. display text in monitor
  1. . S HMPACT=HMPMNTR("default") ; initial action is default
  1. . D FORMFEED^HMPMONL,U^HMPMOND ; clear screen, then update monitor display
  1. . ; 2. prompt user to select action
  1. . S HMPACT="" D PROMPT^HMPMONA(.HMPACT,HMPROMPT) ; prompt user for action
  1. . Q:HMPMNTR("exit") ; exit the monitor
  1. . Q:HMPACT="" ; no action selected
  1. . Q:$E(HMPACT)="U" ; update = initial action, nothing to do
  1. . ; 3. perform user-selected action
  1. . S LNTAG=$P(HMPCALLS(HMPACT),";",3) ; action's subroutine call
  1. . D @LNTAG ; perform user-selected action
  1. ;
  1. Q
  1. ;
  1. EXIT ; exit monitor action
  1. S HMPMNTR("exit")=1 D FORMFEED^HMPMONL Q
  1. ;
  1. ;eHMP monitor routines as of 13 September 2016
  1. ; HMPMON - main routine, entry point for MenuMan option
  1. ; HMPMONA - action prompts for ^DIR calls
  1. ; HMPMONC - change auto-refresh rates, which is the timeout when calling ^DIR
  1. ; HMPMOND - display routine for monitor screen
  1. ; HMPMONDH - display help for monitor screen
  1. ; HMPMONE - error and event log display actions
  1. ; HMPMONEH - error display help, called by ^DIR ? logic
  1. ; HMPMONH - history of monitor (not implemented)
  1. ; HMPMONHH - history of monitor help text (not implemented)
  1. ; HMPMONJ - job processes (poller) display
  1. ; HMPMONL - library of monitor support support code
  1. ; HMPMONM - monitor a different server, interactive ^DIC call
  1. ; HMPMONR - reader array set up (^DIR)
  1. ; HMPMONS - synch process actions (not implemented)
  1. ; HMPMONSH - synch process help (not implemented)
  1. ; HMPMONV - view eHMP global nodes
  1. ; HMPMONX - XTMP global monitor support logic
  1. ;