source: WorldVistAEHR/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRPIYN.m@ 1351

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1RMPRPIYN ;HINCIO/ODJ - EL - Edit Location ;3/8/01
2 ;;3.0;PROSTHETICS;**61**;Feb 09, 1996
3 Q
4 ;
5 ;***** EL - Edit Inventory LOCATION
6 ; no inputs required
7 ; other than standard VISTA vars. (DUZ, etc)
8 ;
9EL N RMPRERR,RMPRSTN,RMPREXC,RMPR5
10 ;
11 ;***** STN - call prompt for Site/Station
12STN S RMPRERR=$$STN^RMPRPIY1(.RMPRSTN,.RMPREXC)
13 I RMPRERR G ELX
14 I RMPREXC'="" G ELX
15 ;
16 ;***** LOCN - call prompt for Location
17LOCN W @IOF,!!,"Editing an Inventory Location.....",!
18LOCN1 D LOCNM^RMPRPIY7(RMPRSTN("IEN"),.RMPR5,.RMPREXC)
19 I RMPREXC="T"!(RMPREXC="^") G ELX
20 I RMPREXC="P" G STN
21 S RMPR5("STATION")=RMPRSTN("IEN")
22 S RMPR5("STATION IEN")=RMPRSTN("IEN")
23 ;
24 ;***** LOCN2 - call prompt to change Location name
25LOCN2 W ! D EDLOC(.RMPR5,.RMPREXC)
26 I RMPREXC="T" G ELX
27 I RMPREXC'="" G LOCN
28 G ELX
29 ;
30 ;***** exit points
31ELX D KILL^XUSCLEAN
32 Q
33 ;
34 ;***** EDLOC - prompt for change of Location name
35EDLOC(RMPR5,RMPREXC) ;
36 N DIR,X,Y,DA,DUOUT,DTOUT,DIROUT,RMPRYN,RMPRNEWN,RMPR5N,RMPRERR
37 S RMPREXC=""
38 S DIR(0)="FOA^3:30"
39 S DIR("A")="LOCATION: "
40 S DIR("B")=RMPR5("NAME")
41 S DIR("?")="Answer must be 3-30 characters in length."
42 S DIR("??")="^D ELQQM^RMPRPIY6"
43EDLOC1 D ^DIR
44 I $D(DTOUT) S RMPREXC="T" G EDLOCX
45 I $D(DIROUT) S RMPREXC="P" G EDLOCX
46 I X=""!(X["^") S RMPREXC="^" G EDLOCX
47 I X=RMPR5("NAME") G EDLOCX
48 L +^RMPR(661.5,RMPR5("IEN")):0 E D G EDLOCX
49 . W !,"Location being edited by another user, cannot continue."
50 . H 2
51 . S RMPREXC="P"
52 . Q
53 I $D(^RMPR(661.5,"XSL",RMPR5("STATION"),X)) D G EDLOCU
54 . W !,"Location name already in use, cannot continue.",!
55 . H 2
56 . S RMPREXC="P"
57 . Q
58 S RMPRNEWN=X
59 D ELOK(.RMPRYN,.RMPREXC)
60 I RMPREXC="T" G EDLOCU
61 I RMPREXC'=""!(RMPRYN="N") S RMPREXC="" L -^RMPR(661.5,RMPR5("IEN")) G EDLOC1
62 S RMPR5N("IEN")=RMPR5("IEN")
63 S RMPR5N("NAME")=RMPRNEWN
64 S RMPRERR=$$UPD^RMPRPIX5(.RMPR5N)
65 W !
66 W "Location has been edited from '"_RMPR5("NAME")_"'"
67 W " to '"_RMPRNEWN_"' !!!"
68 H 2
69EDLOCU L -^RMPR(661.5,RMPR5("IEN"))
70EDLOCX Q
71ELQQM W !,"This is a location of an item or stock being tracked for inventory."
72 Q
73 ;
74 ; Y/N Prompt to confirm change of Location Name
75ELOK(RMPRYN,RMPREXC) ;
76 N DIR,X,Y,DA,DUOUT,DTOUT,DIROUT
77 S RMPRYN="N"
78 S RMPREXC=""
79 S DIR(0)="Y"
80 S DIR("B")="N"
81 S DIR("A")="Are you sure you want to change the name of this location"
82 D ^DIR
83 I $D(DTOUT) S RMPREXC="T" G ELOKX
84 I $D(DIROUT) S RMPREXC="P" G ELOKX
85 I X=""!(X["^") S RMPREXC="^" G ELOKX
86 S RMPRYN="N" S:Y RMPRYN="Y"
87ELOKX Q
Note: See TracBrowser for help on using the repository browser.