HLEVSTUP ;O-OIFO/LJA - Event Monitor SETUP ;02/04/2004 14:42
;;1.6;HEALTH LEVEL SEVEN;**109**;Oct 13, 1995
;
E7761 ; Enter/Edit 776.1...
N DA,DIC,DIE,DR,IEN,X,Y
D HD,EX
F D QUIT:IEN'>0
. W !
. S IEN=$$ASKIEN^HLEVREP(776.1,"L") QUIT:'IEN ;->
. W !!,$$CJ^XLFSTR("---------------- editing entry ----------------",IOM)
. W !
. D EDIT(776.1,IEN,"[HLEV MONITOR ENTER/EDIT]")
. W !
. D ASKRUN^HLEVAPI1(+IEN)
. D HD,EX
Q
;
E7769 ; Edit 776.999...
N DA,DIC,DIE,DR,IEN,X,Y
W @IOF
D EDIT(776.999,1,"[HLEV MASTER JOB ENTER/EDIT]")
W !
S X=$$BTE^HLCSMON("Press RETURN to exit... ")
Q
;
EDIT(FILE,IEN,DR) ; Edit entry...
N DA,DIE
S DA=+IEN,DIE=FILE
D ^DIE
Q
;
HD W @IOF,$$CJ^XLFSTR("Event Monitoring System Enter/Edit",IOM)
W !,$$REPEAT^XLFSTR("=",IOM)
QUIT
;
EX N I,T F I=1:1 S T=$T(EX+I) QUIT:T'[";;" W !,$P(T,";;",2,99)
;;You may now enter new entries, and edit existing entries. Enter a new entry
;;now, or select the existing entry to be edited.
QUIT
;
HELP(FILE,FLD) D HELPM
;;776.1^2^HD^STATUS (#2)
;;776.1^2^TX^Enter ACTIVE to make this event monitor "available" to the master job for
;;776.1^2^TX^queuing. When set to ACTIVE the master job will run this event monitor
;;776.1^2^TX^according to the REQUEUE FREQUENCY (that you will be asked several prompts
;;776.1^2^TX^from now.)
;;776.1^2^TX^
;;776.1^2^TX^NOTE: If you're entering this event monitor for the first time, you should
;;776.1^2^TX^ set this field to INACTIVE until all fields have been filled in. Then,
;;776.1^2^TX^ change this field back to ACTIVE.^1
;;
;;776.1^3^HD^SHORT DESCRIPTION (#3)
;;776.1^3^TX^Enter a short description for this event monitor; something that is more
;;776.1^3^TX^complete and descriptive than the NAME.^1
;;
;;776.1^4^HD^REQUEUE FREQUENCY (#4)
;;776.1^4^TX^The master job will run this event monitor as often as you specify. And, this
;;776.1^4^TX^field is the way you specify rerun frequency. Enter the number of minutes
;;776.1^4^TX^that should elapse after this event monitor runs until it is run again.
;;776.1^4^TX
;;776.1^4^TX^NOTE: Enter '0' if you want this event to run every time the master job
;;776.1^4^TX^ checks this monitor.^1
;;
;;776.1^5^HD^REMOTE REQUESTABLE
;;776.1^5^TX^Some monitors can only be started locally at a site. Some monitors can be
;;776.1^5^TX^started locally, and also requested remotely. (A remote request occurs when
;;776.1^5^TX^someone at another site or location sends a Mailman message to your site - to
;;776.1^5^TX^your site's HL7 Event Monitor's server option - requesting that the monitor be
;;776.1^5^TX^run.)^1
;;776.1^5^TX^WARNING!! Does this monitor return a report to the requester containing
;;776.1^5^TX^ sensitive information? If so, you should not, under any
;;776.1^5^TX^ circumstances, set this field to YES.^1
;;776.1^5^TX^Please specify now whether this monitor can be requested remotely. Enter YES
;;776.1^5^TX^to allow remote users to run this monitor. Enter NO if remote requests should
;;776.1^5^TX^ignored.^1
;;
;;776.1^6^HD^M STARTUP LOCATION
;;776.1^6^TX^The master job uses this field to determine how to start this event monitor.
;;776.1^6^TX^So, enter the M location (subroutine and routine) where the event
;;776.1^6^TX^should be queued. Enter it in the SUBROUTINE~ROUTINE format, substituting
;;776.1^6^TX^a tilde (~) for the up-arrow.
;;776.1^6^TX^
;;776.1^6^TX^The M location you enter now is the location where queued jobs start.^1
;;
;;776.1^7^HD^M START CHECK (EXTRINSIC FUNCTION)
;;776.1^7^TX^Normally, the master job uses the monitor's requeue frequency in order to
;;776.1^7^TX^determine whether a new monitor job should be queued. Alternately, you may
;;776.1^7^TX^call an extrinsic function to determine whether a new monitor job should be
;;776.1^7^TX^started. Entry of the M check extrinsic function is optional.
;;776.1^7^TX^
;;776.1^7^TX^Extrinsic functions must follow these rules:
;;776.1^7^TX^
;;776.1^7^TX^ * Syntax = $$TAG~ROUTINE (where TAG and ROUTINE do not exceed 8 characters.)
;;776.1^7^TX^ * $$TAG~ROUTINE returns a 1 or 0.
;;776.1^7^TX^
;;776.1^7^TX^The extrinsic function should return '0' if a new monitor job should not be
;;776.1^7^TX^started, or a '1' to start a new monitor job.^1
;;
;;776.1^41^HD^PARAMETER NOTES
;;776.1^41^TX^Enter description and documentation of the just entered parameters.^1
;;
;;776.1^50^HD^EVENT MONITOR NOTES
;;776.1^50^TX^Enter overall comments about this event monitor.^1
;;
;;776.1^51^HD^MAIL GROUPs, USERs, REMOTE USERs
;;776.1^51^TX^Enter the mail groups and local users and remote users to which notification
;;776.1^51^TX^messages are to be sent. If no notification message will ever be sent, leave
;;776.1^51^TX^these fields blank.^1
;;
;;=====================================================================
;;776.999^.01^HD^MONITORING SYSTEM NAME
;;776.999^.01^TX^You may change the name of the monitoring system if you like. (But, it
;;776.999^.01^TX^makes no difference to the monitoring system!)^1
;;
;;776.999^2^HD^MASTER JOB STATUS
;;776.999^2^TX^Set this field to ACTIVE to enable the master job to run and monitor your
;;776.999^2^TX^system. (The master job is started and stopped using the 'Turn on/off
;;776.999^2^TX^monitoring system [HLEV EDIT MASTER ON-OFF]' menu option.) Set this field
;;776.999^2^TX^to INACTIVE to stop the master job (if it is running), and to ensure that
;;776.999^2^TX^the master job does not start^1
;;
;;776.999^3^HD^MASTER JOB INTERVAL (MINUTES)
;;776.999^3^TX^The master job is started every MASTER JOB INTERVAL minutes to evaluate your
;;776.999^3^TX^system. Enter the number of minutes now that should elapse between every
;;776.999^3^TX^"run" of the master job.^1
;;
;;776.999^4^HD^PURGE LIMIT FOR DATA
;;776.999^4^TX^Whenever the master job runs, data is created in the HL7 Monitor Master Job
;;776.999^4^TX^file (#776.2.) Whenever the master job spawns off a new background job for
;;776.999^4^TX^an event monitor, data is created in the HL7 Monitor Job file (#776.) Purging
;;776.999^4^TX^of this data occurs automatically. This parameter controls how much data to
;;776.999^4^TX^retain. For example, if you enter '96' now, then no data less than 96 hours
;;776.999^4^TX^old will be purged.^1
;;
;;776.999^6^TX^
;;776.999^6^TX^
;;776.999^6^TX^ --- EVENT MONITORING FIELDS ---
;;776.999^6^TX^
;;776.999^6^HD^STATUS OF EVENT MONITORING
;;776.999^6^TX^The master job periodically "fires off" event monitors. If you set this field
;;776.999^6^TX^to INACTIVE, the master job will continue to start and run, but no events
;;776.999^6^TX^will be started. When this field is set to ACTIVE, the master job will be
;;776.999^6^TX^able to run event monitors.^1
;
Q
;
HELPM ; Display of HELP logic...
N I,INFO,J,T,TYP
F I=1:1 S T=$T(HELP+I) Q:T'[";;" D
. S T=$P(T,";;",2,999)
. I +T=FILE,$P(T,U,2)=FLD D
. . S TYP=$P(T,U,3),INFO=$P(T,U,4)
. . W:TYP="HD" !!,$$CJ^XLFSTR(" "_INFO_" ",IOM,"=")
. . W:TYP="TX" !,INFO
. . W:TYP="FT" !,$$REPEAT^XLFSTR("=",IOM)
. . I $P(T,U,5)>0 F J=1:1:$P(T,U,5) W !
Q
;
IMPLEMNT ; Not yet implemented API...
N OPT
S OPT=$P($G(XQY0),U,2)_" ["_$P($G(XQY0),U)_"]"
W !!,$$CJ^XLFSTR("This '"_OPT_"' menu option",IOM)
W !,$$CJ^XLFSTR("is not yet implemented.",IOM)
W !
S X=$$BTE^HLCSMON("Press RETURN to return to menu...")
Q
;
EOR ;HLEVSTUP - Event Monitor SETUP ;5/16/03 14:42
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HHLEVSTUP 7701 printed Oct 16, 2024@17:58:46 Page 2
HLEVSTUP ;O-OIFO/LJA - Event Monitor SETUP ;02/04/2004 14:42
+1 ;;1.6;HEALTH LEVEL SEVEN;**109**;Oct 13, 1995
+2 ;
E7761 ; Enter/Edit 776.1...
+1 NEW DA,DIC,DIE,DR,IEN,X,Y
+2 DO HD
DO EX
+3 FOR
Begin DoDot:1
+4 WRITE !
+5 ;->
SET IEN=$$ASKIEN^HLEVREP(776.1,"L")
if 'IEN
QUIT
+6 WRITE !!,$$CJ^XLFSTR("---------------- editing entry ----------------",IOM)
+7 WRITE !
+8 DO EDIT(776.1,IEN,"[HLEV MONITOR ENTER/EDIT]")
+9 WRITE !
+10 DO ASKRUN^HLEVAPI1(+IEN)
+11 DO HD
DO EX
End DoDot:1
if IEN'>0
QUIT
+12 QUIT
+13 ;
E7769 ; Edit 776.999...
+1 NEW DA,DIC,DIE,DR,IEN,X,Y
+2 WRITE @IOF
+3 DO EDIT(776.999,1,"[HLEV MASTER JOB ENTER/EDIT]")
+4 WRITE !
+5 SET X=$$BTE^HLCSMON("Press RETURN to exit... ")
+6 QUIT
+7 ;
EDIT(FILE,IEN,DR) ; Edit entry...
+1 NEW DA,DIE
+2 SET DA=+IEN
SET DIE=FILE
+3 DO ^DIE
+4 QUIT
+5 ;
HD WRITE @IOF,$$CJ^XLFSTR("Event Monitoring System Enter/Edit",IOM)
+1 WRITE !,$$REPEAT^XLFSTR("=",IOM)
+2 QUIT
+3 ;
EX NEW I,T
FOR I=1:1
SET T=$TEXT(EX+I)
if T'[";;"
QUIT
WRITE !,$PIECE(T,";;",2,99)
+1 ;;You may now enter new entries, and edit existing entries. Enter a new entry
+2 ;;now, or select the existing entry to be edited.
+3 QUIT
+4 ;
HELP(FILE,FLD) DO HELPM
+1 ;;776.1^2^HD^STATUS (#2)
+2 ;;776.1^2^TX^Enter ACTIVE to make this event monitor "available" to the master job for
+3 ;;776.1^2^TX^queuing. When set to ACTIVE the master job will run this event monitor
+4 ;;776.1^2^TX^according to the REQUEUE FREQUENCY (that you will be asked several prompts
+5 ;;776.1^2^TX^from now.)
+6 ;;776.1^2^TX^
+7 ;;776.1^2^TX^NOTE: If you're entering this event monitor for the first time, you should
+8 ;;776.1^2^TX^ set this field to INACTIVE until all fields have been filled in. Then,
+9 ;;776.1^2^TX^ change this field back to ACTIVE.^1
+10 ;;
+11 ;;776.1^3^HD^SHORT DESCRIPTION (#3)
+12 ;;776.1^3^TX^Enter a short description for this event monitor; something that is more
+13 ;;776.1^3^TX^complete and descriptive than the NAME.^1
+14 ;;
+15 ;;776.1^4^HD^REQUEUE FREQUENCY (#4)
+16 ;;776.1^4^TX^The master job will run this event monitor as often as you specify. And, this
+17 ;;776.1^4^TX^field is the way you specify rerun frequency. Enter the number of minutes
+18 ;;776.1^4^TX^that should elapse after this event monitor runs until it is run again.
+19 ;;776.1^4^TX
+20 ;;776.1^4^TX^NOTE: Enter '0' if you want this event to run every time the master job
+21 ;;776.1^4^TX^ checks this monitor.^1
+22 ;;
+23 ;;776.1^5^HD^REMOTE REQUESTABLE
+24 ;;776.1^5^TX^Some monitors can only be started locally at a site. Some monitors can be
+25 ;;776.1^5^TX^started locally, and also requested remotely. (A remote request occurs when
+26 ;;776.1^5^TX^someone at another site or location sends a Mailman message to your site - to
+27 ;;776.1^5^TX^your site's HL7 Event Monitor's server option - requesting that the monitor be
+28 ;;776.1^5^TX^run.)^1
+29 ;;776.1^5^TX^WARNING!! Does this monitor return a report to the requester containing
+30 ;;776.1^5^TX^ sensitive information? If so, you should not, under any
+31 ;;776.1^5^TX^ circumstances, set this field to YES.^1
+32 ;;776.1^5^TX^Please specify now whether this monitor can be requested remotely. Enter YES
+33 ;;776.1^5^TX^to allow remote users to run this monitor. Enter NO if remote requests should
+34 ;;776.1^5^TX^ignored.^1
+35 ;;
+36 ;;776.1^6^HD^M STARTUP LOCATION
+37 ;;776.1^6^TX^The master job uses this field to determine how to start this event monitor.
+38 ;;776.1^6^TX^So, enter the M location (subroutine and routine) where the event
+39 ;;776.1^6^TX^should be queued. Enter it in the SUBROUTINE~ROUTINE format, substituting
+40 ;;776.1^6^TX^a tilde (~) for the up-arrow.
+41 ;;776.1^6^TX^
+42 ;;776.1^6^TX^The M location you enter now is the location where queued jobs start.^1
+43 ;;
+44 ;;776.1^7^HD^M START CHECK (EXTRINSIC FUNCTION)
+45 ;;776.1^7^TX^Normally, the master job uses the monitor's requeue frequency in order to
+46 ;;776.1^7^TX^determine whether a new monitor job should be queued. Alternately, you may
+47 ;;776.1^7^TX^call an extrinsic function to determine whether a new monitor job should be
+48 ;;776.1^7^TX^started. Entry of the M check extrinsic function is optional.
+49 ;;776.1^7^TX^
+50 ;;776.1^7^TX^Extrinsic functions must follow these rules:
+51 ;;776.1^7^TX^
+52 ;;776.1^7^TX^ * Syntax = $$TAG~ROUTINE (where TAG and ROUTINE do not exceed 8 characters.)
+53 ;;776.1^7^TX^ * $$TAG~ROUTINE returns a 1 or 0.
+54 ;;776.1^7^TX^
+55 ;;776.1^7^TX^The extrinsic function should return '0' if a new monitor job should not be
+56 ;;776.1^7^TX^started, or a '1' to start a new monitor job.^1
+57 ;;
+58 ;;776.1^41^HD^PARAMETER NOTES
+59 ;;776.1^41^TX^Enter description and documentation of the just entered parameters.^1
+60 ;;
+61 ;;776.1^50^HD^EVENT MONITOR NOTES
+62 ;;776.1^50^TX^Enter overall comments about this event monitor.^1
+63 ;;
+64 ;;776.1^51^HD^MAIL GROUPs, USERs, REMOTE USERs
+65 ;;776.1^51^TX^Enter the mail groups and local users and remote users to which notification
+66 ;;776.1^51^TX^messages are to be sent. If no notification message will ever be sent, leave
+67 ;;776.1^51^TX^these fields blank.^1
+68 ;;
+69 ;;=====================================================================
+70 ;;776.999^.01^HD^MONITORING SYSTEM NAME
+71 ;;776.999^.01^TX^You may change the name of the monitoring system if you like. (But, it
+72 ;;776.999^.01^TX^makes no difference to the monitoring system!)^1
+73 ;;
+74 ;;776.999^2^HD^MASTER JOB STATUS
+75 ;;776.999^2^TX^Set this field to ACTIVE to enable the master job to run and monitor your
+76 ;;776.999^2^TX^system. (The master job is started and stopped using the 'Turn on/off
+77 ;;776.999^2^TX^monitoring system [HLEV EDIT MASTER ON-OFF]' menu option.) Set this field
+78 ;;776.999^2^TX^to INACTIVE to stop the master job (if it is running), and to ensure that
+79 ;;776.999^2^TX^the master job does not start^1
+80 ;;
+81 ;;776.999^3^HD^MASTER JOB INTERVAL (MINUTES)
+82 ;;776.999^3^TX^The master job is started every MASTER JOB INTERVAL minutes to evaluate your
+83 ;;776.999^3^TX^system. Enter the number of minutes now that should elapse between every
+84 ;;776.999^3^TX^"run" of the master job.^1
+85 ;;
+86 ;;776.999^4^HD^PURGE LIMIT FOR DATA
+87 ;;776.999^4^TX^Whenever the master job runs, data is created in the HL7 Monitor Master Job
+88 ;;776.999^4^TX^file (#776.2.) Whenever the master job spawns off a new background job for
+89 ;;776.999^4^TX^an event monitor, data is created in the HL7 Monitor Job file (#776.) Purging
+90 ;;776.999^4^TX^of this data occurs automatically. This parameter controls how much data to
+91 ;;776.999^4^TX^retain. For example, if you enter '96' now, then no data less than 96 hours
+92 ;;776.999^4^TX^old will be purged.^1
+93 ;;
+94 ;;776.999^6^TX^
+95 ;;776.999^6^TX^
+96 ;;776.999^6^TX^ --- EVENT MONITORING FIELDS ---
+97 ;;776.999^6^TX^
+98 ;;776.999^6^HD^STATUS OF EVENT MONITORING
+99 ;;776.999^6^TX^The master job periodically "fires off" event monitors. If you set this field
+100 ;;776.999^6^TX^to INACTIVE, the master job will continue to start and run, but no events
+101 ;;776.999^6^TX^will be started. When this field is set to ACTIVE, the master job will be
+102 ;;776.999^6^TX^able to run event monitors.^1
+103 ;
+104 QUIT
+105 ;
HELPM ; Display of HELP logic...
+1 NEW I,INFO,J,T,TYP
+2 FOR I=1:1
SET T=$TEXT(HELP+I)
if T'[";;"
QUIT
Begin DoDot:1
+3 SET T=$PIECE(T,";;",2,999)
+4 IF +T=FILE
IF $PIECE(T,U,2)=FLD
Begin DoDot:2
+5 SET TYP=$PIECE(T,U,3)
SET INFO=$PIECE(T,U,4)
+6 if TYP="HD"
WRITE !!,$$CJ^XLFSTR(" "_INFO_" ",IOM,"=")
+7 if TYP="TX"
WRITE !,INFO
+8 if TYP="FT"
WRITE !,$$REPEAT^XLFSTR("=",IOM)
+9 IF $PIECE(T,U,5)>0
FOR J=1:1:$PIECE(T,U,5)
WRITE !
End DoDot:2
End DoDot:1
+10 QUIT
+11 ;
IMPLEMNT ; Not yet implemented API...
+1 NEW OPT
+2 SET OPT=$PIECE($GET(XQY0),U,2)_" ["_$PIECE($GET(XQY0),U)_"]"
+3 WRITE !!,$$CJ^XLFSTR("This '"_OPT_"' menu option",IOM)
+4 WRITE !,$$CJ^XLFSTR("is not yet implemented.",IOM)
+5 WRITE !
+6 SET X=$$BTE^HLCSMON("Press RETURN to return to menu...")
+7 QUIT
+8 ;
EOR ;HLEVSTUP - Event Monitor SETUP ;5/16/03 14:42