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