source: FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUMFP512.m@ 1655

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

initial load of FOIAVistA 6/30/08 version

File size: 4.4 KB
Line 
1XUMFP512 ;ALB/BRM - Master File Param POSTAL CODE ; 10/17/02 2:36pm
2 ;;8.0;KERNEL;**246**;Jul 10, 1995
3 ;
4 ;
5 ; This routine sets up the parameters required by the POSTAL CODE
6 ; (#5.12) file for the Master File server mechanism.
7 ;
8 ; ** This routine is not a supported interface -- use XUMFP **
9 ;
10 ; See XUMFP for parameter list documentation
11 ;
12 N PKV,PROTOCOL,HLFS,HLCS,RT,RF
13 ;
14 S PARAM("PRE")="PRE^XUMFP512"
15 S PARAM("POST")="POST^XUMFP512"
16 S TYPE=0
17 ;
18 I $O(HL(""))="" D
19 .S:UPDATE PROTOCOL=$O(^ORD(101,"B","XUMF MFN",0))
20 .S:QUERY PROTOCOL=$O(^ORD(101,"B","XUMF MFQ",0))
21 .S:'PROTOCOL ERROR="1^invalid protocol" Q:ERROR
22 .S ^TMP("XUMF MFS",$J,"PARAM","PROTOCOL")=PROTOCOL
23 .D INIT^HLFNC2(PROTOCOL,.HL)
24 ;
25 I $O(HL(""))="" S ERROR="1^"_$P(HL,U,2) Q
26 S HLFS=HL("FS"),HLCS=$E(HL("ECH"))
27 ;
28 I QUERY D QRD
29 ;
30 ; MFI -- Master File Identification Segment
31 S ^TMP("XUMF MFS",$J,"PARAM","MFI")="5P12" ;Master File Identifier
32 S ^TMP("XUMF MFS",$J,"PARAM","MFAI")="" ;Application Identifier
33 S ^TMP("XUMF MFS",$J,"PARAM","FLEC")="UPD" ;File-Level Event Code
34 S ^TMP("XUMF MFS",$J,"PARAM","ENDT")="" ;Entered Date/Time
35 S ^TMP("XUMF MFS",$J,"PARAM","MFIEDT")="" ;Effective Date/Time
36 S ^TMP("XUMF MFS",$J,"PARAM","RLC")="NE" ;Response Level Code
37 ;
38 ; MFE -- Master File Entry
39 I $G(^TMP("XUMF MFS",$J,"PARAM","RLEC"))="" D ;Record-Level Event Code
40 .S ^TMP("XUMF MFS",$J,"PARAM","RLEC")="UPD"
41 S ^TMP("XUMF MFS",$J,"PARAM","MFNCID")="" ;MFN Control ID
42 I $G(^TMP("XUMF MFS",$J,"PARAM","MFEEDT"))="" D ;Effective Date/Time
43 .S ^TMP("XUMF MFS",$J,"PARAM","MFEEDT")=$$HLDATE^HLFNC($$NOW^XLFDT)
44 ;
45SEG ; -- LOC segment used for Postal Code File updates
46 ;
47 I IEN D
48 .S PKV=$P($G(^XIP(5.12,+IEN,0)),U)
49 .S ^TMP("XUMF MFS",$J,"PARAM","PKV")=PKV ; Primary Key Value
50 I NEW D
51 .S PKV="NEW"
52 .S ^TMP("XUMF MFS",$J,"PARAM","PKV")=PKV ; Primary Key Value
53 ;
54 ; LOC -- Location Identification Segment sequence
55 S ^TMP("XUMF MFS",$J,"PARAM","SEGMENT")="LOC"
56 ; primary key value
57 S ^TMP("XUMF MFS",$J,"PARAM","SEG","LOC","SEQ",1,.01)="PL"
58 ; location address (contains components utilizing XAD)
59 ; the components are recognized by decimal SEQ values
60 S ^TMP("XUMF MFS",$J,"PARAM","SEG","LOC","SEQ",5.3,1)="ST" ;city
61 S ^TMP("XUMF MFS",$J,"PARAM","SEG","LOC","SEQ",5.4,3)="ZST" ;state
62 S ^TMP("XUMF MFS",$J,"PARAM","SEG","LOC","SEQ",5.5,.01)="ST" ;p code
63 S ^TMP("XUMF MFS",$J,"PARAM","SEG","LOC","SEQ",5.9,2)="ST" ;county
64 S ^TMP("XUMF MFS",$J,"PARAM","SEG","LOC","SEQ",5.12,"HLSCS",2,4)="DT" ;inactive date
65 ;
66 Q:'GROUP
67 Q:$G(HL("MTN"))="MFR"
68 ;
69GROUP ; -- query group
70 ;
71 S IEN=0
72 F S IEN=$O(^TMP("XUMF MFS",$J,"PARAM","IENS",IEN)) Q:'IEN D
73 .S PKV=$P(^XIP(5.12,IEN,0),U)
74 .S ^TMP("XUMF MFS",$J,"PARAM",IEN,"PKV")=PKV
75 ;
76 Q
77 ;
78QRD ; -- query definition segment
79 ;
80 ;Query Date/Time
81 I '$D(^TMP("XUMF MFS",$J,"PARAM","QDT")) D
82 .S ^TMP("XUMF MFS",$J,"PARAM","QDT")=$$HLDATE^HLFNC($$NOW^XLFDT)
83 ;
84 ;Query Format Code
85 I '$D(^TMP("XUMF MFS",$J,"PARAM","QFC")) D
86 .S ^TMP("XUMF MFS",$J,"PARAM","QFC")="R"
87 ;
88 ;Query Priority
89 I '$D(^TMP("XUMF MFS",$J,"PARAM","QP")) D
90 .S ^TMP("XUMF MFS",$J,"PARAM","QP")="I"
91 ;
92 ;Query ID
93 I '$D(^TMP("XUMF MFS",$J,"PARAM","QID")) D
94 .S ^TMP("XUMF MFS",$J,"PARAM","QID")="5P12 "_$S(ARRAY:"ARRAY",1:"FILE")
95 ;
96 ;Deferred Response Type (optional)
97 I '$D(^TMP("XUMF MFS",$J,"PARAM","DRT")) D
98 .S ^TMP("XUMF MFS",$J,"PARAM","DRT")=""
99 ;
100 ;Deferred Response Date/Time (optional)
101 I '$D(^TMP("XUMF MFS",$J,"PARAM","DRDT")) D
102 .S ^TMP("XUMF MFS",$J,"PARAM","DRDT")=""
103 ;
104 ;Quantity Limited Request
105 I '$D(^TMP("XUMF MFS",$J,"PARAM","QLR")) D
106 .S ^TMP("XUMF MFS",$J,"PARAM","QLR")="RD"_HLCS_999
107 ;
108 ;Who Subject Filter - sta#, D x-ref, assigning facility
109 I '$D(^TMP("XUMF MFS",$J,"PARAM","WHO")) D
110 .N X S X=$S(ALL:"ALL",IEN:$P($G(^XIP(5.12,+IEN,0)),U),1:"IEN ARRAY")
111 .S $P(X,HLCS,9,10)="B"_HLCS_"VA"
112 .S ^TMP("XUMF MFS",$J,"PARAM","WHO")=X
113 ;
114 ;What Subject Filter
115 I '$D(^TMP("XUMF MFS",$J,"PARAM","WHAT")) D
116 .S ^TMP("XUMF MFS",$J,"PARAM","WHAT")="5.12"_HLCS_"IFN"_HLCS_"VA FM"
117 ;
118 ;What Department Data Code
119 I '$D(^TMP("XUMF MFS",$J,"PARAM","WDDC")) D
120 .N X S X="INFRASTRUCTURE"_HLCS_"INFORMATION INFRASTRUCTURE"
121 .S X=X_HLCS_"VA TS"
122 .S ^TMP("XUMF MFS",$J,"PARAM","WDDC")=X
123 ;
124 ;What Data Code Value Qual (optional)
125 I '$D(^TMP("XUMF MFS",$J,"PARAM","WDCVQ")) D
126 .S ^TMP("XUMF MFS",$J,"PARAM","WDCVQ")=""
127 ;
128 ;Query Results Level (optional)
129 I '$D(^TMP("XUMF MFS",$J,"PARAM","QRL")) D
130 .S ^TMP("XUMF MFS",$J,"PARAM","QRL")=""
131 ;
132 Q
133 ;
134PRE ; -- pre-update record
135 ;
136 Q
137 ;
138POST ; -- post-update record
139 ;
140 Q
141 ;
Note: See TracBrowser for help on using the repository browser.