PSSPOIMP ;BIR/RTR/WRT-Edit Orderable Item Name and Inactive date ;7/20/04 1:45pm
;;1.0;PHARMACY DATA MANAGEMENT;**102,107**;9/30/97
ASKSYN ;PSS*1*102;PROMPT TO ADD DRUG TEXT AS SYNONYM
N DIR
S DIR(0)="Y"
S DIR("A")="ADD THIS DRUG TEXT AS A SYNONYM? "
S DIR("B")="N"
D ^DIR
I 'Y Q
S X=$G(^PS(51.7,X(1),0))
I X]"" S PPPTMP(50.72,D0,X)="" ;; PSS*1*107 replace with D0
Q
ADDSYN ;ADD DRUG TEXT AS A SYNONYM
N TMP,PSOERR,DIERR,X,PSOIEN
S PSOIEN="" F S PSOIEN=$O(PPPTMP(50.72,PSOIEN)) Q:PSOIEN="" D
.S X="" F S X=$O(PPPTMP(50.72,PSOIEN,X)) Q:X="" D
..I $D(^PS(50.7,PSOIEN,2,"B",X)) Q
..S TMP(50.72,"+2,"_PSOIEN_",",.01)=X
..D UPDATE^DIE("","TMP","","PSOERR")
..K DIE,DIR,DIERR,TMP
K PPPTMP,TMP
Q
PSSPOIMP ;BIR/RTR/WRT-Edit Orderable Item Name and Inactive date ;7/20/04 1:45pm
+1 ;;1.0;PHARMACY DATA MANAGEMENT;**102,107**;9/30/97
ASKSYN ;PSS*1*102;PROMPT TO ADD DRUG TEXT AS SYNONYM
+1 NEW DIR
+2 SET DIR(0)="Y"
+3 SET DIR("A")="ADD THIS DRUG TEXT AS A SYNONYM? "
+4 SET DIR("B")="N"
+5 DO ^DIR
+6 IF 'Y
QUIT
+7 SET X=$GET(^PS(51.7,X(1),0))
+8 ;; PSS*1*107 replace with D0
IF X]""
SET PPPTMP(50.72,D0,X)=""
+9 QUIT
ADDSYN ;ADD DRUG TEXT AS A SYNONYM
+1 NEW TMP,PSOERR,DIERR,X,PSOIEN
+2 SET PSOIEN=""
FOR
SET PSOIEN=$ORDER(PPPTMP(50.72,PSOIEN))
IF PSOIEN=""
QUIT
Begin DoDot:1
+3 SET X=""
FOR
SET X=$ORDER(PPPTMP(50.72,PSOIEN,X))
IF X=""
QUIT
Begin DoDot:2
+4 IF $DATA(^PS(50.7,PSOIEN,2,"B",X))
QUIT
+5 SET TMP(50.72,"+2,"_PSOIEN_",",.01)=X
+6 DO UPDATE^DIE("","TMP","","PSOERR")
+7 KILL DIE,DIR,DIERR,TMP
End DoDot:2
End DoDot:1
+8 KILL PPPTMP,TMP
+9 QUIT