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

PRCPRDCR.m

Go to the documentation of this file.
  1. PRCPRDCR ;WISC/RFJ-dietetics cost report ;27 May 93
  1. ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. D ^PRCPUSEL Q:'$G(PRCP("I"))
  1. N %,%H,%I,DATEEND,DATESTRT,INVPT,PRCPFLAG,PRCPIN,X,Y
  1. K X S X(1)="The Dietetic Cost Report is sorted by the inventory point (selectable), food group from the item master file, NSN, and date received (selectable)." D DISPLAY^PRCPUX2(40,79,.X)
  1. K X S X(1)="You can select multiple dietetic inventory points for printing this report. A dietetic inventory point is defined as a primary inventory point with the first two digits of the department number equal to '11'."
  1. D DISPLAY^PRCPUX2(5,40,.X)
  1. K ^TMP($J,"PRCPRDIE") S PRCPIN=PRCP("IN")
  1. S PRCPIN="" I $E($P($G(^PRCP(445,PRCP("I"),0)),"^",8),1,2)="11" S PRCPIN=PRCP("IN")
  1. F S INVPT=$$INVPT^PRCPUINV(PRC("SITE"),"P",0,1,PRCPIN) S:INVPT["^" PRCPFLAG=1 Q:'INVPT D
  1. . S PRCPIN=""
  1. . I $E($P($G(^PRCP(445,+INVPT,0)),"^",8),1,2)'="11" W !?2,"CANNOT BE SELECTED. FIRST TWO DIGITS OF DEPARTMENT NUMBER NOT EQUAL TO '11'." Q
  1. . S ^TMP($J,"PRCPRDIE",INVPT)=""
  1. I $G(PRCPFLAG) D Q Q
  1. I '$O(^TMP($J,"PRCPRDIE",0)) Q
  1. W !
  1. K X S X(1)="Select the range of RECEIPT DATES to display" W !! D DISPLAY^PRCPUX2(5,40,.X)
  1. D DATESEL^PRCPURS2("Receipt") I '$G(DATEEND) D Q Q
  1. W ! S %ZIS="Q" D ^%ZIS G:POP Q I $D(IO("Q")) D D ^%ZTLOAD K IO("Q"),ZTSK D Q Q
  1. . S ZTDESC="Dietetic Cost Report",ZTRTN="DQ^PRCPRDCR"
  1. . S ZTSAVE("PRCP*")="",ZTSAVE("DATE*")="",ZTSAVE("^TMP($J,""PRCPRDIE"",")="",ZTSAVE("ZTREQ")="@"
  1. W !!,"<*> please wait <*>"
  1. DQ ; queue starts here
  1. D START^PRCPRDC0
  1. Q D ^%ZISC K ^TMP($J,"PRCPRDIE"),^TMP($J,"PRCPRDIET")
  1. Q