source: FOIAVistA/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORD1.m@ 1595

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1XQORD1 ; SLC/KCM - Process Menus, WP during dialog ;11/19/92 08:31 [ 05/08/95 4:17 PM ]
2 ;;8.0;KERNEL;;Jul 10, 1995
3 ;
4RDR ;Setup and prompt using reader (DIR)
5 ;Entry: XQORDX(field) is entire prompt node, XQORDLG(ITM) is previous response
6 N DIR
7 I XQORDX("DOM")="D",'$L(XQORDX("PARM")) S XQORDX("PARM")="::ET"
8 S DIR(0)=XQORDX("DOM")_"A"_$S(XQORDX("MODE")["R":"",1:"O")_"^"_XQORDX("PARM")
9 S DIR("A")=XQORDX("PRMT") S:DIR("A")'?.E1P1" " DIR("A")=DIR("A")_": "
10 S:$L(XQORDX("DFLT")) DIR("B")=XQORDX("DFLT") ;default answer
11 S:$D(XQORDLG(ITM))#2 DIR("B")=XQORDLG(ITM) ;last entered answer
12 S:$L(XQORDX("HELP")) DIR("?")=XQORDX("HELP") ;help prompt
13 D ^DIR
14 Q ;Exit: X is user entry, Y is validated answer (internal value)
15 ;
16WP ;Prompt for word processing
17 ;Entry: .X is entire prompt node, XQORDLG(ITM) is last answer to this prompt
18 N IFN,PRMT,DIC,DLAYGO,DIE,DR,DA,%
19 S PRMT=XQORDX("PRMT") ;boilerplate in $P(X,"^",2)
20 I '$G(XQORDLG(ITM)) DO
21 . I '$D(^XUTL("XQORW",0)) S ^XUTL("XQORW",0)="XQOR WORD PROCESSING^101.11D^" ;if ^XUTL killed
22 . D NOW^%DTC
23 . S X=""""_%_"""",DIC="^XUTL(""XQORW"",",DIC(0)="L",DLAYGO=101.11 D ^DIC ;stuff entry
24 I $G(XQORDLG(ITM)) S Y=XQORDLG(ITM),DIC="^XUTL(""XQORW"","
25 S IFN=+Y,DIE=DIC,DR="1"_$TR(PRMT,";:"," "),DA=IFN D ^DIE
26 S Y=IFN,X=$G(^XUTL("XQORW",IFN,1,+$O(^XUTL("XQORW",IFN,1,0)),0))
27 Q ;Exit: X is first entered line, Y is pointer 101.11 entry
28 ;
29MENU ;Allow menu selections from 101, 19, and similar files (XQORM)
30 ;Entry: XQORDX(field) is prompt node, XQORDLG(ITM) is last answer to this prompt
31 Q ;N XQORM (menus not allowed for now)
32 S XQORM=$P(X,"^",6),XQORM(0)=$P(X,"^",4)_"\",XQORM("A")=$P(X,"^",1)_": "
33 S:'$L(XQORM(0)) XQORM(0)="A"
34 S:$L($P(X,"^",2)) XQORM("B")=$P(X,"^",2) ;default selection
35 S:$D(XQORDLG(ITM,1,"E")) XQORM("B")=XQORDLG(ITM,1,"E") ;last answer
36 S:$L($P(X,"^",5)) XQORM("?")="W !!,"""_$P(X,"^",5)_""",!" ;help prompt
37 D EN^XQORM
38 Q ;Exit: X is user entry, Y is pointer to entry in menu file
Note: See TracBrowser for help on using the repository browser.