1 | PSSSYN ;BIR/WRT-ADD SYNONYMS FROM 50 TO ORDERABLE ITEM FILE ; 09/02/97 8:56
|
---|
2 | ;;1.0;PHARMACY DATA MANAGEMENT;;9/30/97
|
---|
3 | D LOOP,DEX
|
---|
4 | Q
|
---|
5 | LOOP F NUM=0:0 S NUM=$O(^PSDRUG(NUM)) Q:'NUM I $D(^PSDRUG(NUM,2)) S POI=$P(^PSDRUG(NUM,2),"^",1) I POI]"",$D(^PS(50.7,POI,0)) D LOOP1
|
---|
6 | Q
|
---|
7 | LOOP1 I $D(^PSDRUG(NUM,1,0)) F NUMB=0:0 S NUMB=$O(^PSDRUG(NUM,1,NUMB)) Q:'NUMB S IUSE=$P(^PSDRUG(NUM,1,NUMB,0),"^",3) I IUSE=0!(IUSE="") S SYNO=$P(^PSDRUG(NUM,1,NUMB,0),"^",1) D CHEK
|
---|
8 | Q
|
---|
9 | CHEK I '$D(^PS(50.7,"C",SYNO,POI)) D ADD
|
---|
10 | Q
|
---|
11 | ADD S DA(1)=POI,DIC="^PS(50.7,"_POI_",2,",X=SYNO,DIC(0)="L",DIC("P")=$P(^DD(50.7,2,0),"^",2),DLAYGO=50.72 D ^DIC
|
---|
12 | Q
|
---|
13 | DEX K ^PS(50.7,"C") F IEN=0:0 S IEN=$O(^PS(50.7,IEN)) Q:'IEN F IEN1=0:0 S IEN1=$O(^PS(50.7,IEN,2,IEN1)) Q:'IEN1 S SYN=$P(^PS(50.7,IEN,2,IEN1,0),"^",1),^PS(50.7,"C",SYN,IEN,IEN1)=""
|
---|
14 | Q
|
---|