source: FOIAVistA/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMEXLR.m@ 1635

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

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1PXRMEXLR ; SLC/PKR/PJH - List Manager routines for existing repository entries. ;07/30/2007
2 ;;2.0;CLINICAL REMINDERS;**6**;Feb 04, 2005;Build 123
3 ;==================================================
4CHF ;Create a host file containing repository entries.
5 N IND,FILE,LENH2,PATH,SUCCESS,TEMP,VALMY
6 ;Get the list to store.
7 D EN^VALM2(XQORNOD(0))
8 ;If there is no list quit.
9 I '$D(VALMY) Q
10 ;Get the host file to use.
11 D CLEAR^VALM1
12 S TEMP=$$GETHFS^PXRMEXHF
13 I TEMP=0 S VALMBCK="R" Q
14 S PATH=$P(TEMP,U,1)
15 S FILE=$P(TEMP,U,2)
16 D CHF^PXRMEXHF(.SUCCESS,.VALMY,PATH,FILE)
17 S VALMHDR(1)="Successfully stored entries"
18 S VALMHDR(2)="Failed to store entries"
19 S LENH2=$L(VALMHDR(2))
20 S IND=""
21 F S IND=$O(SUCCESS(IND)) Q:+IND=0 D
22 . I SUCCESS(IND) S VALMHDR(1)=VALMHDR(1)_" "_IND
23 . E S VALMHDR(2)=VALMHDR(2)_" "_IND
24 I $L(VALMHDR(2))=LENH2 K VALMHDR(2)
25 S VALMBCK="R"
26 Q
27 ;
28 ;==================================================
29CMM ;Create a MailMan message containing packed reminders.
30 N SUCCESS,TEMP,VALMY
31 ;Get the list to store.
32 D EN^VALM2(XQORNOD(0))
33 ;If there is no list quit.
34 I '$D(VALMY) Q
35 ;Get a new message number to store the entries in.
36 D CMM^PXRMEXMM(.SUCCESS,.VALMY)
37 I $D(SUCCESS("XMZ")) S VALMHDR(1)="Successfully stored entries in message "_SUCCESS("XMZ")_"."
38 E S VALMHDR(1)="Failed to store entries"
39 S VALMBCK="R"
40 Q
41 ;
42 ;==================================================
43DELETE ;Get a list of repository entries and delete them.
44 N COUNT,DELLIST,IEN,IND,RELIST,VALMY
45 ;Get the list to delete.
46 D MIENLIST(.DELLIST)
47 S COUNT=+$G(DELLIST("COUNT"))
48 I COUNT=0 Q
49 D DELETE^PXRMEXU1(.DELLIST)
50 ;Rebuild the list for List Manager to display.
51 K ^TMP("PXRMEXLR",$J)
52 D REXL^PXRMLIST("PXRMEXLR")
53 ;
54 S VALMHDR(1)="Deleted "_DELLIST("COUNT")_" Exchange File"
55 I COUNT>1 S VALMHDR(1)=VALMHDR(1)_" entries."
56 I COUNT=1 S VALMHDR(1)=VALMHDR(1)_" entry."
57 I COUNT=0 S VALMHDR(1)="No entries selected."
58 S VALMHDR(2)=" "
59 S VALMBCK="R"
60 Q
61 ;
62 ;==================================================
63EXIT ; Exit code
64 D CLEAN^VALM10
65 D FULL^VALM1
66 S VALMBCK="R"
67 K ^TMP("PXRMEXLR",$J)
68 Q
69 ;
70 ;==================================================
71INSTALL ;Get a list of repository entries and install them.
72 N IND,PXRMRIEN,VALMY
73 D EN^VALM2(XQORNOD(0))
74 ;If there is no list quit.
75 I '$D(VALMY) Q
76 ;PXRMDONE is newed in PXRMEXLM
77 S PXRMDONE=0
78 S IND=""
79 F S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE) D
80 .;Get the repository ien.
81 . S PXRMRIEN=^TMP("PXRMEXLR",$J,"SEL",IND)
82 .;The list template calls INSTALL^PXRMEXLI
83 . D EN^VALM("PXRM EX LIST COMPONENTS")
84 . K ^TMP("PXRMEXLC",$J)
85 Q
86 ;
87 ;==================================================
88HDR ; Header code
89 S VALMHDR(1)=""
90 D CHGCAP^VALM("RNAME","Reminder Name")
91 D CHGCAP^VALM("PNAME","Date Loaded")
92 Q
93 ;
94 ;==================================================
95HELP ; Help code
96 S X="?" D DISP^XQORM1 W !!
97 Q
98 ;
99 ;==================================================
100MIENLIST(LIST) ;Get a list of List Manager repository entries and turn it
101 ;into iens.
102 N COUNT,IEN,VALMY
103 D EN^VALM2(XQORNOD(0))
104 ;If there is no list quit.
105 I '$D(VALMY) Q
106 S COUNT=0
107 S IND=""
108 F S IND=$O(VALMY(IND)) Q:+IND=0 D
109 . S COUNT=COUNT+1
110 . ;S IEN=^TMP("PXRMEXLR",$J,"IDX",IND,IND)
111 . S IEN=^TMP("PXRMEXLR",$J,"SEL",IND)
112 . S LIST(IEN)=""
113 S LIST("COUNT")=COUNT
114 Q
115 ;
116 ;==================================================
117PEXIT ;PXRM EXCH INSTALLATION MENU protocol exit code
118 S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
119 Q
120 ;
Note: See TracBrowser for help on using the repository browser.