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

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1DG53657P ;BAJ - Patch DG*5.3*657 Pre-Install Utility Routine ; 10/24/2006
2 ;;5.3;Registration;**657**;AUG 13, 1993;Build 19
3 Q
4 ;
5 ;
6EN N XPDABORT
7 D LKUP(61,"MISSING PHONE NUMBER DATA","C")
8 ;2 - consistency check not there, 3 - consistency check is wrong
9 I ($G(XPDABORT)=2)!($G(XPDABORT)=3) Q ;Find file 38.6 entry
10 D LKUP(87,"SC ELIG BUT NO RD CODES","A")
11 Q:$G(XPDABORT)=3
12 D POSTN ;Modify file 38.6 entry
13 D CREATE ;add the 87 consistency check
14 D COMPILE
15 Q
16 ;
17LKUP(RULE,FIELD01,MODE) ; Update entry in INCONSISTENT DATA ELEMENTS file (#38.6)
18 ;MODE = 'C' change
19 ;MODE = 'A' add
20 N ERR,DA,DIE,DR,X
21 K XPDABORT
22 D BMES^XPDUTL("Checking entry #"_RULE_" in 38.6 file.")
23 S DIE=38.6,DA=$$FIND1^DIC(DIE,"","X",RULE)
24 I 'DA,MODE="C" D Q
25 . S XPDABORT=2
26 . D MES^XPDUTL(" *** Entry not found! ***")
27 . D BMES^XPDUTL(" *** Please contact EVS for assistance ***")
28 . D BMES^XPDUTL(" *** INSTALLATION ABORTED ***")
29 . D BMES^XPDUTL("")
30 . Q
31 S X=""
32 I $G(DA)'="" S X=$G(^DGIN(38.6,DA,0))
33 I X'="",$P(X,"^",1)'=FIELD01 D Q
34 . S XPDABORT=3
35 . D MES^XPDUTL(" *** Field #.01 should be "_FIELD01_"! ***")
36 . D BMES^XPDUTL(" *** Please contact EVS for assistance ***")
37 . D BMES^XPDUTL(" *** INSTALLATION ABORTED ***")
38 . D BMES^XPDUTL("")
39 . Q
40 Q
41POSTN ; Update entry in INCONSISTENT DATA ELEMENTS file (#38.6)
42 N FILE,IENS,FIELD,DGWP,ERRORS,FDA
43 D BMES^XPDUTL("Updating Consistency #61")
44 ;FDA_ROOT(FILE#,"IENS",FIELD#)="VALUE"
45 S FILE=38.6,IENS="61,",FIELD=50
46 S DGWP(1,0)="Inconsistency results if the patient's Employment Status is EMPLOYED FULL"
47 S DGWP(2,0)="TIME, EMPLOYED PART TIME, or SELF EMPLOYED and the PHONE NUMBER [WORK] has"
48 S DGWP(3,0)="not been entered."
49 S FDA(FILE,IENS,FIELD)="DGWP"
50 D FILE^DIE("K","FDA","ERRORS(1)")
51 I $D(ERRORS) D Q
52 . D MES^XPDUTL(" *** Error filing Data Dictionary update! ***")
53 . D BMES^XPDUTL(" *** Please contact EVS for assistance ***")
54 . D BMES^XPDUTL(" *** INSTALLATION ABORTED ***")
55 . D BMES^XPDUTL("")
56 . Q
57 D MES^XPDUTL(" *** Update Complete ***")
58 D BMES^XPDUTL("")
59 Q
60 ;
61CREATE ;Post-Install
62 N MSGROOT,FDAWP,FDAROOT,IENROOT,IEN,X,ERR,LN,LN2
63 S X=$G(^DGIN(38.6,87,0))
64 I $L(X),$P(X,"^",1)'="SC ELIG BUT NO RD CODES" D Q
65 . D BMES^XPDUTL("An entry already exists in file 38.6 for consistency #87.")
66 . D MES^XPDUTL("Cannot add SC ELIG BUT NO RD CODES.")
67 . Q
68 I $L(X),$P(X,"^",1)="SC ELIG BUT NO RD CODES" Q
69 D BMES^XPDUTL("Adding Consistency #87")
70 S IEN="+1,"
71 S FDAROOT(38.6,IEN,.01)="SC ELIG BUT NO RD CODES"
72 S FDAROOT(38.6,IEN,2)="SC ELIGIBILITY BUT NO RATED DISABILITY CODES"
73 S FDAROOT(38.6,IEN,50)="FDAWP"
74 S FDAWP(1,0)="Inconsistency results if the PRIMARY ELIGIBILITY CODE"
75 S FDAWP(2,0)="is a 1 (SERVICE CONNECTED 50% TO 100%) or a 3 (SC LESS THAN 50%)"
76 S FDAWP(3,0)="and no rated disabilities are present."
77 S FDAROOT(38.6,IEN,3)="NO KEY REQUIRED"
78 S FDAROOT(38.6,IEN,5)="CHECK"
79 S IENROOT(1)=87
80 D UPDATE^DIE("E","FDAROOT","IENROOT","MSGROOT")
81 I $D(MSGROOT("DIERR")) D Q
82 . S (ERR,LN2)=0
83 . D ERR
84 . D BMES^XPDUTL(.X)
85 . Q
86 D MES^XPDUTL(" *** CC #87 Added ***")
87 D BMES^XPDUTL("")
88 Q
89ERR F S ERR=+$O(MSGROOT("DIERR",ERR)) Q:'ERR D LN
90 Q
91LN S LN=0
92 F S LN=+$O(MSGROOT("DIERR",ERR,"TEXT",LN)) Q:'LN D
93 . S LN2=LN2+1
94 . S X(LN2)=MSGROOT("DIERR",ERR,"TEXT",LN)
95 . Q
96 Q
97COMPILE ;compile screen 7
98 D BMES^XPDUTL("Re-compiling input template DG LOAD EDIT SCREEN 7 of PATIENT FILE(#2)")
99 N X,Y,DMAX
100 S Y=$O(^DIE("B","DG LOAD EDIT SCREEN 7",""))
101 I Y'="" D
102 . S X=$G(^DIE(Y,"ROU")) I $E(X)="^" S X=$E(X,2,99)
103 . S DMAX=$$ROUSIZE^DILF
104 . D EN^DIEZ
105 . Q
106 D BMES^XPDUTL("Re-compiling input template DVBHINQ UPDATE of PATIENT FILOE(#2)")
107 S Y=$O(^DIE("B","DVBHINQ UPDATE",""))
108 I Y'="" D
109 . S X=$G(^DIE(Y,"ROU")) I $E(X)="^" S X=$E(X,2,99)
110 . S DMAX=$$ROUSIZE^DILF
111 . D EN^DIEZ
112 . Q
113 Q
Note: See TracBrowser for help on using the repository browser.