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

DDXP2.m

Go to the documentation of this file.
  1. DDXP2 ;SFISC/DPC-SELECTED FIELDS FOR EXPORT ;10/11/94 14:34
  1. ;;22.0;VA FileMan;;Mar 30, 1999
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. EN1 ;
  1. N Y,D,DICS D ^DICRW I Y=-1 G QUIT
  1. S Q="""",C=",",DC=0,L=1,DI=DIC,DALL(1)=1 W !
  1. D ^DIP2
  1. I $D(DDXPFDTM) S DIE="^DIPT(",DA=DDXPFDTM,DR="8///7" D ^DIE
  1. QUIT ;
  1. K C,DA,DALL,DC,DI,DIE,DIC,DR,DTOUT,DUOUT,L,Q
  1. Q
  1. VALALL ;
  1. W !,$C(7),"SORRY. When choosing export fields, you cannot use ALL to select all fields.",!
  1. S Y=0 K X
  1. Q
  1. VAL1 ;validates raw user input -- X contains user input
  1. S DDXPNG=0
  1. F DDXPCK=";C",";D",";L",";N",";R",";S",";T",";W",";X" D
  1. . I X[DDXPCK S DDXPNG=1 W !!,$C(7),"SORRY. You cannot add "_DDXPCK_" to the export field specifications.",!
  1. . Q
  1. F DDXPCK="+","#","*","&","!" D
  1. . I $E(X)=DDXPCK S DDXPNG=1 W !!,$C(7),"SORRY. You cannot choose the "_DDXPCK_" statistical operator when selecting fields for export.",!
  1. . Q
  1. I $E(X,$L(X))=":" S DDXPNG=1 W !!,$C(7),"SORRY. You cannot jump to another file when selecting fields for export.",!
  1. I X[";""" S DDXPNG=1 W !!,$C(7),"SORRY. You cannot enter a custom heading when selecting fields for export."
  1. K:DDXPNG X K DDXPNG,DDXPCK
  1. Q
  1. VAL2 ;validates found field -- Y(0) contains 0-node of field DD
  1. S DDXPNG=0
  1. S %=+$P(Y(0),U,2) I '% G VAL2OUT
  1. I $P($G(^DD(%,.01,0)),U,2)["W" S DDXPNG=1 W !!,$C(7),"SORRY. You cannot choose a word processing field for export.",!
  1. VAL2OUT K:DDXPNG Y(0) K %,DDXPNG
  1. Q
  1. VAL3 ;validates expression returned from DICOMP -- S contains expression
  1. S DDXPNG=0
  1. I S[";W"!(S[";m") S DDXPNG=1 W !!,$C(7),"SORRY. That response is not acceptable when selecting fields for export.",!
  1. K:DDXPNG S K DDXPNG
  1. Q