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

AMQQGTX.m

Go to the documentation of this file.
AMQQGTX ; IHS/CMI/THL - GENERIC TAXONOMY GENERATOR AND RESTORER ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;-----
EN ; - ENTRY POINT - Generate Taxonomy
 I '$D(AMQQGTX) W !,"Array variable, AMQQGTX, to store members of taxonomy not set" Q
 I '$D(DTIME) S DTIME=999
 K AMQQQUIT,^UTILITY("AMQQ TAX",$J)
 S AMQQCNAM="PATIENTS"
 S AMQQCCLS="P"
 S AMQQURGN=0
 S AMQQDF=""
 D ^AMQQAT
 S AMQQCNAM="PROVIDER"
 S AMQQCCLS="H"
 S AMQQURGN=0
 S AMQQDF=""
 D ^AMQQAT
 I $D(^UTILITY("AMQQ TAX",$J)) S %=0  F  S %=$O(^UTILITY("AMQQ TAX",$J,1,%)) Q:%=""  S @(AMQQGTX_""""_%_""")")=""
 K AMQQCCLS,AMQQMULT,AMQQQUIT,AMQQCNAM,AMQQQ,AMQQURGN,DR,DIE,AMQQDF,^UTILITY("AMQQ TAX",$J),AMQQGTX,AMQQTAX
 Q
 ;
EN1 ; - ENTRY POINT - Restore Taxonomy
 I '$D(AMQQGTX) Q
 K ^UTILITY("AMQQ TAX",$J),^UTILITY("AMQQ",$J)
 S AMQQHILO="^UTILITY(""AMQQ"",$J,""HILO"")"
 S AMQQURGN=1
 S AMQQDF=""
 D RESTORE^AMQQTX0
 I $D(^UTILITY("AMQQ TAX",$J)) S %=0  F  S %=$O(^UTILITY("AMQQ TAX",$J,1,%)) Q:%=""  S @(AMQQGTX_%_")")=""
 K AMQQB,AMQQDF,AMQQHILO,AMQQTAXT,AMQQTGBL,AMQQGTX,AMQQURGN,AMQQECHO,AMQQLINK,AMQQTGFG,^UTILITY("AMQQ TAX",$J),^UTILITY("AMQQ",$J),AMQQTAX
 Q
 ;
EN2 ; - ENTRY POINT - Generation of taxonomy by end user
 S DIR("?")="Select the number or name of an attribute from the list for which a taxonomy is to be created"
 S DIR(0)="S^1:DIAGNOSIS;2:ADA CODE;3:RX;4:PROCEDURE (MEDICAL);5:PATIENT ED TOPIC;6:HEALTH FACTORS"
 D ^DIR
 K DIR
 I '$D(Y(0)) G X1
 S X=$O(^AMQQ(5,"B",Y(0),""))
 I X="" W !,"A taxonomy can not be created for this attribute" G X1
 S AMQQATNM=Y(0)
 D EN1^AMQQTX
 K ^UTILITY("AMQQ TAX",$J),AMQQTDFN,AMQQTAX,AMQQURGN,AMQQTAX,AMQQATNM
X1 Q
 ;