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

BEHBUSA.m

Go to the documentation of this file.
  1. BEHBUSA ; MSC/JS - BUSA Audit for Info Button ;29-Aug-2013 19:42;du
  1. ;;1.1;BEH COMPONENTS;**054001**;Mar 20, 2007;Build 23
  1. ;
  1. ; BUSA audit for MSC rpc CIAVMCFG GETTEMPL
  1. ; Called from BUSA AUDIT RPC DEFINITION file entry field #.06 ENTRY DESCRIPTION EXECUTABLE (FX), [0;6]
  1. ;
  1. ; Searches the content of the layout template looking
  1. ; for the BEHIPL.IPL, BEHMEDS.MEDMANAGEMENT, and BEHLAB.LABVIEW prog ids.
  1. ; Stores the result of this search into the BUSA Summary field #1 ENTRY DESCRIPTION using
  1. ; the following pattern:
  1. ;
  1. ; IPL = <0 or 1>
  1. ; MEDS = <0 or 1>
  1. ; LAB = <0 or 1>
  1. ;
  1. ; where 1 indicates that the prog id is present in the layout template.
  1. ;
  1. ;Return template data
  1. BUSACK() ;
  1. I $G(DUZ)="" Q "-1^DUZ not set"
  1. S U="^"
  1. S TMPL=$$GETPAR()
  1. I $G(TMPL)="" Q "-1^Missing VueCentric Template File IEN"
  1. S DATA=$$TMPGBL
  1. M:TMPL @DATA=^CIAVTPL(TMPL,1)
  1. I $G(@DATA@(0))="" Q "-1^Template Data Not Found"
  1. NEW IPL,MEDS,LAB
  1. D PROGID
  1. K STRING
  1. S STRING="MSC - "_"IPL="_$G(IPL)_"/"_"MEDS="_$G(MEDS)_"/"_"LAB="_$G(LAB)
  1. K ^TMP("BEHBUSA",$J)
  1. K IPL,MEDS,LAB,DATA,TMPL
  1. Q STRING
  1. ;
  1. ;Return template data - interactive
  1. TMCHEK() ;
  1. I $G(DUZ)="" Q "-1^DUZ not set"
  1. S U="^"
  1. S TMPL=$$GETPAR()
  1. I $G(TMPL)="" Q "-1^Missing VueCentric Template File IEN"
  1. S DATA=$$TMPGBL
  1. M:TMPL @DATA=^CIAVTPL(TMPL,1)
  1. I $G(@DATA@(0))="" Q "-1^Template Data Not Found"
  1. NEW IPL,MEDS,LAB
  1. D PROGID
  1. W !,"IPL VALUE:",?15,IPL
  1. W !,"MEDS VALUE:",?15,MEDS
  1. W !,"LAB VALUE:",?15,LAB
  1. K STRING
  1. S STRING="MSC - "_"IPL="_$G(IPL)_"/"_"MEDS="_$G(MEDS)_"/"_"LAB="_$G(LAB)
  1. K ^TMP("BEHBUSA",$J)
  1. K IPL,MEDS,LAB,DATA,TMPL
  1. Q STRING
  1. ;
  1. ;Return temp global reference
  1. TMPGBL() ;
  1. NEW GBL
  1. S GBL=$NA(^TMP("BEHBUSA",$J))
  1. K @GBL
  1. Q GBL
  1. ;
  1. PROGID ; -- Search thru Template for BEHIPL.IPL, BEHMEDS.MEDMANAGEMENT, and BEHLAB.LABVIEW
  1. ; 0/not present, 1/present
  1. S (IPL,MEDS,LAB)=0
  1. NEW A
  1. S A=""
  1. F S A=$O(^TMP("BEHBUSA",$J,A)) Q:A="" D
  1. .NEW TMDATA
  1. .S TMDATA=$G(^TMP("BEHBUSA",$J,A,0))
  1. .Q:TMDATA=""
  1. .;
  1. .;W !!,"TEMPLATE LINE ",A,!?2,TMDATA <<<< UNCOMMENT TO TEST
  1. .;
  1. .I TMDATA["PROGID=""BEHIPL.IPL""" S IPL=1
  1. .I TMDATA["PROGID=""BEHMEDS.MEDMANAGEMENT""" S MEDS=1
  1. .I TMDATA["PROGID=""BEHLAB.LABVIEW""" S LAB=1
  1. Q
  1. ;
  1. ;Return user's default template IEN
  1. GETPAR() ;
  1. S TMPL=$$GET^XPAR("ALL","CIAVM DEFAULT TEMPLATE")
  1. Q TMPL