source: WorldVistAEHR/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOSUINV.m@ 1438

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

initial load of WorldVistAEHR

File size: 1.4 KB
Line 
1PSOSUINV ;BHAM ISC/SAB-UPDATE OR INITIALIZE INVENTORY ; 04/02/93 9:55
2 ;;7.0;OUTPATIENT PHARMACY;;DEC 1997
3 W ! S DIR("A",1)="1 Update Current Inventory",DIR("A",2)="2 Initialize Inventory"
4 S DIR("A")="CHOOSE 1 OR 2> ",DIR(0)="SAO^1:Update Current Inventory;2:Initialize Inventory" D ^DIR G:$D(DUOUT)!($D(DIROUT))!($D(DIRUT))!(Y="") EX K DIR S F=Y-1
5A W ! S (DIE,DIC)="^PSDRUG(",DIC(0)="QEAM",DIC("W")="I $D(^PSDRUG(Y,""I"")),^(""I""),^(""I"")'>DT W $C(7),?45,""INACTIVE DRUG""" D ^DIC G:"^"[X EX G:Y<0 A
6 K DIC S DA=+Y,DR="12;15;13;1000:99999;W !,$P(^DD(50,16,0),""^"",1),"" is "" W:$D(^PSDRUG(DA,660)) $P(^(660),""^"",6)"
7 W !!,$P(^PSDRUG(DA,0),"^"),?45,"CURRENT INVENTORY: ",$S($D(^(660.1)):^(660.1),1:0) D ^DIE G A:'$D(^PSDRUG(DA,660))!($D(Y))
8B R !,"UNITS RECEIVED: ",X:DTIME S:'$T X="^" G A:"^"[X,Q:X?1"?".E,U:X?1N.N1"D" S X=X*$P(^PSDRUG(DA,660),"^",5)
9U S X=+X I X'?1N.N W $C(7)," ??" G Q
10 W !,$S(F:"SET INVENTORY TO ",1:"UPDATE INVENTORY BY "),X," UNITS? YES//" R Y:DTIME G B:"Y"'[$E(Y,1) S ^PSDRUG(DA,660.1)=$S(F:X,'$D(^PSDRUG(DA,660.1)):X,1:^(660.1)+X) W ?45,"NEW INVENTORY: ",^(660.1) G A
11Q W !!?5,"ENTER THE NUMBER OF ORDER UNITS (CASES, BOXES, BOTTLES, ETC.) RECEIVED."
12 W !?5,"IF YOU WISH TO UPDATE THE INVENTORY BY DISPENSING UNITS, TYPE THE NUMBER"
13 W !?5,"OF UNITS FOLLOWED BY THE LETTER 'D'.",! G B
14 Q
15EX K DIR,DUOUT,DTOUT,DIRUT,DIC,DIE,X,Y,DA,DR,DIR,F,DI,D0
16 Q
Note: See TracBrowser for help on using the repository browser.