BQIRRHSP ;APTIV/HC/ALA-HMS Supplement RPC ; 05 Feb 2008 6:23 PM
;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
;
EN(DATA,DFN) ; EP - BQI HMS PATIENT SUPPL
;Description
; Generates a Patient Supplement for a given DFN and the HMS Supplement
;
;Input
; DFN - Patient Internal ID
;Output
; DATA - Name of global in which data is stored(^TMP("BQIRRHSP"))
;
NEW UID,II,SUPL
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIRRHSP",UID))
K @DATA
;
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIRRHSP D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
S SUPL=$O(^APCHSUP("B","HMS PATIENT CARE SUPPLEMENT",""))
I SUPL="" S BMXSEC="RPC Call Failed: HMS Supplement not found" Q
D EN^BQIRSPMT(.DATA,DFN,SUPL)
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(BQII) S BQII=BQII+1,@DATA@(BQII)=$C(31)
Q
BQIRRHSP ;APTIV/HC/ALA-HMS Supplement RPC ; 05 Feb 2008 6:23 PM
+1 ;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
+2 ;
EN(DATA,DFN) ; EP - BQI HMS PATIENT SUPPL
+1 ;Description
+2 ; Generates a Patient Supplement for a given DFN and the HMS Supplement
+3 ;
+4 ;Input
+5 ; DFN - Patient Internal ID
+6 ;Output
+7 ; DATA - Name of global in which data is stored(^TMP("BQIRRHSP"))
+8 ;
+9 NEW UID,II,SUPL
+10 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+11 SET DATA=$NAME(^TMP("BQIRRHSP",UID))
+12 KILL @DATA
+13 ;
+14 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIRRHSP D UNWIND^%ZTER"
+15 SET SUPL=$ORDER(^APCHSUP("B","HMS PATIENT CARE SUPPLEMENT",""))
+16 IF SUPL=""
SET BMXSEC="RPC Call Failed: HMS Supplement not found"
QUIT
+17 DO EN^BQIRSPMT(.DATA,DFN,SUPL)
+18 QUIT
+19 ;
ERR ;
+1 DO ^%ZTER
+2 NEW Y,ERRDTM
+3 SET Y=$$NOW^XLFDT()
XECUTE ^DD("DD")
SET ERRDTM=Y
+4 SET BMXSEC="Recording that an error occurred at "_ERRDTM
+5 IF $DATA(BQII)
SET BQII=BQII+1
SET @DATA@(BQII)=$CHAR(31)
+6 QUIT