source: FOIAVistA/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRPIY5.m@ 1800

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

initial load of FOIAVistA 6/30/08 version

File size: 4.3 KB
Line 
1RMPRPIY5 ;HINCIO/ODJ - PIP Data fields - Prompts ;3/8/01
2 ;;3.0;PROSTHETICS;**61**;Feb 09, 1996
3 Q
4 ;
5 ;SRC - Prompt for Source - V for VA (used), C for Commercial
6SRC(RMPRSRC,RMPREXC) ;
7 N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
8 S RMPRSRC=$G(RMPRSRC)
9 S RMPRERR=0
10 S DIR(0)="661.11,4"
11 S DIR("A")="SOURCE"
12 S DIR("B")=$S(RMPRSRC="":"C",1:RMPRSRC)
13 S DIR("?")="^D SRCH^RMPRPIY5"
14RESRC D ^DIR
15 I $D(DTOUT) S RMPREXC="T" G SRCX
16 I $D(DIROUT) S RMPREXC="P" G SRCX
17 I X="" G RESRC
18 I (X["^")!($D(DUOUT)) S RMPREXC="^" G SRCX
19 S RMPRSRC=Y
20 S RMPREXC=""
21SRCX Q
22SRCH W "If the item is USED, type in 'V' for VA."
23 W !,"If the item is NEW, type in 'C' for COMMERCIAL."
24 Q
25 ;
26 ;***** QTY - Prompt for Quantity (Invoice not on hand)
27QTY(RMPRQTY,RMPREXC) ;
28 N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
29 S RMPRQTY=$G(RMPRQTY)
30 S RMPRERR=0
31 S DIR(0)="NAO^0:99999:0"
32 S DIR("A")="INVOICE QUANTITY: "
33 S:RMPRQTY'="" DIR("B")=RMPRQTY
34 S DIR("??")="^D QTYHH^RMPRPIY5"
35REQTY D ^DIR
36 I $D(DTOUT) S RMPREXC="T" G QTYX
37 I $D(DIROUT) S RMPREXC="P" G QTYX
38 I X="" G REQTY
39 I (X["^")!($D(DUOUT)) S RMPREXC="^" G QTYX
40 S RMPREXC=""
41 S RMPRQTY=+Y
42QTYX Q
43QTYHH W "Type in the item quantity you are receiving into stock.",!
44 W "This quantity should match that on the paper record of the receipt",!
45 W "such as an invoice or delivery note, it is not the same as the",!
46 W "quantity on hand. To correct on hand quantities you should use the",!
47 W "reconciliation option.",!
48 W "Please make sure you create separate receipts if you are receiving",!
49 W "the same item from different vendors or at different costs."
50 Q
51 ;
52 ;***** UCST - prompt for Unit Cost
53UCST(RMPRUCST,RMPREXC) ;
54 N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
55 S RMPRUCST=$G(RMPRUCST)
56 S RMPRERR=0
57 S RMPREXC=""
58 S DIR(0)="NOA^0:99999:6"
59 S DIR("A")="UNIT COST: "
60 S DIR("??")="^D UCSTHH^RMPRPIY5"
61 S:RMPRUCST'="" DIR("B")=RMPRUCST
62REUCST D ^DIR
63 I $D(DTOUT) S RMPREXC="T" G SRCX
64 I $D(DIROUT) S RMPREXC="P" G SRCX
65 I X="" G REUCST
66 I X["^"!($D(DUOUT)) S RMPREXC="^" G SRCX
67 S RMPRUCST=+Y
68UCSTX Q
69UCSTHH W "Type in the dollar cost per item."
70 W !,"If you would prefer to enter the total dollar value for the"
71 W !,"item quantity you have just typed in, then type in 0 here."
72 Q
73 ;
74 ;***** TVAL - Prompt for total $ value
75TVAL(RMPRTVAL,RMPREXC) ;
76 N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
77 S RMPRTVAL=$G(RMPRTVAL)
78 S RMPRERR=0
79 S RMPREXC=""
80 S DIR(0)="NOA^0:999999:2"
81 S DIR("A")="TOTAL COST OF QUANTITY: "
82 S:RMPRTVAL'="" DIR("B")=RMPRTVAL
83 S DIR("??")="^D TVALHH^RMPRPIY5"
84RETVAL D ^DIR
85 I $D(DTOUT) S RMPREXC="T" G TVALX
86 I $D(DIROUT) S RMPREXC="P" G TVALX
87 I X["^" S RMPREXC="^" G TVALX
88 I X="" G RETVAL
89 S RMPRTVAL=+Y
90TVALX Q
91TVALHH W "Type in the total dollar value or cost (excluding freight)"
92 W !,"of the item quantity you have entered above."
93 Q
94 ;
95 ;***** REO - Prompt for Re-Order Level
96REO(RMPRREO,RMPREXC) ;
97 N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
98 S RMPRREO=$G(RMPRREO)
99 S RMPRERR=0
100 S RMPREXC=""
101 S DIR(0)="NOA^0:99999:0"
102 S DIR("A")="RE-ORDER LEVEL: "
103 S:RMPRREO'="" DIR("B")=RMPRREO
104 S DIR("??")="^D REOHH^RMPRPIY5"
105REREO D ^DIR
106 I $D(DTOUT) S RMPREXC="T" G REOX
107 I $D(DIROUT) S RMPREXC="P" G REOX
108 I X="" G REREO
109 I (X["^")!($D(DUOUT)) S RMPREXC="^" G REOX
110 S RMPRREO=+Y
111REOX Q
112REOHH W "Type in a number that signifies the quantity on hand of an item,"
113 W !,"at a particular location, below which the item should be ordered."
114 Q
115 ;
116 ;***** VEND - prompt for Vendor
117VEND(RMPRVEND,RMPREXC) ;
118 N RMPRERR,DIC,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
119 S RMPRVEND=$G(RMPRVEND("IEN"))
120 S RMPRERR=0
121 S DIC=440
122 S DIC(0)="AEQM"
123 S DIC("A")="VENDOR: "
124 I RMPRVEND'="" S DIC("B")=RMPRVEND
125REVEND D ^DIC
126 I $D(DTOUT) S RMPREXC="T" G VENDX
127 I $D(DIROUT)!(X["^^") S RMPREXC="P" G VENDX
128 I X="" G REVEND
129 I (X["^")!($D(DUOUT))!(+Y=-1) S RMPREXC="^" G VENDX
130 S RMPREXC=""
131 S RMPRVEND("IEN")=$P(Y,"^",1)
132 S RMPRVEND("NAME")=$P(Y,"^",2)
133VENDX Q
134 ;
135 ;***** UNIT - prompt for unit of issue
136UNIT(RMPRUNI,RMPREXC) ;
137 N RMPRERR,DIC,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
138 S RMPRUNI=$G(RMPRUNI("IEN"))
139 S RMPRERR=0
140 S DIC=420.5
141 S DIC(0)="AEQM"
142 S DIC("A")="UNIT OF ISSUE: "
143 I RMPRUNI'="" S DIC("B")=RMPRUNI
144UNITD D ^DIC
145 I $D(DTOUT) S RMPREXC="T" G UNITX
146 I $D(DIROUT)!(X["^^") S RMPREXC="P" G UNITX
147 I X="" G UNITD
148 I (X["^")!($D(DUOUT))!(+Y=-1) S RMPREXC="^" G UNITX
149 S RMPREXC=""
150 S RMPRUNI("IEN")=$P(Y,"^",1)
151 S RMPRUNI("NAME")=$P(Y,"^",2)
152UNITX Q
Note: See TracBrowser for help on using the repository browser.