source: FOIAVistA/trunk/r/INCOME_VERIFICATION_MATCH-IVM/IVM20P1.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 4.2 KB
Line 
1IVM20P1 ;ALB/CPM - IVM V2.0 POST INIT, SET HL7 PARAMETERS ; 24-JUN-94
2 ;;Version 2.0 ; INCOME VERIFICATION MATCH ;; 21-OCT-94
3 ;
4HL7 ; Set up all HL7 parameters
5 Q:+$G(^DD(301.5,0,"VR"))'<2
6 D HL7713,HL771,HL770
7 K IVMAPP,IVMDIEN,IVMMIEN,IVMPRODL,IVMSEG
8 Q
9 ;
10 ;
11HL7713 ; Add HL7 segments
12 W !!,">>> Adding 'Z' segments to HL7 SEGMENT NAME file (#771.3)..."
13 S IVMFLG=0
14 F IVMI=1:1 S IVMTXT=$P($T(SEG+IVMI),";;",2) Q:IVMTXT="QUIT" D
15 .S X=$P(IVMTXT,"^",1) I $O(^HL(771.3,"B",X,0)) Q
16 .S (DIK,DIC)="^HL(771.3,",DIC(0)="L",DLAYGO=771.3
17 .K DD,DO,DINUM D FILE^DICN S DA=+Y
18 .L +^HL(771.3,DA) S ^HL(771.3,DA,0)=IVMTXT D IX1^DIK L -^HL(771.3,DA)
19 .S IVMFLG=1 W !," >> ",$P(IVMTXT,"^",1)," (",$P(IVMTXT,"^",2),") segment added"
20 I 'IVMFLG W !?3,"All segments already exist...none added"
21HL7713Q K DA,DIC,DIK,DLAYGO,IVMFLG,IVMI,IVMTXT
22 Q
23 ;
24 ;
25HL771 ; Update HL7 DHCP application
26 S (DA,IVMDIEN)=$O(^HL(771,"B","IVM",0))
27 W !!,">>> ",$S('DA:"Adding",1:"Updating")," HL7 DHCP APPLICATION PARAMETER file entry for IVM..."
28 I 'DA D I DA<1 G HL771Q
29 .S DIC="^HL(771,",DIC(0)="L",DLAYGO=771,X="IVM"
30 .K DD,DO D FILE^DICN S (DA,IVMDIEN)=+Y
31 S ^HL(771,DA,0)="IVM^a"
32 S ^HL(771,DA,"EC")="~|\&",^("FS")="^"
33 S ^HL(771,DA,"MSG",0)="^771.06P^3^3"
34 S ^HL(771,DA,"MSG",1,0)=$O(^HL(771.2,"B","ORU",0)),^("R")="ORU^IVMPREC2"
35 S ^HL(771,DA,"MSG",2,0)=$O(^HL(771.2,"B","QRY",0)),^("R")="QRY^IVMPREC"
36 S ^HL(771,DA,"MSG",3,0)=$O(^HL(771.2,"B","ACK",0)),^("R")="ACK^IVMPREC1"
37 S ^HL(771,DA,"SEG",0)="^771.05P^15^15"
38 S ^HL(771,DA,"SEG",1,0)=$$IEN("PID"),^("F")="1,3,5,7,8,11,12,13,14,19"
39 S ^HL(771,DA,"SEG",2,0)=$$IEN("ZCT"),^("F")="1,2,3,4,5,6,7"
40 S ^HL(771,DA,"SEG",3,0)=$$IEN("ZDP"),^("F")="1,2,3,4,5,6,7,8,9"
41 S ^HL(771,DA,"SEG",4,0)=$$IEN("ZEL"),^("F")="1,2,6,7,10,11,13"
42 S ^HL(771,DA,"SEG",5,0)=$$IEN("ZEM"),^("F")="1,2,3"
43 S ^HL(771,DA,"SEG",6,0)=$$IEN("ZGD"),^("F")="1,2,3,4,5,6,7,8"
44 S ^HL(771,DA,"SEG",7,0)=$$IEN("ZIC"),^("F")="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20"
45 S ^HL(771,DA,"SEG",8,0)=$$IEN("ZMT"),^("F")="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21"
46 S ^HL(771,DA,"SEG",9,0)=$$IEN("ZPD"),^("F")="1,8,9,11,12,13"
47 S ^HL(771,DA,"SEG",10,0)=$$IEN("ZTA"),^("F")="1,3,4,5,6,7"
48 S ^HL(771,DA,"SEG",11,0)=$$IEN("ZIO"),^("F")="1,2,3,4"
49 S ^HL(771,DA,"SEG",12,0)=$$IEN("ZIR"),^("F")="1,2,3,4,5,6,7,8,9,10"
50 S ^HL(771,DA,"SEG",13,0)=$$IEN("NTE"),^("F")="1,3"
51 S ^HL(771,DA,"SEG",14,0)=$$IEN("FT1"),^("F")="1,4,6,7,9,11"
52 S ^HL(771,DA,"SEG",15,0)=$$IEN("IN1"),^("F")="1,4,5,7,8,9,12,13,15,16,17,28,36"
53 S ^HL(771,DA,"SEG",16,0)=$$IEN("ZIV"),^("F")="1,2,3,4,5,6,7,8,9,10,11,12"
54 S DIK="^HL(771," D IX1^DIK
55HL771Q K DA,DIC,DIK,DLAYGO,X,Y
56 Q
57 ;
58 ;
59HL770 ; Add HL7 non-DHCP app entry
60 S X=$O(^HL(770,"B","IVM CENTER",0)) I $D(^HL(770,+X,0)) G HL770Q
61 W !!,">>> Adding HL7 NON-DHCP APPLICATION entry for IVM CENTER..."
62 S DIC="^HL(770,",DIC(0)="L",DLAYGO=770,X="IVM CENTER"
63 K DD,DO D FILE^DICN S DA=+Y I DA<1 G HL770Q
64 S ^HL(770,DA,0)="IVM CENTER^"_+$P($$SITE^VASITE,"^",3)_"^724^245^^^1^"_IVMDIEN_"^^"_IVMMIEN_"^^^^P"
65 S DIK=DIC D IX1^DIK
66HL770Q K DA,DIC,DIK,DLAYGO,X,Y
67 Q
68 ;
69 ;
70SEG ; list of segments for HL7 SEGMENT file
71 ;;ZCT^VA Emergency Contact^1
72 ;;ZDP^VA Dependent Information^1
73 ;;ZEL^VA Patient Eligibility^1
74 ;;ZEM^VA Employment Information^1
75 ;;ZGD^VA Guardian^1
76 ;;ZIC^VA Patient Income^1
77 ;;ZIV^VA IVM Message Processing^1
78 ;;ZMT^VA Means Test Information^1
79 ;;ZPD^VA Patient Information^1
80 ;;ZTA^VA Temporary Address^1
81 ;;ZIO^VA Patient Care Statistics^1
82 ;;ZIR^VA Specific Income Information^1
83 ;;QUIT
84 ;
85 ;
86IEN(IVMSEG) ; get ien for segment from hl7 segment file
87 Q $O(^HL(771.3,"B",IVMSEG,0))
88 ;
89 ;
90BULL ; Send notification to the IVM Center once the facility has installed v2.0.
91 Q:+$G(^DD(301.5,0,"VR"))'<2
92 Q:'$G(IVMPROD) ; don't send notice when installing in Test
93 N DIFROM
94 W !!,">>> Sending a 'completed installation' notice to the IVM Center... "
95 S XMSUB="IVM VERSION 2.0 INSTALLATION"
96 S XMDUZ="IVM PACKAGE"
97 S XMY("WEATHERLY@IVM.VA.GOV")="",XMY(DUZ)="",XMY(.5)=""
98 S XMTEXT="IVMTEXT("
99 S IVMX=$$SITE^VASITE
100 S IVMTEXT(1)=" Facility: "_$P(IVMX,"^",2)
101 S IVMTEXT(2)=" Station Number: "_$P(IVMX,"^",3)
102 ;
103 D NOW^%DTC S Y=% D DD^%DT
104 S IVMTEXT(3)=" Installed IVM Version 2.0 on: "_Y
105 D ^XMD
106 K IVMTEXT,IVMX,XMDUZ,XMSUB,XMTEXT,XMY,%
107 Q
Note: See TracBrowser for help on using the repository browser.