Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: LRAPKOPT

LRAPKOPT.m

Go to the documentation of this file.
  1. LRAPKOPT ;AVAMC/REG - DEL OBSOLETE OPTIONS/CREATE X-REF 62.5,5 ; 1/29/89 12:45 ;
  1. ;;V~5.0~;LAB;;02/27/90 17:09
  1. EN ;
  1. S DIK="^DD(63.199,.01,1,",DA(2)="63.199",DA(1)=".01" F DA=0:0 S DA=$O(@(DIK_DA_")")) Q:DA'>0 D ^DIK
  1. S U="^" I $D(^DD(60,0,"VR")),^DD(60,0,"VR")>4.15 Q
  1. W !!,"This routine deletes the old anatomic pathology options from the option file",! D HELP W !!,"OK to delete old options " S %=2 D YN^DICN G:%>1!(%<0) LDF I %=0 D HELP G LRAPKOPT
  1. F LR="LRCXz","LRSOz","LRELz","LRATz","LRAOz" S LRB=$S(LR["C":"LRCYZ",LR["S":"LRSPZ",LR["E":"LREMZ",LR["AT":"LRAUP",1:"LRAPZ") D K
  1. S DIK="^DIC(19," S DA=$O(^DIC(19,"B","LRULY",0)) I DA D ^DIK W !,LR," deleted"
  1. G LDF
  1. K S LRA=LR F A=0:0 S LRA=$O(^DIC(19,"B",LRA)) Q:LRA=""!(LRA]LRB) W !,LRA," deleted" F LRC=0:0 S LRC=$O(^DIC(19,"B",LRA,LRC)) Q:'LRC D M S DA=LRC,DIK="^DIC(19," D ^DIK
  1. Q
  1. M ;delete entry in menu
  1. F LRM=0:0 S LRM=$O(^DIC(19,"AD",LRC,LRM)) Q:'LRM S LRE=$O(^(LRM,0)) D:LRE D
  1. Q
  1. D Q:'$D(^DIC(19,LRM,10,LRE,0)) S Y=^(0),Y(1)=$P(^DIC(19,+Y,0),"^",2),Y(2)=$P(Y,"^",2) K:Y(2)]"" ^DIC(19,LRM,10,"C",Y(2),LRE) K ^DIC(19,LRM,10,"B",LRC,LRE),^DIC(19,LRM,10,LRE,0),^DIC(19,"AD",LRC,LRM,LRE)
  1. K:Y(2)]"" ^(Y(2))
  1. L ^DIC(19,LRM,10,0) S X=^DIC(19,LRM,10,0),Y=$O(^(0)),^(0)=$P(X,"^",1,2)_"^"_Y_"^"_($P(X,"^",4)-1) L Q
  1. ;
  1. LDF W !!,"This part of the pre-init cross-references the screen field",!,"in the lab descriptions file (field# 62.5,5).",!
  1. F DA=0:0 S DA=$O(^LAB(62.5,DA)) Q:'DA W:DA#100=0 "." S X=^(DA,0),%=$P(X,"^"),X=$P(X,"^",4) I X]"",%]"" S ^LAB(62.5,"A"_X,%,DA)=""
  1. W !,*7,"DONE." D V^LRU Q
  1. ;
  1. HELP F A=1:1 S Y=$P($T(TXT+A),";",2) Q:Y="" W !,Y
  1. Q
  1. TXT ;
  1. ;Before initialization of the new anatomic pathology menu, the old options
  1. ;will be deleted if you answer 'YES'.
  1. ;If the old option is a menu entry that entry will be deleted from the menu.
  1. ;If you do not want the old options deleted you are responsible for cleaning
  1. ;up all the obsolete options.