DG53690I ;SLC/PKR - Init for patch 690. ;02/17/2006
;;5.3;Registration;**690,1015**;Aug 13, 1993;Build 21
;===============================================================
CXREFS ;Create the cross-references.
N DGRESULT,DGXREF,MSG,TEXT
S TEXT=$$FMTE^XLFDT($$NOW^XLFDT,"5Z")_" Creating cross-references."
D BMES^XPDUTL(.TEXT)
;Parameters common to all the service cross-references.
S DGXREF("FILE")=2,DGXREF("TYPE")="MUMPS",DGXREF("ROOT FILE")=2
S DGXREF("USE")="ACTION",DGXREF("EXECUTION")="RECORD",DGXREF("ACTIVITY")="R"
;Cross-reference for LAST
S DGXREF("NAME")="ASERLAST"
S DGXREF("SHORT DESCR")="Index LAST ENTRY and SEPARATION dates"
S DGXREF("DESCR",1)="This cross-reference indexes the LAST ENTRY and SEPARATION dates."
S DGXREF("DESCR",2)="The form of the index is:"
S DGXREF("DESCR",3)=" ^DPT(""ASERVICE"",SEPARATION DATE,ENTRY DATE,DA,""LAST"")"
S DGXREF("DESCR",4)=""
S DGXREF("DESCR",5)="If one of the dates is missing the corresponding subscript is replaced by U_DA."
S DGXREF("SET")="D SSERV^DGSRVICE(.X,.DA,""LAST"")"
S DGXREF("KILL")="D KSERV^DGSRVICE(.X,.DA,""LAST"")"
S DGXREF("WHOLE KILL")="K ^DPT(""ASERVICE"")"
S DGXREF("VAL",1)=.326
S DGXREF("VAL",2)=.327
D CREIXN^DDMOD(.DGXREF,"S",.DGRESULT,"","MSG")
I DGRESULT="" D
. S TEXT="Could not create ASERLAST cross-reference"
. D BMES^XPDUTL(.TEXT)
;Cross-reference for NTL.
K DGRESULT,MSG
S DGXREF("NAME")="ASERNTL"
S DGXREF("SHORT DESCR")="Index NTL ENTRY and SEPARATION dates"
S DGXREF("DESCR",1)="This cross-reference indexes the NTL ENTRY and SEPARATION dates."
S DGXREF("DESCR",2)="The form of the index is:"
S DGXREF("DESCR",3)=" ^DPT(""ASERVICE"",SEPARATION DATE,ENTRY DATE,DA,""NTL"")"
S DGXREF("DESCR",4)=""
S DGXREF("DESCR",5)="If one of the dates is missing the corresponding subscript is replaced by U_DA."
S DGXREF("SET")="D SSERV^DGSRVICE(.X,.DA,""NTL"")"
S DGXREF("KILL")="D KSERV^DGSRVICE(.X,.DA,""NTL"")"
S DGXREF("WHOLE KILL")="K ^DPT(""ASERVICE"")"
S DGXREF("VAL",1)=.3292
S DGXREF("VAL",2)=.3293
D CREIXN^DDMOD(.DGXREF,"S",.DGRESULT,"","MSG")
I DGRESULT="" D
. S TEXT="Could not create ASERNTL cross-reference"
. D BMES^XPDUTL(.TEXT)
;Cross-reference for NNTL.
K DGRESULT,MSG
S DGXREF("NAME")="ASERNNTL"
S DGXREF("SHORT DESCR")="Index NNTL ENTRY and SEPARATION dates"
S DGXREF("DESCR",1)="This cross-reference indexes the NNTL ENTRY and SEPARATION dates."
S DGXREF("DESCR",2)="The form of the index is:"
S DGXREF("DESCR",3)=" ^DPT(""ASERVICE"",SEPARATION DATE,ENTRY DATE,DA,""NNTL"")"
S DGXREF("DESCR",4)=""
S DGXREF("DESCR",5)="If one of the dates is missing the corresponding subscript is replaced by U_DA."
S DGXREF("SET")="D SSERV^DGSRVICE(.X,.DA,""NNTL"")"
S DGXREF("KILL")="D KSERV^DGSRVICE(.X,.DA,""NNTL"")"
S DGXREF("WHOLE KILL")="K ^DPT(""ASERVICE"")"
S DGXREF("VAL",1)=.3297
S DGXREF("VAL",2)=.3298
D CREIXN^DDMOD(.DGXREF,"S",.DGRESULT,"","MSG")
I DGRESULT="" D
. S TEXT="Could not create ASERNNTL cross-reference"
. D BMES^XPDUTL(.TEXT)
;Cross-reference TYPE OF PATIENT
;For test sites
D DELIXN^DDMOD(2,"PTYPE","K","","MSG")
K ^DPT("PTYPE")
K DGRESULT,DGXREF,MSG
S DGXREF("FILE")=2,DGXREF("TYPE")="R",DGXREF("ROOT FILE")=2
S DGXREF("USE")="S",DGXREF("EXECUTION")="FIELD",DGXREF("ACTIVITY")="R"
S DGXREF("NAME")="APTYPE"
S DGXREF("SHORT DESCR")="Index TYPE OF PATIENT"
S DGXREF("SET")="S ^DPT(""APTYPE"",X,DA)="""""
S DGXREF("KILL")="K ^DPT(""APTYPE"",X,DA)"
S DGXREF("WHOLE KILL")="K ^DPT(""APTYPE"")"
S DGXREF("VAL",1)=391
S DGXREF("VAL",1,"SUBSCRIPT")=1
D CREIXN^DDMOD(.DGXREF,"S",.DGRESULT,"","MSG")
I DGRESULT="" D
. S TEXT="Could not create TYPE cross-reference"
. D BMES^XPDUTL(.TEXT)
S TEXT=$$FMTE^XLFDT($$NOW^XLFDT,"5Z")_" Cross-references have been created and indexes populated."
D BMES^XPDUTL(.TEXT)
Q
;
;===============================================================
DXREFS ;Delete the cross-references.
N MSG
D DELIXN^DDMOD(2,"ASERLAST","K","","MSG")
D DELIXN^DDMOD(2,"ASERNTL","K","","MSG")
D DELIXN^DDMOD(2,"ASERNNTL","K","","MSG")
D DELIXN^DDMOD(2,"APTYPE","K","","MSG")
Q
;
;===============================================================
POST ;Post-inits
D CXREFS^DG53690I
Q
;
DG53690I ;SLC/PKR - Init for patch 690. ;02/17/2006
+1 ;;5.3;Registration;**690,1015**;Aug 13, 1993;Build 21
+2 ;===============================================================
CXREFS ;Create the cross-references.
+1 NEW DGRESULT,DGXREF,MSG,TEXT
+2 SET TEXT=$$FMTE^XLFDT($$NOW^XLFDT,"5Z")_" Creating cross-references."
+3 DO BMES^XPDUTL(.TEXT)
+4 ;Parameters common to all the service cross-references.
+5 SET DGXREF("FILE")=2
SET DGXREF("TYPE")="MUMPS"
SET DGXREF("ROOT FILE")=2
+6 SET DGXREF("USE")="ACTION"
SET DGXREF("EXECUTION")="RECORD"
SET DGXREF("ACTIVITY")="R"
+7 ;Cross-reference for LAST
+8 SET DGXREF("NAME")="ASERLAST"
+9 SET DGXREF("SHORT DESCR")="Index LAST ENTRY and SEPARATION dates"
+10 SET DGXREF("DESCR",1)="This cross-reference indexes the LAST ENTRY and SEPARATION dates."
+11 SET DGXREF("DESCR",2)="The form of the index is:"
+12 SET DGXREF("DESCR",3)=" ^DPT(""ASERVICE"",SEPARATION DATE,ENTRY DATE,DA,""LAST"")"
+13 SET DGXREF("DESCR",4)=""
+14 SET DGXREF("DESCR",5)="If one of the dates is missing the corresponding subscript is replaced by U_DA."
+15 SET DGXREF("SET")="D SSERV^DGSRVICE(.X,.DA,""LAST"")"
+16 SET DGXREF("KILL")="D KSERV^DGSRVICE(.X,.DA,""LAST"")"
+17 SET DGXREF("WHOLE KILL")="K ^DPT(""ASERVICE"")"
+18 SET DGXREF("VAL",1)=.326
+19 SET DGXREF("VAL",2)=.327
+20 DO CREIXN^DDMOD(.DGXREF,"S",.DGRESULT,"","MSG")
+21 IF DGRESULT=""
Begin DoDot:1
+22 SET TEXT="Could not create ASERLAST cross-reference"
+23 DO BMES^XPDUTL(.TEXT)
End DoDot:1
+24 ;Cross-reference for NTL.
+25 KILL DGRESULT,MSG
+26 SET DGXREF("NAME")="ASERNTL"
+27 SET DGXREF("SHORT DESCR")="Index NTL ENTRY and SEPARATION dates"
+28 SET DGXREF("DESCR",1)="This cross-reference indexes the NTL ENTRY and SEPARATION dates."
+29 SET DGXREF("DESCR",2)="The form of the index is:"
+30 SET DGXREF("DESCR",3)=" ^DPT(""ASERVICE"",SEPARATION DATE,ENTRY DATE,DA,""NTL"")"
+31 SET DGXREF("DESCR",4)=""
+32 SET DGXREF("DESCR",5)="If one of the dates is missing the corresponding subscript is replaced by U_DA."
+33 SET DGXREF("SET")="D SSERV^DGSRVICE(.X,.DA,""NTL"")"
+34 SET DGXREF("KILL")="D KSERV^DGSRVICE(.X,.DA,""NTL"")"
+35 SET DGXREF("WHOLE KILL")="K ^DPT(""ASERVICE"")"
+36 SET DGXREF("VAL",1)=.3292
+37 SET DGXREF("VAL",2)=.3293
+38 DO CREIXN^DDMOD(.DGXREF,"S",.DGRESULT,"","MSG")
+39 IF DGRESULT=""
Begin DoDot:1
+40 SET TEXT="Could not create ASERNTL cross-reference"
+41 DO BMES^XPDUTL(.TEXT)
End DoDot:1
+42 ;Cross-reference for NNTL.
+43 KILL DGRESULT,MSG
+44 SET DGXREF("NAME")="ASERNNTL"
+45 SET DGXREF("SHORT DESCR")="Index NNTL ENTRY and SEPARATION dates"
+46 SET DGXREF("DESCR",1)="This cross-reference indexes the NNTL ENTRY and SEPARATION dates."
+47 SET DGXREF("DESCR",2)="The form of the index is:"
+48 SET DGXREF("DESCR",3)=" ^DPT(""ASERVICE"",SEPARATION DATE,ENTRY DATE,DA,""NNTL"")"
+49 SET DGXREF("DESCR",4)=""
+50 SET DGXREF("DESCR",5)="If one of the dates is missing the corresponding subscript is replaced by U_DA."
+51 SET DGXREF("SET")="D SSERV^DGSRVICE(.X,.DA,""NNTL"")"
+52 SET DGXREF("KILL")="D KSERV^DGSRVICE(.X,.DA,""NNTL"")"
+53 SET DGXREF("WHOLE KILL")="K ^DPT(""ASERVICE"")"
+54 SET DGXREF("VAL",1)=.3297
+55 SET DGXREF("VAL",2)=.3298
+56 DO CREIXN^DDMOD(.DGXREF,"S",.DGRESULT,"","MSG")
+57 IF DGRESULT=""
Begin DoDot:1
+58 SET TEXT="Could not create ASERNNTL cross-reference"
+59 DO BMES^XPDUTL(.TEXT)
End DoDot:1
+60 ;Cross-reference TYPE OF PATIENT
+61 ;For test sites
+62 DO DELIXN^DDMOD(2,"PTYPE","K","","MSG")
+63 KILL ^DPT("PTYPE")
+64 KILL DGRESULT,DGXREF,MSG
+65 SET DGXREF("FILE")=2
SET DGXREF("TYPE")="R"
SET DGXREF("ROOT FILE")=2
+66 SET DGXREF("USE")="S"
SET DGXREF("EXECUTION")="FIELD"
SET DGXREF("ACTIVITY")="R"
+67 SET DGXREF("NAME")="APTYPE"
+68 SET DGXREF("SHORT DESCR")="Index TYPE OF PATIENT"
+69 SET DGXREF("SET")="S ^DPT(""APTYPE"",X,DA)="""""
+70 SET DGXREF("KILL")="K ^DPT(""APTYPE"",X,DA)"
+71 SET DGXREF("WHOLE KILL")="K ^DPT(""APTYPE"")"
+72 SET DGXREF("VAL",1)=391
+73 SET DGXREF("VAL",1,"SUBSCRIPT")=1
+74 DO CREIXN^DDMOD(.DGXREF,"S",.DGRESULT,"","MSG")
+75 IF DGRESULT=""
Begin DoDot:1
+76 SET TEXT="Could not create TYPE cross-reference"
+77 DO BMES^XPDUTL(.TEXT)
End DoDot:1
+78 SET TEXT=$$FMTE^XLFDT($$NOW^XLFDT,"5Z")_" Cross-references have been created and indexes populated."
+79 DO BMES^XPDUTL(.TEXT)
+80 QUIT
+81 ;
+82 ;===============================================================
DXREFS ;Delete the cross-references.
+1 NEW MSG
+2 DO DELIXN^DDMOD(2,"ASERLAST","K","","MSG")
+3 DO DELIXN^DDMOD(2,"ASERNTL","K","","MSG")
+4 DO DELIXN^DDMOD(2,"ASERNNTL","K","","MSG")
+5 DO DELIXN^DDMOD(2,"APTYPE","K","","MSG")
+6 QUIT
+7 ;
+8 ;===============================================================
POST ;Post-inits
+1 DO CXREFS^DG53690I
+2 QUIT
+3 ;