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/XUMFXR.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1XUMFXR ;ISS/RAM - MFS param pre/post update;04/15/02
2 ;;8.0;KERNEL;**299**;Jul 10, 1995
3 ;
4 Q
5 ;
6NULL ; -- do nothing
7 ;
8 Q
9 ;
10PRE ; -- pre update
11 ;
12 N ARRAY
13 ;
14 K ^TMP("XUMF PRE",$J)
15 ;
16 D DATA(.ARRAY)
17 ;
18 M ^TMP("XUMF PRE",$J)=ARRAY
19 ;
20 Q
21 ;
22POST ; -- post update
23 ;
24 N ARRAY,I,X,FLAG
25 ;
26 D DATA(.ARRAY)
27 ;
28 S (FLAG,I)=0
29 F S I=$O(ARRAY(I)) Q:'I D Q:FLAG
30 .I ARRAY(I)'=^TMP("XUMF PRE",$J,I) S FLAG=1 Q
31 ;
32 I FLAG D
33 .S I=0
34 .F S I=$O(ARRAY(I)) Q:'I D
35 ..S X(I+100)=ARRAY(I) K ARRAY(I)
36 .M X=^TMP("XUMF PRE",$J)
37 .D XM(.X,$G(KEY))
38 ;
39 K ^TMP("XUMF PRE",$J)
40 ;
41 Q
42 ;
43DATA(ARRAY) ; -- array(sequence)=fieldLabel_": "_value
44 ;
45 N SEG,SEQ,FLD,FILE,IENS,FIELD,VALUE,LKUP,IDX
46 ;
47 S SEG="",SEQ=0
48 F S SEQ=$O(^TMP("XUMF MFS",$J,"PARAM","SEQ",SEQ)) Q:'SEQ D
49 .;
50 .S FLD=$O(^TMP("XUMF MFS",$J,"PARAM","SEQ",SEQ,0))
51 .;
52 .I 'FLD D
53 ..S FILE=^TMP("XUMF MFS",$J,"PARAM","SEQ",SEQ,"FILE")
54 ..S IENS=$G(^TMP("XUMF MFS",$J,"PARAM","IENS",SEQ))
55 ..S FIELD=^TMP("XUMF MFS",$J,"PARAM","SEQ",SEQ,"FIELD")
56 ..S LKUP=$G(^TMP("XUMF MFS",$J,"PARAM","SEQ",SEQ,"LKUP"))
57 ..I LKUP S FIELD=FIELD_":"_LKUP
58 ..S VALUE=$$GET1^DIQ(FILE,IENS,FIELD)
59 ..S ARRAY(SEQ)=$$FIELD^XUMF(FILE,$P(FIELD,":"),"LABEL")_": "_VALUE
60 .I FLD D
61 ..S ZDTYP=$G(^TMP("XUMF MFS",$J,"PARAM","SEQ",SEQ,FLD))
62 ..S LKUP=$P(ZDTYP,U,2)
63 ..I LKUP S FLD=FLD_":"_LKUP
64 ..S VALUE=$$GET1^DIQ(IFN,IEN_",",FLD)
65 ..S ARRAY(SEQ)=$$FIELD^XUMF(IFN,$P(FLD,":"),"LABEL")_": "_VALUE
66 ;
67 Q
68 ;
69MFP ; -- get Master File Parameters from server
70 ;
71 N X
72 ;
73 S EXIT=1
74 S IEN=$$FIND1^DIC(1,,"BX",$P(KEY,HLCS))
75 ;
76 D MAIN^XUMF299
77 ;
78 S X(1)="Query sent to MFS to get "_$P(KEY,HLCS)_" parameters"
79 D XM1(.X)
80 ;
81 Q
82 ;
83XM(X,XUMFKEY) ; -- MailMan notification
84 ;
85 N GROUP
86 ;
87 S HLCS=$G(HLCS) S:HLCS="" HLCS="~"
88 S XUMFKEY=" "_$P($G(XUMFKEY),HLCS)
89 ;
90 S GROUP=$$GET1^DIQ(4.001,IEN_",",.06)
91 S:GROUP'="" GROUP="G."_GROUP
92 S X(.1)="HL7 message ID: "_$G(HL("MID")),X(.2)=""
93 S X(.3)="PRE UPDATE VALUES:",X(.4)=""
94 S X(99.1)="",X(99.2)="POST UPDATE VALUES:",X(99.3)=""
95 S XMSUB="XUMF MFS UPDATE - "_$$FILE^XUMF(IFN,"NAME")_XUMFKEY
96 S XMY("G.XUMF SERVER")="",XMDUZ=.5
97 S:GROUP'="" XMY(GROUP)=""
98 S XMTEXT="X("
99 ;
100 D ^XMD
101 ;
102XM1(X) ; -- MailMan notification
103 ;
104 N GROUP
105 ;
106 S GROUP=$$GET1^DIQ(4.001,IEN_",",.06)
107 S:GROUP'="" GROUP="G."_GROUP
108 S X(.1)="HL7 message ID: "_$G(HL("MID")),X(.2)=""
109 S XMSUB="XUMF MFE - "_$$FILE^XUMF(IFN,"NAME")
110 S XMY("G.XUMF SERVER")="",XMDUZ=.5
111 S:GROUP'="" XMY(GROUP)=""
112 S XMTEXT="X("
113 ;
114 D ^XMD
115 ;
116 Q
117 ;
Note: See TracBrowser for help on using the repository browser.