ORAPDLG ;SLC/JNM - LAB ANATOMIC PATHOLOGY ROUTINES ;Feb 18, 2022@14:01:36
;;3.0;ORDER ENTRY/RESULTS REPORTING;**569**;Dec 17, 1997;Build 23
;
Q
;
; SETNAME and KILLNAME are used by the "AOI" cross reference of the
; AP DIALOG CONFIG File (#101.45), ORDERABLE ITEM Field (#.04),
; to set the NAME Field (#.01) to the same as the NAME Field (#.01)
; of the ORDERABLE ITEM File (#101.43).
;
SETNAME(DA,X1,X2) ;
N NAME,OLDNAME
S OLDNAME=$P(^ORD(101.45,DA,0),U,1)
S NAME=$P($G(^ORD(101.43,X2,0)),U)
I NAME'="",NAME'=OLDNAME D
. S $P(^ORD(101.45,DA,0),U,1)=NAME
. I OLDNAME'="" K ^ORD(101.45,"B",OLDNAME,DA)
. S ^ORD(101.45,"B",NAME,DA)=""
Q
;
KILLNAME(DA,X1,X2) ;
;N NAME
;S NAME=$P($G(^ORD(101.45,DA,0)),U,1)
;I NAME'="" D
;. K ^ORD(101.45,"B",NAME,DA)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORAPDLG 806 printed Oct 16, 2024@18:27:48 Page 2
ORAPDLG ;SLC/JNM - LAB ANATOMIC PATHOLOGY ROUTINES ;Feb 18, 2022@14:01:36
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**569**;Dec 17, 1997;Build 23
+2 ;
+3 QUIT
+4 ;
+5 ; SETNAME and KILLNAME are used by the "AOI" cross reference of the
+6 ; AP DIALOG CONFIG File (#101.45), ORDERABLE ITEM Field (#.04),
+7 ; to set the NAME Field (#.01) to the same as the NAME Field (#.01)
+8 ; of the ORDERABLE ITEM File (#101.43).
+9 ;
SETNAME(DA,X1,X2) ;
+1 NEW NAME,OLDNAME
+2 SET OLDNAME=$PIECE(^ORD(101.45,DA,0),U,1)
+3 SET NAME=$PIECE($GET(^ORD(101.43,X2,0)),U)
+4 IF NAME'=""
IF NAME'=OLDNAME
Begin DoDot:1
+5 SET $PIECE(^ORD(101.45,DA,0),U,1)=NAME
+6 IF OLDNAME'=""
KILL ^ORD(101.45,"B",OLDNAME,DA)
+7 SET ^ORD(101.45,"B",NAME,DA)=""
End DoDot:1
+8 QUIT
+9 ;
KILLNAME(DA,X1,X2) ;
+1 ;N NAME
+2 ;S NAME=$P($G(^ORD(101.45,DA,0)),U,1)
+3 ;I NAME'="" D
+4 ;. K ^ORD(101.45,"B",NAME,DA)
+5 QUIT