EDPFX233 ;SLC/BWF - Pre-init for facility install ;2/28/12 08:33am
;;2.0;EMERGENCY DEPARTMENT;;May 2, 2012;Build 103
;
FIX233() ;
N IEN,DISPNM,ABBREV
S IEN=0 F S IEN=$O(^EDPB(233.1,IEN)) Q:'IEN D
.S DISPNM=$$GET1^DIQ(233.1,IEN,.02)
.S ABBREV=$$GET1^DIQ(233.1,IEN,.03)
.I DISPNM=""!(ABBREV="") D
..D DISP(IEN)
..I DISPNM="" D EDFLD(IEN,.02)
..I ABBREV="" D EDFLD(IEN,.03)
Q
DISP(IEN) ;
N DATA,ERR,IENS
S IENS=IEN_","
D GETS^DIQ(233.1,IENS,".01;.02;.03","IE","DATA","ERR")
W !,?2,"NAME: ",?20,$G(DATA(233.1,IENS,.01,"E"))
W !,?2,"DISPLAY NAME:",?20,$G(DATA(233.1,IENS,.02,"E"))
W !,?2,"ABBREVIATION:",?20,$G(DATA(233.1,IENS,.03,"E")),!
Q
EDFLD(IEN,FLD) ;
N DIE,DA,DR
S DIE("NO^")=""
W !!,"You must correct the following fields before continuing:",!
S DIE="^EDPB(233.1,",DA=IEN,DR=FLD
L +^EDPB(233.1,IEN):2
I $T D ^DIE L -^EDPB(233.1,IEN) W !!! Q
W !,?10,"Another user is editing this entry. Please try again later.",!! Q
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HEDPFX233 979 printed Dec 13, 2024@01:51:54 Page 2
EDPFX233 ;SLC/BWF - Pre-init for facility install ;2/28/12 08:33am
+1 ;;2.0;EMERGENCY DEPARTMENT;;May 2, 2012;Build 103
+2 ;
FIX233() ;
+1 NEW IEN,DISPNM,ABBREV
+2 SET IEN=0
FOR
SET IEN=$ORDER(^EDPB(233.1,IEN))
if 'IEN
QUIT
Begin DoDot:1
+3 SET DISPNM=$$GET1^DIQ(233.1,IEN,.02)
+4 SET ABBREV=$$GET1^DIQ(233.1,IEN,.03)
+5 IF DISPNM=""!(ABBREV="")
Begin DoDot:2
+6 DO DISP(IEN)
+7 IF DISPNM=""
DO EDFLD(IEN,.02)
+8 IF ABBREV=""
DO EDFLD(IEN,.03)
End DoDot:2
End DoDot:1
+9 QUIT
DISP(IEN) ;
+1 NEW DATA,ERR,IENS
+2 SET IENS=IEN_","
+3 DO GETS^DIQ(233.1,IENS,".01;.02;.03","IE","DATA","ERR")
+4 WRITE !,?2,"NAME: ",?20,$GET(DATA(233.1,IENS,.01,"E"))
+5 WRITE !,?2,"DISPLAY NAME:",?20,$GET(DATA(233.1,IENS,.02,"E"))
+6 WRITE !,?2,"ABBREVIATION:",?20,$GET(DATA(233.1,IENS,.03,"E")),!
+7 QUIT
EDFLD(IEN,FLD) ;
+1 NEW DIE,DA,DR
+2 SET DIE("NO^")=""
+3 WRITE !!,"You must correct the following fields before continuing:",!
+4 SET DIE="^EDPB(233.1,"
SET DA=IEN
SET DR=FLD
+5 LOCK +^EDPB(233.1,IEN):2
+6 IF $TEST
DO ^DIE
LOCK -^EDPB(233.1,IEN)
WRITE !!!
QUIT
+7 WRITE !,?10,"Another user is editing this entry. Please try again later.",!!
QUIT
+8 QUIT