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

BQIIPCUT.m

Go to the documentation of this file.
BQIIPCUT ;VNGT/HS/BEE-IPC Utilities ; 17 Jun 2011  12:38 PM
 ;;2.7;ICARE MANAGEMENT SYSTEM;**1**;Dec 19, 2017;Build 12
 ;
LIST(DATA,FAKE) ;EP -- BQI GET IPC CHOICE
 NEW UID,II,HDR,IX,LIST,PC
 S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
 S DATA=$NA(^TMP("BQIIPCUT",UID))
 K @DATA
 S II=0
 NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIIPCUT D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
 S HDR="T00003CHOICE_CODE^T00050CHOICE_TEXT"_$C(30)
 S @DATA@(II)=HDR
 ;
 D FIELD^DID(90505,.21,"","POINTER","LIST")
 ;
 F IX=1:1:$L($G(LIST("POINTER")),";") S PC=$P($G(LIST("POINTER")),";",IX) D
 . S CD=$P(PC,":") Q:CD=""
 . S CT=$P(PC,":",2) Q:CT=""
 . S II=II+1,@DATA@(II)=CD_U_CT_$C(30)
 ;
DONE ;
 S II=II+1,@DATA@(II)=$C(31)
 Q
 ;
ERR ;
 D ^%ZTER
 NEW Y,ERRDTM
 S Y=$$NOW^XLFDT() X ^DD("DD") S ERRDTM=Y
 S BMXSEC="Recording that an error occurred at "_ERRDTM
 I $D(II),$D(DATA) S II=II+1,@DATA@(II)=$C(31)
 Q
 ;
CLIN(BQIPCDE) ;EP - Get Clinical for a measure
 NEW BQIH,CRIPC,CRN,DA,IENS
 S BQIH=$$SPM^BQIGPUTL()
 S CRIPC=$P($G(^BQI(90508,1,11)),U,1)
 S CRN=$O(^BQI(90508,1,22,"B",CRIPC,""))
 S DA(2)=BQIH,DA(1)=CRN
 S DA=$O(^BQI(90508,BQIH,22,CRN,1,"B",BQIPCDE,""))
 S IENS=$$IENS^DILF(.DA)
 Q $$GET1^DIQ(90508.221,IENS,.03,"E")
 ;
CIPC(BQIPCDE) ;EP - Current IPC measure?
 NEW BQIH,CRIPC,CRN,DA,IENS
 S BQIH=$$SPM^BQIGPUTL()
 S CRIPC=$P($G(^BQI(90508,1,11)),U,1)
 S CRN=$O(^BQI(90508,1,22,"B",CRIPC,""))
 S DA(2)=BQIH,DA(1)=CRN
 S DA=$O(^BQI(90508,BQIH,22,CRN,1,"B",BQIPCDE,""))
 I DA="" Q 0
 Q 1