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/XUMFR.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1XUMFR ;OIFO-OAK/RAM - pre/post update subroutines;04/15/02 ;10/12/05 12:12
2 ;;8.0;KERNEL;**335,383**;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,ZDTYP
46 ;
47 S SEG="",SEQ=0
48 F S SEG=$O(^TMP("XUMF MFS",$J,"PARAM","SEG",SEG)) Q:SEG="" D
49 .F S SEQ=$O(^TMP("XUMF MFS",$J,"PARAM","SEG",SEG,"SEQ",SEQ)) Q:'SEQ D
50 ..;
51 ..S FLD=$O(^TMP("XUMF MFS",$J,"PARAM","SEG",SEG,"SEQ",SEQ,0))
52 ..;
53 ..I 'FLD D
54 ...S FILE=^TMP("XUMF MFS",$J,"PARAM","SEG",SEG,"SEQ",SEQ,"FILE")
55 ...S IENS=$G(^TMP("XUMF MFS",$J,"PARAM","IENS",SEG,SEQ))
56 ...S FIELD=^TMP("XUMF MFS",$J,"PARAM","SEG",SEG,"SEQ",SEQ,"FIELD")
57 ...S LKUP=$G(^TMP("XUMF MFS",$J,"PARAM","SEG",SEG,"SEQ",SEQ,"LKUP"))
58 ...I LKUP S FIELD=FIELD_":"_LKUP
59 ...S VALUE=$$GET1^DIQ(FILE,IENS,FIELD)
60 ...S ARRAY(SEQ)=$$FIELD^XUMF(FILE,$P(FIELD,":"),"LABEL")_": "_VALUE
61 ..I FLD D
62 ...S ZDTYP=$G(^TMP("XUMF MFS",$J,"PARAM","SEG",SEG,"SEQ",SEQ,FLD))
63 ...S LKUP=$P(ZDTYP,U,2)
64 ...I LKUP S FLD=FLD_":"_LKUP
65 ...S VALUE=$$GET1^DIQ(IFN,IEN_",",FLD)
66 ...S ARRAY(SEQ)=$$FIELD^XUMF(IFN,$P(FLD,":"),"LABEL")_": "_VALUE
67 ;
68 Q
69 ;
70XM(X,XUMFKEY) ; -- MailMan notification
71 ;
72 N GROUP,XMDUZ
73 ;
74 S HLCS=$G(HLCS) S:HLCS="" HLCS="~"
75 S XUMFKEY=" "_$P($G(XUMFKEY),HLCS)
76 ;
77 S GROUP=$$GET1^DIQ(4.001,IEN_",",.06)
78 S:GROUP'="" GROUP="G."_GROUP
79 S X(.1)="HL7 message ID: "_$G(HL("MID")),X(.2)=""
80 ;S X(.3)="PRE UPDATE VALUES:",X(.4)=""
81 S X(99.1)="",X(99.2)="POST UPDATE VALUES:",X(99.3)=""
82 S XMSUB="MFS UPDATE - "_$$FILE^XUMF(IFN,"NAME")_XUMFKEY
83 S XMY("G.XUMF SERVER")="",XMDUZ=.5
84 S:GROUP'="" XMY(GROUP)=""
85 S XMTEXT="X("
86 ;
87 D ^XMD
88 ;
89 Q
90 ;
91MD5 ;MD5 Hash value
92 D EN^XUMF5I(IEN)
93 Q
Note: See TracBrowser for help on using the repository browser.