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

BQIPTVFV.m

Go to the documentation of this file.
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