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

DDSCAP.m

Go to the documentation of this file.
  1. DDSCAP ;SFISC/MKO-INPUT TRANSFORM FOR CAPTIONS ;01:24 PM 14 Aug 2002
  1. ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
  1. ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
  1. ;;Licensed under the terms of the Apache License, Version 2.0.
  1. ;
  1. FUNC(X) ;
  1. Q:$E(X)'="!"
  1. N E,F,Y
  1. S F=$E(X,2,999)
  1. S:$P(F,"(")?.A1.L.A F=$$UPCASE($P(F,"("))_$S(F["(":"("_$P(F,"(",2,999),1:"")
  1. Q:$P(F,"(")'?1U.7UN X
  1. Q:$T(@$P(F,"("))="" X
  1. ;
  1. D Q:$G(E) X
  1. . N X S X="S Y=$$"_F
  1. . N F D ^DIM
  1. . S:'$D(X) E=1
  1. ;
  1. S @("Y=$$"_F)
  1. Q Y
  1. ;
  1. L() ;;Get label of field
  1. N F1,F2
  1. S X=""
  1. S F1=$$GET^DDSVAL(DIE,.DA,4) Q:'F1 X
  1. S F2=$$GET^DDSVAL(.404,DA(1),1) Q:'F2 X
  1. S X=$P($G(^DD(F2,F1,0)),U)
  1. Q X
  1. ;
  1. T() ;;Get title of field
  1. N F1,F2
  1. S X=""
  1. S F1=$$GET^DDSVAL(DIE,.DA,4) Q:'F1 X
  1. S F2=$$GET^DDSVAL(.404,DA(1),1) Q:'F2 X
  1. S X=$G(^DD(F2,F1,.1))
  1. Q X
  1. ;
  1. U() ;;Get unique name of field
  1. Q $$GET^DDSVAL(DIE,.DA,3.1)
  1. ;
  1. DUP(X1,X) ;;The DUP function
  1. Q:$G(X1)="" ""
  1. N %
  1. S %=X,X="",$P(X,X1,%\$L(X1)+1)=X1,X=$E(X,1,%)
  1. Q X
  1. ;
  1. UPCASE(X) ;Convert X to uppercase
  1. Q $$UP^DILIBF(X) ;**