source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DG53672D.m@ 1528

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1DG53672D ;ALB/ERC - PATCH INSTALL UTILITIES FOR DG 672 ; 9/21/05 4:32pm
2 ;;5.3;Registration;**672**; Aug 13, 1993
3 ;convert values from Patient file, field .362 (Disability Retirement
4 ;from the Military) and 1010.158 (Disability Discharge on 1010EZ)
5 ;to two new fields, Military Disability Retirement (.3602) and
6 ;Discharge Due to Disability? (.3603)
7 ;
8 ;for field .362 values converted to .3602
9 ; 0 (NO) not converted
10 ; 1 (YES, RECEIVING MILITARY RETIREMENT) converted to 1(yes)
11 ; 2 (YES, RECEIVING MILITARY RETIREMENT IN LIEU OF VA COMPENSATION)
12 ; converted to 1(yes)
13 ; 3 (UNKNOWN) not converted
14 ;for field 1010.158 to .3603
15 ; 0 (NO) to 0
16 ; 1 (YES) to 1
17 ;
18 ;this routine is called from DG53672C
19 ;
20EN(DFN) ;entry from DG53672C
21 N DGD,DGFDA,DGDIS,DGERR,DGLOD,DGRAND
22 D GETS^DIQ(2,DFN_",",".362;1010.158","I","DGD","DGERR")
23 S DGDIS=$G(DGD(2,DFN_",",.362,"I"))
24 S DGLOD=$G(DGD(2,DFN_",",1010.158,"I"))
25 I $G(DGLOD)]"" D
26 . D LOD
27 . S ^XTMP("DG53672C","DG53672D",1010.158,"CNT")=$G(^XTMP("DG53672C","DG53672D",1010.158,"CNT"))+1
28 I $G(DGDIS)=1!($G(DGDIS)=2) D
29 . D DIS
30 . S ^XTMP("DG53672C","DG53672D",.362,"CNT")=$G(^XTMP("DG53672C","DG53672D",.362,"CNT"))+1
31FILE ;
32 D FILE^DIE("K","DGFDA","DGERR")
33 I $G(DGERR)']"" D
34 .I $G(DGDIS)]"" D
35 . . S ^XTMP("DG53672C","DG53672D","DATA",.362,DGDIS)=$G(^XTMP("DG53672C","DG53672D","DATA",".362",DGDIS))+1
36 . I $G(DGLOD)]"" D
37 . . S ^XTMP("DG53672C","DG53672D","DATA",1010.158,DGLOD)=$G(^XTMP("DG53672C","DG53672D","DATA","1010.158",DGLOD))+1
38 Q
39 ;
40DIS ;convert Disability Retirement to new fields
41 S DGFDA(2,DFN_",",.3602)=1
42 I $G(DGFDA(2,DFN_",",.3603))']"" S DGFDA(2,DFN_",",.3603)=1
43 Q
44 ;
45LOD ;Discharge Due to Disability is populated
46 S DGFDA(2,DFN_",",.3603)=DGLOD
47 Q
48 ;
49SNDMSG ; Send Mailman bulletin when process completes
50 N SITE,STATN,SITENM,XMDUZ,XMSUB,XMY,XMTEXT,MSG
51 S SITE=$$SITE^VASITE,STATN=$P($G(SITE),U,3),SITENM=$P($G(SITE),U,2)
52 S:$$GET1^DIQ(869.3,"1,",.03,"I")'="P" STATN=STATN_" [TEST]"
53 S XMDUZ="DISABILITY RETIREMENT DATA CONVERSION",XMSUB=XMDUZ_" - "_STATN
54 S SITE=$$SITE^VASITE,STATN=$P($G(SITE),U,3),SITENM=$P($G(SITE),U,2)
55 S:$$GET1^DIQ(869.3,"1,",.03,"I")'="P" STATN=STATN_" [TEST]"
56 S XMDUZ="DISABILITY RETIREMENT DATA CONVERSION",XMSUB=XMDUZ_" - "_STATN
57 S XMY(DUZ)=""
58 S XMY("CURTIN,EDNA@MNTVMM.FO-ALBANY")=""
59 S XMTEXT="MSG("
60 S MSG(1)="The Disability Retirement Data Conversion has completed successfully."
61 S MSG(2)="Fields .362 (DISABILITY RET. FROM MILITARY?) and 1010.158 (DISABILITY"
62 S MSG(3)="DISCHARGE ON 1010EZ), both in the Patient file, have been converted"
63 S MSG(4)="to fields .3602 (MILITARY DISABILITY RETIREMENT) and .3603 (DISCHARGE DUE"
64 S MSG(5)="TO DISABILITY), according to the following algorithm:"
65 S MSG(6)=" value of 'Yes' in 1010.158 is now 'Yes' in field .3603"
66 S MSG(7)=" value of 'No' in 1010.158 is now 'No' in field .3603"
67 S MSG(8)=""
68 S MSG(9)=" value of 1 or 2 in .362 is now 'Yes' in .3602 and .3603"
69 S MSG(10)=" value of 0 or 3 in .362 was not converted"
70 S MSG(12)=""
71 S MSG(13)="Task: "_$G(^XTMP("DG53672C",0,"TASK"))
72 S MSG(14)="Site Station Number: "_STATN
73 S MSG(15)="Site Name: "_SITENM
74 S MSG(16)=""
75 S MSG(17)="Process started : "_$$FMTE^XLFDT($P($G(^XTMP("DG53672C",0)),U,2))
76 S MSG(18)="Process completed : "_$$FMTE^XLFDT($P($G(^XTMP("DG53672C",0)),"^",4))
77 S MSG(19)=""
78 S MSG(20)="Total Patients processed : "_+$G(^XTMP("DG53672C","TCNT"))
79 S MSG(21)="Total with 'Yes' in 1010.158: "_+$G(^XTMP("DG53672C","DG53672D","DATA","1010.158",1))
80 S MSG(22)="Total with 'No' in 1010.158: "_+$G(^XTMP("DG53672C","DG53672D","DATA","1010.158",0))
81 S MSG(23)="Total with 1 in .362: "_+$G(^XTMP("DG53672C","DG53672D","DATA",".362",1))
82 S MSG(24)="Total with 2 in .362: "_+$G(^XTMP("DG53672C","DG53672D","DATA",".362",2))
83 D ^XMD
84 Q
Note: See TracBrowser for help on using the repository browser.