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

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

initial load of WorldVistAEHR

File size: 4.1 KB
Line 
1XUMF4L2 ;OIFO-OAK/RAM - Load IMF ;02/21/02
2 ;;8.0;KERNEL;**217**;Jul 10, 1995
3 ;
4 ; $$PARAM^HLCS2 call supported by IA #3552
5 ;
6LOCAL ; -- status message to site
7 ;
8 I '$$ADD,'$$DEL,'$$MOD Q
9 ;
10 N XMSUB,TEXT,XMDUZ,XMY,XMTEXT,I,ZIN
11 ;
12 S ZIN="NAME^STATION NUMBER^STATUS^FACILITY TYPE^OFFICIAL VA NAME"
13 S ZIN=ZIN_"^INACTIVE FACILITY FLAG^STATE^VISN^PARENT FACILITY"
14 ;
15 S I=0
16 ;
17 S I=I+1,TEXT(I)="A backgroud job just updated your Institution file"
18 S I=I+1,TEXT(I)="with data from the Institution Master File (IMF)"
19 S I=I+1,TEXT(I)="on FORUM."
20 S I=I+1,TEXT(I)=""
21 S I=I+1,TEXT(I)="This job was a special task to insure sites that"
22 S I=I+1,TEXT(I)="have already run the cleanup are up-to-date with"
23 S I=I+1,TEXT(I)="all updates."
24 S I=I+1,TEXT(I)=""
25 S I=I+1,TEXT(I)="These updates were broadcast previously, but your"
26 S I=I+1,TEXT(I)="site may not have received them due to enabling"
27 S I=I+1,TEXT(I)="and/or disabling broadcasting to sites for various"
28 S I=I+1,TEXT(I)="reasons."
29 S I=I+1,TEXT(I)=""
30 S I=I+1,TEXT(I)="This message has three sections (in addition to this"
31 S I=I+1,TEXT(I)="initial text.) The first section lists entries that"
32 S I=I+1,TEXT(I)="have been added to your file. The second section"
33 S I=I+1,TEXT(I)="lists existing entries that have modified. The third"
34 S I=I+1,TEXT(I)="section lists entries that have had their STATUS (#11)"
35 S I=I+1,TEXT(I)="changed from National to Local and their STATION"
36 S I=I+1,TEXT(I)="NUMBER (#99) removed (was never a valid sta #.)"
37 S I=I+1,TEXT(I)=""
38 S I=I+1,TEXT(I)="The lists are in Station Number order and are up-arrow"
39 S I=I+1,TEXT(I)="delimited strings in the HL7 Institution segment"
40 S I=I+1,TEXT(I)="format. The values correspond to the FileMan fields"
41 S I=I+1,TEXT(I)=""
42 S I=I+1,TEXT(I)=ZIN
43 S I=I+1,TEXT(I)=""
44 ;
45 S I=I+1,TEXT(I)="SECTION ONE"
46 S I=I+1,TEXT(I)="The following entries were ADDED:"
47 S I=I+1,TEXT(I)=""
48 I $$ADD=0 S I=I+1,TEXT(I)="None.",I=I+1,TEXT(I)=""
49 I $$ADD D
50 .N STA S STA=""
51 .F S STA=$O(^TMP("XUMF ADD",$J,STA)) Q:STA="" D
52 ..S I=I+1,TEXT(I)=$P(^TMP("XUMF ADD",$J,STA),U,2,10)
53 ;
54 S I=I+1,TEXT(I)=""
55 S I=I+1,TEXT(I)="SECTION TWO"
56 S I=I+1,TEXT(I)="The following entries were MODIFIED (old/new value):"
57 S I=I+1,TEXT(I)=""
58 I $$MOD=0 S I=I+1,TEXT(I)="None.",I=I+1,TEXT(I)=""
59 I $$MOD D
60 .N STA S STA=""
61 .F S STA=$O(^TMP("XUMF MOD",$J,STA)) Q:STA="" D
62 ..S I=I+1,TEXT(I)=^TMP("XUMF MOD",$J,STA,"OLD")
63 ..S I=I+1,TEXT(I)=^TMP("XUMF MOD",$J,STA,"NEW")
64 ..S I=I+1,TEXT(I)=""
65 ;
66 S I=I+1,TEXT(I)=""
67 S I=I+1,TEXT(I)="SECTION THREE"
68 S I=I+1,TEXT(I)="The following STATION NUMBERS were removed:"
69 S I=I+1,TEXT(I)=""
70 I $$DEL=0 S I=I+1,TEXT(I)="None.",I=I+1,TEXT(I)=""
71 I $$DEL D
72 .N STA S STA=""
73 .F S STA=$O(^TMP("XUMF DEL",$J,STA)) Q:STA="" D
74 ..S I=I+1,TEXT(I)=" STA: "_STA_" IEN: "_$O(^TMP("XUMF DEL",$J,STA,0))
75 .S I=I+1,TEXT(I)=""
76 .S I=I+1,TEXT(I)="Note: Just the STATION NUMBER (#99) was removed"
77 .S I=I+1,TEXT(I)="and the STATUS (#11) changed to Local. The entry"
78 .S I=I+1,TEXT(I)="itself was NOT deleted."
79 ;
80 S XMSUB="IFR/cleanup/updates at "_$$SITE
81 S XMDUZ=$S(DUZ:DUZ,1:.5)
82 S XMTEXT="TEXT("
83 S XMY("G.XUMF INSTITUTION")=""
84 S:$P($$PARAM^HLCS2,U,3)'="T" XMY("G.XUMF INSTITUTION@FORUM")=""
85 D ^XMD
86 Q
87 ;
88NVS ; -- status message to NVS
89 ;
90 N XMSUB,TEXT,XMDUZ,XMY,XMTEXT
91 ;
92 S TEXT(1)=$$SITE
93 S TEXT(2)=""
94 S TEXT(3)="Station numbers added: "_$$ADD
95 S TEXT(4)=" deleted: "_$$DEL
96 S TEXT(5)="File entries modified: "_$$MOD
97 ;
98 S XMSUB="IFR/cleanup/status at "_$$SITE
99 S XMDUZ=$S(DUZ:DUZ,1:.5)
100 S XMTEXT="TEXT("
101 S XMY("G.XUMF INSTITUTION")=""
102 S:$P($$PARAM^HLCS2,U,3)'="T" XMY("G.XUMF INSTITUTION@FORUM")=""
103 D ^XMD
104 ;
105 Q
106 ;
107SITE() ; -- facility name and sta # string
108 ;
109 Q $P($G(^DIC(4,+DUZ(2),0)),U)_" Sta#: "_$P($G(^DIC(4,+DUZ(2),99)),U)
110 ;
111ADD() ; -- added sta #
112 ;
113 N STA,CNT
114 S STA="",CNT=0
115 F S STA=$O(^TMP("XUMF ADD",$J,STA)) Q:STA="" S CNT=CNT+1
116 Q CNT
117 ;
118MOD() ; -- modified entries
119 ;
120 N STA,CNT
121 S STA="",CNT=0
122 F S STA=$O(^TMP("XUMF MOD",$J,STA)) Q:STA="" S CNT=CNT+1
123 Q CNT
124 ;
125DEL() ; -- removed sta #
126 ;
127 N STA,CNT
128 S STA="",CNT=0
129 F S STA=$O(^TMP("XUMF DEL",$J,STA)) Q:STA="" S CNT=CNT+1
130 Q CNT
131 ;
Note: See TracBrowser for help on using the repository browser.