source: FOIAVistA/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMEXLD.m@ 632

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1PXRMEXLD ;SLC/PJH - Reminder Dialog Exchange Main Routine. ;08/07/2007
2 ;;2.0;CLINICAL REMINDERS;**4,6**;Feb 04, 2005;Build 123
3 ;
4START N PXRMBG,PXRMMODE,VALMBCK,VALMBG,VALMCNT,VALMSG,X,XMZ
5 S X="IORESET"
6 D EN^VALM("PXRM EX LIST DIALOG")
7 ;Rebuild Display
8 D CDISP^PXRMEXLC(PXRMRIEN)
9 Q
10 ;
11ENTRY ; Entry point for List Manager
12 D FIND Q
13 ;
14DETAIL ;Detailed display
15 S PXRMMODE=0 D DISP(PXRMMODE) Q
16 ;
17FIND ;Display findings
18 S PXRMMODE=2 D DISP(PXRMMODE) Q
19 ;
20SUM ;Display dialog summary
21 S PXRMMODE=3 D DISP(PXRMMODE) Q
22 ;
23USE ;Display dialog usage
24 S PXRMMODE=4 D DISP(PXRMMODE) Q
25 ;
26TEXT ;Display dialog text
27 S PXRMMODE=1 D DISP(PXRMMODE) Q
28 ;
29EXIT ;
30 K ^TMP("PXRMEXLD",$J)
31 Q
32 ;
33DISP(VIEW) ;Build the requested view and display it.
34 D BLDDISP^PXRMEXD1(VIEW)
35 ;Change header
36 I VIEW=0 D CHGCAP^VALM("HEADER2","Dialog Details")
37 I VIEW=1 D CHGCAP^VALM("HEADER2","Dialog Text")
38 I VIEW=2 D CHGCAP^VALM("HEADER2","Dialog Findings")
39 I VIEW=3 D CHGCAP^VALM("HEADER2","Dialog Summary")
40 I VIEW=4 D CHGCAP^VALM("HEADER2","Dialog Usage")
41 S VALMCNT=^TMP("PXRMEXLD",$J,"VALMCNT"),VALMBG=1,VALMBCK="R"
42 ;Reset protocol
43 D XQORM
44 Q
45 ;
46HELP ;
47 N ORU,ORUPRMT,XQORM,PXRMTAG
48 S PXRMTAG="DLG"
49 D EN^VALM("PXRM EX DIALOG HELP")
50 Q
51 ;
52HDR ;
53 S VALMHDR(1)="Packed reminder dialog: "
54 S VALMHDR(1)=VALMHDR(1)_$G(^TMP("PXRMEXTMP",$J,"PXRMDNAM"))
55 I $D(^TMP("PXRMEXTMP",$J,"PXRMDNAT")) S VALMHDR(1)=VALMHDR(1)_" [NATIONAL DIALOG]"
56 S VALMHDR("TITLE")=VALMHDR(1)
57 S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
58 Q
59 ;
60PEXIT ;PXRM EXCH DIALOG MENU protocol exit code
61 S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
62 ;Reset after page up/down etc
63 D XQORM
64 Q
65 ;
66VALID(STRING) ;Validate sequence numbers
67 N CNT,FOUND,OK
68 S FOUND=0,OK=1
69 F CNT=1:1 S SEL=$P(STRING,",",CNT) Q:'SEL D
70 .;Invalid selection
71 .I ('SEL)!(SEL>VALMCNT)!('$D(@VALMAR@("SEL",SEL))) D Q
72 ..S OK=0 W $C(7),!,SEL_" is not a valid item number." H 2
73 .S FOUND=1
74 Q:OK&FOUND 1
75 Q 0
76 ;
77XQORM S XQORM("#")=$O(^ORD(101,"B","PXRM EXCH SELECT DIALOG",0))_U_"1:"_VALMCNT
78 S XQORM("A")="Select Action: "
79 Q
80 ;
81XSEL ;PXRM EXCH SELECT DIALOG validation
82 N ALL,CNT,ERR,IEN,IND,PXRMDONE,SELECT,SEL
83 S ALL="",PXRMDONE=0,PXRMBG=$G(VALMBG)
84 ;Invalid selection
85 S SELECT=$P(XQORNOD(0),"=",2) I '$$VALID(SELECT) S VALMBCK="R" Q
86 ;
87 ;Sort the SELECTION into reverse order
88 D ORDER^PXRMEXLC(.SELECT,-1)
89 ;
90 ;Lock the file
91 I '$$LOCK^PXRMEXID S VALMBCK="R" Q
92 ;
93 ;Install dialog component(s)
94 S CNT=0
95 F CNT=1:1 S SEL=$P(SELECT,",",CNT) Q:'SEL D Q:PXRMDONE
96 .D INSCOM^PXRMEXID(SEL,0)
97 ;
98 ;Unlock file
99 D UNLOCK^PXRMEXID
100 ;
101 ;Rebuild Workfile
102 D DISP^PXRMEXLD(PXRMMODE)
103 ;
104 ;Refresh
105 S VALMBCK="R" I $D(PXRMBG) S VALMBG=PXRMBG
106 Q
Note: See TracBrowser for help on using the repository browser.