source: WorldVistAEHR/trunk/r/DRUG_ACCOUNTABILITY-PSA/PSAFIX.m@ 1582

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

initial load of WorldVistAEHR

File size: 720 bytes
RevLine 
[613]1PSAFIX ;BHM/DB - FIX INACTIVE DRUGS IN 58.8;10/3/97
2 ;;3.0; DRUG ACCOUNTABILITY/INVENTORY INTERFACE;**3**; 10/24/97
3 D NOW^%DTC W @IOF K PSALOC,PSACNT
4 W !!,"Correcting erroneous Drug entries in file 58.8.",!
5BGN ;begin the loop
6 S PSALOC=$S('$D(PSALOC):$O(^PSD(58.8,0)),1:$O(^PSD(58.8,PSALOC))) G DONE:PSALOC'>0
7 ;
8 K DRUG
9DRUG S DRUG=$S('$D(DRUG):$O(^PSD(58.8,PSALOC,1,0)),1:$O(^PSD(58.8,PSALOC,1,DRUG))) G BGN:DRUG'>0 G DRUG:'$D(^PSD(58.8,PSALOC,1,DRUG,0)) S DATA=^PSD(58.8,PSALOC,1,DRUG,0) I $P(DATA,"^",1)'="" G DRUG
10 S $P(^PSD(58.8,PSALOC,1,DRUG,0),"^",1)=DRUG,^PSD(58.8,PSALOC,1,"B",DRUG,DRUG)="",PSACNT=$G(PSACNT)+1
11 G DRUG
12DONE W !!,"Patch PSA*3*3 has finished, and corrected ",$G(PSACNT)," bad entries.",!
13Q Q
Note: See TracBrowser for help on using the repository browser.