source: internationalization/trunk/p/RRCI18E.m@ 1518

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

Internationalization

File size: 3.2 KB
Line 
1RRCI18E ; Internationalization Converter - Editor
2 ;RRCI18N V0.0001;;MTZ/RCR/27MAY2004
3 ;Donated by Chris Richardson
4 ;Initial database design by Marcus Werner
5 ;Copyright 2008 WorldVistA. Licensed under the terms of the GNU
6 ;General Public License See attached copy of the License.
7 ;
8 ;This program is free software; you can redistribute it and/or modify
9 ;it under the terms of the GNU General Public License as published by
10 ;the Free Software Foundation; either version 2 of the License, or
11 ;(at your option) any later version.
12 ;
13 ;This program is distributed in the hope that it will be useful,
14 ;but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;GNU General Public License for more details.
17 ;
18 ;You should have received a copy of the GNU General Public License along
19 ;with this program; if not, write to the Free Software Foundation, Inc.,
20 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21V ; Note: Snapshot file .84 before this run so that
22 ; it might be restored completely.
23 N CODE,END,EXIT,I,J,K,LL,RRCODE,RRCFILE,RRCIEN,RRCNODE,MSK
24 S (EXIT,END)=0
25 F S CMD=$$ASK(.EXIT) Q:EXIT!END D PROCESS(CMD)
26 QUIT
27 ; ============
28ASK(EXIT) ; READ THE USER'S REQUEST, RETURNING THE CURRENT
29 N REQ,STAT
30 S STAT=0
31 R !,"Enter the String to find: ",REQ
32 D
33 . I "^"[REQ S EXIT=1 Q
34 . I REQ?1"?".E D HELP Q
35 . S:$L(REQ)=1 REQ=$TR(REQ,"mx","MX")
36 . I REQ="X" D XCLUDE Q
37 . I REQ="M" D MOVE Q
38 . I REQ?1"`"1.N D NUMB Q
39 . N I,J,K,L
40 . I $D(^DI(.84,"D",REQ)) D Q
41 . .QUIT
42 . ;
43 . Q:STAT ; Drop out if there was a STATus returned
44 . S J="",STAT=0
45 . F I=0:1 S J=$O(^DI(.84,"D",J)) Q:J=""!(STAT>20) I J[REQ D
46 . . S STAT=STAT+1
47 . . S L(STAT)=$O(^DI(.84,"D",J,""))
48 . . I '(I#100) W "." W:$X>75 !
49 . .QUIT
50 . I STAT D Q
51 . ;
52 . S STAT=-99
53 .QUIT
54 QUIT STAT_"^"_REQ
55 ; ============
56HELP ; HELP MESSAGE
57 W !,"Enter one of the following;"
58 W !," a String to find: ",!," ^ to Exit"
59 W !," `nnn for an IEN if known",!
60 W !," M to Move A String to a new Number Space"
61 W !," X to Exclude this string from the Dialog File"
62 W !," ? to get this message.",!
63 QUIT
64 ; ============
65XCLUDE ; Exclude the current message from future extraction
66 I '$G(CUR) S STAT=-98 Q
67 ;
68 N SET,V,W,X,Y
69 S V=$P(^DI(.84,CUR,0),"^",4)
70 I '$L(V) S STAT=-97 Q
71 ;
72 S W=$O(^VWDI(250.84,"B",V,""))
73 D:W=""
74 . S W=$P($G(^VWDI(250.84,0)),"^",3)+1
75 . S $P(^VWDI(250.84,0),"^",2,4)="250.84^"_W_"^"_W
76 . S ^VWDI(250.84,W,0)=V
77 . S ^VWDI(250.84,"D",V,W)=""
78 .QUIT
79 ; K ^DI(.84,"B",CUR),^DI(.84,"D",V,CUR),^DI(.84,CUR)
80 QUIT
81 ; ============
82MOVE ; Relocate the current IEN to a new location
83 I '$G(CUR) S STAT=-98 Q
84 ;
85 QUIT
86 ; ============
87NUMB ; Establish an IEN's existance and fix it as a current source
88 N I,J,K
89 S I=+REP
90 S J=$D(^DI(.84,I,0))
91 I 'J U 0 W !," IEN: "_I_" does not exist" Q
92 ;
93 S CUR=I
94 QUIT
95 ; ============
96SRCH ;
97 QUIT STAT
98 ; ============
Note: See TracBrowser for help on using the repository browser.