GMRC196P ;SLC/WAS - Post Routine To Disable GMRCHCP Link; Jan 25, 2024@13:35
;;3.0;CONSULT/REQUEST TRACKING;**196**;FEB 27, 2018;Build 3
;
; Reference to ^ORD(101 in ICR #872
;
; Depreciated GMRCHCP via GMRC*3.0*196
;
Q
POST ;
;
D BMES^XPDUTL("Post-install GMRC196P begin...")
;
D LINK,INACTVAPP,PROTODIS,PROTOEDIT,PROTOREM
;
D BMES^XPDUTL("Post-install GMRC196P complete...")
Q
LINK ; Update the GMRCHCP HL logical link to disable AUTOSTART
N GMRCIEN,VAL,FDA,GMRCERR
S VAL="GMRCHCP"
S GMRCIEN=$$FIND1^DIC(870,,"B",.VAL)
I 'GMRCIEN D MES^XPDUTL("Missing "_VAL_" - Cannot disable AUTOSTART") Q
S FDA(870,GMRCIEN_",",4.5)=0 ; AUTOSTART disabled
D FILE^DIE(,"FDA","GMRCERR") K FDA
D MES^XPDUTL("")
I $D(GMRCERR) D Q ; something went wrong
.D MES^XPDUTL("FileMan error when disabling AUTOSTART for the GMRCHCP HL logical link")
D MES^XPDUTL("GMRCHCP HL logical link AUTOSTART has been disabled.")
Q
INACTVAPP ; Update the HL7 Application Parameter file to mark GMRC HCP SEND and GMRC HCP RECEIVE inactive
N GMRCIEN,VAL,FDA,GMRCERR
S VAL="GMRC HCP SEND"
S GMRCIEN=$$FIND1^DIC(771,,"B",.VAL)
I 'GMRCIEN D MES^XPDUTL("Missing "_VAL_" - Cannot edit application pararmeter")
D MES^XPDUTL("")
I GMRCIEN D
.S FDA(771,GMRCIEN_",",2)="i" ; mark inactive
.D FILE^DIE(,"FDA","GMRCERR") K FDA
.I $D(GMRCERR) D MES^XPDUTL("FileMan error when marking the "_VAL_" application parameter inactive")
.I '$D(GMRCERR) D MES^XPDUTL("The "_VAL_" application parameter has been marked inactive.")
;
N GMRCIEN,VAL,FDA,GMRCERR
S VAL="GMRC HCP RECEIVE"
S GMRCIEN=$$FIND1^DIC(771,,"B",.VAL)
I 'GMRCIEN D MES^XPDUTL("Missing "_VAL_" - Cannot edit application pararmeter")
D MES^XPDUTL("")
I GMRCIEN D
.S FDA(771,GMRCIEN_",",2)="i" ; mark inactive
.D FILE^DIE(,"FDA","GMRCERR") K FDA
.I $D(GMRCERR) D MES^XPDUTL("FileMan error when marking the "_VAL_" application parameter inactive")
.I '$D(GMRCERR) D MES^XPDUTL("The "_VAL_" application parameter has been marked inactive.")
Q
PROTODIS ; Disable the following protocols
;
N GMRCIEN,VAL,GMRCERR
S VAL="GMRC HCP REF-I12 CLIENT"
S GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
I 'GMRCIEN D MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
D MES^XPDUTL("")
I GMRCIEN D
.S FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196" ; disable
.S FDA(101,GMRCIEN_",",770.7)="@" ; Delete GMRCHCP from logical link
.D FILE^DIE(,"FDA","GMRCERR") K FDA
.I $D(GMRCERR) D MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
.I '$D(GMRCERR) D MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
;
N GMRCIEN,VAL,GMRCERR
S VAL="GMRC HCP REF-I13 CLIENT"
S GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
I 'GMRCIEN D MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
D MES^XPDUTL("")
I GMRCIEN D
.S FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196" ; disable
.S FDA(101,GMRCIEN_",",770.7)="@" ; Delete GMRCHCP from logical link
.D FILE^DIE(,"FDA","GMRCERR") K FDA
.I $D(GMRCERR) D MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
.I '$D(GMRCERR) D MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
;
N GMRCIEN,VAL,GMRCERR
S VAL="GMRC HCP REF-I14 CLIENT"
S GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
I 'GMRCIEN D MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
D MES^XPDUTL("")
I GMRCIEN D
.S FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196" ; disable
.S FDA(101,GMRCIEN_",",770.7)="@" ; Delete GMRCHCP from logical link
.D FILE^DIE(,"FDA","GMRCERR") K FDA
.I $D(GMRCERR) D MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
.I '$D(GMRCERR) D MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
;
N GMRCIEN,VAL,GMRCERR
S VAL="GMRC HCP RRI-I13 CLIENT"
S GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
I 'GMRCIEN D MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
D MES^XPDUTL("")
I GMRCIEN D
.S FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196" ; disable
.S FDA(101,GMRCIEN_",",770.7)="@" ; Delete GMRCHCP from logical link
.D FILE^DIE(,"FDA","GMRCERR") K FDA
.I $D(GMRCERR) D MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
.I '$D(GMRCERR) D MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
;
N GMRCIEN,VAL,GMRCERR
S VAL="GMRC HCP REF-I12 SERVER"
S GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
I 'GMRCIEN D MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
D MES^XPDUTL("")
I GMRCIEN D
.S FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196" ; disable
.D FILE^DIE(,"FDA","GMRCERR") K FDA
.I $D(GMRCERR) D MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
.I '$D(GMRCERR) D MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
;
N GMRCIEN,VAL,GMRCERR
S VAL="GMRC HCP REF-I13 SERVER"
S GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
I 'GMRCIEN D MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
D MES^XPDUTL("")
I GMRCIEN D
.S FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196" ; disable
.D FILE^DIE(,"FDA","GMRCERR") K FDA
.I $D(GMRCERR) D MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
.I '$D(GMRCERR) D MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
;
N GMRCIEN,VAL,GMRCERR
S VAL="GMRC HCP REF-I14 SERVER"
S GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
I 'GMRCIEN D MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
D MES^XPDUTL("")
I GMRCIEN D
.S FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196" ; disable
.D FILE^DIE(,"FDA","GMRCERR") K FDA
.I $D(GMRCERR) D MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
.I '$D(GMRCERR) D MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
;
N GMRCIEN,VAL,GMRCERR
S VAL="GMRC HCP RRI-I13 SERVER"
S GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
I 'GMRCIEN D MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
D MES^XPDUTL("")
I GMRCIEN D
.S FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196" ; disable
.D FILE^DIE(,"FDA","GMRCERR") K FDA
.I $D(GMRCERR) D MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
.I '$D(GMRCERR) D MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
;
Q
PROTOEDIT ; Edit the following protocol to remove entry action
;
N GMRCIEN,VAL,GMRCERR
S VAL="GMRC CONSULTS TO HCP"
S GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
I 'GMRCIEN D MES^XPDUTL("Missing "_VAL_" - Cannot edit protocol")
D MES^XPDUTL("")
I GMRCIEN D
.S FDA(101,GMRCIEN_",",20)="@"
.D FILE^DIE(,"FDA","GMRCERR") K FDA
.I $D(GMRCERR) D MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to remove entry action")
.I '$D(GMRCERR) D MES^XPDUTL("The "_VAL_" protocol has been updated to remove entry action.")
;
Q
PROTOREM ; Remove the following child protocol from parent
;
N VAL,VAL1,GMRCIEN,GMRCIEN1,DA,DIK
S VAL="GMRC CONSULTS TO HCP"
S VAL1="GMRC EVSEND OR"
S GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
D MES^XPDUTL("")
I 'GMRCIEN D MES^XPDUTL("Cannot remove "_VAL_" from "_VAL1_" protocol - Missing "_VAL) Q
S GMRCIEN1=$$FIND1^DIC(101,,"B",.VAL1)
I 'GMRCIEN1 D MES^XPDUTL("Cannot remove "_VAL_" from "_VAL1_" protocol - Missing "_VAL1) Q
S DA=$O(^ORD(101,GMRCIEN1,10,"B",GMRCIEN,0))
I 'DA D MES^XPDUTL("Cannot remove "_VAL_" from "_VAL1_" protocol - Already removed") Q
S DA(1)=GMRCIEN1
S DIK="^ORD(101,"_DA(1)_",10,"
D ^DIK
D MES^XPDUTL("")
I $D(GMRCERR) D Q ; something went wrong
.D MES^XPDUTL("FileMan error when removing "_VAL_" from "_VAL1_" protocol")
D MES^XPDUTL(VAL_" has been removed from "_VAL1_" protocol.")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRC196P 7805 printed Dec 13, 2024@01:44:50 Page 2
GMRC196P ;SLC/WAS - Post Routine To Disable GMRCHCP Link; Jan 25, 2024@13:35
+1 ;;3.0;CONSULT/REQUEST TRACKING;**196**;FEB 27, 2018;Build 3
+2 ;
+3 ; Reference to ^ORD(101 in ICR #872
+4 ;
+5 ; Depreciated GMRCHCP via GMRC*3.0*196
+6 ;
+7 QUIT
POST ;
+1 ;
+2 DO BMES^XPDUTL("Post-install GMRC196P begin...")
+3 ;
+4 DO LINK
DO INACTVAPP
DO PROTODIS
DO PROTOEDIT
DO PROTOREM
+5 ;
+6 DO BMES^XPDUTL("Post-install GMRC196P complete...")
+7 QUIT
LINK ; Update the GMRCHCP HL logical link to disable AUTOSTART
+1 NEW GMRCIEN,VAL,FDA,GMRCERR
+2 SET VAL="GMRCHCP"
+3 SET GMRCIEN=$$FIND1^DIC(870,,"B",.VAL)
+4 IF 'GMRCIEN
DO MES^XPDUTL("Missing "_VAL_" - Cannot disable AUTOSTART")
QUIT
+5 ; AUTOSTART disabled
SET FDA(870,GMRCIEN_",",4.5)=0
+6 DO FILE^DIE(,"FDA","GMRCERR")
KILL FDA
+7 DO MES^XPDUTL("")
+8 ; something went wrong
IF $DATA(GMRCERR)
Begin DoDot:1
+9 DO MES^XPDUTL("FileMan error when disabling AUTOSTART for the GMRCHCP HL logical link")
End DoDot:1
QUIT
+10 DO MES^XPDUTL("GMRCHCP HL logical link AUTOSTART has been disabled.")
+11 QUIT
INACTVAPP ; Update the HL7 Application Parameter file to mark GMRC HCP SEND and GMRC HCP RECEIVE inactive
+1 NEW GMRCIEN,VAL,FDA,GMRCERR
+2 SET VAL="GMRC HCP SEND"
+3 SET GMRCIEN=$$FIND1^DIC(771,,"B",.VAL)
+4 IF 'GMRCIEN
DO MES^XPDUTL("Missing "_VAL_" - Cannot edit application pararmeter")
+5 DO MES^XPDUTL("")
+6 IF GMRCIEN
Begin DoDot:1
+7 ; mark inactive
SET FDA(771,GMRCIEN_",",2)="i"
+8 DO FILE^DIE(,"FDA","GMRCERR")
KILL FDA
+9 IF $DATA(GMRCERR)
DO MES^XPDUTL("FileMan error when marking the "_VAL_" application parameter inactive")
+10 IF '$DATA(GMRCERR)
DO MES^XPDUTL("The "_VAL_" application parameter has been marked inactive.")
End DoDot:1
+11 ;
+12 NEW GMRCIEN,VAL,FDA,GMRCERR
+13 SET VAL="GMRC HCP RECEIVE"
+14 SET GMRCIEN=$$FIND1^DIC(771,,"B",.VAL)
+15 IF 'GMRCIEN
DO MES^XPDUTL("Missing "_VAL_" - Cannot edit application pararmeter")
+16 DO MES^XPDUTL("")
+17 IF GMRCIEN
Begin DoDot:1
+18 ; mark inactive
SET FDA(771,GMRCIEN_",",2)="i"
+19 DO FILE^DIE(,"FDA","GMRCERR")
KILL FDA
+20 IF $DATA(GMRCERR)
DO MES^XPDUTL("FileMan error when marking the "_VAL_" application parameter inactive")
+21 IF '$DATA(GMRCERR)
DO MES^XPDUTL("The "_VAL_" application parameter has been marked inactive.")
End DoDot:1
+22 QUIT
PROTODIS ; Disable the following protocols
+1 ;
+2 NEW GMRCIEN,VAL,GMRCERR
+3 SET VAL="GMRC HCP REF-I12 CLIENT"
+4 SET GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
+5 IF 'GMRCIEN
DO MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
+6 DO MES^XPDUTL("")
+7 IF GMRCIEN
Begin DoDot:1
+8 ; disable
SET FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196"
+9 ; Delete GMRCHCP from logical link
SET FDA(101,GMRCIEN_",",770.7)="@"
+10 DO FILE^DIE(,"FDA","GMRCERR")
KILL FDA
+11 IF $DATA(GMRCERR)
DO MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
+12 IF '$DATA(GMRCERR)
DO MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
End DoDot:1
+13 ;
+14 NEW GMRCIEN,VAL,GMRCERR
+15 SET VAL="GMRC HCP REF-I13 CLIENT"
+16 SET GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
+17 IF 'GMRCIEN
DO MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
+18 DO MES^XPDUTL("")
+19 IF GMRCIEN
Begin DoDot:1
+20 ; disable
SET FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196"
+21 ; Delete GMRCHCP from logical link
SET FDA(101,GMRCIEN_",",770.7)="@"
+22 DO FILE^DIE(,"FDA","GMRCERR")
KILL FDA
+23 IF $DATA(GMRCERR)
DO MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
+24 IF '$DATA(GMRCERR)
DO MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
End DoDot:1
+25 ;
+26 NEW GMRCIEN,VAL,GMRCERR
+27 SET VAL="GMRC HCP REF-I14 CLIENT"
+28 SET GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
+29 IF 'GMRCIEN
DO MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
+30 DO MES^XPDUTL("")
+31 IF GMRCIEN
Begin DoDot:1
+32 ; disable
SET FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196"
+33 ; Delete GMRCHCP from logical link
SET FDA(101,GMRCIEN_",",770.7)="@"
+34 DO FILE^DIE(,"FDA","GMRCERR")
KILL FDA
+35 IF $DATA(GMRCERR)
DO MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
+36 IF '$DATA(GMRCERR)
DO MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
End DoDot:1
+37 ;
+38 NEW GMRCIEN,VAL,GMRCERR
+39 SET VAL="GMRC HCP RRI-I13 CLIENT"
+40 SET GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
+41 IF 'GMRCIEN
DO MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
+42 DO MES^XPDUTL("")
+43 IF GMRCIEN
Begin DoDot:1
+44 ; disable
SET FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196"
+45 ; Delete GMRCHCP from logical link
SET FDA(101,GMRCIEN_",",770.7)="@"
+46 DO FILE^DIE(,"FDA","GMRCERR")
KILL FDA
+47 IF $DATA(GMRCERR)
DO MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
+48 IF '$DATA(GMRCERR)
DO MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
End DoDot:1
+49 ;
+50 NEW GMRCIEN,VAL,GMRCERR
+51 SET VAL="GMRC HCP REF-I12 SERVER"
+52 SET GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
+53 IF 'GMRCIEN
DO MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
+54 DO MES^XPDUTL("")
+55 IF GMRCIEN
Begin DoDot:1
+56 ; disable
SET FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196"
+57 DO FILE^DIE(,"FDA","GMRCERR")
KILL FDA
+58 IF $DATA(GMRCERR)
DO MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
+59 IF '$DATA(GMRCERR)
DO MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
End DoDot:1
+60 ;
+61 NEW GMRCIEN,VAL,GMRCERR
+62 SET VAL="GMRC HCP REF-I13 SERVER"
+63 SET GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
+64 IF 'GMRCIEN
DO MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
+65 DO MES^XPDUTL("")
+66 IF GMRCIEN
Begin DoDot:1
+67 ; disable
SET FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196"
+68 DO FILE^DIE(,"FDA","GMRCERR")
KILL FDA
+69 IF $DATA(GMRCERR)
DO MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
+70 IF '$DATA(GMRCERR)
DO MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
End DoDot:1
+71 ;
+72 NEW GMRCIEN,VAL,GMRCERR
+73 SET VAL="GMRC HCP REF-I14 SERVER"
+74 SET GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
+75 IF 'GMRCIEN
DO MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
+76 DO MES^XPDUTL("")
+77 IF GMRCIEN
Begin DoDot:1
+78 ; disable
SET FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196"
+79 DO FILE^DIE(,"FDA","GMRCERR")
KILL FDA
+80 IF $DATA(GMRCERR)
DO MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
+81 IF '$DATA(GMRCERR)
DO MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
End DoDot:1
+82 ;
+83 NEW GMRCIEN,VAL,GMRCERR
+84 SET VAL="GMRC HCP RRI-I13 SERVER"
+85 SET GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
+86 IF 'GMRCIEN
DO MES^XPDUTL("Missing "_VAL_" - Cannot disable "_VAL_" protocol")
+87 DO MES^XPDUTL("")
+88 IF GMRCIEN
Begin DoDot:1
+89 ; disable
SET FDA(101,GMRCIEN_",",2)="Deprecated via GMRC*3.0*196"
+90 DO FILE^DIE(,"FDA","GMRCERR")
KILL FDA
+91 IF $DATA(GMRCERR)
DO MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to mark as disabled")
+92 IF '$DATA(GMRCERR)
DO MES^XPDUTL("The "_VAL_" Protocol has been updated to disable.")
End DoDot:1
+93 ;
+94 QUIT
PROTOEDIT ; Edit the following protocol to remove entry action
+1 ;
+2 NEW GMRCIEN,VAL,GMRCERR
+3 SET VAL="GMRC CONSULTS TO HCP"
+4 SET GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
+5 IF 'GMRCIEN
DO MES^XPDUTL("Missing "_VAL_" - Cannot edit protocol")
+6 DO MES^XPDUTL("")
+7 IF GMRCIEN
Begin DoDot:1
+8 SET FDA(101,GMRCIEN_",",20)="@"
+9 DO FILE^DIE(,"FDA","GMRCERR")
KILL FDA
+10 IF $DATA(GMRCERR)
DO MES^XPDUTL("FileMan error when editing the "_VAL_" protocol to remove entry action")
+11 IF '$DATA(GMRCERR)
DO MES^XPDUTL("The "_VAL_" protocol has been updated to remove entry action.")
End DoDot:1
+12 ;
+13 QUIT
PROTOREM ; Remove the following child protocol from parent
+1 ;
+2 NEW VAL,VAL1,GMRCIEN,GMRCIEN1,DA,DIK
+3 SET VAL="GMRC CONSULTS TO HCP"
+4 SET VAL1="GMRC EVSEND OR"
+5 SET GMRCIEN=$$FIND1^DIC(101,,"B",.VAL)
+6 DO MES^XPDUTL("")
+7 IF 'GMRCIEN
DO MES^XPDUTL("Cannot remove "_VAL_" from "_VAL1_" protocol - Missing "_VAL)
QUIT
+8 SET GMRCIEN1=$$FIND1^DIC(101,,"B",.VAL1)
+9 IF 'GMRCIEN1
DO MES^XPDUTL("Cannot remove "_VAL_" from "_VAL1_" protocol - Missing "_VAL1)
QUIT
+10 SET DA=$ORDER(^ORD(101,GMRCIEN1,10,"B",GMRCIEN,0))
+11 IF 'DA
DO MES^XPDUTL("Cannot remove "_VAL_" from "_VAL1_" protocol - Already removed")
QUIT
+12 SET DA(1)=GMRCIEN1
+13 SET DIK="^ORD(101,"_DA(1)_",10,"
+14 DO ^DIK
+15 DO MES^XPDUTL("")
+16 ; something went wrong
IF $DATA(GMRCERR)
Begin DoDot:1
+17 DO MES^XPDUTL("FileMan error when removing "_VAL_" from "_VAL1_" protocol")
End DoDot:1
QUIT
+18 DO MES^XPDUTL(VAL_" has been removed from "_VAL1_" protocol.")
+19 QUIT