PRCPCRLO ;WISC/RFJ-specific item or ik locator report ;01 Sep 93
;;5.1;IFCAP;;Oct 20, 2000
;Per VHA Directive 10-93-142, this routine should not be modified.
D ^PRCPUSEL Q:'$G(PRCP("I"))
N ITEMDA,X
K X S X(1)="The Specific Item Or Instrument Kit Locator Report will print which case carts contain a specified item or instrument kit AND which instrument kits contain a specified item."
D DISPLAY^PRCPUX2(40,79,.X)
S ITEMDA=$$MASTITEM^PRCPUITM("I '$D(^PRCP(445.7,+Y,0))") I 'ITEMDA Q
W ! S %ZIS="Q" D ^%ZIS Q:POP I $D(IO("Q")) D D ^%ZTLOAD K IO("Q"),ZTSK D Q Q
. S ZTDESC="Specific Item Or Instrument Kit Locator Report",ZTRTN="DQ^PRCPCRLO"
. S ZTSAVE("PRCP*")="",ZTSAVE("ITEMDA")="",ZTSAVE("ZTREQ")="@"
W !!,"<*> please wait <*>"
DQ ; queue starts here
N %,%I,CCITEM,DATA,IKITEM,ITEMDESC,NOW,PAGE,PRCPFLAG,QTY,SCREEN,UNITS,X,Y
S ITEMDESC=$$DESCR^PRCPUX1(PRCP("I"),ITEMDA),QTY=+$P($G(^PRCP(445,PRCP("I"),1,ITEMDA,0)),"^",7),UNITS=$$UNIT^PRCPUX1(PRCP("I"),ITEMDA,"/")
D NOW^%DTC S Y=% D DD^%DT S NOW=Y,PAGE=1,SCREEN=$$SCRPAUSE^PRCPUREP U IO D H
S CCITEM=0 F S CCITEM=$O(^PRCP(445.7,"AI",ITEMDA,CCITEM)) Q:'CCITEM!($G(PRCPFLAG)) S DATA=$G(^PRCP(445.7,CCITEM,1,ITEMDA,0)) I DATA'="" D
. W !,"CC ITEM # ",CCITEM,?20,$E($$DESCR^PRCPUX1(PRCP("I"),CCITEM),1,28),?50,$E($$INVNAME^PRCPUX1(+$P(^PRCP(445.7,CCITEM,0),"^",2)),1,18),?70,$J($P(DATA,"^",2),10)
. I $Y>(IOSL-4) D:SCREEN P^PRCPUREP Q:$D(PRCPFLAG) D H
I $G(PRCPFLAG) D Q Q
S IKITEM=0 F S IKITEM=$O(^PRCP(445.8,"AI",ITEMDA,IKITEM)) Q:'IKITEM!($G(PRCPFLAG)) S DATA=$G(^PRCP(445.8,IKITEM,1,ITEMDA,0)) I DATA'="" D
. W !,"IK ITEM # ",IKITEM,?20,$E($$DESCR^PRCPUX1(PRCP("I"),IKITEM),1,28),?50,$E($$INVNAME^PRCPUX1(+$P(^PRCP(445.8,IKITEM,0),"^",2)),1,18),?70,$J($P(DATA,"^",2),10)
. I $Y>(IOSL-4) D:SCREEN P^PRCPUREP Q:$D(PRCPFLAG) D H
I $G(PRCPFLAG) D Q Q
D END^PRCPUREP
Q D ^%ZISC
Q
;
;
H S %=NOW_" PAGE "_PAGE,PAGE=PAGE+1 I PAGE'=2!(SCREEN) W @IOF
W $C(13),"SPECIFIC ITEM OR INSTRUMENT KIT LOCATOR REPORT ",?(80-$L(%)),%
S %="",$P(%,"-",81)=""
W !?5,"FOR: ",PRCP("IN")
W !?4,"ITEM: ",$E(ITEMDESC,1,20),?32,"CURRENT QTY ON-HAND: ",QTY," ",UNITS
W !,"CASE CART OR INSTRUMENT KIT",?50,"CREATED BY",?70,$J("QTY NEEDED",10),!,%
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRCPCRLO 2274 printed Oct 16, 2024@18:13:56 Page 2
PRCPCRLO ;WISC/RFJ-specific item or ik locator report ;01 Sep 93
+1 ;;5.1;IFCAP;;Oct 20, 2000
+2 ;Per VHA Directive 10-93-142, this routine should not be modified.
+3 DO ^PRCPUSEL
if '$GET(PRCP("I"))
QUIT
+4 NEW ITEMDA,X
+5 KILL X
SET X(1)="The Specific Item Or Instrument Kit Locator Report will print which case carts contain a specified item or instrument kit AND which instrument kits contain a specified item."
+6 DO DISPLAY^PRCPUX2(40,79,.X)
+7 SET ITEMDA=$$MASTITEM^PRCPUITM("I '$D(^PRCP(445.7,+Y,0))")
IF 'ITEMDA
QUIT
+8 WRITE !
SET %ZIS="Q"
DO ^%ZIS
if POP
QUIT
IF $DATA(IO("Q"))
Begin DoDot:1
+9 SET ZTDESC="Specific Item Or Instrument Kit Locator Report"
SET ZTRTN="DQ^PRCPCRLO"
+10 SET ZTSAVE("PRCP*")=""
SET ZTSAVE("ITEMDA")=""
SET ZTSAVE("ZTREQ")="@"
End DoDot:1
DO ^%ZTLOAD
KILL IO("Q"),ZTSK
DO Q
QUIT
+11 WRITE !!,"<*> please wait <*>"
DQ ; queue starts here
+1 NEW %,%I,CCITEM,DATA,IKITEM,ITEMDESC,NOW,PAGE,PRCPFLAG,QTY,SCREEN,UNITS,X,Y
+2 SET ITEMDESC=$$DESCR^PRCPUX1(PRCP("I"),ITEMDA)
SET QTY=+$PIECE($GET(^PRCP(445,PRCP("I"),1,ITEMDA,0)),"^",7)
SET UNITS=$$UNIT^PRCPUX1(PRCP("I"),ITEMDA,"/")
+3 DO NOW^%DTC
SET Y=%
DO DD^%DT
SET NOW=Y
SET PAGE=1
SET SCREEN=$$SCRPAUSE^PRCPUREP
USE IO
DO H
+4 SET CCITEM=0
FOR
SET CCITEM=$ORDER(^PRCP(445.7,"AI",ITEMDA,CCITEM))
if 'CCITEM!($GET(PRCPFLAG))
QUIT
SET DATA=$GET(^PRCP(445.7,CCITEM,1,ITEMDA,0))
IF DATA'=""
Begin DoDot:1
+5 WRITE !,"CC ITEM # ",CCITEM,?20,$EXTRACT($$DESCR^PRCPUX1(PRCP("I"),CCITEM),1,28),?50,$EXTRACT($$INVNAME^PRCPUX1(+$PIECE(^PRCP(445.7,CCITEM,0),"^",2)),1,18),?70,$JUSTIFY($PIECE(DATA,"^",2),10)
+6 IF $Y>(IOSL-4)
if SCREEN
DO P^PRCPUREP
if $DATA(PRCPFLAG)
QUIT
DO H
End DoDot:1
+7 IF $GET(PRCPFLAG)
DO Q
QUIT
+8 SET IKITEM=0
FOR
SET IKITEM=$ORDER(^PRCP(445.8,"AI",ITEMDA,IKITEM))
if 'IKITEM!($GET(PRCPFLAG))
QUIT
SET DATA=$GET(^PRCP(445.8,IKITEM,1,ITEMDA,0))
IF DATA'=""
Begin DoDot:1
+9 WRITE !,"IK ITEM # ",IKITEM,?20,$EXTRACT($$DESCR^PRCPUX1(PRCP("I"),IKITEM),1,28),?50,$EXTRACT($$INVNAME^PRCPUX1(+$PIECE(^PRCP(445.8,IKITEM,0),"^",2)),1,18),?70,$JUSTIFY($PIECE(DATA,"^",2),10)
+10 IF $Y>(IOSL-4)
if SCREEN
DO P^PRCPUREP
if $DATA(PRCPFLAG)
QUIT
DO H
End DoDot:1
+11 IF $GET(PRCPFLAG)
DO Q
QUIT
+12 DO END^PRCPUREP
Q DO ^%ZISC
+1 QUIT
+2 ;
+3 ;
H SET %=NOW_" PAGE "_PAGE
SET PAGE=PAGE+1
IF PAGE'=2!(SCREEN)
WRITE @IOF
+1 WRITE $CHAR(13),"SPECIFIC ITEM OR INSTRUMENT KIT LOCATOR REPORT ",?(80-$LENGTH(%)),%
+2 SET %=""
SET $PIECE(%,"-",81)=""
+3 WRITE !?5,"FOR: ",PRCP("IN")
+4 WRITE !?4,"ITEM: ",$EXTRACT(ITEMDESC,1,20),?32,"CURRENT QTY ON-HAND: ",QTY," ",UNITS
+5 WRITE !,"CASE CART OR INSTRUMENT KIT",?50,"CREATED BY",?70,$JUSTIFY("QTY NEEDED",10),!,%
+6 QUIT