source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPCED0.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1PRCPCED0 ;WISC/RFJ-enter edit case cart or instrument kit ;01 Sep 93
2 ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6 ;
7INSTRKIT ; enter edit instrument kit
8 D ^PRCPUSEL Q:'$G(PRCP("I"))
9 N %,D0,D1,DA,DDC,DG,DI,DIC,DIE,DQ,DR,PRCPPRIV,PRCPSET,PRCPFLAG,X,Y
10 K X S X(1)="Before you can create an instrument kit, an item must be defined in the Item Master File as non-purchasable." D DISPLAY^PRCPUX2(2,40,.X)
11 F S DA=$$SELECT("K",1,PRCP("I")) Q:DA<1 D
12 . D LOCATE(PRCP("I"),DA) I $G(PRCPFLAG) K PRCPFLAG W !! Q
13 . S (DIC,DIE)="^PRCP(445.8,",DR=".01;5////"_DUZ_";6///NOW;1;7;11;12;10",PRCPSET="I 1",PRCPPRIV=1 D ^DIE
14 . W !!
15 Q
16 ;
17 ;
18CASECART ; enter edit case cart
19 D ^PRCPUSEL Q:'$G(PRCP("I"))
20 N %,D0,D1,DA,DI,DIC,DIE,DQ,DR,PRCPPRIV,PRCPSET,X,Y
21 K X S X(1)="Before you can create a case cart, an item must be defined in the Item Master File as non-purchasable." D DISPLAY^PRCPUX2(2,40,.X)
22 F S DA=$$SELECT("C",1,PRCP("I")) Q:DA<1 D
23 . S (DIC,DIE)="^PRCP(445.7,",DR=".01;5////"_DUZ_";6///NOW;1;7;10",PRCPSET="I 1",PRCPPRIV=1 D ^DIE
24 . W !!
25 Q
26 ;
27 ;
28OPCODES ; enter opcodes tied to a case cart
29 D ^PRCPUSEL Q:'$G(PRCP("I"))
30 N %,D0,D1,DA,DI,DIC,DIE,DIZ,DLAYGO,DQ,DR,X,Y
31 K X S X(1)="This option allows operation codes to be linked to case carts. When a patient is scheduled for an operation code, the system will recommend ordering the case carts tied to the operation code."
32 D DISPLAY^PRCPUX2(2,40,.X)
33 F S DA=$$SELECT("C",0,$S(PRCP("DPTYPE")="P":PRCP("I"),1:0)) Q:DA<1 D
34 . S (DIC,DIE)="^PRCP(445.7,",DR=81 W ! D ^DIE
35 . W !!
36 Q
37 ;
38 ;
39SELECT(TYPE,ADDNEW,INVPT) ; select a case cart or instrument kit
40 ; type='C'ase cart or instrument 'K'it
41 ; addnew=1 for adding new entries
42 ; invpt to screen cc or ik owned by inventory point
43 N %,DIC,DLAYGO,I,PRCPINPT,PRCPFILE,PRCPNAME,PRCPSET,PRCPPRIV,X,Y
44 S PRCPFILE=445.7,PRCPNAME="CASE CART",PRCPPRIV=1
45 I TYPE="K" S PRCPFILE=445.8,PRCPNAME="INSTRUMENT KIT"
46 S DIC="^PRCP("_PRCPFILE_",",DIC(0)="QEAM",DIC("A")="Select "_PRCPNAME_" Item Number: ",PRCPSET="I 1"
47 I INVPT S DIC("S")="I $P(^PRCP("_PRCPFILE_",+Y,0),U,2)="_INVPT,PRCPINPT=INVPT
48 S DIC("W")="W ?20,$E($$DESCR^PRCPUX1(+$G(PRCPINPT),+Y),1,20) I $G(PRCPINPT) S %=$G(^PRCP(445,PRCPINPT,1,+Y,0)) W ?45,"" "",$S(%="""":""Not Stored In InvPt"",1:""Qty On-Hand: ""_+$P(%,U,7))"
49 I ADDNEW S DIC(0)="QEALM",DLAYGO=PRCPFILE,DIC("DR")="2////"_PRCP("I")_";3////"_DUZ_";4///NOW"
50 D ^DIC
51 Q $S(Y<1:0,1:+Y)
52 ;
53 ;
54LOCATE(INVPT,IKITEM) ; locate any case carts containing instrument kits ikitem
55 S IOP="HOME" D ^%ZIS K IOP
56 K ^TMP($J,"PRCPCED0")
57 N CCITEM,SCREEN,QTY,X
58 S CCITEM=0 F S CCITEM=$O(^PRCP(445.7,"AI",IKITEM,CCITEM)) Q:'CCITEM S QTY=+$P($G(^PRCP(445,INVPT,1,CCITEM,0)),"^",7) I QTY S ^TMP($J,"PRCPCED0",CCITEM)=QTY
59 I '$O(^TMP($J,"PRCPCED0",0)) Q
60 ; show where iks are
61 W ! D H
62 S SCREEN=1,(CCITEM,PRCPFLAG)=0 F S CCITEM=$O(^TMP($J,"PRCPCED0",CCITEM)) Q:'CCITEM!($G(PRCPFLAG)) S QTY=^(CCITEM) D
63 . W !,CCITEM,?7,$E($$DESCR^PRCPUX1(INVPT,CCITEM),1,22),?44,$J(QTY,13)
64 . S SCREEN=SCREEN+1
65 . I SCREEN'<IOSL D P^PRCPUREP Q:$D(PRCPFLAG) D H S SCREEN=1
66 I SCREEN>(IOSL-16) D R^PRCPUREP
67 K X S X(1)="WARNING -- This Instrument Kit has been assembled and is contained in the above case cart(s)."
68 S X(2)="If you continue editing the definition of this instrument kit, disassembling of the above case cart(s) and instrument kit may cause incorrect quantities for items contained within this instrument kit."
69 S X(3)="To prevent incorrect quantities, please disassemble the above case cart(s) and the instrument kit before editing the definition."
70 D DISPLAY^PRCPUX2(20,60,.X)
71 K ^TMP($J,"PRCPCED0")
72 S PRCPFLAG=1
73 Q
74 ;
75 ;
76H ; display header on display
77 S %="",$P(%,"-",81)=""
78 W !,"IM#",?7,"DESCRIPTION",?44,$J("QTY ON-HAND",13),!,%
79 Q
Note: See TracBrowser for help on using the repository browser.