Index: ccr/trunk/rxnorm/trunk/C0CRXNLK.m
===================================================================
--- ccr/trunk/rxnorm/trunk/C0CRXNLK.m	(revision 1614)
+++ 	(revision )
@@ -1,282 +1,0 @@
-C0CRXNLK	; VEN/SMH - RxNorm Lookup Utilities ;2013-04-08  5:00 PM
-	;;1.0;RX NORM;;Apr 25, 2012;Build 99
-	;(c) Sam Habiel 2013
-	; See accompanying license. Don't use otherwise.
-	;
-	S IO=$P
-	N DIQUIET S DIQUIET=1
-	D DT^DICRW
-	D EN^XTMUNIT($T(+0),1)
-	QUIT
-	;
-GCN2RXN(GCN)	; $$ Public - Get RxNorm CUI using GCN
-	; Input: GCN by Value
-	; Output: Extrinsic
-	S GCN=$$RJ^XLFSTR(GCN,6,0) ; pad to six digits by zeros (123 becomes 000123)
-	N IEN S IEN=$O(^C0CRXN(176.001,"STC","NDDF","CDC",GCN,"")) ; Get Entry
-	Q ^(IEN)
-	;
-GCN2RXNT ; @TEST - Test Get RxNorm CUI using GCN
-	N L F L=1:1 N LN S LN=$T(GCN2RXND+L) Q:LN["<<END>>"  Q:LN=""  D
-	. N GCN S GCN=$P(LN,";",3)
-	. N RXN S RXN=$P(LN,";",4)
-	. D CHKEQ^XTMUNIT($$GCN2RXN(GCN),RXN,"Translation from GCN to RXCUI failed")
-	QUIT
-	;
-GCN2RXND ; @DATA - Data for Tests ;;GCN;EXPECTED RXNCUI
-	;;16033;991632
-	;;8208;310429
-	;;1275;628953
-	;;18;197604
-	;;346;884173
-	;;<<END>>
-	;
-	;
-	;
-RXN2VUI(RXNCUI)	; $$ Public - Get VUID(s) for given RXNCUI for Clinical Drug
-	; Input: RXNCUI by Value
-	; Output: Caret delimited extrinsic. Should not be more than 2 entries.
-	N C0PVUID S C0PVUID=""
-	N I S I=""
-	F  S I=$O(^C0CRXN(176.001,"STX","VANDF","CD",RXNCUI,I)) Q:I=""  S C0PVUID=C0PVUID_^(I)_U
-	S C0PVUID=$E(C0PVUID,1,$L(C0PVUID)-1) ; remove trailing ^
-	; TODO: Return only the quantified form using:
-	; I $O(^C0CRXN(176.005,"RXCUIREL",RXN,"has_quantified_form","")) N QF S QF=$O(^("")) Q $O(^C0CRXN(176.001,"RXN2VUID",QF,""))
-	Q C0PVUID
-	;
-RXN2VUIT ; @TEST - Get VUIDs given RxNorm values
-	N L F L=1:1 N LN S LN=$T(RXN2VUID+L) Q:LN["<<END>>"  Q:LN=""  D
-	. N RXN S RXN=$P(LN,";",3)
-	. N VUIDS S VUIDS=$P(LN,";",4)
-	. D CHKEQ^XTMUNIT($$RXN2VUI(RXN),VUIDS,"Translation from RXNCUI to VUID failed")
-	QUIT
-	;
-RXN2VUID ; @DATA - Data items for previous test
-	;;991632;4006455
-	;;310429;4002369^4013941
-	;;628953;4000874^4000856^4013966^4015798^4015799
-	;;197604;4003335^4015937
-	;;884173;4002469^4013919
-	;;<<END>>
-	;
-	;
-	;
-VUI2VAP(VUID)	; $$ Public - Get VA Product IEN from VUID
-	; Input VUID by Value
-	; Output: Extrinsic
-	Q $$FIND1^DIC(50.68,"","QX",VUID,"AVUID")
-	;
-VUI2VAPT ; @TEST - Get VA Product IEN from VUID
-	N L F L=1:1 N LN S LN=$T(VUI2VAPD+L) Q:LN["<<END>>"  Q:LN=""  D
-	. N VUID S VUID=$P(LN,";",3)
-	. N VAP S VAP=$P(LN,";",4)
-	. D CHKEQ^XTMUNIT($$VUI2VAP(VUID),VAP,"Translation from VUID to VA PRODUCT failed")
-	QUIT
-	;
-VUI2VAPD ; @DATA - Data for above test
-	;;4006455;5932
-	;;4002369;1784
-	;;4000874;252
-	;;4003335;2756
-	;;4002469;1884
-	;;<<END>>
-	;
-	;
-	;
-VAP2MED(VAPROD)	; $$ Public - Get Drug(s) using VA Product IEN
-	; Un-Unit-testable: Drug files differ between sites.
-	; Input: VA Product IEN By Value
-	; OUtput: Caret delimited extrinsic
-	; This code inspired from PSNAPIs
-	; WHY THE HELL WOULD I USE A TEXT INDEX?
-	; It's my only option. Creating new xrefs on the drug file doesn't help
-	; as they are not filled out when adding a drug (IX[ALL]^DIK isn't called).
-	N MEDS S MEDS="" ; result
-	N PN,PN1 ; Product Name, abbreviated product name.
-	S PN=$P(^PSNDF(50.68,VAPROD,0),"^"),PN1=$E(PN,1,30)
-	N P50 S P50=0 ; looper through VAPN index which is DRUG file entry
-	F  S P50=$O(^PSDRUG("VAPN",PN1,P50)) Q:'P50  D  ; for each text match
-	. I $P(^PSDRUG(P50,"ND"),"^",3)=VAPROD S MEDS=$G(MEDS)_P50_U  ; check that the VA PRODUCT pointer is the same as ours.
-	S:MEDS MEDS=$E(MEDS,1,$L(MEDS)-1) ; remove trailing ^
-	Q MEDS
-	;
-	;
-RXN2MEDS(RXNCUI) ; $$ Public - Convert RxNorm value to currently existing drugs in File 50.
-	; Input: SCD RXNCUI
-	; Output; Caret delimited extrinsic
-	; Un-unit testable
-	N VUIDS S VUIDS=$$RXN2VUI(RXNCUI) ; Get VUID from RXNCUI
-	; TODO: Decide which VUID to use!
-	N VAPROD S VAPROD=$$VUI2VAP(VUIDS) ; Get VA Product from VUID
-	N MEDS S MEDS=$$VAP2MED(VAPROD) ; Get Meds from VA Product
-	QUIT MEDS
-	;
-FDI2RXN(BASE)	; $$ Public - Get RxNorm CUI for FDB Ingredient/Base
-	; ^C0CRXN(176.001,"STC","NDDF","IN","014739",1000870)=1362160
-	; Input: BASE By Value
-	; Output: RxNorm CUI
-	S BASE=$$RJ^XLFSTR(BASE,6,0) ; pad to six digits by zeros (123 becomes 000123)
-	N IEN S IEN=$O(^C0CRXN(176.001,"STC","NDDF","IN",BASE,"")) Q ^(IEN)
-	;
-FDI2RXNT	; @TEST - Test Get RxNorm CUI for FDB Ingredient/Base
-	D CHKEQ^XTMUNIT($$FDI2RXN(14739),1362160,"$$FDI2RXN failed")
-	QUIT
-	;
-	;
-	;
-RXN2VIN(RXNCUI)	; $$ Public - Get VUID Ingredient for RxNorm CUI
-	; ^C0CRXN(176.001,"STX","VANDF","IN",1366467,1008555)=4031768
-	; Input: RXNCUI By Value
-	; Output: VUID
-	N IEN S IEN=$O(^C0CRXN(176.001,"STX","VANDF","IN",RXNCUI,"")) Q ^(IEN)
-	;
-RXN2VINT	; @TEST - Test Get VUID Ingredient for RxNorm CUI
-	D CHKEQ^XTMUNIT($$RXN2VIN(1366467),4031768,"$$RXN2VIN failed")
-	QUIT
-	;
-	;
-	;
-VIN2VAG(VUID)	; $$ Public - Get VA Generic for VUID Ingredient
-	; Input: VUID By Value
-	; Output: IEN^VA Generic Name (i.e. .01 field value)
-	N C0PIEN S C0PIEN=$$FIND1^DIC(50.6,"","QX",VUID,"AVUID")
-	N C0P01 S C0P01=$$GET1^DIQ(50.6,C0PIEN,.01)
-	Q C0PIEN_"^"_C0P01
-	;
-VIN2VAGT ; @TEST - Test Get VA Generic for VUID Ingredient
-	D CHKEQ^XTMUNIT(+$$VIN2VAG(4023636),2832,"$$VIN2VAG failed")
-	QUIT
-	;
-	;
-	;
-FDI2VAG(BASE)	; $$ Public - Get VA Generic for FDB Ingredient/Base
-	; TODO:Not tested...
-	; Input: BASE By Value
-	; Output: IEN^VA Generic Name (i.e. .01 field value)
-	Q $$VIN2VAG($$RXN2VIN($$FDI2RXN(BASE)))
-	;
-VIN2DIN(VUID)	; $$ Public - Get Drug Ingredient for VUID Ingredient
-	; TODO:Not tested...
-	; Input: VUID By Value
-	; Output: IEN^Drug Ingredient Name (i.e. .01 field value)
-	N C0PIEN S C0PIEN=$$FIND1^DIC(50.416,"","QX",VUID,"AVUID")
-	N C0P01 S C0P01=$$GET1^DIQ(50.416,C0PIEN,.01)
-	Q C0PIEN_"^"_C0P01
-	;
-FDI2DIN(BASE)	; $$ Public - Get Drug Ingredient for FDB Ingredient/Base
-	; TODO:Not tested...
-	; Input: BASE By Value
-	; Output: IEN^Drug Ingredient Name (i.e. .01 field value)
-	Q $$VIN2DIN($$RXN2VIN($$FDI2RXN(BASE)))
-	;
-VUI2RXN(VUID)	; $$ Public - Get RXNCUI for VUID (any VUID type)
-	; Input: VUID By Value
-	; Output: RXNCUIs delimited by ^
-	; Get all entries whose code is the VUID and are in the VA NDF which are clinical drugs
-	D FIND^DIC(176.001,,"@;.01","PQX",VUID,,"CODE","I $P(^(0),U,12,13)=""VANDF^CD""")
-	; Deserialise it into a single string
-	; ^TMP("DILIST",4844,0)="1^*^0^"
-	; ^TMP("DILIST",4844,0,"MAP")="IEN^.01"
-	; ^TMP("DILIST",4844,1,0)="1006351^1364462"
-	N RXNS S RXNS=""
-	N I F I=0:0 S I=$O(^TMP("DILIST",$J,I)) Q:'I  S RXNS=RXNS_$P(^(I,0),U,2)_U
-	S RXNS=$E(RXNS,1,$L(RXNS)-1)
-	QUIT RXNS
-	;
-MED2RXN(DA) ; $$ Public - Get RxNorm CUI for Drug
-	; Input: DA - Medication IEN
-	; Output: RXNCUIs delimited by ^
-	N ND S ND=$G(^PSDRUG(DA,"ND")) ; ND Node
-	N VAP S VAP=$P(ND,U,3) ; VA Product Pointer
-	Q:'VAP ""  ; quit if empty
-	N VUID S VUID=+^PSNDF(50.68,VAP,"VUID")  ; Get VUID
-	I 'VUID S $EC=",U1," ; Must exist
-	Q $$VUI2RXN(VUID)
-	;
-MED2SCDN(DA) ; $$ Public - Medication to Semantic Clinical Drug Name
-	; Input: DA - Medication IEN
-	; Output: The Canonical Semantic Clinical Drug name
-	N RXNCUI S RXNCUI=$$MED2RXN(DA)
-	Q:'RXNCUI ""
-	N IEN S IEN=$O(^C0CRXN(176.001,"STC","RXNORM","SCD",RXNCUI,""))  ; Let's try generic drug
-	I 'IEN S IEN=$O(^C0CRXN(176.001,"STC","RXNORM","SBD",RXNCUI,""))  ; Let's try non-bioequivalent Brands then
-	I 'IEN S IEN=$O(^C0CRXN(176.001,"STC","RXNORM","GPCK",RXNCUI,"")) ; Let's try a Generic combination package
-	I 'IEN S IEN=$O(^C0CRXN(176.001,"STC","RXNORM","SCDF",RXNCUI,"")) ; Let's try a Clinical Drug and Form (Like Metamucil)
-	Q:'IEN "" ; Apparently not every VUID has a corresponding RXNCUI SCD.
-	Q $P(^C0CRXN(176.001,IEN,0),U,15)
-	;
-RXN2NDI(RXNCUI)	; $$ Public - Get NDDF Ingredient for RXNCUI
-	; Input: RXNCUI By Value
-	; Output: NDDF Base code
-	; TODO:Not tested...
-	N IEN S IEN=$O(^C0CRXN(176.001,"STX","NDDF","IN",RXNCUI,"")) Q ^(IEN)
-	;
-VIN2NDI(VUID)	; $$ Public - Get NDDF Ingredient for VUID
-	; NB: WILL ONLY WORK IF VUID IS AN INGREDIENT VUID, NOT A CLINICAL DRUG
-	; Input: VUID By Value
-	; Output: NDDF Base code
-	; TODO:Not tested...
-	Q $$RXN2NDI($$VUI2RXN(VUID))
-	;
-	; ---
-	;
-NDC2RXN(NDC) ; $$ Public - Get RxCUI given the NDC
-	; NB: Will only work if passed NDC is in 5-4-2 format.
-	; Input: NDC By Value in 5-4-2 Format
-	; Output: RxNorm Code.
-	S NDC=$TR(NDC,"-")
-	N IEN S IEN=$O(^C0CRXN(176.002,"ASAA","RXNORM","NDC",NDC,"")) Q ^(IEN)
-	;
-NDC2RXNT ; @TEST - Test Get RxCUI given the NDC
-	D CHKEQ^XTMUNIT($$NDC2RXN("30142-0917-71"),198439,"$$NDC2RXN failed")
-	QUIT
-	;
-	; ---
-	;
-ISBRAND(RXN) ; $$ Public - Is this RxCUI for a brand drug?
-	; Input: RxCUI
-	; Output: 0 or 1
-	Q ''$D(^C0CRXN(176.001,"STC","RXNORM","SBD",RXN))
-ISBRANDT ; @TEST - Test Is this RxCUI for a brand drug?
-	D CHKEQ^XTMUNIT($$ISBRAND(205535),1,"$$ISBRAND failed") ; Brand Prozac
-	D CHKEQ^XTMUNIT($$ISBRAND(310384),0,"$$ISBRAND failed") ; Generic Fluoxetine
-	QUIT
-	;
-	; ---
-	;
-BR2GEN(RXN) ; $$ Public - Convert Brand RxCUI to Generic RxCUI (many to 1)
-	; Input: RxCUI of Brand
-	; Output: RxCUI of Generic
-	Q $O(^C0CRXN(176.005,"B",RXN,"has_tradename",""))
-BR2GENT ; @TEST - Test Convert Brand RxCUI to Generic RxCUI (many to 1)
-	D CHKEQ^XTMUNIT($$BR2GEN(205535),310384,"$$BR2GEN failed")
-	QUIT
-	;
-	; ---
-	;
-GEN2BR(RXN) ; $$ Public - Convert Generic RxCUI to Brand RxCUIs (1 to many).
-	N RTN S RTN="" ; Return
-	N I S I="" F  S I=$O(^C0CRXN(176.005,"B",RXN,"tradename_of",I)) Q:'I  S RTN=RTN_I_U
-	S RTN=$E(RTN,1,$L(RTN)-1)
-	Q RTN
-	;
-GEN2BRT ; @TEST - Test Convert Generic RxCUI to Brand RxCUIs (1 to many).
-	D CHKTF^XTMUNIT($$GEN2BR(310384)[205535,"$$GEN2BR failed")
-	QUIT
-	;
-	; ---
-	;
-RXN2BNS(RXN) ; $$ Public - Get all Brand Names associated with an RXN
-	N BNS S BNS=""
-	I $$ISBRAND(RXN) S RXN=$$BR2GEN(RXN)
-	N ALLBN S ALLBN=$$GEN2BR(RXN)
-	N BNNO F BNNO=1:1:$L(ALLBN,U) D
-	. N EACHBN S EACHBN=$P(ALLBN,U,BNNO)
-	. N BNRXCUI S BNRXCUI=$O(^C0CRXN(176.005,"B",EACHBN,"ingredient_of",""))
-	. Q:BNRXCUI=""
-	. N BNIEN S BNIEN=$O(^C0CRXN(176.001,"B",BNRXCUI,""))
-	. S BNS=BNS_$P(^C0CRXN(176.001,BNIEN,0),U,15)_U
-	QUIT $E(BNS,1,$L(BNS)-1)
-RXN2BNST ; @TEST - Test Get all Brand Names associated with an RXN
-	D CHKTF^XTMUNIT($$RXN2BNS(205535)["Prozac","$$RXN2BNS failed")
-	QUIT
Index: ccr/trunk/rxnorm/trunk/C0CRXNRD.m
===================================================================
--- ccr/trunk/rxnorm/trunk/C0CRXNRD.m	(revision 1614)
+++ 	(revision )
@@ -1,168 +1,0 @@
-C0CRXNRD	; VEN/SMH - RxNorm Utilities: Routine to Read RxNorm files;2013-03-06  4:32 PM
-	;;2.0;RX NORM;;May 11, 2012;Build 50
-	; (C) Sam Habiel 2013
-	; See license for terms of use.
-	;
-	W "No entry from top" Q
-IMPORT(PATH) ; PUBLIC ENTRY POINT. Rest are private
-	I PATH="" QUIT
-	S U="^"
-	N STARTTIME S STARTTIME=$P($H,",")*24*60*60+$P($H,",",2)
-	D SAB(PATH),CONSO(PATH),SAT(PATH),STY(PATH),REL(PATH),DOC(PATH)
-	N ENDTIME S ENDTIME=$P($H,",")*24*60*60+$P($H,",",2)
-	W !,(ENDTIME-STARTTIME)/60_" minutes elapsed"
-	QUIT
-	;
-	; Everything is private from down on...
-DELFILED(FN)	; Delete file data; PEP procedure; only for RxNorm files
-	; FN is Filenumber passed by Value
-	QUIT:$E(FN,1,3)'=176  ; Quit if not RxNorm files
-	N ROOT S ROOT=$$ROOT^DILFD(FN,"",1) ; global root
-	N ZERO S ZERO=@ROOT@(0) ; Save zero node
-	S $P(ZERO,U,3,9999)="" ; Remove entry # and last edited
-	K @ROOT ; Kill the file -- so sad!
-	S @ROOT@(0)=ZERO ; It riseth again!
-	QUIT
-GETLINES(PATH,FILENAME)	; Get number of lines in a file
-	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
-	U IO
-	N I,LINE
-	F I=1:1 R LINE:0 Q:$$STATUS^%ZISH
-	D CLOSE^%ZISH("FILE")
-	Q I-1
-CONSO(PATH,INCRES)	; Open and read concepts file: RXNCONSO.RRF
-	; PATH ByVal, path of RxNorm files
-	; INCRES ByVal, include restricted sources. 1 for yes, 0 for no
-	I PATH="" QUIT
-	S INCRES=+$G(INCRES) ; if not passed, becomes zero.
-	N FILENAME S FILENAME="RXNCONSO.RRF"
-	D DELFILED(176.001) ; delete data
-	N LINES S LINES=$$GETLINES(PATH,FILENAME)
-	N POP
-	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
-	IF POP D EN^DDIOL("Error reading file..., Please check...") G EX
-	N C0CCOUNT
-	F C0CCOUNT=1:1 D  Q:$$STATUS^%ZISH
-	. U IO
-	. N LINE R LINE:0
-	. IF $$STATUS^%ZISH QUIT
-	. I '(C0CCOUNT#1000) U $P W C0CCOUNT," of ",LINES," read ",! U IO ; update every 1000
-	. S ^C0CRXN(176.001,C0CCOUNT,0)=$TR(LINE,"|^","^|")
-	. ; TODO Implement Filtering:
-	. ; If the source is a restricted source, decide what to do based on what's asked.
-	. ; N SRCIEN S SRCIEN=$$FIND1^DIC(176.003,"","QX",SAB,"B") ; SrcIEN in RXNORM SOURCES file
-	. ; N RESTRIC S RESTRIC=$$GET1^DIQ(176.003,SRCIEN,14,"I") ; 14 is restriction field; values 0-4
-	. ; If RESTRIC is zero, then it's unrestricted. Everything else is restricted.
-	. ; If user didn't ask to include restricted sources, and the source is restricted, then quit
-	. ; I 'INCRES,RESTRIC QUIT
-EX	D CLOSE^%ZISH("FILE")
-	N DIK S DIK="^C0CRXN(176.001," D IXALL^DIK
-	QUIT
-	;
-	;
-SAT(PATH)	; Open and read Concept and Atom attributes: RXNSAT.RRF
-	I PATH="" QUIT
-	N FILENAME S FILENAME="RXNSAT.RRF"
-	D DELFILED(176.002) ; delete data
-	N LINES S LINES=$$GETLINES(PATH,FILENAME)
-	N POP
-	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
-	IF POP W "Error reading file..., Please check...",! G EX2
-	N C0CCOUNT F C0CCOUNT=1:1 Q:$$STATUS^%ZISH  D
-	. U IO
-	. N LINE R LINE:0
-	. IF $$STATUS^%ZISH QUIT
-	. I '(C0CCOUNT#1000) U $P W C0CCOUNT," of ",LINES," read ",! U IO ; update every 1000
-	. ;
-	. ; We switch around the fields .01 and .09 because the .01 isn't always present; where as .09 is required
-	. N RXCUI1,ATN9
-	. S RXCUI1=$P(LINE,"|",1)
-	. S ATN9=$P(LINE,"|",9)
-	. S $P(LINE,"|",1)=ATN9
-	. S $P(LINE,"|",9)=RXCUI1
-	. ;
-	. ; Save off
-	. S ^C0CRXN(176.002,C0CCOUNT,0)=$TR(LINE,"|^","^|")
-EX2	D CLOSE^%ZISH("FILE")
-	N DIK S DIK="^C0CRXN(176.002," D IXALL^DIK
-	QUIT
-	;
-	;
-SAB(PATH)	; Open the read RxNorm Sources file: RXNSAB.RRF
-	I PATH="" QUIT
-	N FILENAME S FILENAME="RXNSAB.RRF"
-	D DELFILED(176.003) ; delete data
-	N POP
-	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
-	IF POP W "Error reading file..., Please check...",! G EX3
-	N I F I=1:1 Q:$$STATUS^%ZISH  D
-	. U IO
-	. N LINE R LINE:0
-	. IF $$STATUS^%ZISH QUIT
-	. U $P W I,! U IO  ; Write I to the screen, then go back to reading the file
-	. ; Switch pieces 1 and 4 because 4 is always defined. Goes into .01 field.
-	. N VCUI S VCUI=$P(LINE,"|",1)
-	. N RSAB S RSAB=$P(LINE,"|",4)
-	. S $P(LINE,"|",1)=RSAB
-	. S $P(LINE,"|",4)=VCUI
-	. S ^C0CRXN(176.003,I,0)=$TR(LINE,"^|","|^")
-EX3	D CLOSE^%ZISH("FILE")
-	N DIK S DIK="^C0CRXN(176.003," D IXALL^DIK
-	QUIT
-STY(PATH)	; Open and read RxNorm Semantic types file: RXNSTY.RRF
-	I PATH="" QUIT
-	N FILENAME S FILENAME="RXNSTY.RRF"
-	D DELFILED(176.004) ; delete data
-	N LINES S LINES=$$GETLINES(PATH,FILENAME) ; Get # of lines
-	N POP
-	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
-	IF POP W "Error reading file..., Please check...",! G EX4
-	N I F I=1:1 Q:$$STATUS^%ZISH  D
-	. U IO
-	. N LINE R LINE:0
-	. IF $$STATUS^%ZISH QUIT
-	. I '(I#1000) U $P W I," of ",LINES," read ",! U IO ; update every 1000
-	. S ^C0CRXN(176.004,I,0)=$TR(LINE,"^|","|^")
-EX4	D CLOSE^%ZISH("FILE")
-	N DIK S DIK="^C0CRXN(176.004," D IXALL^DIK
-	QUIT
-	;
-REL(PATH)	; Open and read RxNorm Relationships file: RXNREL.RRF
-	I PATH="" QUIT
-	N FILENAME S FILENAME="RXNREL.RRF"
-	D DELFILED(176.005) ; delete data
-	N LINES S LINES=$$GETLINES(PATH,FILENAME) ; Get # of lines
-	N POP
-	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
-	IF POP W "Error reading file..., Please check...",! G EX5
-	N I F I=1:1 Q:$$STATUS^%ZISH  D
-	. U IO
-	. N LINE R LINE:0
-	. IF $$STATUS^%ZISH QUIT
-	. I '(I#1000) U $P W I," of ",LINES," read ",! U IO ; update every 1000
-	. ; swap RXCUI1 location with SAB b/c SAB is required so can be .01 field
-	. N RXCUI1 S RXCUI1=$P(LINE,"|",1)
-	. N SAB S SAB=$P(LINE,"|",11)
-	. S $P(LINE,"|",1)=SAB
-	. S $P(LINE,"|",11)=RXCUI1
-	. S ^C0CRXN(176.005,I,0)=$TR(LINE,"^|","|^")
-EX5	D CLOSE^%ZISH("FILE")
-	N DIK S DIK="^C0CRXN(176.005," D IXALL^DIK
-	QUIT
-DOC(PATH)	; Open the read RxNorm Abbreviation Documentation file: RXNDOC.RRF
-	I PATH="" QUIT
-	N FILENAME S FILENAME="RXNDOC.RRF"
-	D DELFILED(176.006) ; delete data
-	N LINES S LINES=$$GETLINES(PATH,FILENAME) ; Get # of lines
-	N POP
-	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
-	IF POP W "Error reading file..., Please check...",! G EX6
-	N I F I=1:1 Q:$$STATUS^%ZISH  D
-	. U IO
-	. N LINE R LINE:0
-	. IF $$STATUS^%ZISH QUIT
-	. I '(I#1000) U $P W I," of ",LINES," read ",! U IO ; update every 1000
-	. S ^C0CRXN(176.006,I,0)=$TR(LINE,"^|","|^")
-EX6	D CLOSE^%ZISH("FILE")
-	N DIK S DIK="^C0CRXN(176.006," D IXALL^DIK
-	QUIT
Index: ccr/trunk/rxnorm/trunk/globals/F176.001.ZWR
===================================================================
--- ccr/trunk/rxnorm/trunk/globals/F176.001.ZWR	(revision 1615)
+++ ccr/trunk/rxnorm/trunk/globals/F176.001.ZWR	(revision 1615)
@@ -0,0 +1,268 @@
+KBANXDD - FILE 176.001
+3130409.13243 ZWR
+^DIC(176.001,0)="RXNORM CONCEPT NAMES AND SOURCES^176.001"
+^DIC(176.001,0,"AUDIT")=""
+^DIC(176.001,0,"DD")="@"
+^DIC(176.001,0,"DEL")=""
+^DIC(176.001,0,"GL")="^C0CRXN(176.001,"
+^DIC(176.001,0,"LAYGO")=""
+^DIC(176.001,0,"RD")=""
+^DIC(176.001,0,"WR")="@"
+^DIC(176.001,"%",0)="^1.005^^"
+^DIC(176.001,"%D",0)="^^10^10^3130225^"
+^DIC(176.001,"%D",1,0)="File = RXNCONSO.RRF"
+^DIC(176.001,"%D",2,0)=" "
+^DIC(176.001,"%D",3,0)="This file follows the general format of the MRCONSO.RRF file of the "
+^DIC(176.001,"%D",4,0)="Metathesaurus. Some of the Metathesaurus fields are not provided by "
+^DIC(176.001,"%D",5,0)="RxNorm and are marked as ""(no value provided)"". There is exactly one row "
+^DIC(176.001,"%D",6,0)="in this file for each atom (each occurrence of each unique string or "
+^DIC(176.001,"%D",7,0)="concept name within each source vocabulary) in RxNorm, i.e., there is "
+^DIC(176.001,"%D",8,0)="exactly one row for each unique RXAUI in RxNorm. Every string or concept "
+^DIC(176.001,"%D",9,0)="name in RxNorm appears in this file, connected to its language, source "
+^DIC(176.001,"%D",10,0)="vocabularies, and its concept identifier (RXCUI)."
+^DD(176.001,0)="FIELD^^.18^18"
+^DD(176.001,0,"DT")=3130227
+^DD(176.001,0,"ID",.12)="W ""   "",$P(^(0),U,12)"
+^DD(176.001,0,"ID",.13)="W ""   "",$P(^(0),U,13)"
+^DD(176.001,0,"ID",.14)="W ""   "",$P(^(0),U,14)"
+^DD(176.001,0,"ID",.15)="W ""   "",$P(^(0),U,15)"
+^DD(176.001,0,"NM","RXNORM CONCEPT NAMES AND SOURCES")=""
+^DD(176.001,.01,0)="RXCUI^RFJ8^^0;1^K:$L(X)>8!($L(X)<1)!'(X'?1P.E) X"
+^DD(176.001,.01,1,0)="^.1^^0"
+^DD(176.001,.01,3)="Answer must be 1-8 characters in length."
+^DD(176.001,.01,21,0)="^^1^1^3130225^"
+^DD(176.001,.01,21,1,0)="RxNorm Unique identifier for concept (concept ID)"
+^DD(176.001,.01,"DT")=3130305
+^DD(176.001,.02,0)="LAT^RFJ3^^0;2^K:$L(X)>3!($L(X)<1) X"
+^DD(176.001,.02,3)="Answer must be 1-3 characters in length."
+^DD(176.001,.02,21,0)="^^1^1^3130225^"
+^DD(176.001,.02,21,1,0)="Language of Term"
+^DD(176.001,.02,"DT")=3130225
+^DD(176.001,.03,0)="TS^FJ1^^0;3^K:$L(X)>1!($L(X)<1) X"
+^DD(176.001,.03,3)="Answer must be 1 character in length."
+^DD(176.001,.03,21,0)="^^1^1^3130225^"
+^DD(176.001,.03,21,1,0)="Term status (no value provided)"
+^DD(176.001,.03,"DT")=3130225
+^DD(176.001,.04,0)="LUI^FJ8^^0;4^K:$L(X)>8!($L(X)<1) X"
+^DD(176.001,.04,3)="Answer must be 1-8 characters in length."
+^DD(176.001,.04,21,0)="^^1^1^3130225^"
+^DD(176.001,.04,21,1,0)="Unique identifier for term (no value provided)"
+^DD(176.001,.04,"DT")=3130225
+^DD(176.001,.05,0)="STT^FJ3^^0;5^K:$L(X)>3!($L(X)<1) X"
+^DD(176.001,.05,3)="Answer must be 1-3 characters in length."
+^DD(176.001,.05,21,0)="^^1^1^3130225^"
+^DD(176.001,.05,21,1,0)="String type (no value provided)"
+^DD(176.001,.05,"DT")=3130225
+^DD(176.001,.06,0)="SUI^FJ8^^0;6^K:$L(X)>8!($L(X)<1) X"
+^DD(176.001,.06,3)="Answer must be 1-8 characters in length."
+^DD(176.001,.06,21,0)="^^1^1^3130225^"
+^DD(176.001,.06,21,1,0)="Unique identifier for string (no value provided)"
+^DD(176.001,.06,"DT")=3130225
+^DD(176.001,.07,0)="ISPREF^FJ1^^0;7^K:$L(X)>1!($L(X)<1) X"
+^DD(176.001,.07,3)="Answer must be 1 character in length."
+^DD(176.001,.07,21,0)="^^2^2^3130225^"
+^DD(176.001,.07,21,1,0)="Atom status - preferred (Y) or not (N) for this string within this "
+^DD(176.001,.07,21,2,0)="concept (no value provided)"
+^DD(176.001,.07,"DT")=3130225
+^DD(176.001,.08,0)="RXAUI^RFJ8^^0;8^K:$L(X)>8!($L(X)<1) X"
+^DD(176.001,.08,3)="Answer must be 1-8 characters in length."
+^DD(176.001,.08,21,0)="^^1^1^3130225^"
+^DD(176.001,.08,21,1,0)="Unique identifier for atom (RxNorm Atom ID)"
+^DD(176.001,.08,"DT")=3130225
+^DD(176.001,.09,0)="SAUI^FJ50^^0;9^K:$L(X)>50!($L(X)<1) X"
+^DD(176.001,.09,3)="Answer must be 1-50 characters in length."
+^DD(176.001,.09,21,0)="^^1^1^3130225^"
+^DD(176.001,.09,21,1,0)="Source asserted atom identifier [optional]"
+^DD(176.001,.09,"DT")=3130225
+^DD(176.001,.1,0)="SCUI^FJ50^^0;10^K:$L(X)>50!($L(X)<1) X"
+^DD(176.001,.1,3)="Answer must be 1-50 characters in length."
+^DD(176.001,.1,21,0)="^^1^1^3130225^"
+^DD(176.001,.1,21,1,0)="Source asserted concept identifier [optional]"
+^DD(176.001,.1,"DT")=3130225
+^DD(176.001,.11,0)="SDUI^FJ50^^0;11^K:$L(X)>50!($L(X)<1) X"
+^DD(176.001,.11,3)="Answer must be 1-50 characters in length."
+^DD(176.001,.11,21,0)="^^1^1^3130225^"
+^DD(176.001,.11,21,1,0)="Source asserted descriptor identifier [optional] (no value provided)"
+^DD(176.001,.11,"DT")=3130225
+^DD(176.001,.12,0)="SAB^RFJ20^^0;12^K:$L(X)>20!($L(X)<1) X"
+^DD(176.001,.12,3)="Answer must be 1-20 characters in length."
+^DD(176.001,.12,21,0)="^^1^1^3130225^"
+^DD(176.001,.12,21,1,0)="Source abbreviation"
+^DD(176.001,.12,"DT")=3130305
+^DD(176.001,.13,0)="TTY^RFJ20^^0;13^K:$L(X)>20!($L(X)<1) X"
+^DD(176.001,.13,3)="Answer must be 1-20 characters in length."
+^DD(176.001,.13,21,0)="^^1^1^3130225^"
+^DD(176.001,.13,21,1,0)="Term type in source"
+^DD(176.001,.13,"DT")=3130305
+^DD(176.001,.14,0)="CODE^RFJ50^^0;14^K:$L(X)>50!($L(X)<1) X"
+^DD(176.001,.14,3)="Answer must be 1-50 characters in length."
+^DD(176.001,.14,21,0)="^^3^3^3130225^"
+^DD(176.001,.14,21,1,0)="""Most useful"" source asserted identifier (if the source vocabulary has "
+^DD(176.001,.14,21,2,0)="more than one identifier), or a Metathesaurus-generated source entry "
+^DD(176.001,.14,21,3,0)="identifier (if the source vocabulary has none.)"
+^DD(176.001,.14,"DT")=3130305
+^DD(176.001,.15,0)="STR^RFJ3000^^0;15^K:$L(X)>3000!($L(X)<1) X"
+^DD(176.001,.15,1,0)="^.1^^0"
+^DD(176.001,.15,3)="Answer must be 1-3000 characters in length."
+^DD(176.001,.15,21,0)="^^1^1^3130225^"
+^DD(176.001,.15,21,1,0)="String"
+^DD(176.001,.15,"DT")=3130227
+^DD(176.001,.16,0)="SRL^FJ10^^0;16^K:$L(X)>10!($L(X)<1) X"
+^DD(176.001,.16,3)="Answer must be 1-10 characters in length."
+^DD(176.001,.16,21,0)="^^1^1^3130225^"
+^DD(176.001,.16,21,1,0)="Source Restriction Level (no value provided)"
+^DD(176.001,.16,"DT")=3130225
+^DD(176.001,.17,0)="SUPPRESS^FJ1^^0;17^K:$L(X)>1!($L(X)<1) X"
+^DD(176.001,.17,3)="Answer must be 1 character in length."
+^DD(176.001,.17,21,0)="^^4^4^3130225^"
+^DD(176.001,.17,21,1,0)="Suppressible flag. Values = N or O. N - not suppressible. O - Specific "
+^DD(176.001,.17,21,2,0)="Individual names (atoms) set as Obsolete because the name is no longer "
+^DD(176.001,.17,21,3,0)="provided by the original source. NLM strongly recommends that users not "
+^DD(176.001,.17,21,4,0)="alter editor-assigned suppressibility."
+^DD(176.001,.17,"DT")=3130225
+^DD(176.001,.18,0)="CVF^FJ50^^0;18^K:$L(X)>50!($L(X)<1) X"
+^DD(176.001,.18,3)="Answer must be 1-50 characters in length."
+^DD(176.001,.18,21,0)="^^1^1^3130225^"
+^DD(176.001,.18,21,1,0)="Content view flag"
+^DD(176.001,.18,"DT")=3130225
+^DD(176.001,"B","CODE",.14)=""
+^DD(176.001,"B","CVF",.18)=""
+^DD(176.001,"B","ISPREF",.07)=""
+^DD(176.001,"B","LAT",.02)=""
+^DD(176.001,"B","LUI",.04)=""
+^DD(176.001,"B","RXAUI",.08)=""
+^DD(176.001,"B","RXCUI",.01)=""
+^DD(176.001,"B","SAB",.12)=""
+^DD(176.001,"B","SAUI",.09)=""
+^DD(176.001,"B","SCUI",.1)=""
+^DD(176.001,"B","SDUI",.11)=""
+^DD(176.001,"B","SRL",.16)=""
+^DD(176.001,"B","STR",.15)=""
+^DD(176.001,"B","STT",.05)=""
+^DD(176.001,"B","SUI",.06)=""
+^DD(176.001,"B","SUPPRESS",.17)=""
+^DD(176.001,"B","TS",.03)=""
+^DD(176.001,"B","TTY",.13)=""
+^DD(176.001,"GL",0,1,.01)=""
+^DD(176.001,"GL",0,2,.02)=""
+^DD(176.001,"GL",0,3,.03)=""
+^DD(176.001,"GL",0,4,.04)=""
+^DD(176.001,"GL",0,5,.05)=""
+^DD(176.001,"GL",0,6,.06)=""
+^DD(176.001,"GL",0,7,.07)=""
+^DD(176.001,"GL",0,8,.08)=""
+^DD(176.001,"GL",0,9,.09)=""
+^DD(176.001,"GL",0,10,.1)=""
+^DD(176.001,"GL",0,11,.11)=""
+^DD(176.001,"GL",0,12,.12)=""
+^DD(176.001,"GL",0,13,.13)=""
+^DD(176.001,"GL",0,14,.14)=""
+^DD(176.001,"GL",0,15,.15)=""
+^DD(176.001,"GL",0,16,.16)=""
+^DD(176.001,"GL",0,17,.17)=""
+^DD(176.001,"GL",0,18,.18)=""
+^DD(176.001,"RQ",.01)=""
+^DD(176.001,"RQ",.02)=""
+^DD(176.001,"RQ",.08)=""
+^DD(176.001,"RQ",.12)=""
+^DD(176.001,"RQ",.13)=""
+^DD(176.001,"RQ",.14)=""
+^DD(176.001,"RQ",.15)=""
+^DD("IX",900,0)="176.001^STR^String Lookup Index^R^^F^IR^I^176.001^^^^^LS"
+^DD("IX",900,1)="S ^C0CRXN(176.001,""STR"",$E(X,1,30),DA)="""""
+^DD("IX",900,2)="K ^C0CRXN(176.001,""STR"",$E(X,1,30),DA)"
+^DD("IX",900,2.5)="K ^C0CRXN(176.001,""STR"")"
+^DD("IX",900,11.1,0)="^.114IA^1^1"
+^DD("IX",900,11.1,1,0)="1^F^176.001^.15^30^1^F"
+^DD("IX",900,11.1,1,2)="S X=$$UP^XLFSTR(X)"
+^DD("IX",900,11.1,1,3)=""
+^DD("IX",900,11.1,1,4)="S X=$$UP^XLFSTR(X)"
+^DD("IX",900,11.1,"AC",1,1)=""
+^DD("IX",900,11.1,"B",1,1)=""
+^DD("IX",900,11.1,"BB",1,1)=""
+^DD("IX",901,0)="176.001^B^Regular B Index^R^^F^IR^I^176.001^^^^^LS"
+^DD("IX",901,1)="S ^C0CRXN(176.001,""B"",X,DA)="""""
+^DD("IX",901,2)="K ^C0CRXN(176.001,""B"",X,DA)"
+^DD("IX",901,2.5)="K ^C0CRXN(176.001,""B"")"
+^DD("IX",901,11.1,0)="^.114IA^1^1"
+^DD("IX",901,11.1,1,0)="1^F^176.001^.01^^1^F"
+^DD("IX",901,11.1,1,3)=""
+^DD("IX",901,11.1,"AC",1,1)=""
+^DD("IX",901,11.1,"B",1,1)=""
+^DD("IX",901,11.1,"BB",1,1)=""
+^DD("IX",902,0)="176.001^STC^Source Term Type Code Index^MU^^R^IR^I^176.001^^^^^LS"
+^DD("IX",902,.1,0)="^^11^11^3130304^"
+^DD("IX",902,.1,1,0)="Use this index to do compound searches on RxNorm Concepts."
+^DD("IX",902,.1,2,0)=" "
+^DD("IX",902,.1,3,0)="Examples:"
+^DD("IX",902,.1,4,0)="SAB=""NDDF"", TTY=""CDC"", CODE={GCN} will give you the entry a clinical drug "
+^DD("IX",902,.1,5,0)="in First Database with GCN Code {GCN}."
+^DD("IX",902,.1,6,0)=" "
+^DD("IX",902,.1,7,0)="SAB=""RXNORM"", TTY=""SCD"", CODE={RXNORM} will give you the entry that is "
+^DD("IX",902,.1,8,0)="the Semantic Clinical Drug for the RxNorm code."
+^DD("IX",902,.1,9,0)=" "
+^DD("IX",902,.1,10,0)="SAB=""VANDF"", TTY=""CD"", CODE={VUID} will give you a drug that has that "
+^DD("IX",902,.1,11,0)="VUID."
+^DD("IX",902,1)="S ^C0CRXN(176.001,""STC"",X(1),X(2),X(3),DA)=X(4)"
+^DD("IX",902,2)="K ^C0CRXN(176.001,""STC"",X(1),X(2),X(3),DA)"
+^DD("IX",902,2.5)="K ^C0CRXN(176.001,""STC"")"
+^DD("IX",902,11.1,0)="^.114IA^4^4"
+^DD("IX",902,11.1,1,0)="1^F^176.001^.12^^1^F"
+^DD("IX",902,11.1,1,3)=""
+^DD("IX",902,11.1,2,0)="2^F^176.001^.13^^2^F"
+^DD("IX",902,11.1,2,3)=""
+^DD("IX",902,11.1,3,0)="3^F^176.001^.14^^3^F"
+^DD("IX",902,11.1,3,3)=""
+^DD("IX",902,11.1,4,0)="4^F^176.001^.01^^^F"
+^DD("IX",902,11.1,4,3)=""
+^DD("IX",902,11.1,"AC",1,1)=""
+^DD("IX",902,11.1,"AC",2,2)=""
+^DD("IX",902,11.1,"AC",3,3)=""
+^DD("IX",902,11.1,"B",1,1)=""
+^DD("IX",902,11.1,"B",2,2)=""
+^DD("IX",902,11.1,"B",3,3)=""
+^DD("IX",902,11.1,"B",4,4)=""
+^DD("IX",902,11.1,"BB",1,1)=""
+^DD("IX",902,11.1,"BB",2,2)=""
+^DD("IX",902,11.1,"BB",3,3)=""
+^DD("IX",902,11.1,"BB",4,4)=""
+^DD("IX",903,0)="176.001^CODE^Code Index^R^^F^IR^I^176.001^^^^^LS"
+^DD("IX",903,1)="S ^C0CRXN(176.001,""CODE"",X,DA)="""""
+^DD("IX",903,2)="K ^C0CRXN(176.001,""CODE"",X,DA)"
+^DD("IX",903,2.5)="K ^C0CRXN(176.001,""CODE"")"
+^DD("IX",903,11.1,0)="^.114IA^1^1"
+^DD("IX",903,11.1,1,0)="1^F^176.001^.14^^1^F"
+^DD("IX",903,11.1,1,3)=""
+^DD("IX",903,11.1,"AC",1,1)=""
+^DD("IX",903,11.1,"B",1,1)=""
+^DD("IX",903,11.1,"BB",1,1)=""
+^DD("IX",906,0)="176.001^STX^Source Term Type RxCUI Code Index^MU^^R^IR^I^176.001^^^^^LS"
+^DD("IX",906,.1,0)="^^5^5^3130305^"
+^DD("IX",906,.1,1,0)="Use this index as a reverse of the STC index."
+^DD("IX",906,.1,2,0)=" "
+^DD("IX",906,.1,3,0)="The STC index will give you an entry if you know the source and the type "
+^DD("IX",906,.1,4,0)="and the code. This index will give you the codes if you know the source, "
+^DD("IX",906,.1,5,0)="the type, but not the code, but rather the RxNorm code."
+^DD("IX",906,1)="S ^C0CRXN(176.001,""STX"",X(1),X(2),X(3),DA)=X(4)"
+^DD("IX",906,2)="K ^C0CRXN(176.001,""STX"",X(1),X(2),X(3),DA)"
+^DD("IX",906,2.5)="K ^C0CRXN(176.001,""STX"")"
+^DD("IX",906,11.1,0)="^.114IA^4^4"
+^DD("IX",906,11.1,1,0)="1^F^176.001^.12^^1^F"
+^DD("IX",906,11.1,1,3)=""
+^DD("IX",906,11.1,2,0)="2^F^176.001^.13^^2^F"
+^DD("IX",906,11.1,2,3)=""
+^DD("IX",906,11.1,3,0)="3^F^176.001^.01^^3^F"
+^DD("IX",906,11.1,3,3)=""
+^DD("IX",906,11.1,4,0)="4^F^176.001^.14^^^F"
+^DD("IX",906,11.1,4,3)=""
+^DD("IX",906,11.1,"AC",1,1)=""
+^DD("IX",906,11.1,"AC",2,2)=""
+^DD("IX",906,11.1,"AC",3,3)=""
+^DD("IX",906,11.1,"B",1,1)=""
+^DD("IX",906,11.1,"B",2,2)=""
+^DD("IX",906,11.1,"B",3,3)=""
+^DD("IX",906,11.1,"B",4,4)=""
+^DD("IX",906,11.1,"BB",1,1)=""
+^DD("IX",906,11.1,"BB",2,2)=""
+^DD("IX",906,11.1,"BB",3,3)=""
+^DD("IX",906,11.1,"BB",4,4)=""
Index: ccr/trunk/rxnorm/trunk/globals/F176.002.ZWR
===================================================================
--- ccr/trunk/rxnorm/trunk/globals/F176.002.ZWR	(revision 1615)
+++ ccr/trunk/rxnorm/trunk/globals/F176.002.ZWR	(revision 1615)
@@ -0,0 +1,227 @@
+KBANXDD - FILE 176.002
+3130409.132457 ZWR
+^DIC(176.002,0)="RXNORM SIMPLE CONCEPT AND ATOM ATTRIBUTES^176.002"
+^DIC(176.002,0,"AUDIT")="@"
+^DIC(176.002,0,"DD")="@"
+^DIC(176.002,0,"DEL")="@"
+^DIC(176.002,0,"GL")="^C0CRXN(176.002,"
+^DIC(176.002,0,"LAYGO")="@"
+^DIC(176.002,0,"RD")=""
+^DIC(176.002,0,"WR")="@"
+^DIC(176.002,"%",0)="^1.005^^"
+^DIC(176.002,"%D",0)="^^9^9^3130301^"
+^DIC(176.002,"%D",1,0)="File: RXNSAT.RRF"
+^DIC(176.002,"%D",2,0)=" "
+^DIC(176.002,"%D",3,0)="This file follows the general format of the MRSAT.RRF file of the"
+^DIC(176.002,"%D",4,0)="Metathesaurus. Some of the Metathesaurus fields are not provided by "
+^DIC(176.002,"%D",5,0)="RxNorm and are marked as ""(no value provided)"". There is exactly one row "
+^DIC(176.002,"%D",6,0)="in this table for each concept, atom, or relationship attribute that does "
+^DIC(176.002,"%D",7,0)="not have a sub-element structure. Not all RxNorm concepts or RxNorm "
+^DIC(176.002,"%D",8,0)="relationships have entries in this file. This file includes all source "
+^DIC(176.002,"%D",9,0)="vocabulary attributes that do not fit into other categories."
+^DD(176.002,0)="FIELD^^.13^13"
+^DD(176.002,0,"DT")=3130301
+^DD(176.002,0,"ID",.1)="W ""   "",$P(^(0),U,10)"
+^DD(176.002,0,"ID",.11)="W ""   "",$P(^(0),U,11)"
+^DD(176.002,0,"IX","XATN",176.002,.01)=""
+^DD(176.002,0,"IX","XATV",176.002,.11)=""
+^DD(176.002,0,"NM","RXNORM SIMPLE CONCEPT AND ATOM ATTRIBUTES")=""
+^DD(176.002,.01,0)="ATN^RFJ1000^^0;1^K:$L(X)>1000!($L(X)<1)!'(X'?1P.E) X"
+^DD(176.002,.01,1,0)="^.1"
+^DD(176.002,.01,1,1,0)="176.002^XATN"
+^DD(176.002,.01,1,1,1)="S ^C0CRXN(176.002,""XATN"",$E(X,1,30),DA)="""""
+^DD(176.002,.01,1,1,2)="K ^C0CRXN(176.002,""XATN"",$E(X,1,30),DA)"
+^DD(176.002,.01,1,1,3)="ATN INDEX"
+^DD(176.002,.01,1,1,"DT")=3130301
+^DD(176.002,.01,3)="Answer must be 1-1000 characters in length."
+^DD(176.002,.01,21,0)="^^2^2^3130301^^"
+^DD(176.002,.01,21,1,0)="Attribute name. Possible values appear in RXNDOC.RRF and are described on "
+^DD(176.002,.01,21,2,0)="the UMLS Attribute Names page."
+^DD(176.002,.01,"DT")=3130307
+^DD(176.002,.02,0)="LUI^FJ8^^0;2^K:$L(X)>8!($L(X)<1) X"
+^DD(176.002,.02,3)="Answer must be 1-8 characters in length."
+^DD(176.002,.02,21,0)="^^1^1^3130301^^"
+^DD(176.002,.02,21,1,0)="Unique identifier for term (no value provided)"
+^DD(176.002,.02,"DT")=3130301
+^DD(176.002,.03,0)="SUI^FJ8^^0;3^K:$L(X)>8!($L(X)<1) X"
+^DD(176.002,.03,3)="Answer must be 1-8 characters in length."
+^DD(176.002,.03,21,0)="^^1^1^3130301^"
+^DD(176.002,.03,21,1,0)="Unique identifier for string (no value provided)"
+^DD(176.002,.03,"DT")=3130301
+^DD(176.002,.04,0)="RXAUI^FJ8^^0;4^K:$L(X)>8!($L(X)<1) X"
+^DD(176.002,.04,3)="Answer must be 1-8 characters in length."
+^DD(176.002,.04,21,0)="^^1^1^3130301^"
+^DD(176.002,.04,21,1,0)="RxNorm atom identifier (RXAUI) or RxNorm relationship identifier (RUI)."
+^DD(176.002,.04,"DT")=3130301
+^DD(176.002,.05,0)="STYPE^FJ50^^0;5^K:$L(X)>50!($L(X)<1) X"
+^DD(176.002,.05,3)="Answer must be 1-50 characters in length."
+^DD(176.002,.05,21,0)="^^2^2^3130301^"
+^DD(176.002,.05,21,1,0)="The name of the column in RXNCONSO.RRF or RXNREL.RRF that contains the "
+^DD(176.002,.05,21,2,0)="identifier to which the attribute is attached, e.g., CUI, AUI."
+^DD(176.002,.05,"DT")=3130301
+^DD(176.002,.06,0)="CODE^FJ50^^0;6^K:$L(X)>50!($L(X)<1) X"
+^DD(176.002,.06,3)="Answer must be 1-50 characters in length."
+^DD(176.002,.06,21,0)="^^2^2^3130301^^"
+^DD(176.002,.06,21,1,0)="""Most useful"" source asserted identifier (if the source vocabulary "
+^DD(176.002,.06,21,2,0)="contains more than one)."
+^DD(176.002,.06,"DT")=3130301
+^DD(176.002,.07,0)="ATUI^FJ11^^0;7^K:$L(X)>11!($L(X)<1) X"
+^DD(176.002,.07,3)="Answer must be 1-11 characters in length."
+^DD(176.002,.07,21,0)="^^1^1^3130301^"
+^DD(176.002,.07,21,1,0)="Unique identifier for attribute."
+^DD(176.002,.07,"DT")=3130301
+^DD(176.002,.08,0)="SATUI^FJ50^^0;8^K:$L(X)>50!($L(X)<1) X"
+^DD(176.002,.08,3)="Answer must be 1-50 characters in length."
+^DD(176.002,.08,21,0)="^^1^1^3130301^"
+^DD(176.002,.08,21,1,0)="Source asserted attribute identifier (optional - present if it exists)."
+^DD(176.002,.08,"DT")=3130301
+^DD(176.002,.09,0)="RXCUI^FJ8^^0;9^K:$L(X)>8!($L(X)<1) X"
+^DD(176.002,.09,3)="Answer must be 1-8 characters in length."
+^DD(176.002,.09,21,0)="^^1^1^3130301^"
+^DD(176.002,.09,21,1,0)="Unique identifier for concept (concept id)."
+^DD(176.002,.09,"DT")=3130307
+^DD(176.002,.1,0)="SAB^RFJ20^^0;10^K:$L(X)>20!($L(X)<1) X"
+^DD(176.002,.1,3)="Answer must be 1-20 characters in length."
+^DD(176.002,.1,21,0)="^^2^2^3130301^"
+^DD(176.002,.1,21,1,0)="Abbreviation of the source of the attribute. Possible values appear in "
+^DD(176.002,.1,21,2,0)="RXNSAB.RRF and are listed on the UMLS Source Vocabularies page."
+^DD(176.002,.1,"DT")=3130307
+^DD(176.002,.11,0)="ATV^FJ4000^^0;11^K:$L(X)>4000!($L(X)<1) X"
+^DD(176.002,.11,1,0)="^.1"
+^DD(176.002,.11,1,1,0)="176.002^XATV"
+^DD(176.002,.11,1,1,1)="S ^C0CRXN(176.002,""XATV"",$E(X,1,30),DA)="""""
+^DD(176.002,.11,1,1,2)="K ^C0CRXN(176.002,""XATV"",$E(X,1,30),DA)"
+^DD(176.002,.11,1,1,3)="ATV INDEX"
+^DD(176.002,.11,1,1,"DT")=3130301
+^DD(176.002,.11,3)="Answer must be 1-4000 characters in length."
+^DD(176.002,.11,21,0)="^^4^4^3130301^"
+^DD(176.002,.11,21,1,0)="Attribute value described under specific attribute name on the UMLS "
+^DD(176.002,.11,21,2,0)="Attribute Names page. A few attribute values exceed 1,000 characters. "
+^DD(176.002,.11,21,3,0)="Many of the abbreviations used in attribute values are explained in "
+^DD(176.002,.11,21,4,0)="RXNDOC.RRF and included UMLS Abbreviations Used in Data Elements page."
+^DD(176.002,.11,"DT")=3130307
+^DD(176.002,.12,0)="SUPPRESS^FJ1^^0;12^K:$L(X)>1!($L(X)<1) X"
+^DD(176.002,.12,3)="Answer must be 1 character in length."
+^DD(176.002,.12,21,0)="^^3^3^3130301^"
+^DD(176.002,.12,21,1,0)="Suppressible flag. Values = O, Y, or N. Reflects the suppressible status "
+^DD(176.002,.12,21,2,0)="of the attribute. N - Attribute is not suppressed. O - Attribute is "
+^DD(176.002,.12,21,3,0)="suppressed at source level. Y - Attribute is suppressed by RxNorm editors."
+^DD(176.002,.12,"DT")=3130301
+^DD(176.002,.13,0)="CVF^FJ50^^0;13^K:$L(X)>50!($L(X)<1) X"
+^DD(176.002,.13,3)="Answer must be 1-50 characters in length."
+^DD(176.002,.13,21,0)="^^1^1^3130301^"
+^DD(176.002,.13,21,1,0)="Content view flag"
+^DD(176.002,.13,"DT")=3130301
+^DD(176.002,"B","ATN",.01)=""
+^DD(176.002,"B","ATUI",.07)=""
+^DD(176.002,"B","ATV",.11)=""
+^DD(176.002,"B","CODE",.06)=""
+^DD(176.002,"B","CVF",.13)=""
+^DD(176.002,"B","LUI",.02)=""
+^DD(176.002,"B","RXAUI",.04)=""
+^DD(176.002,"B","RXCUI",.09)=""
+^DD(176.002,"B","SAB",.1)=""
+^DD(176.002,"B","SATUI",.08)=""
+^DD(176.002,"B","STYPE",.05)=""
+^DD(176.002,"B","SUI",.03)=""
+^DD(176.002,"B","SUPPRESS",.12)=""
+^DD(176.002,"GL",0,1,.01)=""
+^DD(176.002,"GL",0,2,.02)=""
+^DD(176.002,"GL",0,3,.03)=""
+^DD(176.002,"GL",0,4,.04)=""
+^DD(176.002,"GL",0,5,.05)=""
+^DD(176.002,"GL",0,6,.06)=""
+^DD(176.002,"GL",0,7,.07)=""
+^DD(176.002,"GL",0,8,.08)=""
+^DD(176.002,"GL",0,9,.09)=""
+^DD(176.002,"GL",0,10,.1)=""
+^DD(176.002,"GL",0,11,.11)=""
+^DD(176.002,"GL",0,12,.12)=""
+^DD(176.002,"GL",0,13,.13)=""
+^DD(176.002,"IX",.01)=""
+^DD(176.002,"IX",.11)=""
+^DD(176.002,"RQ",.01)=""
+^DD(176.002,"RQ",.1)=""
+^DD("IX",904,0)="176.002^RXCUI^RXCUI Index^R^^F^IR^I^176.002^^^^^LS"
+^DD("IX",904,1)="S ^C0CRXN(176.002,""RXCUI"",X,DA)="""""
+^DD("IX",904,2)="K ^C0CRXN(176.002,""RXCUI"",X,DA)"
+^DD("IX",904,2.5)="K ^C0CRXN(176.002,""RXCUI"")"
+^DD("IX",904,11.1,0)="^.114IA^1^1"
+^DD("IX",904,11.1,1,0)="1^F^176.002^.09^^1^F"
+^DD("IX",904,11.1,"AC",1,1)=""
+^DD("IX",904,11.1,"B",1,1)=""
+^DD("IX",904,11.1,"BB",1,1)=""
+^DD("IX",910,0)="176.002^ASAA^SAB (Source) ATN (Attribute Name) ATV (Value) Index^MU^^R^IR^I^176.002^^^^^S"
+^DD("IX",910,1)="S ^C0CRXN(176.002,""ASAA"",X(1),$E(X(2),1,30),$E(X(3),1,30),DA)=X(4)"
+^DD("IX",910,2)="K ^C0CRXN(176.002,""ASAA"",X(1),$E(X(2),1,30),$E(X(3),1,30),DA)"
+^DD("IX",910,2.5)="K ^C0CRXN(176.002,""ASAA"")"
+^DD("IX",910,11.1,0)="^.114IA^4^4"
+^DD("IX",910,11.1,1,0)="1^F^176.002^.1^^1^F"
+^DD("IX",910,11.1,1,3)=""
+^DD("IX",910,11.1,2,0)="2^F^176.002^.01^30^2^F"
+^DD("IX",910,11.1,2,3)=""
+^DD("IX",910,11.1,3,0)="3^F^176.002^.11^30^3^F"
+^DD("IX",910,11.1,3,3)=""
+^DD("IX",910,11.1,4,0)="4^F^176.002^.09^^^F"
+^DD("IX",910,11.1,4,3)=""
+^DD("IX",910,11.1,"AC",1,1)=""
+^DD("IX",910,11.1,"AC",2,2)=""
+^DD("IX",910,11.1,"AC",3,3)=""
+^DD("IX",910,11.1,"B",1,1)=""
+^DD("IX",910,11.1,"B",2,2)=""
+^DD("IX",910,11.1,"B",3,3)=""
+^DD("IX",910,11.1,"B",4,4)=""
+^DD("IX",910,11.1,"BB",1,1)=""
+^DD("IX",910,11.1,"BB",2,2)=""
+^DD("IX",910,11.1,"BB",3,3)=""
+^DD("IX",910,11.1,"BB",4,4)=""
+^DD("IX",911,0)="176.002^ASAR^SAB (Source) ATN (Attribute Name) RxCUI Index^MU^^R^IR^I^176.002^^^^^S"
+^DD("IX",911,1)="S ^C0CRXN(176.002,""ASAR"",X(1),$E(X(2),1,30),X(3),DA)=X(4)"
+^DD("IX",911,2)="K ^C0CRXN(176.002,""ASAR"",X(1),$E(X(2),1,30),X(3),DA)"
+^DD("IX",911,2.5)="K ^C0CRXN(176.002,""ASAR"")"
+^DD("IX",911,11.1,0)="^.114IA^4^4"
+^DD("IX",911,11.1,1,0)="1^F^176.002^.1^^1^F"
+^DD("IX",911,11.1,1,3)=""
+^DD("IX",911,11.1,2,0)="2^F^176.002^.01^30^2^F"
+^DD("IX",911,11.1,2,3)=""
+^DD("IX",911,11.1,3,0)="3^F^176.002^.09^^3^F"
+^DD("IX",911,11.1,3,3)=""
+^DD("IX",911,11.1,4,0)="4^F^176.002^.11^^^F"
+^DD("IX",911,11.1,4,3)=""
+^DD("IX",911,11.1,"AC",1,1)=""
+^DD("IX",911,11.1,"AC",2,2)=""
+^DD("IX",911,11.1,"AC",3,3)=""
+^DD("IX",911,11.1,"B",1,1)=""
+^DD("IX",911,11.1,"B",2,2)=""
+^DD("IX",911,11.1,"B",3,3)=""
+^DD("IX",911,11.1,"B",4,4)=""
+^DD("IX",911,11.1,"BB",1,1)=""
+^DD("IX",911,11.1,"BB",2,2)=""
+^DD("IX",911,11.1,"BB",3,3)=""
+^DD("IX",911,11.1,"BB",4,4)=""
+^DD("IX",912,0)="176.002^ANDFRT^RxNorm NDFRT Index^R^^R^IR^I^176.002^^^^^S"
+^DD("IX",912,1)="S ^C0CRXN(176.002,""ANDFRT"",X(1),$E(X(3),1,30),$E(X(4),1,30),DA)="""""
+^DD("IX",912,1.4)="S X=X(2)=""NDFRT"""
+^DD("IX",912,2)="K ^C0CRXN(176.002,""ANDFRT"",X(1),$E(X(3),1,30),$E(X(4),1,30),DA)"
+^DD("IX",912,2.4)="S X=X(2)=""NDFRT"""
+^DD("IX",912,2.5)="K ^C0CRXN(176.002,""ANDFRT"")"
+^DD("IX",912,11.1,0)="^.114IA^4^4"
+^DD("IX",912,11.1,1,0)="1^F^176.002^.09^^1^F"
+^DD("IX",912,11.1,1,3)=""
+^DD("IX",912,11.1,2,0)="2^F^176.002^.1^^^F"
+^DD("IX",912,11.1,2,3)=""
+^DD("IX",912,11.1,3,0)="3^F^176.002^.01^30^2^F"
+^DD("IX",912,11.1,3,3)=""
+^DD("IX",912,11.1,4,0)="4^F^176.002^.11^30^3^F"
+^DD("IX",912,11.1,4,3)=""
+^DD("IX",912,11.1,"AC",1,1)=""
+^DD("IX",912,11.1,"AC",2,3)=""
+^DD("IX",912,11.1,"AC",3,4)=""
+^DD("IX",912,11.1,"B",1,1)=""
+^DD("IX",912,11.1,"B",2,2)=""
+^DD("IX",912,11.1,"B",3,3)=""
+^DD("IX",912,11.1,"B",4,4)=""
+^DD("IX",912,11.1,"BB",1,1)=""
+^DD("IX",912,11.1,"BB",2,2)=""
+^DD("IX",912,11.1,"BB",3,3)=""
+^DD("IX",912,11.1,"BB",4,4)=""
Index: ccr/trunk/rxnorm/trunk/globals/F176.003.ZWR
===================================================================
--- ccr/trunk/rxnorm/trunk/globals/F176.003.ZWR	(revision 1615)
+++ ccr/trunk/rxnorm/trunk/globals/F176.003.ZWR	(revision 1615)
@@ -0,0 +1,277 @@
+KBANXDD - FILE 176.003
+3130409.132522 ZWR
+^DIC(176.003,0)="RXNORM SOURCE INFORMATION^176.003"
+^DIC(176.003,0,"AUDIT")="@"
+^DIC(176.003,0,"DD")="@"
+^DIC(176.003,0,"DEL")="@"
+^DIC(176.003,0,"GL")="^C0CRXN(176.003,"
+^DIC(176.003,0,"LAYGO")="@"
+^DIC(176.003,0,"RD")=""
+^DIC(176.003,0,"WR")="@"
+^DIC(176.003,"%",0)="^1.005^^"
+^DIC(176.003,"%D",0)="^^11^11^3130301^"
+^DIC(176.003,"%D",1,0)="File RXNSAB.RRF"
+^DIC(176.003,"%D",2,0)=" "
+^DIC(176.003,"%D",3,0)="This file contains the sources for each of the RxNorm files and their "
+^DIC(176.003,"%D",4,0)="restriction levels."
+^DIC(176.003,"%D",5,0)=" "
+^DIC(176.003,"%D",6,0)="This file follows the general format of the MRSAB.RRF file of the"
+^DIC(176.003,"%D",7,0)="Metathesaurus. Please refer to the UMLS Reference Manual for more "
+^DIC(176.003,"%D",8,0)="specific information regarding this file."
+^DIC(176.003,"%D",9,0)=" "
+^DIC(176.003,"%D",10,0)="There is one row in this file for every source in RxNorm that is "
+^DIC(176.003,"%D",11,0)="represented in this RxNorm release."
+^DD(176.003,0)="FIELD^^.25^25"
+^DD(176.003,0,"DT")=3130301
+^DD(176.003,0,"ID",.05)="W ""   "",$P(^(0),U,5)"
+^DD(176.003,0,"ID",.14)="W ""   "",$P(^(0),U,14)"
+^DD(176.003,0,"IX","B",176.003,.01)=""
+^DD(176.003,0,"NM","RXNORM SOURCE INFORMATION")=""
+^DD(176.003,.01,0)="RSAB^RFJ20^^0;1^K:$L(X)>20!($L(X)<1)!'(X'?1P.E) X"
+^DD(176.003,.01,.1)="ROOT SOURCE ABBREVIATION"
+^DD(176.003,.01,1,0)="^.1"
+^DD(176.003,.01,1,1,0)="176.003^B"
+^DD(176.003,.01,1,1,1)="S ^C0CRXN(176.003,""B"",$E(X,1,30),DA)="""""
+^DD(176.003,.01,1,1,2)="K ^C0CRXN(176.003,""B"",$E(X,1,30),DA)"
+^DD(176.003,.01,3)="Answer must be 1-20 characters in length."
+^DD(176.003,.01,21,0)="^^1^1^3130301^"
+^DD(176.003,.01,21,1,0)="The root source abbreviation, for a source e.g. NDDF"
+^DD(176.003,.01,"DT")=3130301
+^DD(176.003,.02,0)="RCUI^FJ8^^0;2^K:$L(X)>8!($L(X)<1) X"
+^DD(176.003,.02,.1)="ROOT CUI"
+^DD(176.003,.02,3)="Answer must be 1-8 characters in length."
+^DD(176.003,.02,21,0)="^^1^1^3130301^"
+^DD(176.003,.02,21,1,0)="CUI of the root SRC concept for a source"
+^DD(176.003,.02,"DT")=3130301
+^DD(176.003,.03,0)="VSAB^FJ20^^0;3^K:$L(X)>20!($L(X)<1) X"
+^DD(176.003,.03,.1)="VERSIONED SOURCE ABBREVIATION"
+^DD(176.003,.03,3)="Answer must be 1-20 characters in length."
+^DD(176.003,.03,21,0)="^^1^1^3130301^"
+^DD(176.003,.03,21,1,0)="The versioned source abbreviation for a source, e.g., NDDF_2004_11_03"
+^DD(176.003,.03,"DT")=3130301
+^DD(176.003,.04,0)="VCUI^FJ8^^0;4^K:$L(X)>8!($L(X)<1) X"
+^DD(176.003,.04,.1)="CUI"
+^DD(176.003,.04,3)="Answer must be 1-8 characters in length."
+^DD(176.003,.04,21,0)="^^1^1^3130301^"
+^DD(176.003,.04,21,1,0)="CUI of the versioned SRC concept for a source"
+^DD(176.003,.04,"DT")=3130301
+^DD(176.003,.05,0)="SON^FJ3000^^0;5^K:$L(X)>3000!($L(X)<1) X"
+^DD(176.003,.05,.1)="OFFICIAL NAME"
+^DD(176.003,.05,3)="Answer must be 1-3000 characters in length."
+^DD(176.003,.05,21,0)="^^1^1^3130301^^"
+^DD(176.003,.05,21,1,0)="The official name for a source"
+^DD(176.003,.05,"DT")=3130301
+^DD(176.003,.06,0)="SF^FJ20^^0;6^K:$L(X)>20!($L(X)<1) X"
+^DD(176.003,.06,.1)="SOURCE FAMILY"
+^DD(176.003,.06,3)="Answer must be 1-20 characters in length."
+^DD(176.003,.06,21,0)="^^1^1^3130301^"
+^DD(176.003,.06,21,1,0)="The Source Family for a source"
+^DD(176.003,.06,"DT")=3130301
+^DD(176.003,.07,0)="SVER^FJ20^^0;7^K:$L(X)>20!($L(X)<1) X"
+^DD(176.003,.07,.1)="VERSION"
+^DD(176.003,.07,3)="Answer must be 1-20 characters in length."
+^DD(176.003,.07,21,0)="^^1^1^3130301^"
+^DD(176.003,.07,21,1,0)="The source version, e.g., 2001"
+^DD(176.003,.07,"DT")=3130301
+^DD(176.003,.08,0)="VSTART^FJ10^^0;8^K:$L(X)>10!($L(X)<1) X"
+^DD(176.003,.08,.1)="META START DATE"
+^DD(176.003,.08,3)="Answer must be 1-10 characters in length."
+^DD(176.003,.08,21,0)="^^1^1^3130301^"
+^DD(176.003,.08,21,1,0)="The date a source became active, e.g., 2001_04_03"
+^DD(176.003,.08,"DT")=3130301
+^DD(176.003,.09,0)="VEND^FJ10^^0;9^K:$L(X)>10!($L(X)<1) X"
+^DD(176.003,.09,.1)="META END DATE"
+^DD(176.003,.09,3)="Answer must be 1-10 characters in length."
+^DD(176.003,.09,21,0)="^^1^1^3130301^"
+^DD(176.003,.09,21,1,0)="The date a source ceased to be active, e.g., 2001_05_10"
+^DD(176.003,.09,"DT")=3130301
+^DD(176.003,.1,0)="IMETA^FJ10^^0;10^K:$L(X)>10!($L(X)<1) X"
+^DD(176.003,.1,.1)="META INSERT VERSION"
+^DD(176.003,.1,3)="Answer must be 1-10 characters in length."
+^DD(176.003,.1,21,0)="^^1^1^3130301^^"
+^DD(176.003,.1,21,1,0)="The version of the Metathesaurus a source first appeared, e.g., 2001AB"
+^DD(176.003,.1,"DT")=3130301
+^DD(176.003,.11,0)="RMETA^FJ10^^0;11^K:$L(X)>10!($L(X)<1) X"
+^DD(176.003,.11,.1)="META REMOVE VERSION"
+^DD(176.003,.11,3)="Answer must be 1-10 characters in length."
+^DD(176.003,.11,21,0)="^^1^1^3130301^"
+^DD(176.003,.11,21,1,0)="The version of the Metathesaurus a source was removed, e.g., 2001AC"
+^DD(176.003,.11,"DT")=3130301
+^DD(176.003,.12,0)="SLC^FJ1000^^0;12^K:$L(X)>1000!($L(X)<1) X"
+^DD(176.003,.12,.1)="SOURCE LICENSE CONTACT"
+^DD(176.003,.12,3)="Answer must be 1-1000 characters in length."
+^DD(176.003,.12,21,0)="^^4^4^3130301^"
+^DD(176.003,.12,21,1,0)="The source license contact information. A semi-colon separated list "
+^DD(176.003,.12,21,2,0)="containing the following fields: Name; Title; Organization; Address 1; "
+^DD(176.003,.12,21,3,0)="Address 2; City; State or Province; Country; Zip or Postal Code; "
+^DD(176.003,.12,21,4,0)="Telephone; Contact Fax; Email; URL"
+^DD(176.003,.12,"DT")=3130301
+^DD(176.003,.13,0)="SCC^FJ1000^^0;13^K:$L(X)>1000!($L(X)<1) X"
+^DD(176.003,.13,.1)="SOURCE CONTENT CONTACT"
+^DD(176.003,.13,3)="Answer must be 1-1000 characters in length."
+^DD(176.003,.13,21,0)="^^4^4^3130301^"
+^DD(176.003,.13,21,1,0)="The source content contact information. A semi-colon separated list "
+^DD(176.003,.13,21,2,0)="containing the following fields: Name; Title; Organization; Address 1; "
+^DD(176.003,.13,21,3,0)="Address 2; City; State or Province; Country; Zip or Postal Code; "
+^DD(176.003,.13,21,4,0)="Telephone; Contact Fax; Email; URL"
+^DD(176.003,.13,"DT")=3130301
+^DD(176.003,.14,0)="SRL^NJ10,0^^0;14^K:+X'=X!(X>9999999999)!(X<0)!(X?.E1"".""1N.N) X"
+^DD(176.003,.14,.1)="SOURCE RESTRICTION LEVEL"
+^DD(176.003,.14,3)="Type a number between 0 and 9999999999, 0 decimal digits."
+^DD(176.003,.14,21,0)="^^1^1^3130301^"
+^DD(176.003,.14,21,1,0)="0,1,2,3,4 - explained in the License Agreement."
+^DD(176.003,.14,"DT")=3130301
+^DD(176.003,.15,0)="TFR^NJ10,0^^0;15^K:+X'=X!(X>9999999999)!(X<0)!(X?.E1"".""1N.N) X"
+^DD(176.003,.15,.1)="TERM FREQUENCY"
+^DD(176.003,.15,3)="Type a number between 0 and 9999999999, 0 decimal digits."
+^DD(176.003,.15,21,0)="^^2^2^3130301^"
+^DD(176.003,.15,21,1,0)="The number of terms for this source in RXNCONSO.RRF, e.g., 12343 (not "
+^DD(176.003,.15,21,2,0)="implemented yet)"
+^DD(176.003,.15,"DT")=3130301
+^DD(176.003,.16,0)="CFR^NJ10,0^^0;16^K:+X'=X!(X>9999999999)!(X<0)!(X?.E1"".""1N.N) X"
+^DD(176.003,.16,.1)="CUI FREQUENCY"
+^DD(176.003,.16,3)="Type a number between 0 and 9999999999, 0 decimal digits."
+^DD(176.003,.16,21,0)="^^2^2^3130301^"
+^DD(176.003,.16,21,1,0)="The number of CUIs associated with this source, e.g., 10234 (not "
+^DD(176.003,.16,21,2,0)="implemented yet)"
+^DD(176.003,.16,"DT")=3130301
+^DD(176.003,.17,0)="CXTY^FJ50^^0;17^K:$L(X)>50!($L(X)<1) X"
+^DD(176.003,.17,.1)="CONTEXT TYPE"
+^DD(176.003,.17,3)="Answer must be 1-50 characters in length."
+^DD(176.003,.17,21,0)="^^1^1^3130301^"
+^DD(176.003,.17,21,1,0)="The type of relationship label (Section 2.4.2 of UMLS Reference Manual)"
+^DD(176.003,.17,"DT")=3130301
+^DD(176.003,.18,0)="TTYL^FJ300^^0;18^K:$L(X)>300!($L(X)<1) X"
+^DD(176.003,.18,.1)="TERM TYPE LIST"
+^DD(176.003,.18,3)="Answer must be 1-300 characters in length."
+^DD(176.003,.18,21,0)="^^1^1^3130301^"
+^DD(176.003,.18,21,1,0)="Term type list from source, e.g., MH,EN,PM,TQ"
+^DD(176.003,.18,"DT")=3130301
+^DD(176.003,.19,0)="ATNL^FJ1000^^0;19^K:$L(X)>1000!($L(X)<1) X"
+^DD(176.003,.19,.1)="ATTRIBUTE NAME LIST"
+^DD(176.003,.19,3)="Answer must be 1-1000 characters in length."
+^DD(176.003,.19,21,0)="^^1^1^3130301^"
+^DD(176.003,.19,21,1,0)="The attribute name list, e.g., MUI,RN,TH,..."
+^DD(176.003,.19,"DT")=3130301
+^DD(176.003,.2,0)="LAT^FJ3^^0;20^K:$L(X)>3!($L(X)<1) X"
+^DD(176.003,.2,.1)="LANGUAGE"
+^DD(176.003,.2,3)="Answer must be 1-3 characters in length."
+^DD(176.003,.2,21,0)="^^1^1^3130301^"
+^DD(176.003,.2,21,1,0)="The language of the terms in the source"
+^DD(176.003,.2,"DT")=3130301
+^DD(176.003,.21,0)="CENC^FJ20^^0;21^K:$L(X)>20!($L(X)<1) X"
+^DD(176.003,.21,.1)="CHARACTER ENCODING"
+^DD(176.003,.21,3)="Answer must be 1-20 characters in length."
+^DD(176.003,.21,21,0)="^^2^2^3130301^"
+^DD(176.003,.21,21,1,0)="Character set as specified by the IANA official names for character "
+^DD(176.003,.21,21,2,0)="assignments http://www.iana.org/assignments/character-sets"
+^DD(176.003,.21,"DT")=3130301
+^DD(176.003,.22,0)="CURVER^FJ1^^0;22^K:$L(X)>1!($L(X)<1) X"
+^DD(176.003,.22,.1)="CURRENT VERSION"
+^DD(176.003,.22,3)="Answer must be 1 character in length."
+^DD(176.003,.22,21,0)="^^2^2^3130301^"
+^DD(176.003,.22,21,1,0)="A Y or N flag indicating whether or not this row corresponds to the "
+^DD(176.003,.22,21,2,0)="current version of the named source"
+^DD(176.003,.22,"DT")=3130301
+^DD(176.003,.23,0)="SABIN^FJ1^^0;23^K:$L(X)>1!($L(X)<1) X"
+^DD(176.003,.23,.1)="SOURCE IN SUBSET"
+^DD(176.003,.23,3)="Answer must be 1 character in length."
+^DD(176.003,.23,21,0)="^^3^3^3130301^"
+^DD(176.003,.23,21,1,0)="A Y or N flag indicating whether or not this row is represented in the "
+^DD(176.003,.23,21,2,0)="current MetamorphoSys subset. Initially always Y where CURVER is Y, but "
+^DD(176.003,.23,21,3,0)="later is recomputed by MetamorphoSys."
+^DD(176.003,.23,"DT")=3130301
+^DD(176.003,.24,0)="SSN^FJ3000^^0;24^K:$L(X)>3000!($L(X)<1) X"
+^DD(176.003,.24,.1)="SOURCE SHORT NAME"
+^DD(176.003,.24,3)="Answer must be 1-3000 characters in length."
+^DD(176.003,.24,21,0)="^^1^1^3130301^"
+^DD(176.003,.24,21,1,0)="The short name of a source as used by the NLM Knowledge Source Server."
+^DD(176.003,.24,"DT")=3130301
+^DD(176.003,.25,0)="SCIT^FJ4000^^0;25^K:$L(X)>4000!($L(X)<1) X"
+^DD(176.003,.25,.1)="SOURCE CITATION"
+^DD(176.003,.25,3)="Answer must be 1-4000 characters in length."
+^DD(176.003,.25,21,0)="^^6^6^3130301^"
+^DD(176.003,.25,21,1,0)="Citation information for a source. A semi-colon separated list containing "
+^DD(176.003,.25,21,2,0)="the following fields: Author(s); Author(s) address; Author(s) "
+^DD(176.003,.25,21,3,0)="organization; Editor(s); Title; Content Designator; Medium Designator; "
+^DD(176.003,.25,21,4,0)="Edition; Place of Publication; Publisher; Date of Publication/copyright; "
+^DD(176.003,.25,21,5,0)="Date of revision; Location; Extent; Series; Availability Statement (URL); "
+^DD(176.003,.25,21,6,0)="Language; Notes"
+^DD(176.003,.25,"DT")=3130301
+^DD(176.003,"B","ATNL",.19)=""
+^DD(176.003,"B","ATTRIBUTE NAME LIST",.19)=1
+^DD(176.003,"B","CENC",.21)=""
+^DD(176.003,"B","CFR",.16)=""
+^DD(176.003,"B","CHARACTER ENCODING",.21)=1
+^DD(176.003,"B","CONTEXT TYPE",.17)=1
+^DD(176.003,"B","CUI",.04)=1
+^DD(176.003,"B","CUI FREQUENCY",.16)=1
+^DD(176.003,"B","CURRENT VERSION",.22)=1
+^DD(176.003,"B","CURVER",.22)=""
+^DD(176.003,"B","CXTY",.17)=""
+^DD(176.003,"B","IMETA",.1)=""
+^DD(176.003,"B","LANGUAGE",.2)=1
+^DD(176.003,"B","LAT",.2)=""
+^DD(176.003,"B","META END DATE",.09)=1
+^DD(176.003,"B","META INSERT VERSION",.1)=1
+^DD(176.003,"B","META REMOVE VERSION",.11)=1
+^DD(176.003,"B","META START DATE",.08)=1
+^DD(176.003,"B","OFFICIAL NAME",.05)=1
+^DD(176.003,"B","RCUI",.02)=""
+^DD(176.003,"B","RMETA",.11)=""
+^DD(176.003,"B","ROOT CUI",.02)=1
+^DD(176.003,"B","ROOT SOURCE ABBREVIATION",.01)=1
+^DD(176.003,"B","RSAB",.01)=""
+^DD(176.003,"B","SABIN",.23)=""
+^DD(176.003,"B","SCC",.13)=""
+^DD(176.003,"B","SCIT",.25)=""
+^DD(176.003,"B","SF",.06)=""
+^DD(176.003,"B","SLC",.12)=""
+^DD(176.003,"B","SON",.05)=""
+^DD(176.003,"B","SOURCE CITATION",.25)=1
+^DD(176.003,"B","SOURCE CONTENT CONTACT",.13)=1
+^DD(176.003,"B","SOURCE FAMILY",.06)=1
+^DD(176.003,"B","SOURCE IN SUBSET",.23)=1
+^DD(176.003,"B","SOURCE LICENSE CONTACT",.12)=1
+^DD(176.003,"B","SOURCE RESTRICTION LEVEL",.14)=1
+^DD(176.003,"B","SOURCE SHORT NAME",.24)=1
+^DD(176.003,"B","SRL",.14)=""
+^DD(176.003,"B","SSN",.24)=""
+^DD(176.003,"B","SVER",.07)=""
+^DD(176.003,"B","TERM FREQUENCY",.15)=1
+^DD(176.003,"B","TERM TYPE LIST",.18)=1
+^DD(176.003,"B","TFR",.15)=""
+^DD(176.003,"B","TTYL",.18)=""
+^DD(176.003,"B","VCUI",.04)=""
+^DD(176.003,"B","VEND",.09)=""
+^DD(176.003,"B","VERSION",.07)=1
+^DD(176.003,"B","VERSIONED SOURCE ABBREVIATION",.03)=1
+^DD(176.003,"B","VSAB",.03)=""
+^DD(176.003,"B","VSTART",.08)=""
+^DD(176.003,"GL",0,1,.01)=""
+^DD(176.003,"GL",0,2,.02)=""
+^DD(176.003,"GL",0,3,.03)=""
+^DD(176.003,"GL",0,4,.04)=""
+^DD(176.003,"GL",0,5,.05)=""
+^DD(176.003,"GL",0,6,.06)=""
+^DD(176.003,"GL",0,7,.07)=""
+^DD(176.003,"GL",0,8,.08)=""
+^DD(176.003,"GL",0,9,.09)=""
+^DD(176.003,"GL",0,10,.1)=""
+^DD(176.003,"GL",0,11,.11)=""
+^DD(176.003,"GL",0,12,.12)=""
+^DD(176.003,"GL",0,13,.13)=""
+^DD(176.003,"GL",0,14,.14)=""
+^DD(176.003,"GL",0,15,.15)=""
+^DD(176.003,"GL",0,16,.16)=""
+^DD(176.003,"GL",0,17,.17)=""
+^DD(176.003,"GL",0,18,.18)=""
+^DD(176.003,"GL",0,19,.19)=""
+^DD(176.003,"GL",0,20,.2)=""
+^DD(176.003,"GL",0,21,.21)=""
+^DD(176.003,"GL",0,22,.22)=""
+^DD(176.003,"GL",0,23,.23)=""
+^DD(176.003,"GL",0,24,.24)=""
+^DD(176.003,"GL",0,25,.25)=""
+^DD(176.003,"IX",.01)=""
+^DD(176.003,"RQ",.01)=""
Index: ccr/trunk/rxnorm/trunk/globals/F176.004.ZWR
===================================================================
--- ccr/trunk/rxnorm/trunk/globals/F176.004.ZWR	(revision 1615)
+++ ccr/trunk/rxnorm/trunk/globals/F176.004.ZWR	(revision 1615)
@@ -0,0 +1,74 @@
+KBANXDD - FILE 176.004
+3130409.132527 ZWR
+^DIC(176.004,0)="RXNORM SEMANTIC TYPES^176.004"
+^DIC(176.004,0,"AUDIT")="@"
+^DIC(176.004,0,"DD")="@"
+^DIC(176.004,0,"DEL")="@"
+^DIC(176.004,0,"GL")="^C0CRXN(176.004,"
+^DIC(176.004,0,"LAYGO")="@"
+^DIC(176.004,0,"RD")=""
+^DIC(176.004,0,"WR")="@"
+^DIC(176.004,"%",0)="^1.005^^"
+^DIC(176.004,"%D",0)="^^7^7^3130301^"
+^DIC(176.004,"%D",1,0)="File = RXNSTY.RRF"
+^DIC(176.004,"%D",2,0)=" "
+^DIC(176.004,"%D",3,0)="This file follows the general format of the MRSTY.RRF file of the"
+^DIC(176.004,"%D",4,0)="Metathesaurus. There is exactly one row in this file for each Semantic "
+^DIC(176.004,"%D",5,0)="Type assigned to each concept. All RxNorm concepts have at least one "
+^DIC(176.004,"%D",6,0)="entry in this file. Many have more than one entry. The TUI, STN, and STY "
+^DIC(176.004,"%D",7,0)="are all direct links to the UMLS Semantic Network."
+^DD(176.004,0)="FIELD^^.06^6"
+^DD(176.004,0,"DT")=3130301
+^DD(176.004,0,"ID",.02)="W ""   "",$P(^(0),U,2)"
+^DD(176.004,0,"ID",.03)="W ""   "",$P(^(0),U,3)"
+^DD(176.004,0,"ID",.04)="W ""   "",$P(^(0),U,4)"
+^DD(176.004,0,"IX","B",176.004,.01)=""
+^DD(176.004,0,"NM","RXNORM SEMANTIC TYPES")=""
+^DD(176.004,.01,0)="RXNCUI^RFJ8^^0;1^K:$L(X)>8!($L(X)<1)!'(X'?1P.E) X"
+^DD(176.004,.01,1,0)="^.1"
+^DD(176.004,.01,1,1,0)="176.004^B"
+^DD(176.004,.01,1,1,1)="S ^C0CRXN(176.004,""B"",$E(X,1,30),DA)="""""
+^DD(176.004,.01,1,1,2)="K ^C0CRXN(176.004,""B"",$E(X,1,30),DA)"
+^DD(176.004,.01,3)="Answer must be 1-8 characters in length."
+^DD(176.004,.01,21,0)="^^1^1^3130301^"
+^DD(176.004,.01,21,1,0)="Unique identifier of concept (concept id)"
+^DD(176.004,.01,"DT")=3130301
+^DD(176.004,.02,0)="TUI^FJ4^^0;2^K:$L(X)>4!($L(X)<1) X"
+^DD(176.004,.02,3)="Answer must be 1-4 characters in length."
+^DD(176.004,.02,21,0)="^^1^1^3130301^"
+^DD(176.004,.02,21,1,0)="Unique identifier of Semantic Type"
+^DD(176.004,.02,"DT")=3130301
+^DD(176.004,.03,0)="STN^FJ100^^0;3^K:$L(X)>100!($L(X)<1) X"
+^DD(176.004,.03,3)="Answer must be 1-100 characters in length."
+^DD(176.004,.03,21,0)="^^1^1^3130301^"
+^DD(176.004,.03,21,1,0)="Semantic Type tree number"
+^DD(176.004,.03,"DT")=3130301
+^DD(176.004,.04,0)="STY^FJ50^^0;4^K:$L(X)>50!($L(X)<1) X"
+^DD(176.004,.04,3)="Answer must be 1-50 characters in length."
+^DD(176.004,.04,21,0)="^^1^1^3130301^"
+^DD(176.004,.04,21,1,0)="Semantic Type. The valid values are defined in the Semantic Network."
+^DD(176.004,.04,"DT")=3130301
+^DD(176.004,.05,0)="ATUI^FJ11^^0;5^K:$L(X)>11!($L(X)<1) X"
+^DD(176.004,.05,3)="Answer must be 1-11 characters in length."
+^DD(176.004,.05,21,0)="^^1^1^3130301^"
+^DD(176.004,.05,21,1,0)="Unique identifier for attribute"
+^DD(176.004,.05,"DT")=3130301
+^DD(176.004,.06,0)="CVF^FJ50^^0;6^K:$L(X)>50!($L(X)<1) X"
+^DD(176.004,.06,3)="Answer must be 1-50 characters in length."
+^DD(176.004,.06,21,0)="^^1^1^3130301^"
+^DD(176.004,.06,21,1,0)="Content view flag"
+^DD(176.004,.06,"DT")=3130301
+^DD(176.004,"B","ATUI",.05)=""
+^DD(176.004,"B","CVF",.06)=""
+^DD(176.004,"B","RXNCUI",.01)=""
+^DD(176.004,"B","STN",.03)=""
+^DD(176.004,"B","STY",.04)=""
+^DD(176.004,"B","TUI",.02)=""
+^DD(176.004,"GL",0,1,.01)=""
+^DD(176.004,"GL",0,2,.02)=""
+^DD(176.004,"GL",0,3,.03)=""
+^DD(176.004,"GL",0,4,.04)=""
+^DD(176.004,"GL",0,5,.05)=""
+^DD(176.004,"GL",0,6,.06)=""
+^DD(176.004,"IX",.01)=""
+^DD(176.004,"RQ",.01)=""
Index: ccr/trunk/rxnorm/trunk/globals/F176.005.ZWR
===================================================================
--- ccr/trunk/rxnorm/trunk/globals/F176.005.ZWR	(revision 1615)
+++ ccr/trunk/rxnorm/trunk/globals/F176.005.ZWR	(revision 1615)
@@ -0,0 +1,173 @@
+KBANXDD - FILE 176.005
+3130409.132533 ZWR
+^DIC(176.005,0)="RXNORM RELATED CONCEPTS^176.005"
+^DIC(176.005,0,"AUDIT")="@"
+^DIC(176.005,0,"DD")="@"
+^DIC(176.005,0,"DEL")="@"
+^DIC(176.005,0,"GL")="^C0CRXN(176.005,"
+^DIC(176.005,0,"LAYGO")="@"
+^DIC(176.005,0,"RD")=""
+^DIC(176.005,0,"WR")="@"
+^DIC(176.005,"%",0)="^1.005^^"
+^DIC(176.005,"%D",0)="^^15^15^3130301^"
+^DIC(176.005,"%D",1,0)="File = RXNREL.RRF"
+^DIC(176.005,"%D",2,0)=" "
+^DIC(176.005,"%D",3,0)="This file follows the general format of the MRREL.RRF file of the"
+^DIC(176.005,"%D",4,0)="Metathesaurus. Some of the Metathesaurus fields are not provided by "
+^DIC(176.005,"%D",5,0)="RxNorm and are marked as ""(no value provided)"". There is one row in this "
+^DIC(176.005,"%D",6,0)="table for each relationship between concepts or atoms known to RxNorm. In "
+^DIC(176.005,"%D",7,0)="addition, explicit SY RELs are provided which give the UMLS Metathesaurus "
+^DIC(176.005,"%D",8,0)="CUI and AUI as the RXCUI2 and RXAUI2 fields."
+^DIC(176.005,"%D",9,0)=" "
+^DIC(176.005,"%D",10,0)="Note that for asymmetrical relationships there is one row for each "
+^DIC(176.005,"%D",11,0)="direction of the relationship. Note also the direction of REL - the "
+^DIC(176.005,"%D",12,0)="relationship which the SECOND concept or atom (with Concept Unique "
+^DIC(176.005,"%D",13,0)="Identifier RXCUI2 and Atom Unique Identifier RXAUI2) HAS TO the FIRST "
+^DIC(176.005,"%D",14,0)="concept or atom (with Concept Unique Identifier RXCUI1 and Atom Unique "
+^DIC(176.005,"%D",15,0)="Identifier RXAUI1)."
+^DD(176.005,0)="FIELD^^.16^16"
+^DD(176.005,0,"DT")=3130301
+^DD(176.005,0,"NM","RXNORM RELATED CONCEPTS")=""
+^DD(176.005,.01,0)="SAB^RFJ20^^0;1^K:$L(X)>20!($L(X)<1)!'(X'?1P.E) X"
+^DD(176.005,.01,1,0)="^.1^^0"
+^DD(176.005,.01,3)="Answer must be 1-20 characters in length."
+^DD(176.005,.01,21,0)="^^1^1^3130301^"
+^DD(176.005,.01,21,1,0)="Abbreviation of the source of relationship"
+^DD(176.005,.01,"DT")=3130301
+^DD(176.005,.02,0)="RXAUI1^FJ8^^0;2^K:$L(X)>8!($L(X)<1) X"
+^DD(176.005,.02,3)="Answer must be 1-8 characters in length."
+^DD(176.005,.02,21,0)="^^1^1^3130301^"
+^DD(176.005,.02,21,1,0)="Unique identifier for first atom"
+^DD(176.005,.02,"DT")=3130301
+^DD(176.005,.03,0)="STYPE1^FJ50^^0;3^K:$L(X)>50!($L(X)<1) X"
+^DD(176.005,.03,3)="Answer must be 1-50 characters in length."
+^DD(176.005,.03,21,0)="^^3^3^3130301^"
+^DD(176.005,.03,21,1,0)="The name of the column in RXNCONSO.RRF that contains the identifier used "
+^DD(176.005,.03,21,2,0)="for the first concept or first atom in source of the relationship (e.g., "
+^DD(176.005,.03,21,3,0)="'AUI' or 'CUI')."
+^DD(176.005,.03,"DT")=3130301
+^DD(176.005,.04,0)="REL^FJ4^^0;4^K:$L(X)>4!($L(X)<1) X"
+^DD(176.005,.04,3)="Answer must be 1-4 characters in length."
+^DD(176.005,.04,21,0)="^^1^1^3130301^"
+^DD(176.005,.04,21,1,0)="Relationship of second concept or atom to first concept or atom"
+^DD(176.005,.04,"DT")=3130301
+^DD(176.005,.05,0)="RXCUI2^FJ8^^0;5^K:$L(X)>8!($L(X)<1) X"
+^DD(176.005,.05,3)="Answer must be 1-8 characters in length."
+^DD(176.005,.05,21,0)="^^1^1^3130301^"
+^DD(176.005,.05,21,1,0)="Unique identifier of second concept"
+^DD(176.005,.05,"DT")=3130301
+^DD(176.005,.06,0)="RXAUI2^FJ8^^0;6^K:$L(X)>8!($L(X)<1) X"
+^DD(176.005,.06,3)="Answer must be 1-8 characters in length."
+^DD(176.005,.06,21,0)="^^1^1^3130301^"
+^DD(176.005,.06,21,1,0)="Unique identifier for second atom"
+^DD(176.005,.06,"DT")=3130301
+^DD(176.005,.07,0)="STYPE2^FJ50^^0;7^K:$L(X)>50!($L(X)<1) X"
+^DD(176.005,.07,3)="Answer must be 1-50 characters in length."
+^DD(176.005,.07,21,0)="^^3^3^3130301^"
+^DD(176.005,.07,21,1,0)="The name of the column in RXNCONSO.RRF that contains the identifier used "
+^DD(176.005,.07,21,2,0)="for the second concept or second atom in the source of the relationship "
+^DD(176.005,.07,21,3,0)="(e.g., 'AUI' or 'CUI')."
+^DD(176.005,.07,"DT")=3130301
+^DD(176.005,.08,0)="RELA^FJ100^^0;8^K:$L(X)>100!($L(X)<1) X"
+^DD(176.005,.08,3)="Answer must be 1-100 characters in length."
+^DD(176.005,.08,21,0)="^^1^1^3130301^"
+^DD(176.005,.08,21,1,0)="Additional (more specific) relationship label (optional)"
+^DD(176.005,.08,"DT")=3130301
+^DD(176.005,.09,0)="RUI^FJ10^^0;9^K:$L(X)>10!($L(X)<1) X"
+^DD(176.005,.09,3)="Answer must be 1-10 characters in length."
+^DD(176.005,.09,21,0)="^^1^1^3130301^^"
+^DD(176.005,.09,21,1,0)="Unique identifier for relationship"
+^DD(176.005,.09,"DT")=3130301
+^DD(176.005,.1,0)="SRUI^FJ50^^0;10^K:$L(X)>50!($L(X)<1) X"
+^DD(176.005,.1,3)="Answer must be 1-50 characters in length."
+^DD(176.005,.1,21,0)="^^1^1^3130301^"
+^DD(176.005,.1,21,1,0)="Source asserted relationship identifier, if present (no value provided)"
+^DD(176.005,.1,"DT")=3130301
+^DD(176.005,.11,0)="RXCUI1^FJ8^^0;11^K:$L(X)>8!($L(X)<1) X"
+^DD(176.005,.11,3)="Answer must be 1-8 characters in length."
+^DD(176.005,.11,21,0)="^^1^1^3130301^"
+^DD(176.005,.11,21,1,0)="Unique identifier of first concept"
+^DD(176.005,.11,"DT")=3130301
+^DD(176.005,.12,0)="SL^FJ1000^^0;12^K:$L(X)>1000!($L(X)<1) X"
+^DD(176.005,.12,3)="Answer must be 1-1000 characters in length."
+^DD(176.005,.12,21,0)="^^1^1^3130301^"
+^DD(176.005,.12,21,1,0)="Source of relationship labels (no value provided)"
+^DD(176.005,.12,"DT")=3130301
+^DD(176.005,.13,0)="DIR^FJ1^^0;13^K:$L(X)>1!($L(X)<1) X"
+^DD(176.005,.13,3)="Answer must be 1 character in length."
+^DD(176.005,.13,21,0)="^^4^4^3130301^"
+^DD(176.005,.13,21,1,0)="Source asserted directionality flag. (no value provided) Y indicates that "
+^DD(176.005,.13,21,2,0)="this is the direction of the relationship in its source; N indicates that "
+^DD(176.005,.13,21,3,0)="it is not; a blank indicates that it is not important or has not yet been "
+^DD(176.005,.13,21,4,0)="determined."
+^DD(176.005,.13,"DT")=3130301
+^DD(176.005,.14,0)="RG^FJ10^^0;14^K:$L(X)>10!($L(X)<1) X"
+^DD(176.005,.14,3)="Answer must be 1-10 characters in length."
+^DD(176.005,.14,21,0)="^^1^1^3130301^"
+^DD(176.005,.14,21,1,0)="Machine generated and unverified indicator (optional)"
+^DD(176.005,.14,"DT")=3130301
+^DD(176.005,.15,0)="SUPPRESS^FJ1^^0;15^K:$L(X)>1!($L(X)<1) X"
+^DD(176.005,.15,3)="Answer must be 1 character in length."
+^DD(176.005,.15,21,0)="^^3^3^3130301^"
+^DD(176.005,.15,21,1,0)="Suppressible flag. Values = Y, E, or N. Reflects the suppressible status "
+^DD(176.005,.15,21,2,0)="of the relationship; not yet in use. See also SUPPRESS in MRCONSO.RRF and "
+^DD(176.005,.15,21,3,0)="MRDEF.RRF and MRREL.RRF in the UMLS Reference Manual."
+^DD(176.005,.15,"DT")=3130301
+^DD(176.005,.16,0)="CVF^FJ50^^0;16^K:$L(X)>50!($L(X)<1) X"
+^DD(176.005,.16,3)="Answer must be 1-50 characters in length."
+^DD(176.005,.16,21,0)="^^1^1^3130301^"
+^DD(176.005,.16,21,1,0)="Content view flag"
+^DD(176.005,.16,"DT")=3130301
+^DD(176.005,"B","CVF",.16)=""
+^DD(176.005,"B","DIR",.13)=""
+^DD(176.005,"B","REL",.04)=""
+^DD(176.005,"B","RELA",.08)=""
+^DD(176.005,"B","RG",.14)=""
+^DD(176.005,"B","RUI",.09)=""
+^DD(176.005,"B","RXAUI1",.02)=""
+^DD(176.005,"B","RXAUI2",.06)=""
+^DD(176.005,"B","RXCUI1",.11)=""
+^DD(176.005,"B","RXCUI2",.05)=""
+^DD(176.005,"B","SAB",.01)=""
+^DD(176.005,"B","SL",.12)=""
+^DD(176.005,"B","SRUI",.1)=""
+^DD(176.005,"B","STYPE1",.03)=""
+^DD(176.005,"B","STYPE2",.07)=""
+^DD(176.005,"B","SUPPRESS",.15)=""
+^DD(176.005,"GL",0,1,.01)=""
+^DD(176.005,"GL",0,2,.02)=""
+^DD(176.005,"GL",0,3,.03)=""
+^DD(176.005,"GL",0,4,.04)=""
+^DD(176.005,"GL",0,5,.05)=""
+^DD(176.005,"GL",0,6,.06)=""
+^DD(176.005,"GL",0,7,.07)=""
+^DD(176.005,"GL",0,8,.08)=""
+^DD(176.005,"GL",0,9,.09)=""
+^DD(176.005,"GL",0,10,.1)=""
+^DD(176.005,"GL",0,11,.11)=""
+^DD(176.005,"GL",0,12,.12)=""
+^DD(176.005,"GL",0,13,.13)=""
+^DD(176.005,"GL",0,14,.14)=""
+^DD(176.005,"GL",0,15,.15)=""
+^DD(176.005,"GL",0,16,.16)=""
+^DD(176.005,"RQ",.01)=""
+^DD("IX",905,0)="176.005^B^Compound Index for RXCUI1/RELA/RXCUI2^R^^R^IR^I^176.005^^^^^LS"
+^DD("IX",905,1)="S ^C0CRXN(176.005,""B"",X(1),X(2),X(3),DA)="""""
+^DD("IX",905,2)="K ^C0CRXN(176.005,""B"",X(1),X(2),X(3),DA)"
+^DD("IX",905,2.5)="K ^C0CRXN(176.005,""B"")"
+^DD("IX",905,11.1,0)="^.114IA^3^3"
+^DD("IX",905,11.1,1,0)="1^F^176.005^.11^^1^F"
+^DD("IX",905,11.1,1,3)=""
+^DD("IX",905,11.1,2,0)="2^F^176.005^.08^^2^F"
+^DD("IX",905,11.1,2,3)=""
+^DD("IX",905,11.1,3,0)="3^F^176.005^.05^^3^F"
+^DD("IX",905,11.1,3,3)=""
+^DD("IX",905,11.1,"AC",1,1)=""
+^DD("IX",905,11.1,"AC",2,2)=""
+^DD("IX",905,11.1,"AC",3,3)=""
+^DD("IX",905,11.1,"B",1,1)=""
+^DD("IX",905,11.1,"B",2,2)=""
+^DD("IX",905,11.1,"B",3,3)=""
+^DD("IX",905,11.1,"BB",1,1)=""
+^DD("IX",905,11.1,"BB",2,2)=""
+^DD("IX",905,11.1,"BB",3,3)=""
Index: ccr/trunk/rxnorm/trunk/globals/F176.006.ZWR
===================================================================
--- ccr/trunk/rxnorm/trunk/globals/F176.006.ZWR	(revision 1615)
+++ ccr/trunk/rxnorm/trunk/globals/F176.006.ZWR	(revision 1615)
@@ -0,0 +1,62 @@
+KBANXDD - FILE 176.006
+3130409.13254 ZWR
+^DIC(176.006,0)="RXNORM DOCUMENTATION FOR ABBREVIATED VALUES^176.006"
+^DIC(176.006,0,"AUDIT")="@"
+^DIC(176.006,0,"DD")="@"
+^DIC(176.006,0,"DEL")="@"
+^DIC(176.006,0,"GL")="^C0CRXN(176.006,"
+^DIC(176.006,0,"LAYGO")="@"
+^DIC(176.006,0,"RD")=""
+^DIC(176.006,0,"WR")="@"
+^DIC(176.006,"%",0)="^1.005^^"
+^DIC(176.006,"%D",0)="^^9^9^3130301^"
+^DIC(176.006,"%D",1,0)="File = RXNDOC.RRF"
+^DIC(176.006,"%D",2,0)=" "
+^DIC(176.006,"%D",3,0)="This file follows the format of the Metathesaurus MRDOC.RRF file. At this "
+^DIC(176.006,"%D",4,0)="time, this file contains all of the data contained in the UMLS MRDOC.RRF "
+^DIC(176.006,"%D",5,0)="file. In the future, the contents of this file may be tailored to the "
+^DIC(176.006,"%D",6,0)="RxNorm subset of data only. There is exactly one row in this table for "
+^DIC(176.006,"%D",7,0)="each allowed value of selected data elements or attributes that have a "
+^DIC(176.006,"%D",8,0)="finite number of abbreviations as allowed values. Examples of such data "
+^DIC(176.006,"%D",9,0)="elements include TTY, ATN, TS, STT, REL, RELA."
+^DD(176.006,0)="FIELD^^.04^4"
+^DD(176.006,0,"DT")=3130301
+^DD(176.006,0,"ID",.02)="W ""   "",$P(^(0),U,2)"
+^DD(176.006,0,"ID",.03)="W ""   "",$P(^(0),U,3)"
+^DD(176.006,0,"ID",.04)="W ""   "",$P(^(0),U,4)"
+^DD(176.006,0,"IX","B",176.006,.01)=""
+^DD(176.006,0,"NM","RXNORM DOCUMENTATION FOR ABBREVIATED VALUES")=""
+^DD(176.006,.01,0)="DOCKEY^RFJ50^^0;1^K:$L(X)>50!($L(X)<1)!'(X'?1P.E) X"
+^DD(176.006,.01,1,0)="^.1"
+^DD(176.006,.01,1,1,0)="176.006^B"
+^DD(176.006,.01,1,1,1)="S ^C0CRXN(176.006,""B"",$E(X,1,30),DA)="""""
+^DD(176.006,.01,1,1,2)="K ^C0CRXN(176.006,""B"",$E(X,1,30),DA)"
+^DD(176.006,.01,3)="Answer must be 1-50 characters in length."
+^DD(176.006,.01,21,0)="^^1^1^3130301^"
+^DD(176.006,.01,21,1,0)="Data element or attribute"
+^DD(176.006,.01,"DT")=3130301
+^DD(176.006,.02,0)="VALUE^FJ1000^^0;2^K:$L(X)>1000!($L(X)<1) X"
+^DD(176.006,.02,3)="Answer must be 1-1000 characters in length."
+^DD(176.006,.02,21,0)="^^1^1^3130301^"
+^DD(176.006,.02,21,1,0)="Abbreviation that is one of its values"
+^DD(176.006,.02,"DT")=3130301
+^DD(176.006,.03,0)="TYPE^FJ50^^0;3^K:$L(X)>50!($L(X)<1) X"
+^DD(176.006,.03,3)="Answer must be 1-50 characters in length."
+^DD(176.006,.03,21,0)="^^1^1^3130301^"
+^DD(176.006,.03,21,1,0)="Type of information in EXPL column"
+^DD(176.006,.03,"DT")=3130301
+^DD(176.006,.04,0)="EXPL^FJ1000^^0;4^K:$L(X)>1000!($L(X)<1) X"
+^DD(176.006,.04,3)="Answer must be 1-1000 characters in length."
+^DD(176.006,.04,21,0)="^^1^1^3130301^"
+^DD(176.006,.04,21,1,0)="Explanation of VALUE"
+^DD(176.006,.04,"DT")=3130301
+^DD(176.006,"B","DOCKEY",.01)=""
+^DD(176.006,"B","EXPL",.04)=""
+^DD(176.006,"B","TYPE",.03)=""
+^DD(176.006,"B","VALUE",.02)=""
+^DD(176.006,"GL",0,1,.01)=""
+^DD(176.006,"GL",0,2,.02)=""
+^DD(176.006,"GL",0,3,.03)=""
+^DD(176.006,"GL",0,4,.04)=""
+^DD(176.006,"IX",.01)=""
+^DD(176.006,"RQ",.01)=""
Index: ccr/trunk/rxnorm/trunk/globals/F50D176.001.ZWR
===================================================================
--- ccr/trunk/rxnorm/trunk/globals/F50D176.001.ZWR	(revision 1615)
+++ ccr/trunk/rxnorm/trunk/globals/F50D176.001.ZWR	(revision 1615)
@@ -0,0 +1,13 @@
+KBANXDD - FILE 50
+3130409.132556 ZWR
+^DD(50,176.001,0)="RXNCUI^CJ8^^ ; ^S X=$$MED2RXN^C0CRXNLK(D0)"
+^DD(50,176.001,.1)="RXNORM CUI"
+^DD(50,176.001,9)=""
+^DD(50,176.001,9.01)=""
+^DD(50,176.001,9.1)="S X=$$MED2RXN^C0CRXNLK(D0)"
+^DD(50,176.001,"DT")=3130408
+^DD(50,176.002,0)="RXN SCD NAME^CJ250^^ ; ^S X=$$MED2SCDN^C0CRXNLK(D0)"
+^DD(50,176.002,9)=""
+^DD(50,176.002,9.01)=""
+^DD(50,176.002,9.1)="S X=$$MED2SCDN^C0CRXNLK(D0)"
+^DD(50,176.002,"DT")=3130408
Index: ccr/trunk/rxnorm/trunk/routines/C0CRXNLK.m
===================================================================
--- ccr/trunk/rxnorm/trunk/routines/C0CRXNLK.m	(revision 1615)
+++ ccr/trunk/rxnorm/trunk/routines/C0CRXNLK.m	(revision 1615)
@@ -0,0 +1,282 @@
+C0CRXNLK	; VEN/SMH - RxNorm Lookup Utilities ;2013-04-08  5:00 PM
+	;;1.0;RX NORM;;Apr 25, 2012;Build 99
+	;(c) Sam Habiel 2013
+	; See accompanying license. Don't use otherwise.
+	;
+	S IO=$P
+	N DIQUIET S DIQUIET=1
+	D DT^DICRW
+	D EN^XTMUNIT($T(+0),1)
+	QUIT
+	;
+GCN2RXN(GCN)	; $$ Public - Get RxNorm CUI using GCN
+	; Input: GCN by Value
+	; Output: Extrinsic
+	S GCN=$$RJ^XLFSTR(GCN,6,0) ; pad to six digits by zeros (123 becomes 000123)
+	N IEN S IEN=$O(^C0CRXN(176.001,"STC","NDDF","CDC",GCN,"")) ; Get Entry
+	Q ^(IEN)
+	;
+GCN2RXNT ; @TEST - Test Get RxNorm CUI using GCN
+	N L F L=1:1 N LN S LN=$T(GCN2RXND+L) Q:LN["<<END>>"  Q:LN=""  D
+	. N GCN S GCN=$P(LN,";",3)
+	. N RXN S RXN=$P(LN,";",4)
+	. D CHKEQ^XTMUNIT($$GCN2RXN(GCN),RXN,"Translation from GCN to RXCUI failed")
+	QUIT
+	;
+GCN2RXND ; @DATA - Data for Tests ;;GCN;EXPECTED RXNCUI
+	;;16033;991632
+	;;8208;310429
+	;;1275;628953
+	;;18;197604
+	;;346;884173
+	;;<<END>>
+	;
+	;
+	;
+RXN2VUI(RXNCUI)	; $$ Public - Get VUID(s) for given RXNCUI for Clinical Drug
+	; Input: RXNCUI by Value
+	; Output: Caret delimited extrinsic. Should not be more than 2 entries.
+	N C0PVUID S C0PVUID=""
+	N I S I=""
+	F  S I=$O(^C0CRXN(176.001,"STX","VANDF","CD",RXNCUI,I)) Q:I=""  S C0PVUID=C0PVUID_^(I)_U
+	S C0PVUID=$E(C0PVUID,1,$L(C0PVUID)-1) ; remove trailing ^
+	; TODO: Return only the quantified form using:
+	; I $O(^C0CRXN(176.005,"RXCUIREL",RXN,"has_quantified_form","")) N QF S QF=$O(^("")) Q $O(^C0CRXN(176.001,"RXN2VUID",QF,""))
+	Q C0PVUID
+	;
+RXN2VUIT ; @TEST - Get VUIDs given RxNorm values
+	N L F L=1:1 N LN S LN=$T(RXN2VUID+L) Q:LN["<<END>>"  Q:LN=""  D
+	. N RXN S RXN=$P(LN,";",3)
+	. N VUIDS S VUIDS=$P(LN,";",4)
+	. D CHKEQ^XTMUNIT($$RXN2VUI(RXN),VUIDS,"Translation from RXNCUI to VUID failed")
+	QUIT
+	;
+RXN2VUID ; @DATA - Data items for previous test
+	;;991632;4006455
+	;;310429;4002369^4013941
+	;;628953;4000874^4000856^4013966^4015798^4015799
+	;;197604;4003335^4015937
+	;;884173;4002469^4013919
+	;;<<END>>
+	;
+	;
+	;
+VUI2VAP(VUID)	; $$ Public - Get VA Product IEN from VUID
+	; Input VUID by Value
+	; Output: Extrinsic
+	Q $$FIND1^DIC(50.68,"","QX",VUID,"AVUID")
+	;
+VUI2VAPT ; @TEST - Get VA Product IEN from VUID
+	N L F L=1:1 N LN S LN=$T(VUI2VAPD+L) Q:LN["<<END>>"  Q:LN=""  D
+	. N VUID S VUID=$P(LN,";",3)
+	. N VAP S VAP=$P(LN,";",4)
+	. D CHKEQ^XTMUNIT($$VUI2VAP(VUID),VAP,"Translation from VUID to VA PRODUCT failed")
+	QUIT
+	;
+VUI2VAPD ; @DATA - Data for above test
+	;;4006455;5932
+	;;4002369;1784
+	;;4000874;252
+	;;4003335;2756
+	;;4002469;1884
+	;;<<END>>
+	;
+	;
+	;
+VAP2MED(VAPROD)	; $$ Public - Get Drug(s) using VA Product IEN
+	; Un-Unit-testable: Drug files differ between sites.
+	; Input: VA Product IEN By Value
+	; OUtput: Caret delimited extrinsic
+	; This code inspired from PSNAPIs
+	; WHY THE HELL WOULD I USE A TEXT INDEX?
+	; It's my only option. Creating new xrefs on the drug file doesn't help
+	; as they are not filled out when adding a drug (IX[ALL]^DIK isn't called).
+	N MEDS S MEDS="" ; result
+	N PN,PN1 ; Product Name, abbreviated product name.
+	S PN=$P(^PSNDF(50.68,VAPROD,0),"^"),PN1=$E(PN,1,30)
+	N P50 S P50=0 ; looper through VAPN index which is DRUG file entry
+	F  S P50=$O(^PSDRUG("VAPN",PN1,P50)) Q:'P50  D  ; for each text match
+	. I $P(^PSDRUG(P50,"ND"),"^",3)=VAPROD S MEDS=$G(MEDS)_P50_U  ; check that the VA PRODUCT pointer is the same as ours.
+	S:MEDS MEDS=$E(MEDS,1,$L(MEDS)-1) ; remove trailing ^
+	Q MEDS
+	;
+	;
+RXN2MEDS(RXNCUI) ; $$ Public - Convert RxNorm value to currently existing drugs in File 50.
+	; Input: SCD RXNCUI
+	; Output; Caret delimited extrinsic
+	; Un-unit testable
+	N VUIDS S VUIDS=$$RXN2VUI(RXNCUI) ; Get VUID from RXNCUI
+	; TODO: Decide which VUID to use!
+	N VAPROD S VAPROD=$$VUI2VAP(VUIDS) ; Get VA Product from VUID
+	N MEDS S MEDS=$$VAP2MED(VAPROD) ; Get Meds from VA Product
+	QUIT MEDS
+	;
+FDI2RXN(BASE)	; $$ Public - Get RxNorm CUI for FDB Ingredient/Base
+	; ^C0CRXN(176.001,"STC","NDDF","IN","014739",1000870)=1362160
+	; Input: BASE By Value
+	; Output: RxNorm CUI
+	S BASE=$$RJ^XLFSTR(BASE,6,0) ; pad to six digits by zeros (123 becomes 000123)
+	N IEN S IEN=$O(^C0CRXN(176.001,"STC","NDDF","IN",BASE,"")) Q ^(IEN)
+	;
+FDI2RXNT	; @TEST - Test Get RxNorm CUI for FDB Ingredient/Base
+	D CHKEQ^XTMUNIT($$FDI2RXN(14739),1362160,"$$FDI2RXN failed")
+	QUIT
+	;
+	;
+	;
+RXN2VIN(RXNCUI)	; $$ Public - Get VUID Ingredient for RxNorm CUI
+	; ^C0CRXN(176.001,"STX","VANDF","IN",1366467,1008555)=4031768
+	; Input: RXNCUI By Value
+	; Output: VUID
+	N IEN S IEN=$O(^C0CRXN(176.001,"STX","VANDF","IN",RXNCUI,"")) Q ^(IEN)
+	;
+RXN2VINT	; @TEST - Test Get VUID Ingredient for RxNorm CUI
+	D CHKEQ^XTMUNIT($$RXN2VIN(1366467),4031768,"$$RXN2VIN failed")
+	QUIT
+	;
+	;
+	;
+VIN2VAG(VUID)	; $$ Public - Get VA Generic for VUID Ingredient
+	; Input: VUID By Value
+	; Output: IEN^VA Generic Name (i.e. .01 field value)
+	N C0PIEN S C0PIEN=$$FIND1^DIC(50.6,"","QX",VUID,"AVUID")
+	N C0P01 S C0P01=$$GET1^DIQ(50.6,C0PIEN,.01)
+	Q C0PIEN_"^"_C0P01
+	;
+VIN2VAGT ; @TEST - Test Get VA Generic for VUID Ingredient
+	D CHKEQ^XTMUNIT(+$$VIN2VAG(4023636),2832,"$$VIN2VAG failed")
+	QUIT
+	;
+	;
+	;
+FDI2VAG(BASE)	; $$ Public - Get VA Generic for FDB Ingredient/Base
+	; TODO:Not tested...
+	; Input: BASE By Value
+	; Output: IEN^VA Generic Name (i.e. .01 field value)
+	Q $$VIN2VAG($$RXN2VIN($$FDI2RXN(BASE)))
+	;
+VIN2DIN(VUID)	; $$ Public - Get Drug Ingredient for VUID Ingredient
+	; TODO:Not tested...
+	; Input: VUID By Value
+	; Output: IEN^Drug Ingredient Name (i.e. .01 field value)
+	N C0PIEN S C0PIEN=$$FIND1^DIC(50.416,"","QX",VUID,"AVUID")
+	N C0P01 S C0P01=$$GET1^DIQ(50.416,C0PIEN,.01)
+	Q C0PIEN_"^"_C0P01
+	;
+FDI2DIN(BASE)	; $$ Public - Get Drug Ingredient for FDB Ingredient/Base
+	; TODO:Not tested...
+	; Input: BASE By Value
+	; Output: IEN^Drug Ingredient Name (i.e. .01 field value)
+	Q $$VIN2DIN($$RXN2VIN($$FDI2RXN(BASE)))
+	;
+VUI2RXN(VUID)	; $$ Public - Get RXNCUI for VUID (any VUID type)
+	; Input: VUID By Value
+	; Output: RXNCUIs delimited by ^
+	; Get all entries whose code is the VUID and are in the VA NDF which are clinical drugs
+	D FIND^DIC(176.001,,"@;.01","PQX",VUID,,"CODE","I $P(^(0),U,12,13)=""VANDF^CD""")
+	; Deserialise it into a single string
+	; ^TMP("DILIST",4844,0)="1^*^0^"
+	; ^TMP("DILIST",4844,0,"MAP")="IEN^.01"
+	; ^TMP("DILIST",4844,1,0)="1006351^1364462"
+	N RXNS S RXNS=""
+	N I F I=0:0 S I=$O(^TMP("DILIST",$J,I)) Q:'I  S RXNS=RXNS_$P(^(I,0),U,2)_U
+	S RXNS=$E(RXNS,1,$L(RXNS)-1)
+	QUIT RXNS
+	;
+MED2RXN(DA) ; $$ Public - Get RxNorm CUI for Drug
+	; Input: DA - Medication IEN
+	; Output: RXNCUIs delimited by ^
+	N ND S ND=$G(^PSDRUG(DA,"ND")) ; ND Node
+	N VAP S VAP=$P(ND,U,3) ; VA Product Pointer
+	Q:'VAP ""  ; quit if empty
+	N VUID S VUID=+^PSNDF(50.68,VAP,"VUID")  ; Get VUID
+	I 'VUID S $EC=",U1," ; Must exist
+	Q $$VUI2RXN(VUID)
+	;
+MED2SCDN(DA) ; $$ Public - Medication to Semantic Clinical Drug Name
+	; Input: DA - Medication IEN
+	; Output: The Canonical Semantic Clinical Drug name
+	N RXNCUI S RXNCUI=$$MED2RXN(DA)
+	Q:'RXNCUI ""
+	N IEN S IEN=$O(^C0CRXN(176.001,"STC","RXNORM","SCD",RXNCUI,""))  ; Let's try generic drug
+	I 'IEN S IEN=$O(^C0CRXN(176.001,"STC","RXNORM","SBD",RXNCUI,""))  ; Let's try non-bioequivalent Brands then
+	I 'IEN S IEN=$O(^C0CRXN(176.001,"STC","RXNORM","GPCK",RXNCUI,"")) ; Let's try a Generic combination package
+	I 'IEN S IEN=$O(^C0CRXN(176.001,"STC","RXNORM","SCDF",RXNCUI,"")) ; Let's try a Clinical Drug and Form (Like Metamucil)
+	Q:'IEN "" ; Apparently not every VUID has a corresponding RXNCUI SCD.
+	Q $P(^C0CRXN(176.001,IEN,0),U,15)
+	;
+RXN2NDI(RXNCUI)	; $$ Public - Get NDDF Ingredient for RXNCUI
+	; Input: RXNCUI By Value
+	; Output: NDDF Base code
+	; TODO:Not tested...
+	N IEN S IEN=$O(^C0CRXN(176.001,"STX","NDDF","IN",RXNCUI,"")) Q ^(IEN)
+	;
+VIN2NDI(VUID)	; $$ Public - Get NDDF Ingredient for VUID
+	; NB: WILL ONLY WORK IF VUID IS AN INGREDIENT VUID, NOT A CLINICAL DRUG
+	; Input: VUID By Value
+	; Output: NDDF Base code
+	; TODO:Not tested...
+	Q $$RXN2NDI($$VUI2RXN(VUID))
+	;
+	; ---
+	;
+NDC2RXN(NDC) ; $$ Public - Get RxCUI given the NDC
+	; NB: Will only work if passed NDC is in 5-4-2 format.
+	; Input: NDC By Value in 5-4-2 Format
+	; Output: RxNorm Code.
+	S NDC=$TR(NDC,"-")
+	N IEN S IEN=$O(^C0CRXN(176.002,"ASAA","RXNORM","NDC",NDC,"")) Q ^(IEN)
+	;
+NDC2RXNT ; @TEST - Test Get RxCUI given the NDC
+	D CHKEQ^XTMUNIT($$NDC2RXN("30142-0917-71"),198439,"$$NDC2RXN failed")
+	QUIT
+	;
+	; ---
+	;
+ISBRAND(RXN) ; $$ Public - Is this RxCUI for a brand drug?
+	; Input: RxCUI
+	; Output: 0 or 1
+	Q ''$D(^C0CRXN(176.001,"STC","RXNORM","SBD",RXN))
+ISBRANDT ; @TEST - Test Is this RxCUI for a brand drug?
+	D CHKEQ^XTMUNIT($$ISBRAND(205535),1,"$$ISBRAND failed") ; Brand Prozac
+	D CHKEQ^XTMUNIT($$ISBRAND(310384),0,"$$ISBRAND failed") ; Generic Fluoxetine
+	QUIT
+	;
+	; ---
+	;
+BR2GEN(RXN) ; $$ Public - Convert Brand RxCUI to Generic RxCUI (many to 1)
+	; Input: RxCUI of Brand
+	; Output: RxCUI of Generic
+	Q $O(^C0CRXN(176.005,"B",RXN,"has_tradename",""))
+BR2GENT ; @TEST - Test Convert Brand RxCUI to Generic RxCUI (many to 1)
+	D CHKEQ^XTMUNIT($$BR2GEN(205535),310384,"$$BR2GEN failed")
+	QUIT
+	;
+	; ---
+	;
+GEN2BR(RXN) ; $$ Public - Convert Generic RxCUI to Brand RxCUIs (1 to many).
+	N RTN S RTN="" ; Return
+	N I S I="" F  S I=$O(^C0CRXN(176.005,"B",RXN,"tradename_of",I)) Q:'I  S RTN=RTN_I_U
+	S RTN=$E(RTN,1,$L(RTN)-1)
+	Q RTN
+	;
+GEN2BRT ; @TEST - Test Convert Generic RxCUI to Brand RxCUIs (1 to many).
+	D CHKTF^XTMUNIT($$GEN2BR(310384)[205535,"$$GEN2BR failed")
+	QUIT
+	;
+	; ---
+	;
+RXN2BNS(RXN) ; $$ Public - Get all Brand Names associated with an RXN
+	N BNS S BNS=""
+	I $$ISBRAND(RXN) S RXN=$$BR2GEN(RXN)
+	N ALLBN S ALLBN=$$GEN2BR(RXN)
+	N BNNO F BNNO=1:1:$L(ALLBN,U) D
+	. N EACHBN S EACHBN=$P(ALLBN,U,BNNO)
+	. N BNRXCUI S BNRXCUI=$O(^C0CRXN(176.005,"B",EACHBN,"ingredient_of",""))
+	. Q:BNRXCUI=""
+	. N BNIEN S BNIEN=$O(^C0CRXN(176.001,"B",BNRXCUI,""))
+	. S BNS=BNS_$P(^C0CRXN(176.001,BNIEN,0),U,15)_U
+	QUIT $E(BNS,1,$L(BNS)-1)
+RXN2BNST ; @TEST - Test Get all Brand Names associated with an RXN
+	D CHKTF^XTMUNIT($$RXN2BNS(205535)["Prozac","$$RXN2BNS failed")
+	QUIT
Index: ccr/trunk/rxnorm/trunk/routines/C0CRXNRD.m
===================================================================
--- ccr/trunk/rxnorm/trunk/routines/C0CRXNRD.m	(revision 1615)
+++ ccr/trunk/rxnorm/trunk/routines/C0CRXNRD.m	(revision 1615)
@@ -0,0 +1,168 @@
+C0CRXNRD	; VEN/SMH - RxNorm Utilities: Routine to Read RxNorm files;2013-03-06  4:32 PM
+	;;2.0;RX NORM;;May 11, 2012;Build 50
+	; (C) Sam Habiel 2013
+	; See license for terms of use.
+	;
+	W "No entry from top" Q
+IMPORT(PATH) ; PUBLIC ENTRY POINT. Rest are private
+	I PATH="" QUIT
+	S U="^"
+	N STARTTIME S STARTTIME=$P($H,",")*24*60*60+$P($H,",",2)
+	D SAB(PATH),CONSO(PATH),SAT(PATH),STY(PATH),REL(PATH),DOC(PATH)
+	N ENDTIME S ENDTIME=$P($H,",")*24*60*60+$P($H,",",2)
+	W !,(ENDTIME-STARTTIME)/60_" minutes elapsed"
+	QUIT
+	;
+	; Everything is private from down on...
+DELFILED(FN)	; Delete file data; PEP procedure; only for RxNorm files
+	; FN is Filenumber passed by Value
+	QUIT:$E(FN,1,3)'=176  ; Quit if not RxNorm files
+	N ROOT S ROOT=$$ROOT^DILFD(FN,"",1) ; global root
+	N ZERO S ZERO=@ROOT@(0) ; Save zero node
+	S $P(ZERO,U,3,9999)="" ; Remove entry # and last edited
+	K @ROOT ; Kill the file -- so sad!
+	S @ROOT@(0)=ZERO ; It riseth again!
+	QUIT
+GETLINES(PATH,FILENAME)	; Get number of lines in a file
+	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
+	U IO
+	N I,LINE
+	F I=1:1 R LINE:0 Q:$$STATUS^%ZISH
+	D CLOSE^%ZISH("FILE")
+	Q I-1
+CONSO(PATH,INCRES)	; Open and read concepts file: RXNCONSO.RRF
+	; PATH ByVal, path of RxNorm files
+	; INCRES ByVal, include restricted sources. 1 for yes, 0 for no
+	I PATH="" QUIT
+	S INCRES=+$G(INCRES) ; if not passed, becomes zero.
+	N FILENAME S FILENAME="RXNCONSO.RRF"
+	D DELFILED(176.001) ; delete data
+	N LINES S LINES=$$GETLINES(PATH,FILENAME)
+	N POP
+	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
+	IF POP D EN^DDIOL("Error reading file..., Please check...") G EX
+	N C0CCOUNT
+	F C0CCOUNT=1:1 D  Q:$$STATUS^%ZISH
+	. U IO
+	. N LINE R LINE:0
+	. IF $$STATUS^%ZISH QUIT
+	. I '(C0CCOUNT#1000) U $P W C0CCOUNT," of ",LINES," read ",! U IO ; update every 1000
+	. S ^C0CRXN(176.001,C0CCOUNT,0)=$TR(LINE,"|^","^|")
+	. ; TODO Implement Filtering:
+	. ; If the source is a restricted source, decide what to do based on what's asked.
+	. ; N SRCIEN S SRCIEN=$$FIND1^DIC(176.003,"","QX",SAB,"B") ; SrcIEN in RXNORM SOURCES file
+	. ; N RESTRIC S RESTRIC=$$GET1^DIQ(176.003,SRCIEN,14,"I") ; 14 is restriction field; values 0-4
+	. ; If RESTRIC is zero, then it's unrestricted. Everything else is restricted.
+	. ; If user didn't ask to include restricted sources, and the source is restricted, then quit
+	. ; I 'INCRES,RESTRIC QUIT
+EX	D CLOSE^%ZISH("FILE")
+	N DIK S DIK="^C0CRXN(176.001," D IXALL^DIK
+	QUIT
+	;
+	;
+SAT(PATH)	; Open and read Concept and Atom attributes: RXNSAT.RRF
+	I PATH="" QUIT
+	N FILENAME S FILENAME="RXNSAT.RRF"
+	D DELFILED(176.002) ; delete data
+	N LINES S LINES=$$GETLINES(PATH,FILENAME)
+	N POP
+	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
+	IF POP W "Error reading file..., Please check...",! G EX2
+	N C0CCOUNT F C0CCOUNT=1:1 Q:$$STATUS^%ZISH  D
+	. U IO
+	. N LINE R LINE:0
+	. IF $$STATUS^%ZISH QUIT
+	. I '(C0CCOUNT#1000) U $P W C0CCOUNT," of ",LINES," read ",! U IO ; update every 1000
+	. ;
+	. ; We switch around the fields .01 and .09 because the .01 isn't always present; where as .09 is required
+	. N RXCUI1,ATN9
+	. S RXCUI1=$P(LINE,"|",1)
+	. S ATN9=$P(LINE,"|",9)
+	. S $P(LINE,"|",1)=ATN9
+	. S $P(LINE,"|",9)=RXCUI1
+	. ;
+	. ; Save off
+	. S ^C0CRXN(176.002,C0CCOUNT,0)=$TR(LINE,"|^","^|")
+EX2	D CLOSE^%ZISH("FILE")
+	N DIK S DIK="^C0CRXN(176.002," D IXALL^DIK
+	QUIT
+	;
+	;
+SAB(PATH)	; Open the read RxNorm Sources file: RXNSAB.RRF
+	I PATH="" QUIT
+	N FILENAME S FILENAME="RXNSAB.RRF"
+	D DELFILED(176.003) ; delete data
+	N POP
+	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
+	IF POP W "Error reading file..., Please check...",! G EX3
+	N I F I=1:1 Q:$$STATUS^%ZISH  D
+	. U IO
+	. N LINE R LINE:0
+	. IF $$STATUS^%ZISH QUIT
+	. U $P W I,! U IO  ; Write I to the screen, then go back to reading the file
+	. ; Switch pieces 1 and 4 because 4 is always defined. Goes into .01 field.
+	. N VCUI S VCUI=$P(LINE,"|",1)
+	. N RSAB S RSAB=$P(LINE,"|",4)
+	. S $P(LINE,"|",1)=RSAB
+	. S $P(LINE,"|",4)=VCUI
+	. S ^C0CRXN(176.003,I,0)=$TR(LINE,"^|","|^")
+EX3	D CLOSE^%ZISH("FILE")
+	N DIK S DIK="^C0CRXN(176.003," D IXALL^DIK
+	QUIT
+STY(PATH)	; Open and read RxNorm Semantic types file: RXNSTY.RRF
+	I PATH="" QUIT
+	N FILENAME S FILENAME="RXNSTY.RRF"
+	D DELFILED(176.004) ; delete data
+	N LINES S LINES=$$GETLINES(PATH,FILENAME) ; Get # of lines
+	N POP
+	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
+	IF POP W "Error reading file..., Please check...",! G EX4
+	N I F I=1:1 Q:$$STATUS^%ZISH  D
+	. U IO
+	. N LINE R LINE:0
+	. IF $$STATUS^%ZISH QUIT
+	. I '(I#1000) U $P W I," of ",LINES," read ",! U IO ; update every 1000
+	. S ^C0CRXN(176.004,I,0)=$TR(LINE,"^|","|^")
+EX4	D CLOSE^%ZISH("FILE")
+	N DIK S DIK="^C0CRXN(176.004," D IXALL^DIK
+	QUIT
+	;
+REL(PATH)	; Open and read RxNorm Relationships file: RXNREL.RRF
+	I PATH="" QUIT
+	N FILENAME S FILENAME="RXNREL.RRF"
+	D DELFILED(176.005) ; delete data
+	N LINES S LINES=$$GETLINES(PATH,FILENAME) ; Get # of lines
+	N POP
+	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
+	IF POP W "Error reading file..., Please check...",! G EX5
+	N I F I=1:1 Q:$$STATUS^%ZISH  D
+	. U IO
+	. N LINE R LINE:0
+	. IF $$STATUS^%ZISH QUIT
+	. I '(I#1000) U $P W I," of ",LINES," read ",! U IO ; update every 1000
+	. ; swap RXCUI1 location with SAB b/c SAB is required so can be .01 field
+	. N RXCUI1 S RXCUI1=$P(LINE,"|",1)
+	. N SAB S SAB=$P(LINE,"|",11)
+	. S $P(LINE,"|",1)=SAB
+	. S $P(LINE,"|",11)=RXCUI1
+	. S ^C0CRXN(176.005,I,0)=$TR(LINE,"^|","|^")
+EX5	D CLOSE^%ZISH("FILE")
+	N DIK S DIK="^C0CRXN(176.005," D IXALL^DIK
+	QUIT
+DOC(PATH)	; Open the read RxNorm Abbreviation Documentation file: RXNDOC.RRF
+	I PATH="" QUIT
+	N FILENAME S FILENAME="RXNDOC.RRF"
+	D DELFILED(176.006) ; delete data
+	N LINES S LINES=$$GETLINES(PATH,FILENAME) ; Get # of lines
+	N POP
+	D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
+	IF POP W "Error reading file..., Please check...",! G EX6
+	N I F I=1:1 Q:$$STATUS^%ZISH  D
+	. U IO
+	. N LINE R LINE:0
+	. IF $$STATUS^%ZISH QUIT
+	. I '(I#1000) U $P W I," of ",LINES," read ",! U IO ; update every 1000
+	. S ^C0CRXN(176.006,I,0)=$TR(LINE,"^|","|^")
+EX6	D CLOSE^%ZISH("FILE")
+	N DIK S DIK="^C0CRXN(176.006," D IXALL^DIK
+	QUIT
