- INHMS3 ;DJL; 10 Jan 95 15:00;Interface - Message Search
- ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
- ;COPYRIGHT 1991-2000 SAIC
- ;
- BLDHELP(INHLP) ; Construct the array containing the HELP text
- ; MODULE NAME: BLDHELP ( Construct the array of text used for HELP )
- ; DESCRIPTION: Constructs an array on assending numeric nodes containing
- ; up to 78 characters per line. No realistic limit exists
- ; on the number of nodes.
- ; RETURN = none
- ; PARAMETERS:
- ; INHLP = The array variable to load the text into.
- ; CODE BEGINS
- ; the following line can be used to limit strings to 78 characters.
- ; HHHHHHHHHHxxxxxxxxxXxxxxxxxxxXxxxxxxxxxxXxxxxxxxxxxXxxxxxxxxxxXxxxxxxxxxxXxxxxxxxxxxXxxxxxxxx
- S INHLP(1)="Displayed is a list of the Interface Messages that have matched the criteria"
- S INHLP(1,0)=""
- S INHLP(2)="you have selected in the previous screen. Select all messages you are"
- S INHLP(2,0)=""
- S INHLP(3)="interested in and hit the <RETURN> key to select the display device "
- S INHLP(3,0)=""
- S INHLP(4)="(re: printer/slave/etc.). To output or view an individual message"
- S INHLP(4,0)=""
- S INHLP(5)="use the EXPAND key. The EXPAND function will return you to the selection"
- S INHLP(5,0)=""
- S INHLP(6)=" list upon completion. The selection list will return you to the Search"
- S INHLP(6,0)=""
- S INHLP(7)="Criteria entry screen upon completion."
- S INHLP(7,0)=""
- S INHLP(8)="Press <RETURN> to continue:"
- S INHLP(8,0)=""
- Q
- ;
- SRCHHELP(INHLPLST) ; Display List Processor style HELP
- ; MODULE NAME: SRCHHELP ( Display an array of text used for HELP )
- ; DESCRIPTION: Call the list processor to display the array passed
- ; if it contains a least one sub-node otherwise construct
- ; a node stating no help is available.
- ; RETURN = none
- ; PARAMETERS:
- ; INHLPLST = The array of the text into.
- ; CODE BEGINS
- N DWLRF,DWLMK,DWLMK1,DWLB,DWLR,DWL
- S DWL="FWHTZ",DWLRF="INHLPLST",DWLB="0^7^10^78"
- S:$D(INHLPLST)<10 INHLPLST(1)="No HELP is available at this time."
- D ^DWL
- Q
- ;
- SRCHSIZE(INSRCH) ; Determine the expected search size
- ; MODULE NAME: SRCHSIZE ( Determine the expected Search Size )
- ; DESCRIPTION: Determine the expected number of message that will
- ; be searched. Warn of very large searches and provide
- ; a mechanism to abort the search.
- ; Uses the Start-Date and End-Date of span to search to
- ; determine the size(approximate).
- ; RETURNS: -1 = The user aborted the search
- ; Number of messages in the search
- ; PARAMETERS:
- ; INSRCH = Array for holding search criteria information
- ; CODE BEGINS
- N INSRCHEN,INSRCHST,INTEMP,INMSGCT,INSIZE,INWRNSZ
- ; INWRNSZ= the water-mark on when to notify the user of the search size
- S INWRNSZ=5000,INSIZE=0,INTEMP=$O(^INTHU("B",INSRCH("INSTART")))
- I INTEMP,(INTEMP<INSRCH("INEND")) S INSRCHST=$O(^INTHU("B",INTEMP,"")),INTEMP=$O(^INTHU("B",INSRCH("INEND")),-1),INSRCHEN=$O(^INTHU("B",INTEMP,""),-1),(INMSGCT,INSIZE)=(INSRCHEN-INSRCHST)+1
- I INTEMP,(INTEMP<INSRCH("INEND")),(INMSGCT>INWRNSZ) D
- . W !! D ERR^INHMS2("WARNING: Approximate search size="_INMSGCT_" messages. This may take awhile.")
- . I '$$YN^UTSRD("Do you want to continue with THIS search? ") S INSIZE=-1
- Q INSIZE
- ;
- QUITDWL(DWLR) ; handle the quit conditions for a ^DWL loop using DWLR
- N INQUIT
- S INQUIT=1
- ; don't quit if any of the following conditions are true
- I DWLR="E" S INQUIT=0 ; Q INQUIT ; expand
- I DWLR="?" S INQUIT=0 ; Q INQUIT ; help
- I DWLR="^" S INQUIT=1 Q INQUIT ; user exit
- I DWLR="^^" S INQUIT=1 Q INQUIT ; user abort
- I DWLR="M" S INQUIT=0 ; Q INQUIT ; max. num. selected
- I DWLR["H" S INQUIT=0 ; Q INQUIT ; hot key
- I +DWLR>0 S INQUIT=1 Q INQUIT ; return
- Q INQUIT
- ;
- INHTITLE(INMSGSZ,INSRCH) ; Write the Search Status line 21 from WITHIN the list proc.
- N INTEMPX,INTEMPY
- S INTEMPX=IOX,INTEMPY=IOY,IOX=0,IOY=21 X IOXY
- W "APPROXIMATE Number of Messages to Search: "_INMSGSZ
- S IOX=INTEMPX,IOY=INTEMPY X IOXY
- W !,$$INMSGSTR^INHMS2("",1,$G(INSRCH("INEXPAND")))
- Q
- ;
- INHMS3 ;DJL; 10 Jan 95 15:00;Interface - Message Search
- +1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
- +2 ;COPYRIGHT 1991-2000 SAIC
- +3 ;
- BLDHELP(INHLP) ; Construct the array containing the HELP text
- +1 ; MODULE NAME: BLDHELP ( Construct the array of text used for HELP )
- +2 ; DESCRIPTION: Constructs an array on assending numeric nodes containing
- +3 ; up to 78 characters per line. No realistic limit exists
- +4 ; on the number of nodes.
- +5 ; RETURN = none
- +6 ; PARAMETERS:
- +7 ; INHLP = The array variable to load the text into.
- +8 ; CODE BEGINS
- +9 ; the following line can be used to limit strings to 78 characters.
- +10 ; HHHHHHHHHHxxxxxxxxxXxxxxxxxxxXxxxxxxxxxxXxxxxxxxxxxXxxxxxxxxxxXxxxxxxxxxxXxxxxxxxxxxXxxxxxxxx
- +11 SET INHLP(1)="Displayed is a list of the Interface Messages that have matched the criteria"
- +12 SET INHLP(1,0)=""
- +13 SET INHLP(2)="you have selected in the previous screen. Select all messages you are"
- +14 SET INHLP(2,0)=""
- +15 SET INHLP(3)="interested in and hit the <RETURN> key to select the display device "
- +16 SET INHLP(3,0)=""
- +17 SET INHLP(4)="(re: printer/slave/etc.). To output or view an individual message"
- +18 SET INHLP(4,0)=""
- +19 SET INHLP(5)="use the EXPAND key. The EXPAND function will return you to the selection"
- +20 SET INHLP(5,0)=""
- +21 SET INHLP(6)=" list upon completion. The selection list will return you to the Search"
- +22 SET INHLP(6,0)=""
- +23 SET INHLP(7)="Criteria entry screen upon completion."
- +24 SET INHLP(7,0)=""
- +25 SET INHLP(8)="Press <RETURN> to continue:"
- +26 SET INHLP(8,0)=""
- +27 QUIT
- +28 ;
- SRCHHELP(INHLPLST) ; Display List Processor style HELP
- +1 ; MODULE NAME: SRCHHELP ( Display an array of text used for HELP )
- +2 ; DESCRIPTION: Call the list processor to display the array passed
- +3 ; if it contains a least one sub-node otherwise construct
- +4 ; a node stating no help is available.
- +5 ; RETURN = none
- +6 ; PARAMETERS:
- +7 ; INHLPLST = The array of the text into.
- +8 ; CODE BEGINS
- +9 NEW DWLRF,DWLMK,DWLMK1,DWLB,DWLR,DWL
- +10 SET DWL="FWHTZ"
- SET DWLRF="INHLPLST"
- SET DWLB="0^7^10^78"
- +11 IF $DATA(INHLPLST)<10
- SET INHLPLST(1)="No HELP is available at this time."
- +12 DO ^DWL
- +13 QUIT
- +14 ;
- SRCHSIZE(INSRCH) ; Determine the expected search size
- +1 ; MODULE NAME: SRCHSIZE ( Determine the expected Search Size )
- +2 ; DESCRIPTION: Determine the expected number of message that will
- +3 ; be searched. Warn of very large searches and provide
- +4 ; a mechanism to abort the search.
- +5 ; Uses the Start-Date and End-Date of span to search to
- +6 ; determine the size(approximate).
- +7 ; RETURNS: -1 = The user aborted the search
- +8 ; Number of messages in the search
- +9 ; PARAMETERS:
- +10 ; INSRCH = Array for holding search criteria information
- +11 ; CODE BEGINS
- +12 NEW INSRCHEN,INSRCHST,INTEMP,INMSGCT,INSIZE,INWRNSZ
- +13 ; INWRNSZ= the water-mark on when to notify the user of the search size
- +14 SET INWRNSZ=5000
- SET INSIZE=0
- SET INTEMP=$ORDER(^INTHU("B",INSRCH("INSTART")))
- +15 IF INTEMP
- IF (INTEMP<INSRCH("INEND"))
- SET INSRCHST=$ORDER(^INTHU("B",INTEMP,""))
- SET INTEMP=$ORDER(^INTHU("B",INSRCH("INEND")),-1)
- SET INSRCHEN=$ORDER(^INTHU("B",INTEMP,""),-1)
- SET (INMSGCT,INSIZE)=(INSRCHEN-INSRCHST)+1
- +16 IF INTEMP
- IF (INTEMP<INSRCH("INEND"))
- IF (INMSGCT>INWRNSZ)
- Begin DoDot:1
- +17 WRITE !!
- DO ERR^INHMS2("WARNING: Approximate search size="_INMSGCT_" messages. This may take awhile.")
- +18 IF '$$YN^UTSRD("Do you want to continue with THIS search? ")
- SET INSIZE=-1
- End DoDot:1
- +19 QUIT INSIZE
- +20 ;
- QUITDWL(DWLR) ; handle the quit conditions for a ^DWL loop using DWLR
- +1 NEW INQUIT
- +2 SET INQUIT=1
- +3 ; don't quit if any of the following conditions are true
- +4 ; Q INQUIT ; expand
- IF DWLR="E"
- SET INQUIT=0
- +5 ; Q INQUIT ; help
- IF DWLR="?"
- SET INQUIT=0
- +6 ; user exit
- IF DWLR="^"
- SET INQUIT=1
- QUIT INQUIT
- +7 ; user abort
- IF DWLR="^^"
- SET INQUIT=1
- QUIT INQUIT
- +8 ; Q INQUIT ; max. num. selected
- IF DWLR="M"
- SET INQUIT=0
- +9 ; Q INQUIT ; hot key
- IF DWLR["H"
- SET INQUIT=0
- +10 ; return
- IF +DWLR>0
- SET INQUIT=1
- QUIT INQUIT
- +11 QUIT INQUIT
- +12 ;
- INHTITLE(INMSGSZ,INSRCH) ; Write the Search Status line 21 from WITHIN the list proc.
- +1 NEW INTEMPX,INTEMPY
- +2 SET INTEMPX=IOX
- SET INTEMPY=IOY
- SET IOX=0
- SET IOY=21
- XECUTE IOXY
- +3 WRITE "APPROXIMATE Number of Messages to Search: "_INMSGSZ
- +4 SET IOX=INTEMPX
- SET IOY=INTEMPY
- XECUTE IOXY
- +5 WRITE !,$$INMSGSTR^INHMS2("",1,$GET(INSRCH("INEXPAND")))
- +6 QUIT
- +7 ;