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

INHMS3.m

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