source: FOIAVistA/trunk/r/INCOME_VERIFICATION_MATCH-IVM/IVMCMD1.m@ 1446

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1IVMCMD1 ;ALB/SEK,KCL - DELETE DCD INCOME TESTS CON'T ; 29-MAY-97
2 ;;2.0;INCOME VERIFICATION MATCH;**17**;21-OCT-94
3 ;
4 ;
5 ;
6EN ;This entry point is called from the routine (IVMCMD) and
7 ;contains calls that are responsible for completing the
8 ;deletion of an income test.
9 ;
10 ; Delete record from Annual Means Test (#408.31) file
11 D DEL31(IVMMTIEN)
12 S IVMDONE=1
13 ;
14 ; Open case record in the IVM Patient (#301.5) file
15 D OPEN(DFN,IVMDOT)
16 ;
17 ; Send 'delete' bulletin/notification to local mail group
18 D BULL
19 ;
20 ; Call means test event driver
21 D EVNT
22 ;
23 ; Call DGMTR if deleted means test
24 D:IVMTOT=1 EN^DGMTR
25 ;
26 ; Cleanup variables
27 D CLEAN
28 ;
29ENQ Q
30 ;
31 ;
32DEL31(IVMDIEN) ; Delete record from Annual Means Test (#408.31) file.
33 ;
34 ; Input(s):
35 ; IVMDIEN - as IEN of the Annual Means Test (#408.31) file
36 ;
37 ; Output(s): None
38 ;
39 N DA,DIK
40 S DA=IVMDIEN,DIK="^DGMT(408.31,"
41 D ^DIK
42 Q
43 ;
44 ;
45OPEN(IVMDFN,IVMOPNDT) ; Open IVM Patient (#301.5) file case record
46 ;
47 ; Input(s):
48 ; IVMDFN - as pointer to patient in Patient (#2) file
49 ; IVMOPNDT - as date of income test
50 ;
51 ; Output(s): None
52 ;
53 N DA,DR,DIE
54 S DA=$O(^IVM(301.5,"APT",+IVMDFN,+$$LYR^DGMTSCU1(IVMOPNDT),0))
55 I $G(^IVM(301.5,+DA,0))']"" G OPENQ
56 S DR=".04////0",DIE="^IVM(301.5,"
57 D ^DIE
58 K ^IVM(301.5,+DA,1)
59OPENQ Q
60 ;
61 ;
62BULL ; Build/Transmit mail msg to IVM mail group notifying
63 ; local site that a Means Test or Copay Test was deleted.
64 ;
65 ; Input(s):
66 ; DFN - as pointer to patient in Patient (#2) file
67 ; IVMDOT - as date of test
68 ; IVMTOT - as type of test
69 ;
70 ; Output(s): None
71 ;
72 S IVMPAT=$$PT^IVMUFNC4(DFN)
73 S XMSUB="DCD - Income Test Deletion for "_$P($P(IVMPAT,"^"),",")_" ("_$P(IVMPAT,"^",3)_")"
74 S IVMTEXT(1)="A deletion request has been received from the Health Eligibility Center."
75 S IVMTEXT(2)="A "_$P($G(^DG(408.33,+IVMTOT,0)),"^")_" was transmitted in error and has now"
76 S IVMTEXT(3)="been deleted for the following patient:"
77 S IVMTEXT(4)=" "
78 S IVMTEXT(5)=" Patient Name: "_$P(IVMPAT,"^")
79 S IVMTEXT(6)=" ID: "_$P(IVMPAT,"^",2)
80 S IVMTEXT(7)=" Type of Test: "_$P($G(^DG(408.33,+IVMTOT,0)),"^")
81 S Y=IVMDOT X ^DD("DD")
82 S IVMTEXT(8)=" Date of Test: "_Y
83 S IVMTEXT(9)=" "
84 ;
85 ; notify mail group
86 D MAIL^IVMUFNC("DGMT MT/CT UPLOAD ALERTS")
87 Q
88 ;
89 ;
90EVNT ; Call means test event driver
91 S DGMTYPT=IVMTOT D QUE^DGMTR
92 Q
93 ;
94 ;
95CLEAN ; Cleanup variables used for deletion.
96 K DA,DFN,DGINC,DGINR,DGMTA,DGMTACT,DGMTI,DGMTP
97 K DGMTYPT,DIE,DIK,DR,IVM12,IVM121,IVM13,IVM41,IVM411
98 K IVMAR1,IVMDEP,IVMFILE,IVMNOD,IVMOLD
99 K IVMPAT,IVMTEXT,IVMVAMCA,XMSUB,Y
100 Q
Note: See TracBrowser for help on using the repository browser.