SD659PST ;ALB/ART - SD*5.3*659 Post Install ;02/16/2017
;;5.3;Scheduling;**659**;Aug 13, 1993;Build 5
;
QUIT
;
;Public, Supported ICRs
; #2916 - Data Base Server API: DD Modification Utilities (DDMOD)
; #10013 - Classic FileMan API: Entry Deletion & File Reindexing (DIK)
; #10141 - XPDUTL - Public APIs for KIDS
;
;Private ICRs
; #6966 - READ ACCESS TO DD(404.43
; #6721 - READ ACCESS TO DD(404.52
; #6722 - READ ACCESS TO DD(404.53
;
EN ;
;
;delete cross references and indexes
DO DEL
;delete records in PCMM HL7 EVENT file
DO DELEVNTS
;
QUIT
;
DEL ;
;
NEW SDFILE,SDFIELD,SDXREFNM,SDINDEX
;
;Delete the AEVENT1 Xref in 404.43
SET SDFILE=404.43
SET SDFIELD=.01
SET SDXREFNM="AEVENT1"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AEVENT3 Xref in 404.43
SET SDFILE=404.43
SET SDFIELD=.02
SET SDXREFNM="AEVENT3"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AEVENT4 Xref in 404.43
SET SDFILE=404.43
SET SDFIELD=.03
SET SDXREFNM="AEVENT4"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AEVENT5 Xref in 404.43
SET SDFILE=404.43
SET SDFIELD=.04
SET SDXREFNM="AEVENT5"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AEVENT2 Xref in 404.43
SET SDFILE=404.43
SET SDFIELD=.05
SET SDXREFNM="AEVENT2"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AEVENT1 Xref in 404.52
SET SDFILE=404.52
SET SDFIELD=.01
SET SDXREFNM="AEVENT1"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AEVENT2 Xref in 404.52
SET SDFILE=404.52
SET SDFIELD=.02
SET SDXREFNM="AEVENT2"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AEVENT3 Xref in 404.52
SET SDFILE=404.52
SET SDFIELD=.03
SET SDXREFNM="AEVENT3"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the ASTATUS Xref in 404.52
SET SDFILE=404.52
SET SDFIELD=.04
SET SDXREFNM="ASTATUS"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AFTEE Xref in 404.52
SET SDFILE=404.52
SET SDFIELD=.09
SET SDXREFNM="AFTEE"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AEVENT1 Xref in 404.53
SET SDFILE=404.53
SET SDFIELD=.01
SET SDXREFNM="AEVENT1"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AEVENT2 Xref in 404.53
SET SDFILE=404.53
SET SDFIELD=.02
SET SDXREFNM="AEVENT2"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AEVENT3 Xref in 404.53
SET SDFILE=404.53
SET SDFIELD=.04
SET SDXREFNM="AEVENT3"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AEVENT4 Xref in 404.53
SET SDFILE=404.53
SET SDFIELD=.06
SET SDXREFNM="AEVENT4"
DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
;
;Delete the AE Index in 404.57
SET SDFILE=404.57
SET SDINDEX="AE"
DO DELINDEX(SDFILE,SDINDEX)
;
;Delete the AD Index in 404.57
SET SDFILE=404.57
SET SDINDEX="AD"
DO DELINDEX(SDFILE,SDINDEX)
;
;Delete the AC Index in 404.59
SET SDFILE=404.59
SET SDINDEX="AC"
DO DELINDEX(SDFILE,SDINDEX)
;
QUIT
;
DELXREF(SDFILE,SDFIELD,SDXREFNM) ; Delete traditional cross reference
;Inputs: SDFILE - file number
; SDFIELD - field number
; SDXREFNM - xref name
;
NEW SDHIT,SDOUT,SDERR,SDXREF
DO BMES^XPDUTL("Delete the "_SDXREFNM_" xref in "_SDFILE_"/"_SDFIELD_".")
;
SET SDHIT=0
SET SDXREF=0
FOR SET SDXREF=$O(^DD(SDFILE,SDFIELD,1,SDXREF)) QUIT:('+SDXREF)!(SDHIT) DO
. IF $GET(^DD(SDFILE,SDFIELD,1,SDXREF,0))[SDXREFNM DO
. . ;W !,"SDXREF: ",SDXREF," Node: ",^DD(SDFILE,SDFIELD,1,SDXREF,0),!
. . DO DELIX^DDMOD(SDFILE,SDFIELD,SDXREF,"","SDOUT","SDERR")
. . IF '$DATA(SDERR) DO
. . . DO MES^XPDUTL("The "_SDXREFNM_" cross reference was deleted.")
. . . SET SDHIT=1
. . ELSE DO
. . . DO MES^XPDUTL("ERROR encountered deleting the "_SDXREFNM_" cross reference.")
;
DO:'SDHIT MES^XPDUTL("The "_SDXREFNM_" cross reference was not found.")
;
QUIT
;
DELINDEX(SDFILE,SDINDEX) ; Delete a new style index
;Inputs: SDFILE - file number
; SDINDEX - index name
;
NEW SDOUT,SDERR
DO BMES^XPDUTL("Delete the "_SDINDEX_" Index in "_SDFILE_".")
;
DO DELIXN^DDMOD(SDFILE,SDINDEX,"","SDOUT","SDERR")
IF '$DATA(SDERR) DO
. DO MES^XPDUTL("The "_SDINDEX_" Index in "_SDFILE_" was deleted.")
ELSE DO
. DO MES^XPDUTL("ERROR encountered deleting the "_SDINDEX_" Index in "_SDFILE_".")
QUIT
;
DELEVNTS ; Delete records in PCMM HL7 EVENT FILE (#404.48)
NEW DA,DIK
SET DA=0
FOR SET DA=$ORDER(^SCPT(404.48,DA)) QUIT:'+DA DO
. SET DIK="^SCPT(404.48,"
. DO ^DIK
;
DO BMES^XPDUTL(" Records were deleted from PCMM HL7 EVENT FILE.")
QUIT
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSD659PST 4576 printed Dec 13, 2024@02:46:52 Page 2
SD659PST ;ALB/ART - SD*5.3*659 Post Install ;02/16/2017
+1 ;;5.3;Scheduling;**659**;Aug 13, 1993;Build 5
+2 ;
+3 QUIT
+4 ;
+5 ;Public, Supported ICRs
+6 ; #2916 - Data Base Server API: DD Modification Utilities (DDMOD)
+7 ; #10013 - Classic FileMan API: Entry Deletion & File Reindexing (DIK)
+8 ; #10141 - XPDUTL - Public APIs for KIDS
+9 ;
+10 ;Private ICRs
+11 ; #6966 - READ ACCESS TO DD(404.43
+12 ; #6721 - READ ACCESS TO DD(404.52
+13 ; #6722 - READ ACCESS TO DD(404.53
+14 ;
EN ;
+1 ;
+2 ;delete cross references and indexes
+3 DO DEL
+4 ;delete records in PCMM HL7 EVENT file
+5 DO DELEVNTS
+6 ;
+7 QUIT
+8 ;
DEL ;
+1 ;
+2 NEW SDFILE,SDFIELD,SDXREFNM,SDINDEX
+3 ;
+4 ;Delete the AEVENT1 Xref in 404.43
+5 SET SDFILE=404.43
+6 SET SDFIELD=.01
+7 SET SDXREFNM="AEVENT1"
+8 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+9 ;
+10 ;Delete the AEVENT3 Xref in 404.43
+11 SET SDFILE=404.43
+12 SET SDFIELD=.02
+13 SET SDXREFNM="AEVENT3"
+14 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+15 ;
+16 ;Delete the AEVENT4 Xref in 404.43
+17 SET SDFILE=404.43
+18 SET SDFIELD=.03
+19 SET SDXREFNM="AEVENT4"
+20 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+21 ;
+22 ;Delete the AEVENT5 Xref in 404.43
+23 SET SDFILE=404.43
+24 SET SDFIELD=.04
+25 SET SDXREFNM="AEVENT5"
+26 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+27 ;
+28 ;Delete the AEVENT2 Xref in 404.43
+29 SET SDFILE=404.43
+30 SET SDFIELD=.05
+31 SET SDXREFNM="AEVENT2"
+32 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+33 ;
+34 ;Delete the AEVENT1 Xref in 404.52
+35 SET SDFILE=404.52
+36 SET SDFIELD=.01
+37 SET SDXREFNM="AEVENT1"
+38 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+39 ;
+40 ;Delete the AEVENT2 Xref in 404.52
+41 SET SDFILE=404.52
+42 SET SDFIELD=.02
+43 SET SDXREFNM="AEVENT2"
+44 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+45 ;
+46 ;Delete the AEVENT3 Xref in 404.52
+47 SET SDFILE=404.52
+48 SET SDFIELD=.03
+49 SET SDXREFNM="AEVENT3"
+50 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+51 ;
+52 ;Delete the ASTATUS Xref in 404.52
+53 SET SDFILE=404.52
+54 SET SDFIELD=.04
+55 SET SDXREFNM="ASTATUS"
+56 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+57 ;
+58 ;Delete the AFTEE Xref in 404.52
+59 SET SDFILE=404.52
+60 SET SDFIELD=.09
+61 SET SDXREFNM="AFTEE"
+62 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+63 ;
+64 ;Delete the AEVENT1 Xref in 404.53
+65 SET SDFILE=404.53
+66 SET SDFIELD=.01
+67 SET SDXREFNM="AEVENT1"
+68 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+69 ;
+70 ;Delete the AEVENT2 Xref in 404.53
+71 SET SDFILE=404.53
+72 SET SDFIELD=.02
+73 SET SDXREFNM="AEVENT2"
+74 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+75 ;
+76 ;Delete the AEVENT3 Xref in 404.53
+77 SET SDFILE=404.53
+78 SET SDFIELD=.04
+79 SET SDXREFNM="AEVENT3"
+80 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+81 ;
+82 ;Delete the AEVENT4 Xref in 404.53
+83 SET SDFILE=404.53
+84 SET SDFIELD=.06
+85 SET SDXREFNM="AEVENT4"
+86 DO DELXREF(SDFILE,SDFIELD,SDXREFNM)
+87 ;
+88 ;Delete the AE Index in 404.57
+89 SET SDFILE=404.57
+90 SET SDINDEX="AE"
+91 DO DELINDEX(SDFILE,SDINDEX)
+92 ;
+93 ;Delete the AD Index in 404.57
+94 SET SDFILE=404.57
+95 SET SDINDEX="AD"
+96 DO DELINDEX(SDFILE,SDINDEX)
+97 ;
+98 ;Delete the AC Index in 404.59
+99 SET SDFILE=404.59
+100 SET SDINDEX="AC"
+101 DO DELINDEX(SDFILE,SDINDEX)
+102 ;
+103 QUIT
+104 ;
DELXREF(SDFILE,SDFIELD,SDXREFNM) ; Delete traditional cross reference
+1 ;Inputs: SDFILE - file number
+2 ; SDFIELD - field number
+3 ; SDXREFNM - xref name
+4 ;
+5 NEW SDHIT,SDOUT,SDERR,SDXREF
+6 DO BMES^XPDUTL("Delete the "_SDXREFNM_" xref in "_SDFILE_"/"_SDFIELD_".")
+7 ;
+8 SET SDHIT=0
+9 SET SDXREF=0
+10 FOR
SET SDXREF=$ORDER(^DD(SDFILE,SDFIELD,1,SDXREF))
if ('+SDXREF)!(SDHIT)
QUIT
Begin DoDot:1
+11 IF $GET(^DD(SDFILE,SDFIELD,1,SDXREF,0))[SDXREFNM
Begin DoDot:2
+12 ;W !,"SDXREF: ",SDXREF," Node: ",^DD(SDFILE,SDFIELD,1,SDXREF,0),!
+13 DO DELIX^DDMOD(SDFILE,SDFIELD,SDXREF,"","SDOUT","SDERR")
+14 IF '$DATA(SDERR)
Begin DoDot:3
+15 DO MES^XPDUTL("The "_SDXREFNM_" cross reference was deleted.")
+16 SET SDHIT=1
End DoDot:3
+17 IF '$TEST
Begin DoDot:3
+18 DO MES^XPDUTL("ERROR encountered deleting the "_SDXREFNM_" cross reference.")
End DoDot:3
End DoDot:2
End DoDot:1
+19 ;
+20 if 'SDHIT
DO MES^XPDUTL("The "_SDXREFNM_" cross reference was not found.")
+21 ;
+22 QUIT
+23 ;
DELINDEX(SDFILE,SDINDEX) ; Delete a new style index
+1 ;Inputs: SDFILE - file number
+2 ; SDINDEX - index name
+3 ;
+4 NEW SDOUT,SDERR
+5 DO BMES^XPDUTL("Delete the "_SDINDEX_" Index in "_SDFILE_".")
+6 ;
+7 DO DELIXN^DDMOD(SDFILE,SDINDEX,"","SDOUT","SDERR")
+8 IF '$DATA(SDERR)
Begin DoDot:1
+9 DO MES^XPDUTL("The "_SDINDEX_" Index in "_SDFILE_" was deleted.")
End DoDot:1
+10 IF '$TEST
Begin DoDot:1
+11 DO MES^XPDUTL("ERROR encountered deleting the "_SDINDEX_" Index in "_SDFILE_".")
End DoDot:1
+12 QUIT
+13 ;
DELEVNTS ; Delete records in PCMM HL7 EVENT FILE (#404.48)
+1 NEW DA,DIK
+2 SET DA=0
+3 FOR
SET DA=$ORDER(^SCPT(404.48,DA))
if '+DA
QUIT
Begin DoDot:1
+4 SET DIK="^SCPT(404.48,"
+5 DO ^DIK
End DoDot:1
+6 ;
+7 DO BMES^XPDUTL(" Records were deleted from PCMM HL7 EVENT FILE.")
+8 QUIT
+9 ;