- KMPDTU10 ;OAK/RAK/JML - CP Tools Timing Utility ;9/1/2015
- ;;3.0;Capacity Management Tools;**3**;Jan 15, 2013;Build 42
- ;
- DATERNG(KMPDSS,KMPDEF,KMPDRES,KMPDDT) ; timing date range for a subscript
- ;-----------------------------------------------------------------------
- ; KMPDSS.... KMPTMP SUBSCRIPT
- ; KMPDEF.... (optional) default number of days to track - if not defined
- ; will default to seven (7)
- ; KMPDRES(). Results of api in format:
- ; KMPDRES(0)=piece 1 - Start Date Internal
- ; piece 2 - End Date Internal
- ; piece 3 - Start Date External
- ; piece 4 - End Date External
- ; Null ("") is returned if no results are found
- ; KMPDRES(1)=NumberOfDays
- ; KMPDDT.... Date only (do not ask for days)
- ; 0 - both date & days
- ; 1 - date only - do not ask for days
- ;
- ; This api determines the date range for KMPDSS (ex: ORWCV for CPRS
- ; cover sheets). It asks the user the ending date. After the ending
- ; date is entered, the user is prompted for the number of days to track.
- ; Results are returned in the KMPDRES() array as described above.
- ;-----------------------------------------------------------------------
- K KMPDRES S KMPDRES(0)="",KMPDRES(1)=""
- Q:$G(KMPDSS)=""
- S:'$G(KMPDEF) KMPDEF=7
- S KMPDDT=+$G(KMPDDT)
- N COUNT,DATE,DAYS,END,SESS,START
- ; start & end dates
- S DATE=$$DATERNG1(KMPDSS,.SESS)
- Q:'$D(SESS)
- S START=$P(DATE,U),END=$P(DATE,U,2)
- Q:'START!('END)
- ; get end date
- K DIR S DIR(0)="DO^"_START_":"_END_":E"
- S DIR("A")="Select End Date",DIR("B")=$$FMTE^XLFDT(END)
- W ! D ^DIR Q:'Y S END=Y
- ; if date only
- I KMPDDT D Q
- .S KMPDRES(0)=END_U_END_U_$$FMTE^XLFDT(END)_U_$$FMTE^XLFDT(END)
- ; determine number of days
- S DATE=END+.1,START=END,DAYS=0
- F S DATE=$O(SESS(DATE),-1) Q:'DATE S START=DATE,DAYS=DAYS+1
- Q:'DAYS
- ; days to go back
- K DIR S DIR(0)="NO^1:"_DAYS_":O"
- S DIR("A")="Select # of Days Review"
- S DIR("B")=$S(DAYS'<KMPDEF:KMPDEF,1:DAYS)
- D ^DIR Q:Y=""!(Y="^")
- ; determine start date
- S START=END
- I Y'=1 S COUNT=1 D
- .F S START=$O(SESS(START),-1) Q:'START S COUNT=COUNT+1 Q:COUNT'<Y
- S KMPDRES(0)=START_U_END_U_$$FMTE^XLFDT(START)_U_$$FMTE^XLFDT(END)
- S KMPDRES(1)=Y
- ;
- Q
- ;
- DATERNG1(KMPDSS,KMPDSESS) ;-- extrinsic function
- ;-----------------------------------------------------------------------
- ; KMPDSS.... KMPTMP SUBSCRIPT
- ; KMPDSESS() Array of dates:
- ; KMPDSESS(3030801)=""
- ; KMPDSESS(3030802)=""
- ; ...
- ;
- ; Return: StartDate^EndDate - in internal fileman format
- ; "" - no results
- ;-----------------------------------------------------------------------
- Q:$G(KMPDSS)="" ""
- N DATE,END,START
- ; determine most recent date
- F DATE=0:0 S DATE=$O(^KMPD(8973.2,"ASVDTSS",KMPDSS,DATE)) Q:'DATE D
- .; set array of session dates
- .S KMPDSESS(DATE)=""
- Q:'$D(KMPDSESS) ""
- ; set start and end dates according to SESS() array
- S END=$O(KMPDSESS("A"),-1),START=$O(KMPDSESS(""))
- Q START_"^"_END
- ;
- DTTMRNG(KMPDSS,KMPDEF,KMPDRES,KMPDEFH) ; timing date/time range for a subscript
- ;-----------------------------------------------------------------------
- ; KMPDSS.... KMPTMP SUBSCRIPT
- ; KMPDEF.... (optional) default number of days to track - if not defined
- ; will default to seven (7)
- ; KMPDRES(). Results of api in format:
- ; KMPDRES(0)=piece 1 - Start Date Internal
- ; piece 2 - End Date Internal
- ; piece 3 - Start Date External
- ; piece 4 - End Date External
- ; Null ("") is returned if no results are found
- ; KMPDRES(1)=NumberOfDays
- ; KMPDEFH.. (optional) Default hour.
- ;
- ; This api determines the date range for KMPDSS (ex: ORWCV for CPRS
- ; cover sheets). It asks the user the ending date. After the ending
- ; date is entered, the user is prompted for the number of hours to
- ; review. Results are returned in the KMPDRES() array as described
- ; above.
- ;-----------------------------------------------------------------------
- K KMPDRES S KMPDRES(0)="",KMPDRES(1)=""
- Q:$G(KMPDSS)=""
- S:'$G(KMPDEF) KMPDEF=7
- S KMPDEFH=$G(KMPDEFH)
- N COUNT,DATE,DAYS,END,SESS,START
- ; get date
- D DATERNG(KMPDSS,1,.KMPDRES,1)
- Q:'$D(KMPDRES)
- Q:$G(KMPDRES(0))=""
- S KMPDRES(1)=""
- ; determine number of hours
- K DIR S DIR(0)="LO^0:23:O"
- S DIR("A")="Select Hour(s) to Review"
- S:KMPDEFH'="" DIR("B")=KMPDEFH
- D ^DIR Q:Y=""!(Y="^")
- S KMPDRES(1)=Y
- Q
- ;
- LISTSEL(KMPDLIST,KMPDSS,KMPDRLTM) ;-- extrinsic function - build list and select entry
- ;-----------------------------------------------------------------------
- ; KMPDLIST... 2 - Client Name
- ; 3 - IP Address
- ; KMPDSS..... Field #.07 (KMPTMP SUBSCRIPT)
- ; KMPDRLTM... Real-Time data
- ; 0 - not real-time
- ; 1 - real-time
- ;
- ; Return: "" - no selection
- ; Name - free text
- ;
- ; This function will build a list of entries from file #8973.2
- ;(CP TIMING) and ask the user to select an entry.
- ;-----------------------------------------------------------------------
- S KMPDLIST=+$G(KMPDLIST)
- Q:KMPDLIST<2!(KMPDLIST>3) ""
- Q:$G(KMPDSS)="" ""
- S KMPDRLTM=+$G(KMPDRLTM)
- ;
- N DIC,I,X,XREF,Y
- ;
- W " ==> building list..."
- K ^TMP("KMPDTU10-LIST",$J)
- D @$S('KMPDRLTM:"LISTSELH",1:"LISTSELR")
- ; quit if no data
- Q:'$D(^TMP("KMPDTU10-LIST",$J))
- S DIC="^TMP(""KMPDTU10-LIST"",$J,"
- S DIC(0)="AEQZ"
- S DIC("A")=$S(KMPDLIST=2:"Select Client",1:"IP Address")_": "
- D ^DIC
- K ^TMP("KMPDTU10-LIST",$J)
- Q $S(Y<1:"",1:$P(Y,"^",2))
- ;
- LISTSELH ;-- historical data list
- N I,CNT,DOT,XREF
- ; determine xref to build list
- S XREF=$S(KMPDLIST=2:"ASSCLDTTM",KMPDLIST=3:"ASSIPDTTM",1:"")
- W !,"XREF: ",XREF
- S I="",(CNT,DOT)=0
- F S I=$O(^KMPD(8973.2,XREF,KMPDSS,I)) Q:I="" D
- .S CNT=CNT+1,DOT=DOT+1 W:'(DOT#100) "."
- .S ^TMP("KMPDTU10-LIST",$J,CNT,0)=I
- .S ^TMP("KMPDTU10-LIST",$J,"B",I,CNT)=""
- S ^TMP("KMPDTU10-LIST",$J,0)=$S(KMPDLIST=2:"Client Name",1:"IP Address")_"^1.01^"_CNT_"^"_CNT
- Q
- ;
- LISTSELR ;-- real-time data list
- N I,CNT,DATA,DOT,X
- S I="",(CNT,DOT)=0
- F S I=$O(^KMPTMP("KMPDT",KMPDSS,I)) Q:I="" S DATA=^(I) I DATA]"" D
- .S X=$S(KMPDLIST=2:$P(DATA,U,4),1:$P($P(I," ",2),"-"))
- .Q:$O(^TMP("KMPDTU10-LIST",$J,"B",X,0))
- .S CNT=CNT+1,DOT=DOT+1 W:'(DOT#100) "."
- .S ^TMP("KMPDTU10-LIST",$J,CNT,0)=X
- .S ^TMP("KMPDTU10-LIST",$J,"B",X,CNT)=""
- S ^TMP("KMPDTU10-LIST",$J,0)=$S(KMPDLIST=2:"Client Name",1:"IP Address")_"^1.01^"_CNT_"^"_CNT
- Q
- ;
- SRCHBY(KMPDRES,KMPDSS,KMPDRLTM) ;-- api - search by criteria
- ;-----------------------------------------------------------------------
- ; KMPDRES().. Array (passed by reference) containing results in format:
- ; KMPDRES = "" - no valid selection
- ; KMPDRES = 1^User Name
- ; KMPDRES(1) = DUZ^NewPersonName
- ; KMPDRES = 2^Client Name
- ; KMPDRES(1) = ClientName (free text)
- ; KMPDRES = 3^IP Address
- ; KMPDRES(1) = IPAddress
- ; KMPDRES = 4^Any Occurrence
- ; KMPDSS..... KMPTMP SUBSCIPT - field #.07 from file #8973.2 (CP TIMING)
- ; KMPDRLTM... Real-Time data
- ; 0 - not real-time
- ; 1 - real-time
- ;-----------------------------------------------------------------------
- K KMPDRES S KMPDRES=""
- Q:$G(KMPDSS)=""
- S KMPDRLTM=+$G(KMPDRLTM)
- N DIC,DIR,X,Y
- S DIR(0)="SO^1:User Name;2:Client Name;3:IP Address;4:All of the Above"
- S DIR("A")="Search By"
- S DIR("B")=4
- D ^DIR
- Q:'Y
- S KMPDRES=Y_"^"_Y(0)
- ; quit if 'all of the above'
- Q:(+KMPDRES)=4
- ;
- ; user name
- I (+KMPDRES)=1 D Q
- .S DIC=200,DIC(0)="AEMQZ",DIC("A")="Select User: "
- .D ^DIC
- .I Y<1 S KMPDRES="" Q
- .S KMPDRES(1)=Y
- ;
- ; client name
- I (+KMPDRES)=2 D Q
- .S KMPDRES(1)=$$LISTSEL(+KMPDRES,KMPDSS,KMPDRLTM)
- .S:KMPDRES(1)="" KMPDRES=""
- ;
- ; ip address
- I (+KMPDRES)=3 D Q
- .S KMPDRES(1)=$$LISTSEL(+KMPDRES,KMPDSS,KMPDRLTM)
- .S:KMPDRES(1)="" KMPDRES=""
- ;
- Q
- ;
- TTLSEC() ;-- extrinsic function - time-to-load threshold seconds
- ;-----------------------------------------------------------------------
- ;-----------------------------------------------------------------------
- N DIR,X,Y
- S DIR(0)="NAO^1"
- S DIR("A")="Select Time-To-Load Threshold (Seconds): "
- S DIR("B")=60
- D ^DIR
- Q $S(Y:Y,1:"")
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HKMPDTU10 8555 printed Apr 23, 2025@17:55:20 Page 2
- KMPDTU10 ;OAK/RAK/JML - CP Tools Timing Utility ;9/1/2015
- +1 ;;3.0;Capacity Management Tools;**3**;Jan 15, 2013;Build 42
- +2 ;
- DATERNG(KMPDSS,KMPDEF,KMPDRES,KMPDDT) ; timing date range for a subscript
- +1 ;-----------------------------------------------------------------------
- +2 ; KMPDSS.... KMPTMP SUBSCRIPT
- +3 ; KMPDEF.... (optional) default number of days to track - if not defined
- +4 ; will default to seven (7)
- +5 ; KMPDRES(). Results of api in format:
- +6 ; KMPDRES(0)=piece 1 - Start Date Internal
- +7 ; piece 2 - End Date Internal
- +8 ; piece 3 - Start Date External
- +9 ; piece 4 - End Date External
- +10 ; Null ("") is returned if no results are found
- +11 ; KMPDRES(1)=NumberOfDays
- +12 ; KMPDDT.... Date only (do not ask for days)
- +13 ; 0 - both date & days
- +14 ; 1 - date only - do not ask for days
- +15 ;
- +16 ; This api determines the date range for KMPDSS (ex: ORWCV for CPRS
- +17 ; cover sheets). It asks the user the ending date. After the ending
- +18 ; date is entered, the user is prompted for the number of days to track.
- +19 ; Results are returned in the KMPDRES() array as described above.
- +20 ;-----------------------------------------------------------------------
- +21 KILL KMPDRES
- SET KMPDRES(0)=""
- SET KMPDRES(1)=""
- +22 if $GET(KMPDSS)=""
- QUIT
- +23 if '$GET(KMPDEF)
- SET KMPDEF=7
- +24 SET KMPDDT=+$GET(KMPDDT)
- +25 NEW COUNT,DATE,DAYS,END,SESS,START
- +26 ; start & end dates
- +27 SET DATE=$$DATERNG1(KMPDSS,.SESS)
- +28 if '$DATA(SESS)
- QUIT
- +29 SET START=$PIECE(DATE,U)
- SET END=$PIECE(DATE,U,2)
- +30 if 'START!('END)
- QUIT
- +31 ; get end date
- +32 KILL DIR
- SET DIR(0)="DO^"_START_":"_END_":E"
- +33 SET DIR("A")="Select End Date"
- SET DIR("B")=$$FMTE^XLFDT(END)
- +34 WRITE !
- DO ^DIR
- if 'Y
- QUIT
- SET END=Y
- +35 ; if date only
- +36 IF KMPDDT
- Begin DoDot:1
- +37 SET KMPDRES(0)=END_U_END_U_$$FMTE^XLFDT(END)_U_$$FMTE^XLFDT(END)
- End DoDot:1
- QUIT
- +38 ; determine number of days
- +39 SET DATE=END+.1
- SET START=END
- SET DAYS=0
- +40 FOR
- SET DATE=$ORDER(SESS(DATE),-1)
- if 'DATE
- QUIT
- SET START=DATE
- SET DAYS=DAYS+1
- +41 if 'DAYS
- QUIT
- +42 ; days to go back
- +43 KILL DIR
- SET DIR(0)="NO^1:"_DAYS_":O"
- +44 SET DIR("A")="Select # of Days Review"
- +45 SET DIR("B")=$SELECT(DAYS'<KMPDEF:KMPDEF,1:DAYS)
- +46 DO ^DIR
- if Y=""!(Y="^")
- QUIT
- +47 ; determine start date
- +48 SET START=END
- +49 IF Y'=1
- SET COUNT=1
- Begin DoDot:1
- +50 FOR
- SET START=$ORDER(SESS(START),-1)
- if 'START
- QUIT
- SET COUNT=COUNT+1
- if COUNT'<Y
- QUIT
- End DoDot:1
- +51 SET KMPDRES(0)=START_U_END_U_$$FMTE^XLFDT(START)_U_$$FMTE^XLFDT(END)
- +52 SET KMPDRES(1)=Y
- +53 ;
- +54 QUIT
- +55 ;
- DATERNG1(KMPDSS,KMPDSESS) ;-- extrinsic function
- +1 ;-----------------------------------------------------------------------
- +2 ; KMPDSS.... KMPTMP SUBSCRIPT
- +3 ; KMPDSESS() Array of dates:
- +4 ; KMPDSESS(3030801)=""
- +5 ; KMPDSESS(3030802)=""
- +6 ; ...
- +7 ;
- +8 ; Return: StartDate^EndDate - in internal fileman format
- +9 ; "" - no results
- +10 ;-----------------------------------------------------------------------
- +11 if $GET(KMPDSS)=""
- QUIT ""
- +12 NEW DATE,END,START
- +13 ; determine most recent date
- +14 FOR DATE=0:0
- SET DATE=$ORDER(^KMPD(8973.2,"ASVDTSS",KMPDSS,DATE))
- if 'DATE
- QUIT
- Begin DoDot:1
- +15 ; set array of session dates
- +16 SET KMPDSESS(DATE)=""
- End DoDot:1
- +17 if '$DATA(KMPDSESS)
- QUIT ""
- +18 ; set start and end dates according to SESS() array
- +19 SET END=$ORDER(KMPDSESS("A"),-1)
- SET START=$ORDER(KMPDSESS(""))
- +20 QUIT START_"^"_END
- +21 ;
- DTTMRNG(KMPDSS,KMPDEF,KMPDRES,KMPDEFH) ; timing date/time range for a subscript
- +1 ;-----------------------------------------------------------------------
- +2 ; KMPDSS.... KMPTMP SUBSCRIPT
- +3 ; KMPDEF.... (optional) default number of days to track - if not defined
- +4 ; will default to seven (7)
- +5 ; KMPDRES(). Results of api in format:
- +6 ; KMPDRES(0)=piece 1 - Start Date Internal
- +7 ; piece 2 - End Date Internal
- +8 ; piece 3 - Start Date External
- +9 ; piece 4 - End Date External
- +10 ; Null ("") is returned if no results are found
- +11 ; KMPDRES(1)=NumberOfDays
- +12 ; KMPDEFH.. (optional) Default hour.
- +13 ;
- +14 ; This api determines the date range for KMPDSS (ex: ORWCV for CPRS
- +15 ; cover sheets). It asks the user the ending date. After the ending
- +16 ; date is entered, the user is prompted for the number of hours to
- +17 ; review. Results are returned in the KMPDRES() array as described
- +18 ; above.
- +19 ;-----------------------------------------------------------------------
- +20 KILL KMPDRES
- SET KMPDRES(0)=""
- SET KMPDRES(1)=""
- +21 if $GET(KMPDSS)=""
- QUIT
- +22 if '$GET(KMPDEF)
- SET KMPDEF=7
- +23 SET KMPDEFH=$GET(KMPDEFH)
- +24 NEW COUNT,DATE,DAYS,END,SESS,START
- +25 ; get date
- +26 DO DATERNG(KMPDSS,1,.KMPDRES,1)
- +27 if '$DATA(KMPDRES)
- QUIT
- +28 if $GET(KMPDRES(0))=""
- QUIT
- +29 SET KMPDRES(1)=""
- +30 ; determine number of hours
- +31 KILL DIR
- SET DIR(0)="LO^0:23:O"
- +32 SET DIR("A")="Select Hour(s) to Review"
- +33 if KMPDEFH'=""
- SET DIR("B")=KMPDEFH
- +34 DO ^DIR
- if Y=""!(Y="^")
- QUIT
- +35 SET KMPDRES(1)=Y
- +36 QUIT
- +37 ;
- LISTSEL(KMPDLIST,KMPDSS,KMPDRLTM) ;-- extrinsic function - build list and select entry
- +1 ;-----------------------------------------------------------------------
- +2 ; KMPDLIST... 2 - Client Name
- +3 ; 3 - IP Address
- +4 ; KMPDSS..... Field #.07 (KMPTMP SUBSCRIPT)
- +5 ; KMPDRLTM... Real-Time data
- +6 ; 0 - not real-time
- +7 ; 1 - real-time
- +8 ;
- +9 ; Return: "" - no selection
- +10 ; Name - free text
- +11 ;
- +12 ; This function will build a list of entries from file #8973.2
- +13 ;(CP TIMING) and ask the user to select an entry.
- +14 ;-----------------------------------------------------------------------
- +15 SET KMPDLIST=+$GET(KMPDLIST)
- +16 if KMPDLIST<2!(KMPDLIST>3)
- QUIT ""
- +17 if $GET(KMPDSS)=""
- QUIT ""
- +18 SET KMPDRLTM=+$GET(KMPDRLTM)
- +19 ;
- +20 NEW DIC,I,X,XREF,Y
- +21 ;
- +22 WRITE " ==> building list..."
- +23 KILL ^TMP("KMPDTU10-LIST",$JOB)
- +24 DO @$SELECT('KMPDRLTM:"LISTSELH",1:"LISTSELR")
- +25 ; quit if no data
- +26 if '$DATA(^TMP("KMPDTU10-LIST",$JOB))
- QUIT
- +27 SET DIC="^TMP(""KMPDTU10-LIST"",$J,"
- +28 SET DIC(0)="AEQZ"
- +29 SET DIC("A")=$SELECT(KMPDLIST=2:"Select Client",1:"IP Address")_": "
- +30 DO ^DIC
- +31 KILL ^TMP("KMPDTU10-LIST",$JOB)
- +32 QUIT $SELECT(Y<1:"",1:$PIECE(Y,"^",2))
- +33 ;
- LISTSELH ;-- historical data list
- +1 NEW I,CNT,DOT,XREF
- +2 ; determine xref to build list
- +3 SET XREF=$SELECT(KMPDLIST=2:"ASSCLDTTM",KMPDLIST=3:"ASSIPDTTM",1:"")
- +4 WRITE !,"XREF: ",XREF
- +5 SET I=""
- SET (CNT,DOT)=0
- +6 FOR
- SET I=$ORDER(^KMPD(8973.2,XREF,KMPDSS,I))
- if I=""
- QUIT
- Begin DoDot:1
- +7 SET CNT=CNT+1
- SET DOT=DOT+1
- if '(DOT#100)
- WRITE "."
- +8 SET ^TMP("KMPDTU10-LIST",$JOB,CNT,0)=I
- +9 SET ^TMP("KMPDTU10-LIST",$JOB,"B",I,CNT)=""
- End DoDot:1
- +10 SET ^TMP("KMPDTU10-LIST",$JOB,0)=$SELECT(KMPDLIST=2:"Client Name",1:"IP Address")_"^1.01^"_CNT_"^"_CNT
- +11 QUIT
- +12 ;
- LISTSELR ;-- real-time data list
- +1 NEW I,CNT,DATA,DOT,X
- +2 SET I=""
- SET (CNT,DOT)=0
- +3 FOR
- SET I=$ORDER(^KMPTMP("KMPDT",KMPDSS,I))
- if I=""
- QUIT
- SET DATA=^(I)
- IF DATA]""
- Begin DoDot:1
- +4 SET X=$SELECT(KMPDLIST=2:$PIECE(DATA,U,4),1:$PIECE($PIECE(I," ",2),"-"))
- +5 if $ORDER(^TMP("KMPDTU10-LIST",$JOB,"B",X,0))
- QUIT
- +6 SET CNT=CNT+1
- SET DOT=DOT+1
- if '(DOT#100)
- WRITE "."
- +7 SET ^TMP("KMPDTU10-LIST",$JOB,CNT,0)=X
- +8 SET ^TMP("KMPDTU10-LIST",$JOB,"B",X,CNT)=""
- End DoDot:1
- +9 SET ^TMP("KMPDTU10-LIST",$JOB,0)=$SELECT(KMPDLIST=2:"Client Name",1:"IP Address")_"^1.01^"_CNT_"^"_CNT
- +10 QUIT
- +11 ;
- SRCHBY(KMPDRES,KMPDSS,KMPDRLTM) ;-- api - search by criteria
- +1 ;-----------------------------------------------------------------------
- +2 ; KMPDRES().. Array (passed by reference) containing results in format:
- +3 ; KMPDRES = "" - no valid selection
- +4 ; KMPDRES = 1^User Name
- +5 ; KMPDRES(1) = DUZ^NewPersonName
- +6 ; KMPDRES = 2^Client Name
- +7 ; KMPDRES(1) = ClientName (free text)
- +8 ; KMPDRES = 3^IP Address
- +9 ; KMPDRES(1) = IPAddress
- +10 ; KMPDRES = 4^Any Occurrence
- +11 ; KMPDSS..... KMPTMP SUBSCIPT - field #.07 from file #8973.2 (CP TIMING)
- +12 ; KMPDRLTM... Real-Time data
- +13 ; 0 - not real-time
- +14 ; 1 - real-time
- +15 ;-----------------------------------------------------------------------
- +16 KILL KMPDRES
- SET KMPDRES=""
- +17 if $GET(KMPDSS)=""
- QUIT
- +18 SET KMPDRLTM=+$GET(KMPDRLTM)
- +19 NEW DIC,DIR,X,Y
- +20 SET DIR(0)="SO^1:User Name;2:Client Name;3:IP Address;4:All of the Above"
- +21 SET DIR("A")="Search By"
- +22 SET DIR("B")=4
- +23 DO ^DIR
- +24 if 'Y
- QUIT
- +25 SET KMPDRES=Y_"^"_Y(0)
- +26 ; quit if 'all of the above'
- +27 if (+KMPDRES)=4
- QUIT
- +28 ;
- +29 ; user name
- +30 IF (+KMPDRES)=1
- Begin DoDot:1
- +31 SET DIC=200
- SET DIC(0)="AEMQZ"
- SET DIC("A")="Select User: "
- +32 DO ^DIC
- +33 IF Y<1
- SET KMPDRES=""
- QUIT
- +34 SET KMPDRES(1)=Y
- End DoDot:1
- QUIT
- +35 ;
- +36 ; client name
- +37 IF (+KMPDRES)=2
- Begin DoDot:1
- +38 SET KMPDRES(1)=$$LISTSEL(+KMPDRES,KMPDSS,KMPDRLTM)
- +39 if KMPDRES(1)=""
- SET KMPDRES=""
- End DoDot:1
- QUIT
- +40 ;
- +41 ; ip address
- +42 IF (+KMPDRES)=3
- Begin DoDot:1
- +43 SET KMPDRES(1)=$$LISTSEL(+KMPDRES,KMPDSS,KMPDRLTM)
- +44 if KMPDRES(1)=""
- SET KMPDRES=""
- End DoDot:1
- QUIT
- +45 ;
- +46 QUIT
- +47 ;
- TTLSEC() ;-- extrinsic function - time-to-load threshold seconds
- +1 ;-----------------------------------------------------------------------
- +2 ;-----------------------------------------------------------------------
- +3 NEW DIR,X,Y
- +4 SET DIR(0)="NAO^1"
- +5 SET DIR("A")="Select Time-To-Load Threshold (Seconds): "
- +6 SET DIR("B")=60
- +7 DO ^DIR
- +8 QUIT $SELECT(Y:Y,1:"")