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

BQIRREG.m

Go to the documentation of this file.
  1. BQIRREG ;PRXM/HC/DB - Register Reports ; 1 Nov 2007 10:35 AM
  1. ;;2.1;ICARE MANAGEMENT SYSTEM;**1**;Feb 07, 2011;Build 5
  1. ;
  1. Q
  1. ;
  1. ; Will need to address missing/unpopulated taxonomies
  1. ;
  1. SSR(DATA,PLIST) ; EP -- BQI PATIENT STATE SURV
  1. ;Description
  1. ; Generates a State Surveillance report for a list of DFNs
  1. ;
  1. ;Input
  1. ; PLIST - Either set to a single Patient Internal ID or
  1. ; in an array in the following format:
  1. ;
  1. ; PLIST(IX)=DFN_$C(28)
  1. ;
  1. ;Output
  1. ; DATA - Name of global in which data is stored(^TMP("BQISSR"))
  1. ;
  1. NEW UID
  1. S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
  1. S DATA=$NA(^TMP("BQISSR",UID))
  1. K @DATA
  1. D EN^BKMQSSR(DATA,.PLIST)
  1. Q
  1. ;
  1. QOC(DATA,BKMRPOP,BKMEDT,OWNR,PLIEN,BKMTAG,DFN) ; EP -- BQI PATIENT QUALITY OF CARE
  1. ;
  1. ; Input:
  1. ; BKMEDT - Ending date for report
  1. ; OWNR - Owner Internal Entry Number if running report by panel
  1. ; PLIEN - Panel Internal Entry Number if running report by panel
  1. ; DFN - Either set to a single Patient Internal ID or
  1. ; in an array in the following format:
  1. ;
  1. ; DFN(IX)=DFN_$C(28)
  1. ; BKMRPOP - Patient selection criteria:
  1. ; - R = Active on HMS Register
  1. ; - D = Active HIV/AIDS Diagnostic Tag
  1. ; - P = By selected patients
  1. ; BKMTAG - If BKMRPOP is by Diagnostic Tag, identifies the status:
  1. ; - Proposed
  1. ; - Accepted
  1. ; - Proposed or Accepted
  1. ;
  1. NEW UID
  1. S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
  1. S DATA=$NA(^TMP("BQIQOC",UID))
  1. K @DATA
  1. D RUN^BKMQQCR(.DATA,BKMRPOP,BKMEDT,$G(OWNR),$G(PLIEN),$G(BKMTAG),.DFN)
  1. Q
  1. ;
  1. QOCTR(DATA,RPOP) ; EP - BQI QOC TRIGGER HMS
  1. ;
  1. ; Input
  1. ; RPOP - Report Population - if the user selected anything other than
  1. ; "D" for Active HIV/AIDS Diagnostic Tag, the Diagnostic Tag
  1. ; Status prompt should be disabled
  1. ;
  1. NEW UID,II,ABLE
  1. S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
  1. S DATA=$NA(^TMP("BQIQOCTR",UID))
  1. K @DATA
  1. S II=0
  1. NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIRREG D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
  1. ;
  1. S @DATA@(II)="T00008SOURCE^T00001ABLE_FLAG"_$C(30)
  1. S ABLE="N"
  1. I $G(RPOP)="D" S ABLE="Y"
  1. S II=II+1,@DATA@(II)="BKMTAG^"_ABLE_$C(30)
  1. S II=II+1,@DATA@(II)=$C(31)
  1. Q
  1. ;
  1. ERR ;
  1. D ^%ZTER
  1. NEW Y,ERRDTM
  1. S Y=$$NOW^XLFDT() X ^DD("DD") S ERRDTM=Y
  1. S BMXSEC="Recording that an error occurred at "_ERRDTM
  1. I $D(BQII),$D(DATA) S BQII=BQII+1,@DATA@(BQII)=$C(31)
  1. I $$TMPFL^BQIUL1("C")
  1. Q