PSS127PI ; PSS*1*127 Post-install routine ;05/11/07
;;1.0;PHARMACY DATA MANAGEMENT;**127**;9/30/97;Build 41
;
N DRUG,UNIT,MULTIP,ZND,NDF,ZTMP,DIE,DR,DA,COUNT
;
D MES^XPDUTL(" ")
D MES^XPDUTL(" Populating new fields in the DRUG file (#50)...")
;
K ^TMP("PSSNCPDP",$J)
M ^TMP("PSSNCPDP",$J)=@XPDGREF@("^XTMP(""PSSNCPDP"")")
;
S XPDIDTOT=$P(^PSDRUG(0),"^",4),COUNT=0
S DRUG=0
F S DRUG=$O(^PSDRUG(DRUG)) Q:'DRUG D
. I '$D(^PSDRUG(DRUG,0)) Q
. S COUNT=COUNT+1 I '(COUNT#100) D UPDATE^XPDID(COUNT)
. S UNIT="EA",MULTIP=1
. S ZND=$G(^PSDRUG(DRUG,"ND")),NDF=+$P(ZND,"^",3)
. I NDF,$D(^TMP("PSSNCPDP",$J,NDF)) D
. . S ZTMP=$G(^TMP("PSSNCPDP",$J,NDF))
. . S UNIT=$P(ZTMP,"^")
. . S MULTIP=$P(ZTMP,"^",2)
. S DIE="^PSDRUG(",DA=DRUG,DR="82////"_UNIT_";83////"_MULTIP D ^DIE
D UPDATE^XPDID(XPDIDTOT)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSS127PI 840 printed Nov 22, 2024@17:39:09 Page 2
PSS127PI ; PSS*1*127 Post-install routine ;05/11/07
+1 ;;1.0;PHARMACY DATA MANAGEMENT;**127**;9/30/97;Build 41
+2 ;
+3 NEW DRUG,UNIT,MULTIP,ZND,NDF,ZTMP,DIE,DR,DA,COUNT
+4 ;
+5 DO MES^XPDUTL(" ")
+6 DO MES^XPDUTL(" Populating new fields in the DRUG file (#50)...")
+7 ;
+8 KILL ^TMP("PSSNCPDP",$JOB)
+9 MERGE ^TMP("PSSNCPDP",$JOB)=@XPDGREF@("^XTMP(""PSSNCPDP"")")
+10 ;
+11 SET XPDIDTOT=$PIECE(^PSDRUG(0),"^",4)
SET COUNT=0
+12 SET DRUG=0
+13 FOR
SET DRUG=$ORDER(^PSDRUG(DRUG))
if 'DRUG
QUIT
Begin DoDot:1
+14 IF '$DATA(^PSDRUG(DRUG,0))
QUIT
+15 SET COUNT=COUNT+1
IF '(COUNT#100)
DO UPDATE^XPDID(COUNT)
+16 SET UNIT="EA"
SET MULTIP=1
+17 SET ZND=$GET(^PSDRUG(DRUG,"ND"))
SET NDF=+$PIECE(ZND,"^",3)
+18 IF NDF
IF $DATA(^TMP("PSSNCPDP",$JOB,NDF))
Begin DoDot:2
+19 SET ZTMP=$GET(^TMP("PSSNCPDP",$JOB,NDF))
+20 SET UNIT=$PIECE(ZTMP,"^")
+21 SET MULTIP=$PIECE(ZTMP,"^",2)
End DoDot:2
+22 SET DIE="^PSDRUG("
SET DA=DRUG
SET DR="82////"_UNIT_";83////"_MULTIP
DO ^DIE
End DoDot:1
+23 DO UPDATE^XPDID(XPDIDTOT)
+24 QUIT