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

BQIPLVW.m

Go to the documentation of this file.
  1. BQIPLVW ;PRXM/HC/ALA-Panel View ; 17 Oct 2005 1:19 PM
  1. ;;2.3;ICARE MANAGEMENT SYSTEM;;Apr 18, 2012;Build 59
  1. ;
  1. Q
  1. ;
  1. LST(DATA,FAKE) ; EP - BQI GET PANEL VIEW
  1. ;Description
  1. ; This returns the standard display and sort order list
  1. ;Input
  1. ; FAKE - extra 'blank' parameter required by BMXNET async 'feature'
  1. ;Output
  1. ; DATA - name of global (passed by reference) in which the data
  1. ; is stored
  1. ;Variables used
  1. ; UID - TMP global subscript. Will be either $J or "Z" plus the
  1. ; TaskMan Task ID
  1. ;
  1. NEW UID,II,IEN,DOR,DVALUE,SOR,SVALUE,X,STVCD,KEY
  1. S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
  1. S DATA=$NA(^TMP("BQIPLVW",UID))
  1. K @DATA
  1. S II=0
  1. NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIPLVW D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
  1. ;
  1. S @DATA@(II)="T00120DISPLAY_ORDER^T00120SORT_ORDER^T00120SORT_DIRECTION"_$C(30)
  1. ;
  1. S II=II+1
  1. S @DATA@(II)=$$DFNC()_"^"_$$SFNC()_"^A"_$C(30)
  1. ;
  1. DONE ;
  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(II),$D(DATA) S II=II+1,@DATA@(II)=$C(31)
  1. Q
  1. ;
  1. DFNC() ;EP - Get the standard display order
  1. S DVALUE=""
  1. S DOR="" F S DOR=$O(^BQI(90506.1,"AD","D",DOR)) Q:DOR="" D
  1. . S IEN=""
  1. . F S IEN=$O(^BQI(90506.1,"AD","D",DOR,IEN)) Q:IEN="" D
  1. .. S KEY=$$GET1^DIQ(90506.1,IEN_",",3.1,"E")
  1. .. I KEY'="",'$$KEYCHK^BQIULSC(KEY,DUZ) Q
  1. .. I $$GET1^DIQ(90506.1,IEN_",",3.04,"I")'="O" D
  1. ... S STVCD=$$GET1^DIQ(90506.1,IEN_",",.01,"E")
  1. ... S DVALUE=DVALUE_STVCD_$C(29)
  1. S DVALUE=$$TKO^BQIUL1(DVALUE,$C(29))
  1. Q DVALUE
  1. ;
  1. SFNC() ;EP - Get the standard sort order
  1. S SVALUE=""
  1. S SOR="" F S SOR=$O(^BQI(90506.1,"AE","D",SOR)) Q:SOR="" D
  1. . S IEN=""
  1. . F S IEN=$O(^BQI(90506.1,"AE","D",SOR,IEN)) Q:IEN="" D
  1. .. S KEY=$$GET1^DIQ(90506.1,IEN_",",3.1,"E")
  1. .. I KEY'="",'$$KEYCHK^BQIULSC(KEY,DUZ) Q
  1. .. I $$GET1^DIQ(90506.1,IEN_",",3.04,"I")'="O" D
  1. ... S STVCD=$$GET1^DIQ(90506.1,IEN_",",.01,"E")
  1. ... S SVALUE=SVALUE_STVCD_$C(29)
  1. S SVALUE=$$TKO^BQIUL1(SVALUE,$C(29))
  1. Q SVALUE