source: WorldVistAEHR/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXILGO.m@ 792

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

initial load of WorldVistAEHR

File size: 3.2 KB
Line 
1LEXILGO ; ISL Rename Options ; 09-23-96
2 ;;2.0;LEXICON UTILITY;;Sep 23, 1996;Build 1
3 Q
4RE ; Entry point to rename GMPT Options to LEX namespace
5 N LEX,LEXR,LEXI,LEXT,LEXC,LEXON,LEXOD,LEXNN,LEXND,LEXNP,LEXNPE
6 I '$D(^DIC(9.4,"C","LEX")) D SPL,OPT,KPL Q
7OPT ; Rename Options
8 W !,?2,"Old Name",?40,"New Name"
9 S (LEXC,LEXNP)=0,LEXR="NAM"
10 F LEXI=1:1 S LEXT=$T(@LEXR+LEXI) Q:$P(LEXT,";",2)="" D
11 . K LEXO S LEXO(99)=0,LEXO(1,0)=$P(LEXT,";",2),LEXO(1,1)=$P(LEXT,";",3),LEXO(2,0)=$P(LEXT,";",4),LEXO(2,1)=$P(LEXT,";",5)
12 . S LEXO(0)=$O(^DIC(19,"B",$E(LEXO(1,0),1,30),0)) S:LEXO(0)="" LEXO(0)=$O(^DIC(19,"B",$E(LEXO(2,0),1,30),0))
13 . Q:+($G(LEXO(0)))=0 S LEXO(3,0)=$P(^DIC(19,LEXO(0),0),"^",1),LEXO(3,1)=$P(^DIC(19,LEXO(0),0),"^",2)
14 . I $G(LEXO(1,0))=$G(LEXO(3,0)),$G(LEXO(1,1))=$G(LEXO(3,1)) S LEXO(99)=1
15 . I $G(LEXO(2,0))=$G(LEXO(3,0)),$G(LEXO(2,1))=$G(LEXO(3,1)) S LEXO(99)=2
16 . I $L($G(LEXOPT)),$E(LEXO(1,0),1,$L(LEXOPT))'=LEXOPT Q
17 . I LEXO(99)=1 D ED(LEXO(0),LEXO(1,0),LEXO(1,1),LEXO(2,0),LEXO(2,1))
18 . I LEXO(99)=2 D ED(LEXO(0),LEXO(2,0),LEXO(2,1),LEXO(1,0),LEXO(1,1))
19 K LEXO Q
20RP ; Rename GMPL only
21 S LEXOPT="GMPL" D OPT Q
22ED(LEXIEN,LEXON,LEXOD,LEXNN,LEXND) ; Edit Option file
23 S LEXC=+($G(LEXC))+1
24 W !!,?2,LEXON,?40,LEXNN
25 W !,?2,LEXOD,?40,LEXND
26 N DA,DR,DIE,DIC S (DIE,DIC)="^DIC(19,",DA=+LEXIEN Q:'$D(@(DIC_DA_",0)"))
27ED2 ; Record is Locked
28 L +^DIC(19,DA):1 I '$T W:'$D(ZTQUEUED) "." H 2 G ED2
29 S DR=".01///^S X=LEXNN;1///^S X=LEXND" D ^DIE L -^DIC(19,DA) Q
30SPL ; Set Temporary Package file entry for LEX
31 N DIE,DIC,DA,X,DR,LEX1,LEX2 K DD,DO S DIC="^DIC(9.4,",DIC(0)="EQLM",X="Lexicon Utility",LEX1="LEX",LEX2="Clinical/Non-Clinical Terminology System"
32 S DIC("DR")="1///^S X=LEX1;2///^S X=LEX2" D FILE^DICN S LEXNP=Y,LEXNPE=+Y Q
33KPL ; Kill Temporary Package file entry for LEX
34 S LEXNPE=+($G(LEXNPE)) Q:LEXNPE=0 N DIK,DIC,DA S (DIK,DIC)="^DIC(9.4,",DA=LEXNPE D ^DIK Q
35DG ; Delete GMPT Package Entry
36 N DA S DA=$O(^DIC(9.4,"C","GMPT",0))
37 I +DA>0,$D(^DIC(9.4,+(DA),0)) D H 1 Q
38 . W !,?4,"GMPT Package File entry was found"
39 . W !!,?6,"The GMPT namespace was used by the Clinical Lexicon"
40 . W !,?6,"Utility version 1.0. The GMPT Package File entry may"
41 . W !,?6,"be deleted. ",!
42 I +DA=0!('$D(^DIC(9.4,+(DA),0))) D H 1 Q
43 . W !,?4,"GMPT Package File entry was not found",!
44 ;N DIK,DIC S (DIK,DIC)="^DIC(9.4," D ^DIK
45 Q
46NAM ; Options - ;old name;old display text;new name;new display text
47 ;GMPT CLINICAL LEXICON MGT MENU;Clinical Lexicon Management Menu;LEX MGT MENU;Lexicon Management Menu
48 ;GMPT MGR EDIT TERM;Edit a term;LEX MGR EDIT LEXICON;Edit Lexicon
49 ;GMPT MGR DEFAULTS;Defaults;LEX MGR DEFAULTS;Defaults
50 ;GMPT CLINICAL LEXICON UTILITY;Clinical Lexicon Utility;LEX UTILITY;Lexicon Utility
51 ;GMPT CLINICAL LEXICON LOOK-UP;Clinical Lexicon Look-up;LEX LOOK-UP;Look-up Term
52 ;GMPT USER DEFAULTS;Lexicon Look-up Defaults;LEX USER DEFAULTS;User Defaults
53 ;GMPT MGR USER DEFAULTS;Edit User/User Group Defaults;LEX MGR USER DEFAULTS;Edit User/User Group Defaults
54 ;GMPT MGR LIST DEFAULTS;List User/User Group Defaults;LEX MGR LIST DEFAULTS;List User/User Group Defaults
55 ;GMPT MGR EDIT DEFN;Edit Term Definition;LEX MGR EDIT DEFN;Edit Term Definition
56 ;GMPL USER SCREEN;Problem Look-up Defaults;GMPL USER LOOK-UP DEFAULTS;Problem Look-up Defaults
57 ;;;
Note: See TracBrowser for help on using the repository browser.