source: FOIAVistA/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRPIYP.m@ 1389

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1RMPRPIYP ;HINCIO/ODJ - PIP EDIT - PROMPTS ;9/30/02 13:35
2 ;;3.0;PROSTHETICS;**61**;Feb 09, 1996
3 Q
4 ; The following subroutines are for selecting
5 ; Inventory Item
6 ;
7 ;***** OK - Prompt for an OK
8OK(RMPRYN,RMPREXC) ;
9 N DIR,X,Y,DA,DUOUT,DTOUT,DIROUT,DIRUT
10 S RMPREXC=""
11 S RMPRYN="N"
12 S DIR("A")=" ...OK"
13 S DIR("B")="Yes"
14 S DIR(0)="Y"
15 D ^DIR
16 I $D(DTOUT) S RMPREXC="T" G OKX
17 I $D(DIROUT) S RMPREXC="P" G OKX
18 I X=""!(X["^") S RMPREXC="^" G OKX
19 S RMPRYN="N" S:Y RMPRYN="Y"
20OKX Q
21 ;
22 ;***** ITEM - Prompt for Inventory Item
23ITEM(RMPRSTN,RMPRHCPC,RMPR11,RMPREXC) ;
24 N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DA,DIRUT,RMPRA,RMPRIMA,RMPRGBLR
25 N RMPRMAX,RMPRLIN,RMPRGBL,RMPR1,RMPRIMAD
26REDO S RMPRERR=0
27 S RMPREXC=""
28 I $G(RMPRSTN)="" S RMPRERR=1 G ITEMX
29 I $G(RMPRHCPC)="" S RMPRERR=3 G ITEMX
30 S RMPR1("HCPCS")=RMPRHCPC
31 S RMPRERR=$$HPACT^RMPRPIX1(.RMPR1)
32 K RMPR11
33 S RMPRMAX=14
34 S (RMLINE,RMPRLIN)=0
35 S RMPRIMA=""
36 ;
37 ; See if just 1 item - no need to list if there is
38 S RMPRGBLR="^RMPR(661.11,""ASHI"","_RMPRSTN_","""_RMPRHCPC_""")"
39 S RMPRGBL=$Q(@RMPRGBLR)
40 S RMPR11("IEN")=$QS(RMPRGBL,6)
41 I $$ITEME() G ITEMX
42 S RMPRGBL=$Q(@RMPRGBL)
43 I $$ITEME() S RMPRERR=$$GET^RMPRPIX1(.RMPR11) G ITEMX
44 ;
45 ; Selection list of items if more than 1
46 S RMPRGBL=RMPRGBLR
47ITEML1 S RMPRGBL=$Q(@RMPRGBL)
48 I $$ITEME G:'RMPRLIN ITEMX G ITEMP
49 I RMPRLIN,(RMLINE>RMPRMAX) D G ITEMP
50 . S DIR("A",1)="Press <RETURN> to see more, '^' to exit this list, or"
51 . Q
52ITEML2 ;
53 S RMPR11("IEN")=$QS(RMPRGBL,6)
54 S RMPRERR=$$GET^RMPRPIX1(.RMPR11)
55 I RMPR11("STATUS")="INACTIVE" G ITEML1
56 S RMPRLIN=RMPRLIN+1
57 I RMPRIMA'=$QS(RMPRGBL,5) D
58 . S RMPRIMAD=RMPR11("ITEM MASTER")
59 . S RMPRIMA=$QS(RMPRGBL,5)
60 . I RMPRLIN=1 Q
61 . W !!,"IFCAP Item: ",RMPRIMAD
62 .; S RMPRLIN=RMPRLIN+2,RMLINE=RMLINE+3
63 . S RMLINE=RMLINE+3
64 . Q
65 I RMPRLIN=1 D ITEMH
66 W !,$J(RMPRLIN,2)," ",RMPR11("HCPCS-ITEM")
67 W ?16,$E(RMPR11("SOURCE"))_" "_RMPR11("DESCRIPTION")
68 S RMPRA(RMPRLIN)=RMPR11("IEN")
69 K RMPR11
70 G ITEML1
71 ;
72 ; Prompt for selection
73ITEMP S DIR(0)="NAO"
74 S DIR("A")="Choose 1 - "_RMPRLIN_" : "
75 S (RMPRFLG,RMLINE)=0
76 D ^DIR
77 I $D(DTOUT) S RMPREXC="T" G ITEMX
78 I $D(DIROUT) S RMPREXC="P" G ITEMX
79 I X="",$D(DIR("A",1)) K DIR("A",1) D ITEMH G ITEML2
80 ;I X="" S RMPREXC="^" G ITEMX
81 I X["^"!($D(DUOUT)) S RMPREXC="^" G ITEMX
82 I X'="",'$D(RMPRA(X)) S RMPRFLG=1
83 I X="?"!X="??"!X="???" K RMPRA G REDO
84 I (X="")!(RMPRFLG) D G ITEMP
85 . W !,"Please select an item by entering a line number in range 1 - "
86 . W RMPRLIN_" or '^' to EXIT"
87 . S RMPRFLG=0
88 . Q
89 S RMPR11("IEN")=RMPRA(X)
90 S RMPRERR=$$GET^RMPRPIX1(.RMPR11)
91ITEMX Q
92ITEME() ;
93 Q:$QS(RMPRGBL,1)'=661.11 1
94 Q:$QS(RMPRGBL,2)'="ASHI" 1
95 Q:$QS(RMPRGBL,3)'=RMPRSTN 1
96 Q:$QS(RMPRGBL,4)'=RMPRHCPC 1
97 Q 0
98ITEMH W !!,"HCPCS: "_RMPRHCPC_" "_RMPR1("SHORT DESC")
99 W !," is associated with more than 1 item, please select one..."
100 W !!,"IFCAP Item: ",RMPRIMAD
101 Q
Note: See TracBrowser for help on using the repository browser.