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

A1B2UTL.m

Go to the documentation of this file.
  1. A1B2UTL ;ALB/MJK - ODS Utility Routine;
  1. ;;Version 1.55 (local for MAS v5 sites);;
  1. ;
  1. ADD ; -- add an entry to a file
  1. ; input: A1B2FL := file number
  1. ; A1B2DT := date/time for .01
  1. ; DFN := pt ifn
  1. ;output: Y := as define by DIC call
  1. ;
  1. S Y=-1 D FAC G ADDQ:A1B2FN=""
  1. K DD,D0 S X=A1B2DT,DIC(0)="L",DIC="^A1B2("_A1B2FL_"," D FILE^DICN G ADDQ:Y<0
  1. S DIE=DIC,DA=+Y,A1B2Y=Y,DR=".07////"_A1B2FN_";.08////"_A1B2FNME_";.12////"_DFN_";.15////1;1.01////2;1.05////"_DUZ K DIC
  1. D ^DIE K DR,DIE,DA,DE,DQ,DG S Y=A1B2Y
  1. ADDQ K A1B2FN,A1B2FNME,A1B2Y Q
  1. ;
  1. FAC ; -- find inst and get fac # and name
  1. ;
  1. N X
  1. S (A1B2FN,A1B2FNME)="",X=+$O(^DG(40.8,0))
  1. I $D(^DG(40.8,X,0)) S X=+$P(^(0),U,7) D GET
  1. Q
  1. ;
  1. NTL ; -- get fac # and name for nationally sign input user (IHS)
  1. ; input: DUZ, DUZ(2)
  1. ; output: A1B2FN := fac #
  1. ; A1B2FNME := fac name
  1. ; A1B2VRG := vhs&ra region #
  1. ;
  1. S (A1B2FN,A1B2FNME,A1B2VRG)=""
  1. I $D(DUZ(2)) S X=+DUZ(2) D GET
  1. Q
  1. ;
  1. KVAR ; -- kill vars set in NTL call
  1. K A1B2FN,A1B2FNME,A1B2VRG
  1. Q
  1. ;
  1. GET ; -- get fac data
  1. I $D(^DIC(4,X,0)),$D(^(99)) S A1B2FN=+^(99),A1B2FNME=$P(^(0),U)
  1. I $D(^DIC(4,X,11002)) S A1B2VRG=+^(11002)
  1. Q
  1. ;
  1. ON ;is the ODS software turned on?
  1. ; input: none
  1. ; output: A1B2ODS := 0 for off and 1 for on
  1. ;
  1. S A1B2ODS=0 I $D(^A1B2(11500.5,1,0)) S A1B2ODS=+$P(^(0),U,2)
  1. Q
  1. ;
  1. DIS ; -- screen set
  1. S DIS(0)="I $P(^A1B2(A1B2FL,D0,0),U,15) N X S X=$S($D(A1B2NTY):$P(A1B2NTY,U,2),1:"""") I $S(X=""""!(X=""A""):1,X=""V"":$P(^(0),U,7)=A1B2FN,X=""R"":$P(^(0),U,9)=A1B2VRG,1:0)"
  1. Q
  1. ;