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

BQIIPCAT.m

Go to the documentation of this file.
BQIIPCAT ;GDIT/HCSD/ALA-IPC Measure Categories ; 05 Oct 2017  12:30 PM
 ;;2.7;ICARE MANAGEMENT SYSTEM;;Dec 19, 2017;Build 23
 ;
CAT(DATA,VERSION) ;EP - BQI GET IPC CATEGORIES
 NEW IEN,TEXT,CAT2,CAT1,SBN,SBN
 S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
 S DATA=$NA(^TMP("BQIPCAT",UID))
 K @DATA
 S II=0
 S @DATA@(II)="T00010IEN^T00030CAT1^T00030CAT2"_$C(30)
 ;
 S IEN=0
 F  S IEN=$O(^BQI(90506.8,IEN)) Q:'IEN  D
 . I $P(^BQI(90506.8,IEN,0),U,3)'="C" Q
 . I $P(^BQI(90506.8,IEN,0),U,6)=1 Q
 . S CAT1=$P(^BQI(90506.8,IEN,0),"^",1)
 . S CAT2=$$GET1^DIQ(90506.8,IEN_",",.04,"E")
 . I CAT2'="" S TEXT=CAT2,CAT2=CAT1
 . I CAT2="" S TEXT=CAT1
 . ; If inactive
 . I '$D(^BQI(90506.8,"AC",IEN)) S II=II+1,@DATA@(II)=IEN_"^"_TEXT_"^"_CAT2_$C(30) Q
 . S SBN=""
 . F  S SBN=$O(^BQI(90506.8,"AC",IEN,SBN)) Q:SBN=""  D
 .. I $P(^BQI(90506.8,SBN,0),"^",2)=1 Q
 .. I $P(^BQI(90506.8,SBN,0),U,6)=1 Q
 .. I $P(^BQI(90506.8,SBN,0),U,5)'=VERSION Q
 .. S CAT1=$P(^BQI(90506.8,SBN,0),"^",1)
 .. S CAT2=$$GET1^DIQ(90506.8,SBN_",",.04,"E")
 .. I CAT2'="" S TEXT=CAT2,CAT2=CAT1
 .. I CAT2="" S TEXT=CAT1
 .. S II=II+1,@DATA@(II)=SBN_"^"_TEXT_"^"_CAT2_$C(30)
 S II=II+1,@DATA@(II)=$C(31)
 Q