source: WorldVistAEHR/trunk/r/LIST_MANAGER-VALM/VALMXQ06.m@ 1042

Last change on this file since 1042 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1VALMXQ06 ; alb/mjk - XQORD for export with LM v1 ; 3/30/93
2 ;;1;List Manager;;Aug 13, 1993
3 ;
4 ;
5XQORD ; SLC/KCM - Dialog Utility ;11/19/92 08:27
6 ;;6.7;Sidewinder;;Jan 08, 1993
7EN D NUL^XQOR2 N DLG,ITM,X ;Process individual prompt
8 S DLG=+^TMP("XQORS",$J,XQORS-1,"VPT"),ITM=+^TMP("XQORS",$J,XQORS-1,"ITM",^TMP("XQORS",$J,XQORS-1,"ITM"),"IEN")
9 S X=$G(^ORD(101,DLG,10,ITM,1)),X("PRMT")=$P(X,"^",1),X("DFLT")=$P(X,"^",2),X("HELP")=$P(X,"^",3),X("MODE")=$P(X,"^",4)
10 S X=$G(^ORD(101,+XQORNOD,101.04)),X("DOM")=$P(X,"^",1),X("PARM")=$P(X,"^",5)
11 S:'$L(X("PRMT")) X("PRMT")=$P(X,"^",2) S:'$L(X("DFLT")) X("DFLT")=$P(X,"^",3) S:'$L(X("HELP")) X("HELP")=$P(X,"^",4)
12 S XQORDLG(ITM,"PRMT")=X("PRMT")_"^"_X("MODE"),XQORDLG("SEQ",+^TMP("XQORS",$J,XQORS-1,"ITM"))=ITM
13 I X("MODE")["E",$D(XQORMSG),XQORMSG="NEW" D G XEN
14 . I '$D(XQORDLG(ITM,1)),$L(X("DFLT")) S XQORDLG(ITM,1,"I")="",XQORDLG(ITM,1,"E")=X("DFLT")
15 ;
16 ; -- case prompt type (X("DOM"))
17 I "DFLNPSY"[X("DOM") D RDR^XQORD1 G C1
18 I X("DOM")="W" D WP^XQORD1 G C1
19 I X("DOM")="M" D MENU^XQORD1 G C1
20C1 ; -- end case prompt type
21 ;
22 ; -- case up-arrow status (X)
23 I $E(X)'="^" D SETANS G C2 ;valid entry
24 S X=$P(X,"^",2) I '$L(X) S XQORPOP=1,XQORDLG=-1 G C2 ;up arrow out
25 I $D(^TMP("XQORS",$J,XQORS-1,"PMT",$$UP(X))) S ^TMP("XQORS",$J,XQORS-1,"ITM")=$O(^($$UP(X),0))-1 G C2 ;full name jump
26 S Y=$O(^TMP("XQORS",$J,XQORS-1,"PMT",$$UP(X))) ;partial name jump
27 I $E(Y,1,$L(X))=$$UP(X) S ^TMP("XQORS",$J,XQORS-1,"ITM")=$O(^TMP("XQORS",$J,XQORS-1,"PMT",Y,0))-1 G C2
28 W " ??" S ^TMP("XQORS",$J,XQORS-1,"ITM")=^TMP("XQORS",$J,XQORS-1,"ITM")-1 ;otherwise...
29C2 ; -- end case up-arrow status
30 ;
31XEN Q ;Exit: XQORDLG(n)=external value of response
32 ;
33SETANS ;Setup answers in array according to type, calling info in X,Y
34 ;Entry: .X is external value, .Y is internal value, X("DOM") is prompt type
35 S XQORDLG(ITM)=""
36 I $L(Y) DO
37 . ; -- case prompt type (X("DOM"))
38 . I X("DOM")="D" D DD^%DT S XQORDLG(ITM)=Y G C3 ;date/Time
39 . I X("DOM")="F" S XQORDLG(ITM)=Y G C3 ;free Text
40 . I X("DOM")="L" S XQORDLG(ITM)=X G C3 ;list/Range
41 . I X("DOM")="N" S XQORDLG(ITM)=Y G C3 ;numeric
42 . I X("DOM")="P" S XQORDLG(ITM)=$P(Y,"^",2) G C3 ;pointer
43 . I X("DOM")="S" S XQORDLG(ITM)=Y(0) G C3 ;set
44 . I X("DOM")="Y" S XQORDLG(ITM)=$S(Y=0:"NO",Y=1:"YES",1:"") G C3 ;yes/no
45 . I X("DOM")="W" S XQORDLG(ITM)=Y G C3 ;word processing
46 . I X("DOM")="M" DO G C3 ;menu
47 . . N I S I=0 F S I=$O(Y(I)) Q:I<1 DO
48 . . . S XQORDLG(ITM)=$P(Y(I),"^",3)_","
49 . . S XQORDLG(ITM)=$E(XQORDLG(ITM),1,$L(XQORDLG(ITM))-1)
50C3 . ; -- end case prompt type
51 . ;
52 Q
53UP(X) Q $TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
Note: See TracBrowser for help on using the repository browser.