File:  [Coherent Logic Development] / freem_fileman / USER / DIAX.m
Revision 1.1: download - view: text, annotated - select for diffs
Mon Apr 28 14:13:19 2025 UTC (3 months ago) by snw
Branches: MAIN
CVS tags: HEAD
Restructure repository

    1: DIAX	;SFISC/DCM-EXTRACT OPTIONS ;5/17/93  14:29
    2: 	;;21.0;VA FileMan;;Dec 28, 1994
    3: 	;Per VHA Directive 10-93-142, this routine should not be modified.
    4: 0	S DIK="^DOPT(""DIAX""," G OPT:$D(^DOPT("DIAX",9))
    5: 	S ^(0)="EXTRACT OPTION^1.01^" K ^("B")
    6: 	F I=1:1:9 S ^DOPT("DIAX",I,0)=$P($T(@I),";;",2)
    7: 	D IXALL^DIK
    8: OPT	W ! S DIC=DIK,DIC(0)="AEQIZ" D ^DIC K DIC,DIK
    9: 	I Y'<0 S DI=+Y K Y D EN G 0
   10: 	W ! K %,DIC,DIK,DI,DA,I,J,X,Y,DIAX Q
   11: 	;
   12: EN	S DIAX=1
   13: 	D @DI
   14: 	Q
   15: 	;
   16: 1	;;SELECT ENTRIES TO EXTRACT
   17: 	G 1^DIAR
   18: 	;
   19: 2	;;ADD/DELETE SELECTED ENTRIES
   20: 	S DIAR=2 G ENTE^DIARB
   21: 	;
   22: 3	;;PRINT SELECTED ENTRIES
   23: 	S DIAR=3 G OUT^DIARA
   24: 	;
   25: 5	;;CREATE EXTRACT TEMPLATE
   26: 	W !!,"This option lets you build a template where you specify fields to extract",!,"and their corresponding mapping in the destination file."
   27: 	W !!,"For more detailed description of requirements on the destination file,",!,"please see your VA FileMan User Manual."
   28: 	S DI=1 G EN^DIFGO
   29: 	;
   30: 4	;;MODIFY DESTINATION FILE
   31: 	W !!,"This option allows you to build a file which will store data extracted from",!,"other files.  When creating fields in the destination file, all data types"
   32: 	W !,"are selectable.  However, only a few data types are acceptable for receiving",!,"extracted data."
   33: 	W !!,"Please see your User Manual for more guidance on building the destination file."
   34: 	D 41 G Q:'$D(DIAXDIC)
   35: 	D 61,Q
   36: 	Q
   37: 41	;
   38: 	G ^DICATT
   39: 	D D^DICRW G Q:Y'>0 S DIAXDIC=+Y
   40: 61	;
   41: 	Q:$P(@(^DIC(DIAXDIC,0,"GL")_"0)"),U,4)
   42: 	K DIR S DIR("A")="ARCHIVE FILE",DIR(0)="YO",DIR("??")="^W !?5,""'YES' will not allow modifications or deletions of data or data dictionary"",!?5,""'NO'  will place no restrictions on the file"""
   43: 	S DIR("B")=$S($P($G(^DD(DIAXDIC,0,"DI")),U)["Y":"YES",1:"NO")
   44: 	D ^DIR Q:$D(DTOUT)!$D(DUOUT)  S (DIARCH,DIE)=$S(Y:"Y",1:"N")
   45: 62	;
   46: 	D FLAG(DIAXDIC,DIE,DIARCH)
   47: 	K DIAXDIC,DIE,DIARCH
   48: 	Q
   49: H6	W !!?5,"'YES' will not allow editing or deleting existing file entries or adding",!?11,"new file entries"
   50: 	W !?5,"'NO'  will place no restrictions on the file"
   51: 	Q
   52: 6	;;UPDATE DESTINATION FILE
   53: 	S DIAR=6 G OUT^DIARA
   54: 	;
   55: 7	;;PURGE EXTRACTED ENTRIES
   56: 	S DIAR=90 G ENTD^DIARA
   57: 	;
   58: 8	;;CANCEL EXTRACT SELECTION
   59: 	S DIAR=99 G ENTC^DIARA
   60: 	;
   61: 9	;;VALIDATE EXTRACT TEMPLATE
   62: 	K X,DIC
   63: 	S DIC="^DIPT(",DIC(0)="ASQEM",DIC("A")="Select EXTRACT TEMPLATE: ",DIC("S")="I $P(^(0),U,8)=2"
   64: 	D ^DIC I Y'>0 K DIC Q
   65: 	S DIARP=+Y,DIAR=""
   66: 	D EN^DIAXM
   67: 	D Q G 9
   68: 	;
   69: Q	G Q^DIARB
   70: 	;
   71: FLAG(DIC,DIE,DIARCH)	 ;
   72: 	Q:'DIC  Q:'$D(^DD(DIC,0))
   73: 	S $P(^DD(DIC,0,"DI"),U)=DIARCH,$P(^DD(DIC,0,"DI"),U,2)=DIE
   74: 	Q

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>