source: WorldVistAEHR/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRPIYU.m@ 648

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

initial load of WorldVistAEHR

File size: 2.5 KB
RevLine 
[613]1RMPRPIYU ;HINCIO/ODJ - PIP Data Prompts;3/8/01
2 ;;3.0;PROSTHETICS;**61**;Feb 09, 1996
3 ;DBIA #800
4 Q
5 ;
6 ;***** QTY - Prompt for Quantity (Transfer Option RMPRPIYT)
7QTY(RMPRQTY,RMPREXC,RMPR5,RMPR11) ;
8 N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA,RMPRSTK
9 S RMPRQTY=$G(RMPRQTY)
10 S RMPREXC=""
11 S RMPRERR=0
12 S RMPRSTK("STATION IEN")=RMPR11("STATION IEN")
13 S RMPRSTK("HCPCS")=RMPR11("HCPCS")
14 S RMPRSTK("ITEM")=RMPR11("ITEM")
15 S RMPRSTK("LOCATION IEN")=RMPR5("IEN")
16 S RMPRSTK("VENDOR IEN")=""
17 S RMPRERR=$$STOCK^RMPRPIUE(.RMPRSTK)
18 I +RMPRSTK("QOH")<1 S RMPRERR=99 G QTYX
19 S DIR(0)="NAO^1:"_+RMPRSTK("QOH")_":0"
20 S DIR("A")="Enter Quantity to transfer: "
21 S DIR("?")="^D QM^RMPRPIYU"
22 D ^DIR
23 I $D(DTOUT) S RMPREXC="T" G QTYX
24 I $D(DIROUT) S RMPREXC="P" G QTYX
25 I X=""!(X["^")!($D(DUOUT)) S RMPREXC="^" G QTYX
26 S RMPRQTY=Y
27 S RMPREXC=""
28QTYX Q RMPRERR
29 ;
30 ; On help get current stock and display
31 ; only call from QTY^RMPRPIYU
32QM N RMPRERR
33 S RMPRERR=$$STOCK^RMPRPIUE(.RMPRSTK)
34 W !,"Current balance is = "_RMPRSTK("QOH")
35 W !,"Enter quantity 1 to "_RMPRSTK("QOH")_" or enter '^' to QUIT?"
36 Q
37 ;
38 ;***** VEND - prompt for Vendor (Transfer option RMPRPIYT)
39VEND(RMPRV,RMPRVNDR,RMPREXC) ;
40 N DIC,X,Y,DA,DUOUT,DTOUT,DIROUT,DIRUT
41 S RMPREXC=""
42 S DIC(0)="AEQM"
43 S DIC("A")="Vendor: "
44 S DIC=440
45 S DIC("S")="I $D(RMPRV(+Y))"
46 D ^DIC
47 I $D(DTOUT) S RMPREXC="T" G VENDX
48 I $D(DIROUT) S RMPREXC="P" G VENDX
49 I X=""!(X["^")!($D(DUOUT)) S RMPREXC="^" G VENDX
50 S RMPRVNDR=+Y
51VENDX Q
52 ;
53 ;***** LOCNM - Prompt for transfer 'To' location
54 ; must be in 661.5 and active
55LOCNM(RMPRSTN,RMPR5,RMPREXC) ;
56 N RMPRERR,DIR,X,Y,DA,DUOUT,DTOUT,DIROUT,RMPRYN,RMPRTDT
57 S RMPREXC=""
58 S RMPRERR=0
59 S DIR(0)="FOA"
60 S DIR("A")="Enter Receiving Location: "
61 S DIR("?")="^D QM^RMPRPIYB"
62 S DIR("??")="^D QM2^RMPRPIYB"
63 S RMPR5("IEN")=""
64LOCNM1 D ^DIR
65 I $G(RMPR5("IEN"))'="" S RMPREXC="" G LOCNMX
66 I $D(DTOUT) S RMPREXC="T" G LOCNMX
67 I $D(DIROUT) S RMPREXC="P" G LOCNMX
68 I X=""!(X["^") S RMPREXC="^" G LOCNMX
69 K RMPR5
70 S RMPR5("STATION")=RMPRSTN
71 S RMPR5("STATION IEN")=RMPRSTN
72 D LIKE^RMPRPIYB(RMPRSTN,X,.RMPREXC,.RMPR5)
73 I RMPREXC'="" G LOCNM1
74 I $G(RMPR5("IEN"))="" D G LOCNM1
75 . W !,"Please enter a valid Location"
76 . Q
77 ;
78 ; exit
79LOCNMX Q
80 ;
81 ;***** OK - Prompt for an OK
82OK(RMPRYN,RMPREXC) ;
83 N DIR,X,Y,DA,DUOUT,DTOUT,DIROUT,DIRUT
84 S RMPREXC=""
85 S RMPRYN="N"
86 S DIR("A")=" ...OK"
87 S DIR("B")="Yes"
88 S DIR(0)="Y"
89 D ^DIR
90 I $D(DTOUT) S RMPREXC="T" G OKX
91 I $D(DIROUT) S RMPREXC="P" G OKX
92 I X=""!(X["^") S RMPREXC="^" G OKX
93 S RMPRYN="N" S:Y RMPRYN="Y"
94OKX Q
Note: See TracBrowser for help on using the repository browser.