Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PSS127PI

PSS127PI.m

Go to the documentation of this file.
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