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

HLEVSTUP.m

Go to the documentation of this file.
  1. HLEVSTUP ;O-OIFO/LJA - Event Monitor SETUP ;02/04/2004 14:42
  1. ;;1.6;HEALTH LEVEL SEVEN;**109**;Oct 13, 1995
  1. ;
  1. E7761 ; Enter/Edit 776.1...
  1. N DA,DIC,DIE,DR,IEN,X,Y
  1. D HD,EX
  1. F D QUIT:IEN'>0
  1. . W !
  1. . S IEN=$$ASKIEN^HLEVREP(776.1,"L") QUIT:'IEN ;->
  1. . W !!,$$CJ^XLFSTR("---------------- editing entry ----------------",IOM)
  1. . W !
  1. . D EDIT(776.1,IEN,"[HLEV MONITOR ENTER/EDIT]")
  1. . W !
  1. . D ASKRUN^HLEVAPI1(+IEN)
  1. . D HD,EX
  1. Q
  1. ;
  1. E7769 ; Edit 776.999...
  1. N DA,DIC,DIE,DR,IEN,X,Y
  1. W @IOF
  1. D EDIT(776.999,1,"[HLEV MASTER JOB ENTER/EDIT]")
  1. W !
  1. S X=$$BTE^HLCSMON("Press RETURN to exit... ")
  1. Q
  1. ;
  1. EDIT(FILE,IEN,DR) ; Edit entry...
  1. N DA,DIE
  1. S DA=+IEN,DIE=FILE
  1. D ^DIE
  1. Q
  1. ;
  1. HD W @IOF,$$CJ^XLFSTR("Event Monitoring System Enter/Edit",IOM)
  1. W !,$$REPEAT^XLFSTR("=",IOM)
  1. QUIT
  1. ;
  1. EX N I,T F I=1:1 S T=$T(EX+I) QUIT:T'[";;" W !,$P(T,";;",2,99)
  1. ;;You may now enter new entries, and edit existing entries. Enter a new entry
  1. ;;now, or select the existing entry to be edited.
  1. QUIT
  1. ;
  1. HELP(FILE,FLD) D HELPM
  1. ;;776.1^2^HD^STATUS (#2)
  1. ;;776.1^2^TX^Enter ACTIVE to make this event monitor "available" to the master job for
  1. ;;776.1^2^TX^queuing. When set to ACTIVE the master job will run this event monitor
  1. ;;776.1^2^TX^according to the REQUEUE FREQUENCY (that you will be asked several prompts
  1. ;;776.1^2^TX^from now.)
  1. ;;776.1^2^TX^
  1. ;;776.1^2^TX^NOTE: If you're entering this event monitor for the first time, you should
  1. ;;776.1^2^TX^ set this field to INACTIVE until all fields have been filled in. Then,
  1. ;;776.1^2^TX^ change this field back to ACTIVE.^1
  1. ;;
  1. ;;776.1^3^HD^SHORT DESCRIPTION (#3)
  1. ;;776.1^3^TX^Enter a short description for this event monitor; something that is more
  1. ;;776.1^3^TX^complete and descriptive than the NAME.^1
  1. ;;
  1. ;;776.1^4^HD^REQUEUE FREQUENCY (#4)
  1. ;;776.1^4^TX^The master job will run this event monitor as often as you specify. And, this
  1. ;;776.1^4^TX^field is the way you specify rerun frequency. Enter the number of minutes
  1. ;;776.1^4^TX^that should elapse after this event monitor runs until it is run again.
  1. ;;776.1^4^TX
  1. ;;776.1^4^TX^NOTE: Enter '0' if you want this event to run every time the master job
  1. ;;776.1^4^TX^ checks this monitor.^1
  1. ;;
  1. ;;776.1^5^HD^REMOTE REQUESTABLE
  1. ;;776.1^5^TX^Some monitors can only be started locally at a site. Some monitors can be
  1. ;;776.1^5^TX^started locally, and also requested remotely. (A remote request occurs when
  1. ;;776.1^5^TX^someone at another site or location sends a Mailman message to your site - to
  1. ;;776.1^5^TX^your site's HL7 Event Monitor's server option - requesting that the monitor be
  1. ;;776.1^5^TX^run.)^1
  1. ;;776.1^5^TX^WARNING!! Does this monitor return a report to the requester containing
  1. ;;776.1^5^TX^ sensitive information? If so, you should not, under any
  1. ;;776.1^5^TX^ circumstances, set this field to YES.^1
  1. ;;776.1^5^TX^Please specify now whether this monitor can be requested remotely. Enter YES
  1. ;;776.1^5^TX^to allow remote users to run this monitor. Enter NO if remote requests should
  1. ;;776.1^5^TX^ignored.^1
  1. ;;
  1. ;;776.1^6^HD^M STARTUP LOCATION
  1. ;;776.1^6^TX^The master job uses this field to determine how to start this event monitor.
  1. ;;776.1^6^TX^So, enter the M location (subroutine and routine) where the event
  1. ;;776.1^6^TX^should be queued. Enter it in the SUBROUTINE~ROUTINE format, substituting
  1. ;;776.1^6^TX^a tilde (~) for the up-arrow.
  1. ;;776.1^6^TX^
  1. ;;776.1^6^TX^The M location you enter now is the location where queued jobs start.^1
  1. ;;
  1. ;;776.1^7^HD^M START CHECK (EXTRINSIC FUNCTION)
  1. ;;776.1^7^TX^Normally, the master job uses the monitor's requeue frequency in order to
  1. ;;776.1^7^TX^determine whether a new monitor job should be queued. Alternately, you may
  1. ;;776.1^7^TX^call an extrinsic function to determine whether a new monitor job should be
  1. ;;776.1^7^TX^started. Entry of the M check extrinsic function is optional.
  1. ;;776.1^7^TX^
  1. ;;776.1^7^TX^Extrinsic functions must follow these rules:
  1. ;;776.1^7^TX^
  1. ;;776.1^7^TX^ * Syntax = $$TAG~ROUTINE (where TAG and ROUTINE do not exceed 8 characters.)
  1. ;;776.1^7^TX^ * $$TAG~ROUTINE returns a 1 or 0.
  1. ;;776.1^7^TX^
  1. ;;776.1^7^TX^The extrinsic function should return '0' if a new monitor job should not be
  1. ;;776.1^7^TX^started, or a '1' to start a new monitor job.^1
  1. ;;
  1. ;;776.1^41^HD^PARAMETER NOTES
  1. ;;776.1^41^TX^Enter description and documentation of the just entered parameters.^1
  1. ;;
  1. ;;776.1^50^HD^EVENT MONITOR NOTES
  1. ;;776.1^50^TX^Enter overall comments about this event monitor.^1
  1. ;;
  1. ;;776.1^51^HD^MAIL GROUPs, USERs, REMOTE USERs
  1. ;;776.1^51^TX^Enter the mail groups and local users and remote users to which notification
  1. ;;776.1^51^TX^messages are to be sent. If no notification message will ever be sent, leave
  1. ;;776.1^51^TX^these fields blank.^1
  1. ;;
  1. ;;=====================================================================
  1. ;;776.999^.01^HD^MONITORING SYSTEM NAME
  1. ;;776.999^.01^TX^You may change the name of the monitoring system if you like. (But, it
  1. ;;776.999^.01^TX^makes no difference to the monitoring system!)^1
  1. ;;
  1. ;;776.999^2^HD^MASTER JOB STATUS
  1. ;;776.999^2^TX^Set this field to ACTIVE to enable the master job to run and monitor your
  1. ;;776.999^2^TX^system. (The master job is started and stopped using the 'Turn on/off
  1. ;;776.999^2^TX^monitoring system [HLEV EDIT MASTER ON-OFF]' menu option.) Set this field
  1. ;;776.999^2^TX^to INACTIVE to stop the master job (if it is running), and to ensure that
  1. ;;776.999^2^TX^the master job does not start^1
  1. ;;
  1. ;;776.999^3^HD^MASTER JOB INTERVAL (MINUTES)
  1. ;;776.999^3^TX^The master job is started every MASTER JOB INTERVAL minutes to evaluate your
  1. ;;776.999^3^TX^system. Enter the number of minutes now that should elapse between every
  1. ;;776.999^3^TX^"run" of the master job.^1
  1. ;;
  1. ;;776.999^4^HD^PURGE LIMIT FOR DATA
  1. ;;776.999^4^TX^Whenever the master job runs, data is created in the HL7 Monitor Master Job
  1. ;;776.999^4^TX^file (#776.2.) Whenever the master job spawns off a new background job for
  1. ;;776.999^4^TX^an event monitor, data is created in the HL7 Monitor Job file (#776.) Purging
  1. ;;776.999^4^TX^of this data occurs automatically. This parameter controls how much data to
  1. ;;776.999^4^TX^retain. For example, if you enter '96' now, then no data less than 96 hours
  1. ;;776.999^4^TX^old will be purged.^1
  1. ;;
  1. ;;776.999^6^TX^
  1. ;;776.999^6^TX^
  1. ;;776.999^6^TX^ --- EVENT MONITORING FIELDS ---
  1. ;;776.999^6^TX^
  1. ;;776.999^6^HD^STATUS OF EVENT MONITORING
  1. ;;776.999^6^TX^The master job periodically "fires off" event monitors. If you set this field
  1. ;;776.999^6^TX^to INACTIVE, the master job will continue to start and run, but no events
  1. ;;776.999^6^TX^will be started. When this field is set to ACTIVE, the master job will be
  1. ;;776.999^6^TX^able to run event monitors.^1
  1. ;
  1. Q
  1. ;
  1. HELPM ; Display of HELP logic...
  1. N I,INFO,J,T,TYP
  1. F I=1:1 S T=$T(HELP+I) Q:T'[";;" D
  1. . S T=$P(T,";;",2,999)
  1. . I +T=FILE,$P(T,U,2)=FLD D
  1. . . S TYP=$P(T,U,3),INFO=$P(T,U,4)
  1. . . W:TYP="HD" !!,$$CJ^XLFSTR(" "_INFO_" ",IOM,"=")
  1. . . W:TYP="TX" !,INFO
  1. . . W:TYP="FT" !,$$REPEAT^XLFSTR("=",IOM)
  1. . . I $P(T,U,5)>0 F J=1:1:$P(T,U,5) W !
  1. Q
  1. ;
  1. IMPLEMNT ; Not yet implemented API...
  1. N OPT
  1. S OPT=$P($G(XQY0),U,2)_" ["_$P($G(XQY0),U)_"]"
  1. W !!,$$CJ^XLFSTR("This '"_OPT_"' menu option",IOM)
  1. W !,$$CJ^XLFSTR("is not yet implemented.",IOM)
  1. W !
  1. S X=$$BTE^HLCSMON("Press RETURN to return to menu...")
  1. Q
  1. ;
  1. EOR ;HLEVSTUP - Event Monitor SETUP ;5/16/03 14:42