XUSTAX ;PRXM/GCD, TAXONOMY CODE LOOKUP FOR INTEGRATED BILLING ;8/3/07 ;;8.0;KERNEL;**410,452,454,467**; July 10, 1995;Build 12 ; ; Must call at an entry point. Q ; ; TAXIND - Extrinsic function to retrieve the taxonomy code ; for a given record in the NEW PERSON file (#200). ; ; Input ; XUIEN - IEN of the record in file #200 ; Output ; Piece 1 = Taxonomy X12 code of the record in file #200 ; Piece 2 = Taxonomy IEN from file 8932.1 TAXIND(XUIEN) ; Get taxonomy for an individual N U S U="^" I $G(XUIEN)'>0 Q U ;I (XUIEN?.N)=0 Q U I ((XUIEN?.N)!(XUIEN?.N1"."1N.N))=0 Q "-1^Invalid IEN" N IEN,XUPTR,XUTAXARR,DIC,DR,DA,DIQ,DI,D0,XUTAX S IEN=0,XUPTR="" F S IEN=$O(^VA(200,XUIEN,"USC1",IEN)) Q:'IEN D ;Q:XUPTR'="" . S DIC=200,DR=8932.1,DA=XUIEN,DR(200.05)=".01:3",DA(200.05)=IEN,DIQ="XUTAXARR",DIQ(0)="I" . D EN^DIQ1 . I XUTAXARR(200.05,IEN,"2","I")>DT Q ; Not effective yet . I XUTAXARR(200.05,IEN,"3","I")'="",XUTAXARR(200.05,IEN,"3","I")