source: WorldVistAEHR/trunk/r/PHARMACY_DATA_MANAGEMENT-PSS/PSS127PI.m@ 1361

Last change on this file since 1361 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 815 bytes
RevLine 
[613]1PSS127PI ; PSS*1*127 Post-install routine ;05/11/07
2 ;;1.0;PHARMACY DATA MANAGEMENT;**127**;9/30/97;Build 41
3 ;
4 N DRUG,UNIT,MULTIP,ZND,NDF,ZTMP,DIE,DR,DA,COUNT
5 ;
6 D MES^XPDUTL(" ")
7 D MES^XPDUTL(" Populating new fields in the DRUG file (#50)...")
8 ;
9 K ^TMP("PSSNCPDP",$J)
10 M ^TMP("PSSNCPDP",$J)=@XPDGREF@("^XTMP(""PSSNCPDP"")")
11 ;
12 S XPDIDTOT=$P(^PSDRUG(0),"^",4),COUNT=0
13 S DRUG=0
14 F S DRUG=$O(^PSDRUG(DRUG)) Q:'DRUG D
15 . I '$D(^PSDRUG(DRUG,0)) Q
16 . S COUNT=COUNT+1 I '(COUNT#100) D UPDATE^XPDID(COUNT)
17 . S UNIT="EA",MULTIP=1
18 . S ZND=$G(^PSDRUG(DRUG,"ND")),NDF=+$P(ZND,"^",3)
19 . I NDF,$D(^TMP("PSSNCPDP",$J,NDF)) D
20 . . S ZTMP=$G(^TMP("PSSNCPDP",$J,NDF))
21 . . S UNIT=$P(ZTMP,"^")
22 . . S MULTIP=$P(ZTMP,"^",2)
23 . S DIE="^PSDRUG(",DA=DRUG,DR="82////"_UNIT_";83////"_MULTIP D ^DIE
24 D UPDATE^XPDID(XPDIDTOT)
25 Q
Note: See TracBrowser for help on using the repository browser.