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

APCLTAX2.m

Go to the documentation of this file.
APCLTAX2 ; IHS/CMI/LAB - DMS TAXONOMY MANAGEMENT UTILITY ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;UTILITY PROGRAM TO MANAGE TAXONOMY CREATION AND EDITING
OTHER ;EP;TO SELECT AND EDIT NON-DMS TAXONOMIES
 F  D O1 Q:$D(APCLQUIT)!$D(APCLOUT)
 K APCLQUIT
 Q
O1 W @IOF
 S DIR(0)="SO^1:Lab Taxonomies;2:All Other Taxonomies"
 S DIR("A")="Which type of Taxonomy"
 W !
 D DIR^APCLDIC
 I Y<1 S APCLQUIT="" Q
 S:Y=1 APCLWHCH="LAB"
 S:Y=2 APCLWHCH="RX"
 D O2
 Q
STAX S DIC=$S(APCLWHCH="RX":"^ATXAX(",1:"^ATXLAB(")
 S DIC(0)="AEMQZ"
 S DIC("A")="Name of Taxonomy: "
 W !
 D DIC^APCLDIC
 Q:Y<1
 S APCLTDA=+Y
 S APCLTNAM=Y(0,0)
 S APCLCANN=$S(APCLWHCH="RX":$P(Y(0),U,13),1:0)
 S APCLFILE=$S(APCLWHCH="RX":+$P(Y(0),U,15),1:60)
 S APCLTF=^DIC(APCLFILE,0,"GL")
 D APCLTF1^APCLTAX0
 I APCLWHCH="RX" S APCLANAM="OTHER" D TE1^APCLTAX0 Q
 D LABTEST^APCLTAX1
 Q
ATTRIB ;EP;TO SELECT ATTRIBUTE FOR TAXONOMY CREATION
 S DIC="^AMQQ(5,"
 S DIC(0)="AEMQZ"
 S DIC("A")="Which ATTRIBUTE: "
 S DIC("S")="I $P(^(0),U,14)]"""""
 W !!,"Each TAXONOMY must be based on an existing ATTRIBUTE."
 W !!,"Please select an ATTRIBUTE for this TAXONOMY."
 W !
 D DIC^APCLDIC
 Q:Y<1
 S APCLADA=+Y
 S APCLANAM="OTHER"
 S APCLCANN=($P(Y(0),U,14)=2)
 D TERM^APCLTAX0
 Q
O2 ;OTHER TAXONOMY ADD/EDIT
 K APCLADA ;PATCH XXX
 S DIR(0)="SO^1:Edit Existing Taxonomy;2:Add NEW Taxonomy"
 S DIR("A")="Which option"
 W !
 D DIR^APCLDIC
 I Y<1 K APCLQUIT Q
 I Y=1 D STAX Q
 I Y=2 D TAXADD^APCLTAX0:APCLWHCH="RX",LADD^APCLTAX0:APCLWHCH="LAB"
 Q