DG53470P ;ALB/EW;PRE/POST INIT FOR PATCH 470;8/19/2002
;;5.3;Registration;**470**;Aug 13, 1993
;
PRE ;Pre-Install
;
I $D(^DGIN(38.6,61,0)) D H 2
. D BMES^XPDUTL("Internal entry number 61 already exist in file 38.6")
. S XPDABORT=2
I $D(^DGIN(38.6,62,0)) D H 2
. D BMES^XPDUTL("Internal entry number 62 already exist in file 38.6")
. S XPDABORT=2
Q
POST ;Post-Install
F I=61,62 D
.N MSGROOT,FDAWP,FDAROOT,IENROOT,IEN,X
.D BMES^XPDUTL("Creating definition for INCONSISTENT DATA ELEMENT #"_I)
.S IEN="+1,"
.I I=61 D ;Missing Phone Number
..S FDAROOT(38.6,IEN,.01)="MISSING PHONE NUMBER DATA"
..S FDAROOT(38.6,IEN,2)="PHONE NUMBER INFORMATION INCOMPLETE"
..S FDAROOT(38.6,IEN,50)="FDAWP"
..S FDAWP(1,0)="Inconsistency results if the Patient's Residence Phone number and Work"
..S FDAWP(2,0)="Phone number have not been entered."
.I I=62 D ;Emergency Contact
..S FDAROOT(38.6,IEN,.01)="EMERGENCY CONTACT NAME MISSING"
..S FDAROOT(38.6,IEN,2)="EMERGENCY CONTACT NAME MISSING"
..S FDAROOT(38.6,IEN,50)="FDAWP"
..S FDAWP(1,0)="Inconsistency results if the emergency contact name is not entered."
.S FDAROOT(38.6,IEN,3)="NO KEY REQUIRED"
.S FDAROOT(38.6,IEN,4)="NO"
.S FDAROOT(38.6,IEN,5)="CHECK"
.S IENROOT(1)=I
.D UPDATE^DIE("E","FDAROOT","IENROOT","MSGROOT")
.I $D(MSGROOT("DIERR")) D
..N ERR,LN,LN2
..S (ERR,LN2)=0
..F S ERR=+$O(MSGROOT("DIERR",ERR)) Q:'ERR D
...S LN=0
...F S LN=+$O(MSGROOT("DIERR",ERR,"TEXT",LN)) Q:'LN D
....S LN2=LN2+1
....S X(LN2)=MSGROOT("DIERR",ERR,"TEXT",LN)
..D BMES^XPDUTL(.X)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG53470P 1592 printed Nov 22, 2024@17:47:34 Page 2
DG53470P ;ALB/EW;PRE/POST INIT FOR PATCH 470;8/19/2002
+1 ;;5.3;Registration;**470**;Aug 13, 1993
+2 ;
PRE ;Pre-Install
+1 ;
+2 IF $DATA(^DGIN(38.6,61,0))
Begin DoDot:1
+3 DO BMES^XPDUTL("Internal entry number 61 already exist in file 38.6")
+4 SET XPDABORT=2
End DoDot:1
HANG 2
+5 IF $DATA(^DGIN(38.6,62,0))
Begin DoDot:1
+6 DO BMES^XPDUTL("Internal entry number 62 already exist in file 38.6")
+7 SET XPDABORT=2
End DoDot:1
HANG 2
+8 QUIT
POST ;Post-Install
+1 FOR I=61,62
Begin DoDot:1
+2 NEW MSGROOT,FDAWP,FDAROOT,IENROOT,IEN,X
+3 DO BMES^XPDUTL("Creating definition for INCONSISTENT DATA ELEMENT #"_I)
+4 SET IEN="+1,"
+5 ;Missing Phone Number
IF I=61
Begin DoDot:2
+6 SET FDAROOT(38.6,IEN,.01)="MISSING PHONE NUMBER DATA"
+7 SET FDAROOT(38.6,IEN,2)="PHONE NUMBER INFORMATION INCOMPLETE"
+8 SET FDAROOT(38.6,IEN,50)="FDAWP"
+9 SET FDAWP(1,0)="Inconsistency results if the Patient's Residence Phone number and Work"
+10 SET FDAWP(2,0)="Phone number have not been entered."
End DoDot:2
+11 ;Emergency Contact
IF I=62
Begin DoDot:2
+12 SET FDAROOT(38.6,IEN,.01)="EMERGENCY CONTACT NAME MISSING"
+13 SET FDAROOT(38.6,IEN,2)="EMERGENCY CONTACT NAME MISSING"
+14 SET FDAROOT(38.6,IEN,50)="FDAWP"
+15 SET FDAWP(1,0)="Inconsistency results if the emergency contact name is not entered."
End DoDot:2
+16 SET FDAROOT(38.6,IEN,3)="NO KEY REQUIRED"
+17 SET FDAROOT(38.6,IEN,4)="NO"
+18 SET FDAROOT(38.6,IEN,5)="CHECK"
+19 SET IENROOT(1)=I
+20 DO UPDATE^DIE("E","FDAROOT","IENROOT","MSGROOT")
+21 IF $DATA(MSGROOT("DIERR"))
Begin DoDot:2
+22 NEW ERR,LN,LN2
+23 SET (ERR,LN2)=0
+24 FOR
SET ERR=+$ORDER(MSGROOT("DIERR",ERR))
if 'ERR
QUIT
Begin DoDot:3
+25 SET LN=0
+26 FOR
SET LN=+$ORDER(MSGROOT("DIERR",ERR,"TEXT",LN))
if 'LN
QUIT
Begin DoDot:4
+27 SET LN2=LN2+1
+28 SET X(LN2)=MSGROOT("DIERR",ERR,"TEXT",LN)
End DoDot:4
End DoDot:3
+29 DO BMES^XPDUTL(.X)
End DoDot:2
End DoDot:1
+30 QUIT