BQIPTVFV ;PRXM/HC/ALA-Patient PCC V File Default List ; 21 Mar 2007 5:12 PM
;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
Q
;
EN(DATA,FAKE) ;EP -- BQI GET VFILE DISPLAY
;
; Get all V Files default views
;
NEW UID,II,IEN,DOR,DVALUE,SOR,SVALUE,X,STVCD,DISP
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIPTVFV",UID))
K @DATA
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIPTVFV D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
;
S HDR="T00030VFILE_NAME^T00010VFILE_NUMBER^T01024DISPLAY_ORDER^T01024SORT_ORDER^T00001SORT_DIRECTION"_$C(30)
S @DATA@(II)=HDR
S VFIL=0
F S VFIL=$O(^BQI(90506.3,VFIL)) Q:'VFIL D
. S VALUE=$$GET1^DIQ(90506.3,VFIL_",",.01,"E")_U_$$GET1^DIQ(90506.3,VFIL_",",.02,"E")
. S DISP="",ORD=""
. F S ORD=$O(^BQI(90506.3,VFIL,10,"C",ORD)) Q:ORD="" D
.. S IEN=""
.. F S IEN=$O(^BQI(90506.3,VFIL,10,"C",ORD,IEN)) Q:IEN="" D
... S VDATA=^BQI(90506.3,VFIL,10,IEN,0)
... S DISP=DISP_$P(VDATA,U,2)_$C(28)_$P(VDATA,U,1)_$C(28)_$P(VDATA,U,4)_$C(29)
. S SORT="",ORD=""
. F S ORD=$O(^BQI(90506.3,VFIL,10,"D",ORD)) Q:ORD="" D
.. S IEN=""
.. F S IEN=$O(^BQI(90506.3,VFIL,10,"D",ORD,IEN)) Q:IEN="" D
... S VDATA=^BQI(90506.3,VFIL,10,IEN,0)
... S SORT=SORT_$P(VDATA,U,2)_$C(29)
. S DISP=$$TKO^BQIUL1(DISP,$C(29))
. S SORT=$$TKO^BQIUL1(SORT,$C(29))
. S SDIR="A"
. S II=II+1,@DATA@(II)=VALUE_U_DISP_U_SORT_U_SDIR_$C(30)
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
BQIPTVFV ;PRXM/HC/ALA-Patient PCC V File Default List ; 21 Mar 2007 5:12 PM
+1 ;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
+2 QUIT
+3 ;
EN(DATA,FAKE) ;EP -- BQI GET VFILE DISPLAY
+1 ;
+2 ; Get all V Files default views
+3 ;
+4 NEW UID,II,IEN,DOR,DVALUE,SOR,SVALUE,X,STVCD,DISP
+5 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+6 SET DATA=$NAME(^TMP("BQIPTVFV",UID))
+7 KILL @DATA
+8 SET II=0
+9 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIPTVFV D UNWIND^%ZTER"
+10 ;
+11 SET HDR="T00030VFILE_NAME^T00010VFILE_NUMBER^T01024DISPLAY_ORDER^T01024SORT_ORDER^T00001SORT_DIRECTION"_$CHAR(30)
+12 SET @DATA@(II)=HDR
+13 SET VFIL=0
+14 FOR
SET VFIL=$ORDER(^BQI(90506.3,VFIL))
IF 'VFIL
QUIT
Begin DoDot:1
+15 SET VALUE=$$GET1^DIQ(90506.3,VFIL_",",.01,"E")_U_$$GET1^DIQ(90506.3,VFIL_",",.02,"E")
+16 SET DISP=""
SET ORD=""
+17 FOR
SET ORD=$ORDER(^BQI(90506.3,VFIL,10,"C",ORD))
IF ORD=""
QUIT
Begin DoDot:2
+18 SET IEN=""
+19 FOR
SET IEN=$ORDER(^BQI(90506.3,VFIL,10,"C",ORD,IEN))
IF IEN=""
QUIT
Begin DoDot:3
+20 SET VDATA=^BQI(90506.3,VFIL,10,IEN,0)
+21 SET DISP=DISP_$PIECE(VDATA,U,2)_$CHAR(28)_$PIECE(VDATA,U,1)_$CHAR(28)_$PIECE(VDATA,U,4)_$CHAR(29)
End DoDot:3
End DoDot:2
+22 SET SORT=""
SET ORD=""
+23 FOR
SET ORD=$ORDER(^BQI(90506.3,VFIL,10,"D",ORD))
IF ORD=""
QUIT
Begin DoDot:2
+24 SET IEN=""
+25 FOR
SET IEN=$ORDER(^BQI(90506.3,VFIL,10,"D",ORD,IEN))
IF IEN=""
QUIT
Begin DoDot:3
+26 SET VDATA=^BQI(90506.3,VFIL,10,IEN,0)
+27 SET SORT=SORT_$PIECE(VDATA,U,2)_$CHAR(29)
End DoDot:3
End DoDot:2
+28 SET DISP=$$TKO^BQIUL1(DISP,$CHAR(29))
+29 SET SORT=$$TKO^BQIUL1(SORT,$CHAR(29))
+30 SET SDIR="A"
+31 SET II=II+1
SET @DATA@(II)=VALUE_U_DISP_U_SORT_U_SDIR_$CHAR(30)
End DoDot:1
+32 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+33 QUIT
+34 ;
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(II)
IF $DATA(DATA)
SET II=II+1
SET @DATA@(II)=$CHAR(31)
+6 QUIT