PSALOG1H ;BIR/LTL,JMB-Unposted Procurement History - CONT'D ;7/23/97 ;;3.0; DRUG ACCOUNTABILITY/INVENTORY INTERFACE;; 10/24/97 ;This routine prints the pharmacy procurement history High Cost Items ;report for a selected month. It is called by PSALOG. ; HIGH S PSAPG=0 D HDR ;If the "PSA" array does not exist, the "PSAC" array cannot be created. I '$D(^TMP("PSA",$J)) W !!,"No items were found for the selected month." G END^PSALOG0 ;If the "PSA" array exists, the "PSAC" does not exit, and the user ;requested the Item Totals report, the routine attempted to create ;the "PSAC" array and found no data. I $D(^TMP("PSA",$J)),'$D(^TMP("PSAC",$J)),$G(PSATOTAL) W !!,"No items were found for the selected month." G END^PSALOG0 ;If the "PSA" array exists, the "PSAC" does not exit, and the user ;did not request the Item Totals report, create the "PSAC" array. I $D(^TMP("PSA",$J)),'$D(^TMP("PSAC",$J)),'$G(PSATOTAL) D CREATE I '$D(^TMP("PSAC",$J)) W !!,"No items were found for the selected month." G END^PSALOG0 S PSAINVO=0 F S PSAINVO=+$O(^TMP("PSAC",$J,PSAINVO)) Q:'PSAINVO!(PSAOUT) D .D:$Y+4>IOSL HDR Q:PSAOUT .S PSAITEM="" F S PSAITEM=$O(^TMP("PSAC",$J,PSAINVO,PSAITEM)) Q:PSAITEM="" D ..Q:$G(^TMP("PSAC",$J,PSAINVO,PSAITEM))