- HMPMON ;ASMR/BL, eHMP monitor main routine ;Sep 13, 2016 20:03:08
- ;;2.0;ENTERPRISE HEALTH MANAGEMENT PLATFORM;**2,3**;April 14,2016;Build 15
- ;Per VA Directive 6402, this routine should not be modified.
- ;
- Q ; no entry from top
- ;DE6526, DE6644 - routine refactored, 25 August 2016
- ;
- ; main routine for the eHMP monitor
- ; all other HMPMON* routines are invoked from this routine (see below)
- ; PROMPT^HMPMONA issues the ^DIR action prompts in the monitor
- ;
- OPTION ; entry point from OPTION file (#19) entry HMPMON DASHBOARD
- ;
- D HOME^%ZIS ; set IO* variables
- ; HMPACT - user selected action
- ; HMPCALLS - values used for ^DIR calls
- ; HMPMNTR array used throughout HMPMON* routines, subscripts indicate intent
- ; HMPRATE - "refresh" rate for displaying screen, used as ^DIR timeout
- ; HMPROMPT - prompt group for ^DIR calls (see HMPMONR routine)
- N D,HMPACT,HMPCALLS,HMPMNTR,HMPRATE,HMPROMPT,LNTAG
- D CALLIST^HMPMONR(.HMPCALLS)
- ; line tag/routine to call
- ; HMPACT - user-selected action
- S HMPROMPT="MNTR" ; Monitor Action Prompt group
- S HMPRATE=$$RATE^HMPMONC ; auto-update rate
- S HMPMNTR("server")=$$GETSRVR^HMPMONM ; subscription server
- ; if there are NO subscriptions, display help and quit
- I 'HMPMNTR("server") D NOSRVR^HMPMONM Q
- S HMPMNTR("exit")=0 ; flag to exit monitor
- S HMPMNTR("site hash")=$$SYS^HMPUTILS,HMPMNTR("site name")=$$KSP^XUPARAM("WHERE")
- ;
- F D Q:HMPROMPT=U!HMPMNTR("exit") ; monitor option's main loop
- . S HMPMNTR("default")="U" ; default to update
- . S HMPMNTR("zero node")=$G(^HMP(800000,HMPMNTR("server"),0)) ; used for display
- . ; 1. display text in monitor
- . S HMPACT=HMPMNTR("default") ; initial action is default
- . D FORMFEED^HMPMONL,U^HMPMOND ; clear screen, then update monitor display
- . ; 2. prompt user to select action
- . S HMPACT="" D PROMPT^HMPMONA(.HMPACT,HMPROMPT) ; prompt user for action
- . Q:HMPMNTR("exit") ; exit the monitor
- . Q:HMPACT="" ; no action selected
- . Q:$E(HMPACT)="U" ; update = initial action, nothing to do
- . ; 3. perform user-selected action
- . S LNTAG=$P(HMPCALLS(HMPACT),";",3) ; action's subroutine call
- . D @LNTAG ; perform user-selected action
- ;
- Q
- ;
- EXIT ; exit monitor action
- S HMPMNTR("exit")=1 D FORMFEED^HMPMONL Q
- ;
- ;eHMP monitor routines as of 13 September 2016
- ; HMPMON - main routine, entry point for MenuMan option
- ; HMPMONA - action prompts for ^DIR calls
- ; HMPMONC - change auto-refresh rates, which is the timeout when calling ^DIR
- ; HMPMOND - display routine for monitor screen
- ; HMPMONDH - display help for monitor screen
- ; HMPMONE - error and event log display actions
- ; HMPMONEH - error display help, called by ^DIR ? logic
- ; HMPMONH - history of monitor (not implemented)
- ; HMPMONHH - history of monitor help text (not implemented)
- ; HMPMONJ - job processes (poller) display
- ; HMPMONL - library of monitor support support code
- ; HMPMONM - monitor a different server, interactive ^DIC call
- ; HMPMONR - reader array set up (^DIR)
- ; HMPMONS - synch process actions (not implemented)
- ; HMPMONSH - synch process help (not implemented)
- ; HMPMONV - view eHMP global nodes
- ; HMPMONX - XTMP global monitor support logic
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HHMPMON 3226 printed Mar 13, 2025@20:58:47 Page 2
- 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
- +2 ;Per VA Directive 6402, this routine should not be modified.
- +3 ;
- +4 ; no entry from top
- QUIT
- +5 ;DE6526, DE6644 - routine refactored, 25 August 2016
- +6 ;
- +7 ; main routine for the eHMP monitor
- +8 ; all other HMPMON* routines are invoked from this routine (see below)
- +9 ; PROMPT^HMPMONA issues the ^DIR action prompts in the monitor
- +10 ;
- OPTION ; entry point from OPTION file (#19) entry HMPMON DASHBOARD
- +1 ;
- +2 ; set IO* variables
- DO HOME^%ZIS
- +3 ; HMPACT - user selected action
- +4 ; HMPCALLS - values used for ^DIR calls
- +5 ; HMPMNTR array used throughout HMPMON* routines, subscripts indicate intent
- +6 ; HMPRATE - "refresh" rate for displaying screen, used as ^DIR timeout
- +7 ; HMPROMPT - prompt group for ^DIR calls (see HMPMONR routine)
- +8 NEW D,HMPACT,HMPCALLS,HMPMNTR,HMPRATE,HMPROMPT,LNTAG
- +9 DO CALLIST^HMPMONR(.HMPCALLS)
- +10 ; line tag/routine to call
- +11 ; HMPACT - user-selected action
- +12 ; Monitor Action Prompt group
- SET HMPROMPT="MNTR"
- +13 ; auto-update rate
- SET HMPRATE=$$RATE^HMPMONC
- +14 ; subscription server
- SET HMPMNTR("server")=$$GETSRVR^HMPMONM
- +15 ; if there are NO subscriptions, display help and quit
- +16 IF 'HMPMNTR("server")
- DO NOSRVR^HMPMONM
- QUIT
- +17 ; flag to exit monitor
- SET HMPMNTR("exit")=0
- +18 SET HMPMNTR("site hash")=$$SYS^HMPUTILS
- SET HMPMNTR("site name")=$$KSP^XUPARAM("WHERE")
- +19 ;
- +20 ; monitor option's main loop
- FOR
- Begin DoDot:1
- +21 ; default to update
- SET HMPMNTR("default")="U"
- +22 ; used for display
- SET HMPMNTR("zero node")=$GET(^HMP(800000,HMPMNTR("server"),0))
- +23 ; 1. display text in monitor
- +24 ; initial action is default
- SET HMPACT=HMPMNTR("default")
- +25 ; clear screen, then update monitor display
- DO FORMFEED^HMPMONL
- DO U^HMPMOND
- +26 ; 2. prompt user to select action
- +27 ; prompt user for action
- SET HMPACT=""
- DO PROMPT^HMPMONA(.HMPACT,HMPROMPT)
- +28 ; exit the monitor
- if HMPMNTR("exit")
- QUIT
- +29 ; no action selected
- if HMPACT=""
- QUIT
- +30 ; update = initial action, nothing to do
- if $EXTRACT(HMPACT)="U"
- QUIT
- +31 ; 3. perform user-selected action
- +32 ; action's subroutine call
- SET LNTAG=$PIECE(HMPCALLS(HMPACT),";",3)
- +33 ; perform user-selected action
- DO @LNTAG
- End DoDot:1
- if HMPROMPT=U!HMPMNTR("exit")
- QUIT
- +34 ;
- +35 QUIT
- +36 ;
- EXIT ; exit monitor action
- +1 SET HMPMNTR("exit")=1
- DO FORMFEED^HMPMONL
- QUIT
- +2 ;
- +3 ;eHMP monitor routines as of 13 September 2016
- +4 ; HMPMON - main routine, entry point for MenuMan option
- +5 ; HMPMONA - action prompts for ^DIR calls
- +6 ; HMPMONC - change auto-refresh rates, which is the timeout when calling ^DIR
- +7 ; HMPMOND - display routine for monitor screen
- +8 ; HMPMONDH - display help for monitor screen
- +9 ; HMPMONE - error and event log display actions
- +10 ; HMPMONEH - error display help, called by ^DIR ? logic
- +11 ; HMPMONH - history of monitor (not implemented)
- +12 ; HMPMONHH - history of monitor help text (not implemented)
- +13 ; HMPMONJ - job processes (poller) display
- +14 ; HMPMONL - library of monitor support support code
- +15 ; HMPMONM - monitor a different server, interactive ^DIC call
- +16 ; HMPMONR - reader array set up (^DIR)
- +17 ; HMPMONS - synch process actions (not implemented)
- +18 ; HMPMONSH - synch process help (not implemented)
- +19 ; HMPMONV - view eHMP global nodes
- +20 ; HMPMONX - XTMP global monitor support logic
- +21 ;