VistA-WorldVistAEHR/r/PHARMACY_DATA_MANAGEMENT-PSS/PSS70UTL.m

13 lines
629 B
Mathematica

PSS70UTL ;BIR/SJA-POST INSTALL ROUTINE FOR PSS*1*70 ; 01/21/00 13:30
;;1.0;PHARMACY DATA MANAGEMENT;**70**;09/30/97
;
D BMES^XPDUTL("...Re-building the Synonym Multiple for GTIN barcode...")
S (PSSD,CNT)=0 F S PSSD=$O(^PSDRUG(PSSD)) Q:'PSSD S B=0 F S B=$O(^PSDRUG(PSSD,1,B)) Q:'B S PSSY=$G(^PSDRUG(PSSD,1,B,0)) I $P(PSSY,"^") S PSSX=$P(PSSY,"^") D CHK
Q
CHK I PSSX?16N!(PSSX?27.AN) D
.I $E(PSSX,1,2)'="01" Q
.I $L(PSSX)>26,$E(PSSX,17,18)'=17 Q
.I $E(PSSX,5)=3 S PSSX=$E(PSSX,6,15) S CNT=CNT+1 W:'(CNT#10) "." D
..K DA,DD,DO,DIC S DIC="^PSDRUG(PSSD,1,",DIC(0)="L",DLAYGO=50.1,DA(1)=PSSD,X=PSSX D FILE^DICN K DD,DO
Q