DG531020P ;ISP/RFR - PATCH 1020 POST-INIT;Sep 21, 2020@15:56
;;5.3;Registration;**1020**;Aug 13, 1993;Build 11
;REMOVE PATCH 932 INDICES
PRE ;PRE-INIT ACTIONS
D BMES^XPDUTL(" Removing unnecessary indices...")
N INDICES,INSTALLED,INSTALLS,INDEXNUM,NAME,INDEX,NUMBER,FILE
S INDICES(1,"ADRDPD")="",INDICES(1,"ADRDPD",45)=""
S INDICES(2,"ADRDPD86")="",INDICES(2,"ADRDPD86",45)=""
S INDICES(3,"ADRDSD")=24,INDICES(3,"ADRDSD",45)=""
S INDICES(4,"ADRDD")=25,INDICES(4,"ADRDD",45.02)=""
S INDICES(5,"ADRDSPDX")="",INDICES(5,"ADRDSPDX",45.06)=""
S INDICES(6,"ADRDSPD")="",INDICES(6,"ADRDSPD",46)=""
S INDICES(7,"ADRDSD")=7,INDICES(7,"ADRDSD",46)=""
S INSTALLED=$$INSTALDT^XPDUTL("DG*5.3*1020",.INSTALLS)
F INDEXNUM=1:1:7 S NAME="" F S NAME=$O(INDICES(INDEXNUM,NAME)) Q:NAME="" D
.S FILE=$O(INDICES(INDEXNUM,NAME,0))
.I INDICES(INDEXNUM,NAME)="" D DELETE(FILE,NAME) Q
.F NUMBER=1:1:INDICES(INDEXNUM,NAME) D
..S INDEX=NAME_$S(NUMBER<10:"0",1:"")_NUMBER
..D DELETE(FILE,INDEX)
D BMES^XPDUTL(" DONE")
N MESSAGE
I $$LKOPT^XPDMENU("DG PTF ICD CODE NOTIFIER")>0 D
.D BMES^XPDUTL(" Renaming option DG PTF ICD CODE NOTIFIER...")
.D RENAME^XPDMENU("DG PTF ICD CODE NOTIFIER","DG EVENT NOTIFIER")
.S MESSAGE(1)=" New name: DG EVENT NOTIFIER"
.S MESSAGE(2)=" DONE"
.D MES^XPDUTL(.MESSAGE)
.K MESSAGE
Q
DELETE(FILE,INDEX) ;DELETE THE SPECIFIED INDEX
N ERROR,MESSAGE
D BMES^XPDUTL(" INDEX "_INDEX_" IN FILE #"_FILE_":")
D DELIXN^DDMOD(FILE,INDEX,"W",,"ERROR")
I $D(ERROR) D
.I $G(ERROR("DIERR",1))=202,INSTALLED>0 S MESSAGE(1)=" Previously removed"
.E D MSG^DIALOG("A",.MESSAGE,,3,"ERROR")
I '$D(MESSAGE) S MESSAGE(1)=" Successfully removed"
D MES^XPDUTL(.MESSAGE)
Q
POST ;POST-INIT ACTIONS
N INDEX,FILENUMS
S FILENUMS("AICN")="PTF FILE (#45)"
S FILENUMS("AICNS")="CPT RECORD DATE/TIME SUB-FILE (#45.06) IN THE PTF FILE (#45)"
S FILENUMS("AICNM")="501 SUB-FILE (#45.02) IN THE PTF FILE (#45)"
S FILENUMS("AICNC")="INPATIENT CPT CODE FILE (#46)"
S FILENUMS("AC")="SCHEDULED ADMISSION FILE (#41.1)"
D BMES^XPDUTL(" Creating new-style indexes...")
F INDEX="AICN","AICNS","AICNM","AICNC","AC" D
.D MES^XPDUTL(" "_INDEX_" IN "_FILENUMS(INDEX)_":"),@INDEX
N X,Y,DMAX,MESSAGE,OUTPUT,LINE
S Y=$$FIND1^DIC(.402,"","X","DGSCHADMIT")
I +Y=0 D
.S MESSAGE(1)=" ERROR! Could not find the input template."
.I Y=0 S MESSAGE(2)=" The template does not exist." Q
.D MSG^DIALOG("AE",.OUTPUT,75)
.S LINE=0 F S LINE=$O(OUTPUT(LINE)) Q:'+LINE S MESSAGE(LINE+1)=OUTPUT(LINE)
I +Y'=0 S DMAX=$$ROUSIZE^DILF,X="DGSATX" D EN^DIEZ S MESSAGE(1)=" DONE"
D MES^XPDUTL(.MESSAGE)
Q
AICN ;CREATE AICN CROSS-REFERENCE IN PTF FILE (#45)
N DGXR,DGRES,DGOUT
S DGXR("FILE")=45
S DGXR("NAME")="AICN"
S DGXR("TYPE")="MU"
S DGXR("USE")="A"
S DGXR("EXECUTION")="R"
S DGXR("SHORT DESCR")="Notify packages of ICD diagnosis code change."
S DGXR("DESCR",1)="This cross-reference will notify subscribing packages via protocol DG PTF "
S DGXR("DESCR",2)="ICD DIAGNOSIS NOTIFIER when an ICD diagnosis code is added, edited or "
S DGXR("DESCR",3)="removed."
S DGXR("SET")="D NOTIFY^DGPTDD(.X1,.X2,.DA,45,""DISCHARGE"",""SET"")"
S DGXR("KILL")="D NOTIFY^DGPTDD(.X1,.X2,.DA,45,""DISCHARGE"",""KILL"")"
S DGXR("VAL",1)=.01
S DGXR("VAL",1,"COLLATION")="F"
S DGXR("VAL",2)=11
S DGXR("VAL",2,"COLLATION")="F"
S DGXR("VAL",3)=79
S DGXR("VAL",3,"COLLATION")="F"
S DGXR("VAL",4)=79.16
S DGXR("VAL",4,"COLLATION")="F"
S DGXR("VAL",5)=79.17
S DGXR("VAL",5,"COLLATION")="F"
S DGXR("VAL",6)=79.18
S DGXR("VAL",6,"COLLATION")="F"
S DGXR("VAL",7)=79.19
S DGXR("VAL",7,"COLLATION")="F"
S DGXR("VAL",8)=79.201
S DGXR("VAL",8,"COLLATION")="F"
S DGXR("VAL",9)=79.21
S DGXR("VAL",9,"COLLATION")="F"
S DGXR("VAL",10)=79.22
S DGXR("VAL",10,"COLLATION")="F"
S DGXR("VAL",11)=79.23
S DGXR("VAL",11,"COLLATION")="F"
S DGXR("VAL",12)=79.24
S DGXR("VAL",12,"COLLATION")="F"
S DGXR("VAL",13)=79.241
S DGXR("VAL",13,"COLLATION")="F"
S DGXR("VAL",14)=79.242
S DGXR("VAL",14,"COLLATION")="F"
S DGXR("VAL",15)=79.243
S DGXR("VAL",15,"COLLATION")="F"
S DGXR("VAL",16)=79.244
S DGXR("VAL",16,"COLLATION")="F"
S DGXR("VAL",17)=79.245
S DGXR("VAL",17,"COLLATION")="F"
S DGXR("VAL",18)=79.246
S DGXR("VAL",18,"COLLATION")="F"
S DGXR("VAL",19)=79.247
S DGXR("VAL",19,"COLLATION")="F"
S DGXR("VAL",20)=79.248
S DGXR("VAL",20,"COLLATION")="F"
S DGXR("VAL",21)=79.249
S DGXR("VAL",21,"COLLATION")="F"
S DGXR("VAL",22)=79.2491
S DGXR("VAL",22,"COLLATION")="F"
S DGXR("VAL",23)=79.24911
S DGXR("VAL",23,"COLLATION")="F"
S DGXR("VAL",24)=79.24912
S DGXR("VAL",24,"COLLATION")="F"
S DGXR("VAL",25)=79.24913
S DGXR("VAL",25,"COLLATION")="F"
S DGXR("VAL",26)=79.24914
S DGXR("VAL",26,"COLLATION")="F"
S DGXR("VAL",27)=79.24915
S DGXR("VAL",27,"COLLATION")="F"
S DGXR("VAL",28)=80
S DGXR("VAL",28,"COLLATION")="F"
D CREIXN^DDMOD(.DGXR,"W",.DGRES,"DGOUT"),CHECK(.DGRES)
Q
AICNS ;CREATE AICNS CROSS-REFERENCE IN PTF FILE (#45)
N DGXR,DGRES,DGOUT
S DGXR("FILE")=45.06
S DGXR("NAME")="AICNS"
S DGXR("TYPE")="MU"
S DGXR("USE")="A"
S DGXR("EXECUTION")="F"
S DGXR("SHORT DESCR")="Notify packages of ICD diagnosis code change."
S DGXR("DESCR",1)="This cross-reference will notify subscribing packages via protocol DG PTF "
S DGXR("DESCR",2)="ICD DIAGNOSIS NOTIFIER when an ICD diagnosis code is added, edited or "
S DGXR("DESCR",3)="removed."
S DGXR("SET")="D NOTIFY^DGPTDD(.X1,.X2,.DA,45,""SERVICE"",""SET"")"
S DGXR("KILL")="D NOTIFY^DGPTDD(.X1,.X2,.DA,45,""SERVICE"",""KILL"")"
S DGXR("VAL",1)=.01
S DGXR("VAL",1,"COLLATION")="F"
S DGXR("VAL",2)=.04
S DGXR("VAL",2,"COLLATION")="F"
S DGXR("VAL",3)=.09
S DGXR("VAL",3,"COLLATION")="F"
D CREIXN^DDMOD(.DGXR,"W",.DGRES,"DGOUT"),CHECK(.DGRES)
Q
AICNM ;CREATE AICNM CROSS-REFERENCE IN PTF FILE (#45)
N DGXR,DGRES,DGOUT
S DGXR("FILE")=45.02
S DGXR("NAME")="AICNM"
S DGXR("TYPE")="MU"
S DGXR("USE")="A"
S DGXR("EXECUTION")="R"
S DGXR("SHORT DESCR")="Notify packages of ICD diagnosis code change."
S DGXR("DESCR",1)="This cross-reference will notify subscribing packages via protocol DG PTF "
S DGXR("DESCR",2)="ICD DIAGNOSIS NOTIFIER when an ICD diagnosis code is added, edited or "
S DGXR("DESCR",3)="removed."
S DGXR("SET")="D NOTIFY^DGPTDD(.X1,.X2,.DA,45,""MOVEMENT"",""SET"")"
S DGXR("KILL")="D NOTIFY^DGPTDD(.X1,.X2,.DA,45,""MOVEMENT"",""KILL"")"
S DGXR("VAL",1)=.01
S DGXR("VAL",1,"COLLATION")="F"
S DGXR("VAL",2)=5
S DGXR("VAL",2,"COLLATION")="F"
S DGXR("VAL",3)=6
S DGXR("VAL",3,"COLLATION")="F"
S DGXR("VAL",4)=7
S DGXR("VAL",4,"COLLATION")="F"
S DGXR("VAL",5)=8
S DGXR("VAL",5,"COLLATION")="F"
S DGXR("VAL",6)=9
S DGXR("VAL",6,"COLLATION")="F"
S DGXR("VAL",7)=11
S DGXR("VAL",7,"COLLATION")="F"
S DGXR("VAL",8)=12
S DGXR("VAL",8,"COLLATION")="F"
S DGXR("VAL",9)=13
S DGXR("VAL",9,"COLLATION")="F"
S DGXR("VAL",10)=14
S DGXR("VAL",10,"COLLATION")="F"
S DGXR("VAL",11)=15
S DGXR("VAL",11,"COLLATION")="F"
S DGXR("VAL",12)=81.01
S DGXR("VAL",12,"COLLATION")="F"
S DGXR("VAL",13)=81.02
S DGXR("VAL",13,"COLLATION")="F"
S DGXR("VAL",14)=81.03
S DGXR("VAL",14,"COLLATION")="F"
S DGXR("VAL",15)=81.04
S DGXR("VAL",15,"COLLATION")="F"
S DGXR("VAL",16)=81.05
S DGXR("VAL",16,"COLLATION")="F"
S DGXR("VAL",17)=81.06
S DGXR("VAL",17,"COLLATION")="F"
S DGXR("VAL",18)=81.07
S DGXR("VAL",18,"COLLATION")="F"
S DGXR("VAL",19)=81.08
S DGXR("VAL",19,"COLLATION")="F"
S DGXR("VAL",20)=81.09
S DGXR("VAL",20,"COLLATION")="F"
S DGXR("VAL",21)=81.1
S DGXR("VAL",21,"COLLATION")="F"
S DGXR("VAL",22)=81.11
S DGXR("VAL",22,"COLLATION")="F"
S DGXR("VAL",23)=81.12
S DGXR("VAL",23,"COLLATION")="F"
S DGXR("VAL",24)=81.13
S DGXR("VAL",24,"COLLATION")="F"
S DGXR("VAL",25)=81.14
S DGXR("VAL",25,"COLLATION")="F"
S DGXR("VAL",26)=81.15
S DGXR("VAL",26,"COLLATION")="F"
D CREIXN^DDMOD(.DGXR,"W",.DGRES,"DGOUT"),CHECK(.DGRES)
Q
AICNC ;CREATE AICNC CROSS-REFERENCE IN INPATIENT CPT CODE FILE (#46)
N DGXR,DGRES,DGOUT
S DGXR("FILE")=46
S DGXR("NAME")="AICNC"
S DGXR("TYPE")="MU"
S DGXR("USE")="A"
S DGXR("EXECUTION")="R"
S DGXR("SHORT DESCR")="Notify packages of ICD diagnosis code change."
S DGXR("DESCR",1)="This cross-reference will notify subscribing packages via protocol DG PTF "
S DGXR("DESCR",2)="ICD DIAGNOSIS NOTIFIER when an ICD diagnosis code is added, edited or "
S DGXR("DESCR",3)="removed."
S DGXR("SET")="D NOTIFY^DGPTDD(.X1,.X2,.DA,46,""SERVICE46"",""SET"")"
S DGXR("KILL")="D NOTIFY^DGPTDD(.X1,.X2,.DA,46,""SERVICE46"",""KILL"")"
S DGXR("VAL",1)=.01
S DGXR("VAL",1,"COLLATION")="F"
S DGXR("VAL",2)=.16
S DGXR("VAL",2,"COLLATION")="F"
S DGXR("VAL",3)=.04
S DGXR("VAL",3,"COLLATION")="F"
S DGXR("VAL",4)=.05
S DGXR("VAL",4,"COLLATION")="F"
S DGXR("VAL",5)=.06
S DGXR("VAL",5,"COLLATION")="F"
S DGXR("VAL",6)=.07
S DGXR("VAL",6,"COLLATION")="F"
S DGXR("VAL",7)=.21
S DGXR("VAL",7,"COLLATION")="F"
S DGXR("VAL",8)=.22
S DGXR("VAL",8,"COLLATION")="F"
S DGXR("VAL",9)=.23
S DGXR("VAL",9,"COLLATION")="F"
S DGXR("VAL",10)=.24
S DGXR("VAL",10,"COLLATION")="F"
S DGXR("VAL",11)=1
S DGXR("VAL",11,"COLLATION")="F"
D CREIXN^DDMOD(.DGXR,"W",.DGRES,"DGOUT"),CHECK(.DGRES)
Q
AC ;CREATE AC CROSS-REFERENCE IN SCHEDULED ADMISSION FILE (#41.1)
N DGXR,DGRES,DGOUT
S DGXR("FILE")=41.1
S DGXR("NAME")="AC"
S DGXR("TYPE")="MU"
S DGXR("USE")="A"
S DGXR("EXECUTION")="R"
S DGXR("SHORT DESCR")="Notify packages when an entry is acted upon."
S DGXR("DESCR",1)="This cross-reference will notify subscribing packages via protocol DG SA "
S DGXR("DESCR",2)="FILE ENTRY NOTIFIER when an entry in this file is added, modified or "
S DGXR("DESCR",3)="removed."
S DGXR("SET")="D NOTIFY^DGSCHAD(.X1,.X2,.DA,""SET"")"
S DGXR("KILL")="D NOTIFY^DGSCHAD(.X1,.X2,.DA,""KILL"")"
S DGXR("VAL",1)=.01
S DGXR("VAL",1,"COLLATION")="F"
S DGXR("VAL",2)=2
S DGXR("VAL",2,"COLLATION")="F"
S DGXR("VAL",3)=3
S DGXR("VAL",3,"COLLATION")="F"
S DGXR("VAL",4)=4
S DGXR("VAL",4,"COLLATION")="F"
S DGXR("VAL",5)=5
S DGXR("VAL",5,"COLLATION")="F"
S DGXR("VAL",6)=6
S DGXR("VAL",6,"COLLATION")="F"
S DGXR("VAL",7)=7
S DGXR("VAL",7,"COLLATION")="F"
S DGXR("VAL",8)=8
S DGXR("VAL",8,"COLLATION")="F"
S DGXR("VAL",9)=9
S DGXR("VAL",9,"COLLATION")="F"
S DGXR("VAL",10)=10
S DGXR("VAL",10,"COLLATION")="F"
S DGXR("VAL",11)=11
S DGXR("VAL",11,"COLLATION")="F"
S DGXR("VAL",12)=12
S DGXR("VAL",12,"COLLATION")="F"
S DGXR("VAL",13)=13
S DGXR("VAL",13,"COLLATION")="F"
S DGXR("VAL",14)=14
S DGXR("VAL",14,"COLLATION")="F"
S DGXR("VAL",15)=15
S DGXR("VAL",15,"COLLATION")="F"
S DGXR("VAL",16)=16
S DGXR("VAL",16,"COLLATION")="F"
S DGXR("VAL",17)=17
S DGXR("VAL",17,"COLLATION")="F"
D CREIXN^DDMOD(.DGXR,"W",.DGRES,"DGOUT"),CHECK(.DGRES)
Q
CHECK(RESULT) ;CHECK STATUS OF INDEX CREATION
N MESSAGE,LINE
I RESULT="" D
.S MESSAGE(1)=" Index creation failed;"
.I $D(ERROR) D
..D MSG^DIALOG("AE",.OUTPUT,75)
..S LINE=0 F S LINE=$O(OUTPUT(LINE)) Q:'+LINE S MESSAGE(LINE+1)=" "_OUTPUT(LINE)
I +RESULT>0 S MESSAGE(1)=" Index creation succeeded"
D MES^XPDUTL(.MESSAGE)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG531020P 11378 printed Dec 13, 2024@02:35:40 Page 2
DG531020P ;ISP/RFR - PATCH 1020 POST-INIT;Sep 21, 2020@15:56
+1 ;;5.3;Registration;**1020**;Aug 13, 1993;Build 11
+2 ;REMOVE PATCH 932 INDICES
PRE ;PRE-INIT ACTIONS
+1 DO BMES^XPDUTL(" Removing unnecessary indices...")
+2 NEW INDICES,INSTALLED,INSTALLS,INDEXNUM,NAME,INDEX,NUMBER,FILE
+3 SET INDICES(1,"ADRDPD")=""
SET INDICES(1,"ADRDPD",45)=""
+4 SET INDICES(2,"ADRDPD86")=""
SET INDICES(2,"ADRDPD86",45)=""
+5 SET INDICES(3,"ADRDSD")=24
SET INDICES(3,"ADRDSD",45)=""
+6 SET INDICES(4,"ADRDD")=25
SET INDICES(4,"ADRDD",45.02)=""
+7 SET INDICES(5,"ADRDSPDX")=""
SET INDICES(5,"ADRDSPDX",45.06)=""
+8 SET INDICES(6,"ADRDSPD")=""
SET INDICES(6,"ADRDSPD",46)=""
+9 SET INDICES(7,"ADRDSD")=7
SET INDICES(7,"ADRDSD",46)=""
+10 SET INSTALLED=$$INSTALDT^XPDUTL("DG*5.3*1020",.INSTALLS)
+11 FOR INDEXNUM=1:1:7
SET NAME=""
FOR
SET NAME=$ORDER(INDICES(INDEXNUM,NAME))
if NAME=""
QUIT
Begin DoDot:1
+12 SET FILE=$ORDER(INDICES(INDEXNUM,NAME,0))
+13 IF INDICES(INDEXNUM,NAME)=""
DO DELETE(FILE,NAME)
QUIT
+14 FOR NUMBER=1:1:INDICES(INDEXNUM,NAME)
Begin DoDot:2
+15 SET INDEX=NAME_$SELECT(NUMBER<10:"0",1:"")_NUMBER
+16 DO DELETE(FILE,INDEX)
End DoDot:2
End DoDot:1
+17 DO BMES^XPDUTL(" DONE")
+18 NEW MESSAGE
+19 IF $$LKOPT^XPDMENU("DG PTF ICD CODE NOTIFIER")>0
Begin DoDot:1
+20 DO BMES^XPDUTL(" Renaming option DG PTF ICD CODE NOTIFIER...")
+21 DO RENAME^XPDMENU("DG PTF ICD CODE NOTIFIER","DG EVENT NOTIFIER")
+22 SET MESSAGE(1)=" New name: DG EVENT NOTIFIER"
+23 SET MESSAGE(2)=" DONE"
+24 DO MES^XPDUTL(.MESSAGE)
+25 KILL MESSAGE
End DoDot:1
+26 QUIT
DELETE(FILE,INDEX) ;DELETE THE SPECIFIED INDEX
+1 NEW ERROR,MESSAGE
+2 DO BMES^XPDUTL(" INDEX "_INDEX_" IN FILE #"_FILE_":")
+3 DO DELIXN^DDMOD(FILE,INDEX,"W",,"ERROR")
+4 IF $DATA(ERROR)
Begin DoDot:1
+5 IF $GET(ERROR("DIERR",1))=202
IF INSTALLED>0
SET MESSAGE(1)=" Previously removed"
+6 IF '$TEST
DO MSG^DIALOG("A",.MESSAGE,,3,"ERROR")
End DoDot:1
+7 IF '$DATA(MESSAGE)
SET MESSAGE(1)=" Successfully removed"
+8 DO MES^XPDUTL(.MESSAGE)
+9 QUIT
POST ;POST-INIT ACTIONS
+1 NEW INDEX,FILENUMS
+2 SET FILENUMS("AICN")="PTF FILE (#45)"
+3 SET FILENUMS("AICNS")="CPT RECORD DATE/TIME SUB-FILE (#45.06) IN THE PTF FILE (#45)"
+4 SET FILENUMS("AICNM")="501 SUB-FILE (#45.02) IN THE PTF FILE (#45)"
+5 SET FILENUMS("AICNC")="INPATIENT CPT CODE FILE (#46)"
+6 SET FILENUMS("AC")="SCHEDULED ADMISSION FILE (#41.1)"
+7 DO BMES^XPDUTL(" Creating new-style indexes...")
+8 FOR INDEX="AICN","AICNS","AICNM","AICNC","AC"
Begin DoDot:1
+9 DO MES^XPDUTL(" "_INDEX_" IN "_FILENUMS(INDEX)_":")
DO @INDEX
End DoDot:1
+10 NEW X,Y,DMAX,MESSAGE,OUTPUT,LINE
+11 SET Y=$$FIND1^DIC(.402,"","X","DGSCHADMIT")
+12 IF +Y=0
Begin DoDot:1
+13 SET MESSAGE(1)=" ERROR! Could not find the input template."
+14 IF Y=0
SET MESSAGE(2)=" The template does not exist."
QUIT
+15 DO MSG^DIALOG("AE",.OUTPUT,75)
+16 SET LINE=0
FOR
SET LINE=$ORDER(OUTPUT(LINE))
if '+LINE
QUIT
SET MESSAGE(LINE+1)=OUTPUT(LINE)
End DoDot:1
+17 IF +Y'=0
SET DMAX=$$ROUSIZE^DILF
SET X="DGSATX"
DO EN^DIEZ
SET MESSAGE(1)=" DONE"
+18 DO MES^XPDUTL(.MESSAGE)
+19 QUIT
AICN ;CREATE AICN CROSS-REFERENCE IN PTF FILE (#45)
+1 NEW DGXR,DGRES,DGOUT
+2 SET DGXR("FILE")=45
+3 SET DGXR("NAME")="AICN"
+4 SET DGXR("TYPE")="MU"
+5 SET DGXR("USE")="A"
+6 SET DGXR("EXECUTION")="R"
+7 SET DGXR("SHORT DESCR")="Notify packages of ICD diagnosis code change."
+8 SET DGXR("DESCR",1)="This cross-reference will notify subscribing packages via protocol DG PTF "
+9 SET DGXR("DESCR",2)="ICD DIAGNOSIS NOTIFIER when an ICD diagnosis code is added, edited or "
+10 SET DGXR("DESCR",3)="removed."
+11 SET DGXR("SET")="D NOTIFY^DGPTDD(.X1,.X2,.DA,45,""DISCHARGE"",""SET"")"
+12 SET DGXR("KILL")="D NOTIFY^DGPTDD(.X1,.X2,.DA,45,""DISCHARGE"",""KILL"")"
+13 SET DGXR("VAL",1)=.01
+14 SET DGXR("VAL",1,"COLLATION")="F"
+15 SET DGXR("VAL",2)=11
+16 SET DGXR("VAL",2,"COLLATION")="F"
+17 SET DGXR("VAL",3)=79
+18 SET DGXR("VAL",3,"COLLATION")="F"
+19 SET DGXR("VAL",4)=79.16
+20 SET DGXR("VAL",4,"COLLATION")="F"
+21 SET DGXR("VAL",5)=79.17
+22 SET DGXR("VAL",5,"COLLATION")="F"
+23 SET DGXR("VAL",6)=79.18
+24 SET DGXR("VAL",6,"COLLATION")="F"
+25 SET DGXR("VAL",7)=79.19
+26 SET DGXR("VAL",7,"COLLATION")="F"
+27 SET DGXR("VAL",8)=79.201
+28 SET DGXR("VAL",8,"COLLATION")="F"
+29 SET DGXR("VAL",9)=79.21
+30 SET DGXR("VAL",9,"COLLATION")="F"
+31 SET DGXR("VAL",10)=79.22
+32 SET DGXR("VAL",10,"COLLATION")="F"
+33 SET DGXR("VAL",11)=79.23
+34 SET DGXR("VAL",11,"COLLATION")="F"
+35 SET DGXR("VAL",12)=79.24
+36 SET DGXR("VAL",12,"COLLATION")="F"
+37 SET DGXR("VAL",13)=79.241
+38 SET DGXR("VAL",13,"COLLATION")="F"
+39 SET DGXR("VAL",14)=79.242
+40 SET DGXR("VAL",14,"COLLATION")="F"
+41 SET DGXR("VAL",15)=79.243
+42 SET DGXR("VAL",15,"COLLATION")="F"
+43 SET DGXR("VAL",16)=79.244
+44 SET DGXR("VAL",16,"COLLATION")="F"
+45 SET DGXR("VAL",17)=79.245
+46 SET DGXR("VAL",17,"COLLATION")="F"
+47 SET DGXR("VAL",18)=79.246
+48 SET DGXR("VAL",18,"COLLATION")="F"
+49 SET DGXR("VAL",19)=79.247
+50 SET DGXR("VAL",19,"COLLATION")="F"
+51 SET DGXR("VAL",20)=79.248
+52 SET DGXR("VAL",20,"COLLATION")="F"
+53 SET DGXR("VAL",21)=79.249
+54 SET DGXR("VAL",21,"COLLATION")="F"
+55 SET DGXR("VAL",22)=79.2491
+56 SET DGXR("VAL",22,"COLLATION")="F"
+57 SET DGXR("VAL",23)=79.24911
+58 SET DGXR("VAL",23,"COLLATION")="F"
+59 SET DGXR("VAL",24)=79.24912
+60 SET DGXR("VAL",24,"COLLATION")="F"
+61 SET DGXR("VAL",25)=79.24913
+62 SET DGXR("VAL",25,"COLLATION")="F"
+63 SET DGXR("VAL",26)=79.24914
+64 SET DGXR("VAL",26,"COLLATION")="F"
+65 SET DGXR("VAL",27)=79.24915
+66 SET DGXR("VAL",27,"COLLATION")="F"
+67 SET DGXR("VAL",28)=80
+68 SET DGXR("VAL",28,"COLLATION")="F"
+69 DO CREIXN^DDMOD(.DGXR,"W",.DGRES,"DGOUT")
DO CHECK(.DGRES)
+70 QUIT
AICNS ;CREATE AICNS CROSS-REFERENCE IN PTF FILE (#45)
+1 NEW DGXR,DGRES,DGOUT
+2 SET DGXR("FILE")=45.06
+3 SET DGXR("NAME")="AICNS"
+4 SET DGXR("TYPE")="MU"
+5 SET DGXR("USE")="A"
+6 SET DGXR("EXECUTION")="F"
+7 SET DGXR("SHORT DESCR")="Notify packages of ICD diagnosis code change."
+8 SET DGXR("DESCR",1)="This cross-reference will notify subscribing packages via protocol DG PTF "
+9 SET DGXR("DESCR",2)="ICD DIAGNOSIS NOTIFIER when an ICD diagnosis code is added, edited or "
+10 SET DGXR("DESCR",3)="removed."
+11 SET DGXR("SET")="D NOTIFY^DGPTDD(.X1,.X2,.DA,45,""SERVICE"",""SET"")"
+12 SET DGXR("KILL")="D NOTIFY^DGPTDD(.X1,.X2,.DA,45,""SERVICE"",""KILL"")"
+13 SET DGXR("VAL",1)=.01
+14 SET DGXR("VAL",1,"COLLATION")="F"
+15 SET DGXR("VAL",2)=.04
+16 SET DGXR("VAL",2,"COLLATION")="F"
+17 SET DGXR("VAL",3)=.09
+18 SET DGXR("VAL",3,"COLLATION")="F"
+19 DO CREIXN^DDMOD(.DGXR,"W",.DGRES,"DGOUT")
DO CHECK(.DGRES)
+20 QUIT
AICNM ;CREATE AICNM CROSS-REFERENCE IN PTF FILE (#45)
+1 NEW DGXR,DGRES,DGOUT
+2 SET DGXR("FILE")=45.02
+3 SET DGXR("NAME")="AICNM"
+4 SET DGXR("TYPE")="MU"
+5 SET DGXR("USE")="A"
+6 SET DGXR("EXECUTION")="R"
+7 SET DGXR("SHORT DESCR")="Notify packages of ICD diagnosis code change."
+8 SET DGXR("DESCR",1)="This cross-reference will notify subscribing packages via protocol DG PTF "
+9 SET DGXR("DESCR",2)="ICD DIAGNOSIS NOTIFIER when an ICD diagnosis code is added, edited or "
+10 SET DGXR("DESCR",3)="removed."
+11 SET DGXR("SET")="D NOTIFY^DGPTDD(.X1,.X2,.DA,45,""MOVEMENT"",""SET"")"
+12 SET DGXR("KILL")="D NOTIFY^DGPTDD(.X1,.X2,.DA,45,""MOVEMENT"",""KILL"")"
+13 SET DGXR("VAL",1)=.01
+14 SET DGXR("VAL",1,"COLLATION")="F"
+15 SET DGXR("VAL",2)=5
+16 SET DGXR("VAL",2,"COLLATION")="F"
+17 SET DGXR("VAL",3)=6
+18 SET DGXR("VAL",3,"COLLATION")="F"
+19 SET DGXR("VAL",4)=7
+20 SET DGXR("VAL",4,"COLLATION")="F"
+21 SET DGXR("VAL",5)=8
+22 SET DGXR("VAL",5,"COLLATION")="F"
+23 SET DGXR("VAL",6)=9
+24 SET DGXR("VAL",6,"COLLATION")="F"
+25 SET DGXR("VAL",7)=11
+26 SET DGXR("VAL",7,"COLLATION")="F"
+27 SET DGXR("VAL",8)=12
+28 SET DGXR("VAL",8,"COLLATION")="F"
+29 SET DGXR("VAL",9)=13
+30 SET DGXR("VAL",9,"COLLATION")="F"
+31 SET DGXR("VAL",10)=14
+32 SET DGXR("VAL",10,"COLLATION")="F"
+33 SET DGXR("VAL",11)=15
+34 SET DGXR("VAL",11,"COLLATION")="F"
+35 SET DGXR("VAL",12)=81.01
+36 SET DGXR("VAL",12,"COLLATION")="F"
+37 SET DGXR("VAL",13)=81.02
+38 SET DGXR("VAL",13,"COLLATION")="F"
+39 SET DGXR("VAL",14)=81.03
+40 SET DGXR("VAL",14,"COLLATION")="F"
+41 SET DGXR("VAL",15)=81.04
+42 SET DGXR("VAL",15,"COLLATION")="F"
+43 SET DGXR("VAL",16)=81.05
+44 SET DGXR("VAL",16,"COLLATION")="F"
+45 SET DGXR("VAL",17)=81.06
+46 SET DGXR("VAL",17,"COLLATION")="F"
+47 SET DGXR("VAL",18)=81.07
+48 SET DGXR("VAL",18,"COLLATION")="F"
+49 SET DGXR("VAL",19)=81.08
+50 SET DGXR("VAL",19,"COLLATION")="F"
+51 SET DGXR("VAL",20)=81.09
+52 SET DGXR("VAL",20,"COLLATION")="F"
+53 SET DGXR("VAL",21)=81.1
+54 SET DGXR("VAL",21,"COLLATION")="F"
+55 SET DGXR("VAL",22)=81.11
+56 SET DGXR("VAL",22,"COLLATION")="F"
+57 SET DGXR("VAL",23)=81.12
+58 SET DGXR("VAL",23,"COLLATION")="F"
+59 SET DGXR("VAL",24)=81.13
+60 SET DGXR("VAL",24,"COLLATION")="F"
+61 SET DGXR("VAL",25)=81.14
+62 SET DGXR("VAL",25,"COLLATION")="F"
+63 SET DGXR("VAL",26)=81.15
+64 SET DGXR("VAL",26,"COLLATION")="F"
+65 DO CREIXN^DDMOD(.DGXR,"W",.DGRES,"DGOUT")
DO CHECK(.DGRES)
+66 QUIT
AICNC ;CREATE AICNC CROSS-REFERENCE IN INPATIENT CPT CODE FILE (#46)
+1 NEW DGXR,DGRES,DGOUT
+2 SET DGXR("FILE")=46
+3 SET DGXR("NAME")="AICNC"
+4 SET DGXR("TYPE")="MU"
+5 SET DGXR("USE")="A"
+6 SET DGXR("EXECUTION")="R"
+7 SET DGXR("SHORT DESCR")="Notify packages of ICD diagnosis code change."
+8 SET DGXR("DESCR",1)="This cross-reference will notify subscribing packages via protocol DG PTF "
+9 SET DGXR("DESCR",2)="ICD DIAGNOSIS NOTIFIER when an ICD diagnosis code is added, edited or "
+10 SET DGXR("DESCR",3)="removed."
+11 SET DGXR("SET")="D NOTIFY^DGPTDD(.X1,.X2,.DA,46,""SERVICE46"",""SET"")"
+12 SET DGXR("KILL")="D NOTIFY^DGPTDD(.X1,.X2,.DA,46,""SERVICE46"",""KILL"")"
+13 SET DGXR("VAL",1)=.01
+14 SET DGXR("VAL",1,"COLLATION")="F"
+15 SET DGXR("VAL",2)=.16
+16 SET DGXR("VAL",2,"COLLATION")="F"
+17 SET DGXR("VAL",3)=.04
+18 SET DGXR("VAL",3,"COLLATION")="F"
+19 SET DGXR("VAL",4)=.05
+20 SET DGXR("VAL",4,"COLLATION")="F"
+21 SET DGXR("VAL",5)=.06
+22 SET DGXR("VAL",5,"COLLATION")="F"
+23 SET DGXR("VAL",6)=.07
+24 SET DGXR("VAL",6,"COLLATION")="F"
+25 SET DGXR("VAL",7)=.21
+26 SET DGXR("VAL",7,"COLLATION")="F"
+27 SET DGXR("VAL",8)=.22
+28 SET DGXR("VAL",8,"COLLATION")="F"
+29 SET DGXR("VAL",9)=.23
+30 SET DGXR("VAL",9,"COLLATION")="F"
+31 SET DGXR("VAL",10)=.24
+32 SET DGXR("VAL",10,"COLLATION")="F"
+33 SET DGXR("VAL",11)=1
+34 SET DGXR("VAL",11,"COLLATION")="F"
+35 DO CREIXN^DDMOD(.DGXR,"W",.DGRES,"DGOUT")
DO CHECK(.DGRES)
+36 QUIT
AC ;CREATE AC CROSS-REFERENCE IN SCHEDULED ADMISSION FILE (#41.1)
+1 NEW DGXR,DGRES,DGOUT
+2 SET DGXR("FILE")=41.1
+3 SET DGXR("NAME")="AC"
+4 SET DGXR("TYPE")="MU"
+5 SET DGXR("USE")="A"
+6 SET DGXR("EXECUTION")="R"
+7 SET DGXR("SHORT DESCR")="Notify packages when an entry is acted upon."
+8 SET DGXR("DESCR",1)="This cross-reference will notify subscribing packages via protocol DG SA "
+9 SET DGXR("DESCR",2)="FILE ENTRY NOTIFIER when an entry in this file is added, modified or "
+10 SET DGXR("DESCR",3)="removed."
+11 SET DGXR("SET")="D NOTIFY^DGSCHAD(.X1,.X2,.DA,""SET"")"
+12 SET DGXR("KILL")="D NOTIFY^DGSCHAD(.X1,.X2,.DA,""KILL"")"
+13 SET DGXR("VAL",1)=.01
+14 SET DGXR("VAL",1,"COLLATION")="F"
+15 SET DGXR("VAL",2)=2
+16 SET DGXR("VAL",2,"COLLATION")="F"
+17 SET DGXR("VAL",3)=3
+18 SET DGXR("VAL",3,"COLLATION")="F"
+19 SET DGXR("VAL",4)=4
+20 SET DGXR("VAL",4,"COLLATION")="F"
+21 SET DGXR("VAL",5)=5
+22 SET DGXR("VAL",5,"COLLATION")="F"
+23 SET DGXR("VAL",6)=6
+24 SET DGXR("VAL",6,"COLLATION")="F"
+25 SET DGXR("VAL",7)=7
+26 SET DGXR("VAL",7,"COLLATION")="F"
+27 SET DGXR("VAL",8)=8
+28 SET DGXR("VAL",8,"COLLATION")="F"
+29 SET DGXR("VAL",9)=9
+30 SET DGXR("VAL",9,"COLLATION")="F"
+31 SET DGXR("VAL",10)=10
+32 SET DGXR("VAL",10,"COLLATION")="F"
+33 SET DGXR("VAL",11)=11
+34 SET DGXR("VAL",11,"COLLATION")="F"
+35 SET DGXR("VAL",12)=12
+36 SET DGXR("VAL",12,"COLLATION")="F"
+37 SET DGXR("VAL",13)=13
+38 SET DGXR("VAL",13,"COLLATION")="F"
+39 SET DGXR("VAL",14)=14
+40 SET DGXR("VAL",14,"COLLATION")="F"
+41 SET DGXR("VAL",15)=15
+42 SET DGXR("VAL",15,"COLLATION")="F"
+43 SET DGXR("VAL",16)=16
+44 SET DGXR("VAL",16,"COLLATION")="F"
+45 SET DGXR("VAL",17)=17
+46 SET DGXR("VAL",17,"COLLATION")="F"
+47 DO CREIXN^DDMOD(.DGXR,"W",.DGRES,"DGOUT")
DO CHECK(.DGRES)
+48 QUIT
CHECK(RESULT) ;CHECK STATUS OF INDEX CREATION
+1 NEW MESSAGE,LINE
+2 IF RESULT=""
Begin DoDot:1
+3 SET MESSAGE(1)=" Index creation failed;"
+4 IF $DATA(ERROR)
Begin DoDot:2
+5 DO MSG^DIALOG("AE",.OUTPUT,75)
+6 SET LINE=0
FOR
SET LINE=$ORDER(OUTPUT(LINE))
if '+LINE
QUIT
SET MESSAGE(LINE+1)=" "_OUTPUT(LINE)
End DoDot:2
End DoDot:1
+7 IF +RESULT>0
SET MESSAGE(1)=" Index creation succeeded"
+8 DO MES^XPDUTL(.MESSAGE)
+9 QUIT