source: FOIAVistA/trunk/r/INCOME_VERIFICATION_MATCH-IVM/IVMYZ3.m@ 1169

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

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1IVMYZ3 ;ALB/SEK - PURGE INCORRECT IVM PATIENT & TRANSMISSION RECORDS ; 13-JUNE-95
2 ;;Version 2.0 ; INCOME VERIFICATION MATCH ;**3**; 21-OCT-94
3 ;
4EN ; this routine will delete ivm patient (#301.5) and ivm
5 ; transmission log (#301.6) records for incorrect income years of
6 ; -10000 & -910000.
7 ; this routine will also send notification to the IVM Center once
8 ; the facility has installed IVM*2*3 patch.
9 ;
10 S IVMQUIT="" D ENV I '$D(IVMQUIT) W !,"PATCH IVM*2*3 INITIALIZATION ABORTED..." G Q
11 D TYPE Q:'$D(IVMPROD)
12 D PURGE
13 D NOTE
14Q K IVMQUIT,IVMPROD
15 Q
16 ;
17ENV ; make sure required patches are installed
18 N X
19 S X="DGDEP" X ^%ZOSF("TEST") E K IVMQUIT W !?3,*7,"Patch DG*5.3*45 must be installed first!"
20 S X="IVMUM9" X ^%ZOSF("TEST") E K IVMQUIT W !?3,*7,"Patch IVM*2*1 must be installed first!"
21 I '$F($T(+2^DGMTCOU1),54) K IVMQUIT W !?3,*7,"Patch DG*5.3*54 must be installed first!"
22 Q
23 ;
24TYPE ; Ask user if this installation is for a test account or live account.
25 N I
26 S DIR(0)="SM^1:PRODUCTION;0:TEST"
27 S DIR("A")="Enter type of account you are installing in"
28 S DIR("?")="Enter P for production account or T for test account"
29 F I=1:1 S X=$P($T(TEXT+I),";;",2) Q:X="QUIT" S DIR("?",I)=X
30 D ^DIR
31 I Y=""!(Y["^") W:Y="" !!,*7,"User Timed Out, Process Aborted..."
32 S IVMPROD=Y
33 K DIR,DTOUT,DUOUT,DIRUT,DIROUT,X,Y
34 I IVMPROD=""!(IVMPROD["^") K IVMPROD Q
35 Q
36 ;
37 ;
38NOTE ; Send notification to the IVM Center once the facility has installed
39 ; IVM*2*3 patch in production account.
40 ;
41 I 'IVMPROD K IVMPROD Q
42 N DIFROM
43 W !!,"Sending a 'completed installation' notice to the IVM Center... "
44 S XMSUB="IVM*2*3 PATCH INSTALLATION"
45 S XMDUZ="IVM PACKAGE"
46 S XMY("WEATHERLY@IVM.VA.GOV")="",XMY(DUZ)="",XMY(.5)=""
47 S XMTEXT="IVMTEXT("
48 S IVMX=$$SITE^VASITE
49 S IVMTEXT(1)=" Facility: "_$P(IVMX,"^",2)
50 S IVMTEXT(2)=" Station Number: "_$P(IVMX,"^",3)
51 ;
52 D NOW^%DTC S Y=% D DD^%DT
53 S IVMTEXT(3)=" Installed IVM*2*3 patch on: "_Y
54 D ^XMD W "done."
55 K IVMPROD,IVMTEXT,IVMX,XMDUZ,XMSUB,XMTEXT,XMY,%
56 Q
57 ;
58 ;
59PURGE ; do the purge
60 S IVMCTR=0
61 F IVMYR=-10000,-910000 D
62 .S DFN="" F S DFN=$O(^IVM(301.5,"AYR",IVMYR,DFN)) Q:'DFN D
63 ..S IVMDA=0 F S IVMDA=$O(^IVM(301.5,"AYR",IVMYR,DFN,IVMDA)) Q:'IVMDA D S DIK="^IVM(301.5,",DA=IVMDA D ^DIK S IVMCTR=IVMCTR+1
64 ...S IVMTR=0 F S IVMTR=$O(^IVM(301.6,"B",IVMDA,IVMTR)) Q:'IVMTR D
65 ....S DIK="^IVM(301.6,",DA=IVMTR D ^DIK
66 ;
67 W !!," Total number of IVM PATIENT (#301.5) records deleted: "_IVMCTR
68 K DA,DFN,DIK,IVMYR,IVMDA,IVMTR,IVMCTR
69 Q
70 ;
71 ;
72TEXT ; Text for help for production/test question
73 ;;If you are currently installing this IVM patch in a production
74 ;;account, you must answer P. If you are installing in a test account
75 ;;you must answer T.
76 ;;
77 ;;The answer to this question is extremely important as it determines
78 ;;where income data for patients gets transmitted. Test data must not
79 ;;be transmitted to the IVM Center's production account. Production
80 ;;data, likewise, will not be evaluated properly if it is not sent to
81 ;;the IVM Center's production account.
82 ;;
83 ;;Enter '^' to abort this process.
84 ;;
85 ;;QUIT
Note: See TracBrowser for help on using the repository browser.