- INHOQT ; FRW/JMB ; 24 Aug 95 13:29; Show top entries in queues
- ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
- ;COPYRIGHT 1991-2000 SAIC
- ;
- EN ;Main entry point
- ;NEW statements
- N %,INPAR,PROMPT,DEF,RANGE,INTASKED
- ;
- S INTASKED=0 ;report only to be displayed
- ;Get report parameters
- Q:'$$PAR
- ;
- G EN^INHOQT1
- Q
- ;
- PAR() ;User parameters
- ;OUTPUT:
- ; INPAR - array of report parameters
- ; function - user did not abort ( 0 - no ; 1 - yes )
- ;
- K INPAR
- S INPAR("DETAIL")=1 ;detail report
- S INPAR("REPAINT")=5 ;repaint frequency
- S INPAR("ITERT")=5 ;number of times to try and get an entry
- ;
- ;Quit if user accepts default parameters
- S %=$$RD("Modify default parameters") Q:'% %'=U W !
- S INPAR("DETAIL")=$$RD("Detailed report",INPAR("DETAIL")) Q:INPAR("DETAIL")=U 0
- S INPAR("REPAINT")=$$RD("Repaint Frequency (sec)",INPAR("REPAINT"),"0,3600") Q:INPAR("REPAINT")=U 0
- S INPAR("ITERT")=$$RD("Maximum number of times to try for an entry",INPAR("ITERT"),"0,9999") Q:INPAR("ITERT")=U 0
- Q 1
- ;
- RD(PROMPT,DEF,RANGE) ;Read a parameter
- Q $$RD^INHUTS1($G(PROMPT),$G(DEF),$G(RANGE))
- ;
- INIARR ;Initialize data and queue arrays
- ;OUTPUT:
- ; INDEST - array destination queues to check
- ; INDAT
- ;
- N INQ
- K INDAT
- ;Determine INDEST
- D DES1^INHUTS1
- ;Write queue names in INDAT
- F BP=1,2 D DATINIT(BP)
- S BP=0 F S BP=$O(INDEST(BP)) Q:'BP D DATINIT(BP)
- Q
- ;
- DATINIT(INQ) ;Initialize INDAT
- ;INPUT
- ; INQ - Process Id number
- ;OUTPUT
- ; INDAT
- ;
- S INDAT(INQ,"NAME")=$P($G(^INTHPC(INQ,0)),U)
- Q
- INHOQT ; FRW/JMB ; 24 Aug 95 13:29; Show top entries in queues
- +1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
- +2 ;COPYRIGHT 1991-2000 SAIC
- +3 ;
- EN ;Main entry point
- +1 ;NEW statements
- +2 NEW %,INPAR,PROMPT,DEF,RANGE,INTASKED
- +3 ;
- +4 ;report only to be displayed
- SET INTASKED=0
- +5 ;Get report parameters
- +6 IF '$$PAR
- QUIT
- +7 ;
- +8 GOTO EN^INHOQT1
- +9 QUIT
- +10 ;
- PAR() ;User parameters
- +1 ;OUTPUT:
- +2 ; INPAR - array of report parameters
- +3 ; function - user did not abort ( 0 - no ; 1 - yes )
- +4 ;
- +5 KILL INPAR
- +6 ;detail report
- SET INPAR("DETAIL")=1
- +7 ;repaint frequency
- SET INPAR("REPAINT")=5
- +8 ;number of times to try and get an entry
- SET INPAR("ITERT")=5
- +9 ;
- +10 ;Quit if user accepts default parameters
- +11 SET %=$$RD("Modify default parameters")
- IF '%
- QUIT %'=U
- WRITE !
- +12 SET INPAR("DETAIL")=$$RD("Detailed report",INPAR("DETAIL"))
- IF INPAR("DETAIL")=U
- QUIT 0
- +13 SET INPAR("REPAINT")=$$RD("Repaint Frequency (sec)",INPAR("REPAINT"),"0,3600")
- IF INPAR("REPAINT")=U
- QUIT 0
- +14 SET INPAR("ITERT")=$$RD("Maximum number of times to try for an entry",INPAR("ITERT"),"0,9999")
- IF INPAR("ITERT")=U
- QUIT 0
- +15 QUIT 1
- +16 ;
- RD(PROMPT,DEF,RANGE) ;Read a parameter
- +1 QUIT $$RD^INHUTS1($GET(PROMPT),$GET(DEF),$GET(RANGE))
- +2 ;
- INIARR ;Initialize data and queue arrays
- +1 ;OUTPUT:
- +2 ; INDEST - array destination queues to check
- +3 ; INDAT
- +4 ;
- +5 NEW INQ
- +6 KILL INDAT
- +7 ;Determine INDEST
- +8 DO DES1^INHUTS1
- +9 ;Write queue names in INDAT
- +10 FOR BP=1,2
- DO DATINIT(BP)
- +11 SET BP=0
- FOR
- SET BP=$ORDER(INDEST(BP))
- IF 'BP
- QUIT
- DO DATINIT(BP)
- +12 QUIT
- +13 ;
- DATINIT(INQ) ;Initialize INDAT
- +1 ;INPUT
- +2 ; INQ - Process Id number
- +3 ;OUTPUT
- +4 ; INDAT
- +5 ;
- +6 SET INDAT(INQ,"NAME")=$PIECE($GET(^INTHPC(INQ,0)),U)
- +7 QUIT