GMRCPSEL ;SLC/DCM - Select Range Of Items From List ;5/20/98 14:20
;;3.0;CONSULT/REQUEST TRACKING;**1**;DEC 27, 1997
SEL ;Entry point into select option
I '$D(^TMP("GMRCR",$J,"CS","AD")) W !,"No Consult Orders Exist To Select From.",! S GMRCSEL="",GMRCQUIT=1 Q
I '$O(^TMP("GMRCR",$J,"CS","AD")),BLK=1 S GMRCSEL=BLK Q
S GMRCSEL="" W !,"Choose No. 1-"_BLK_": " R X:DTIME S:X="^^" DIROUT=1 I '$T!(X["^") S (DTOUT,GMRCQUT)=1 Q
I X["?" D SELHELP G SEL
I X="" S GMRCQUT=1 Q
I $S(X'?.N1",".N.E:1,X<0:1,X>BLK:1,1:0) D SELHELP G SEL
S GMRCSEL=X
Q
SELHELP ;Help to select a valid entry
W !,"Select a request by typing the number in the left column and pressing <ENTER>",!,"or by selecting a range of numbers in the left column, separated by commas.",!
Q
GMRCPSEL ;SLC/DCM - Select Range Of Items From List ;5/20/98 14:20
+1 ;;3.0;CONSULT/REQUEST TRACKING;**1**;DEC 27, 1997
SEL ;Entry point into select option
+1 IF '$DATA(^TMP("GMRCR",$JOB,"CS","AD"))
WRITE !,"No Consult Orders Exist To Select From.",!
SET GMRCSEL=""
SET GMRCQUIT=1
QUIT
+2 IF '$ORDER(^TMP("GMRCR",$JOB,"CS","AD"))
IF BLK=1
SET GMRCSEL=BLK
QUIT
+3 SET GMRCSEL=""
WRITE !,"Choose No. 1-"_BLK_": "
READ X:DTIME
IF X="^^"
SET DIROUT=1
IF '$TEST!(X["^")
SET (DTOUT,GMRCQUT)=1
QUIT
+4 IF X["?"
DO SELHELP
GOTO SEL
+5 IF X=""
SET GMRCQUT=1
QUIT
+6 IF $SELECT(X'?.N1",".N.E:1,X<0:1,X>BLK:1,1:0)
DO SELHELP
GOTO SEL
+7 SET GMRCSEL=X
+8 QUIT
SELHELP ;Help to select a valid entry
+1 WRITE !,"Select a request by typing the number in the left column and pressing <ENTER>",!,"or by selecting a range of numbers in the left column, separated by commas.",!
+2 QUIT