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

BQIRRHSP.m

Go to the documentation of this file.
  1. BQIRRHSP ;APTIV/HC/ALA-HMS Supplement RPC ; 05 Feb 2008 6:23 PM
  1. ;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
  1. ;
  1. EN(DATA,DFN) ; EP - BQI HMS PATIENT SUPPL
  1. ;Description
  1. ; Generates a Patient Supplement for a given DFN and the HMS Supplement
  1. ;
  1. ;Input
  1. ; DFN - Patient Internal ID
  1. ;Output
  1. ; DATA - Name of global in which data is stored(^TMP("BQIRRHSP"))
  1. ;
  1. NEW UID,II,SUPL
  1. S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
  1. S DATA=$NA(^TMP("BQIRRHSP",UID))
  1. K @DATA
  1. ;
  1. NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIRRHSP D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
  1. S SUPL=$O(^APCHSUP("B","HMS PATIENT CARE SUPPLEMENT",""))
  1. I SUPL="" S BMXSEC="RPC Call Failed: HMS Supplement not found" Q
  1. D EN^BQIRSPMT(.DATA,DFN,SUPL)
  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) S BQII=BQII+1,@DATA@(BQII)=$C(31)
  1. Q