DDXP ;SFISC/DPC-EXPORT MENU DRIVER ;12:09 PM 16 Jun 1999 [ 04/02/2003 8:25 AM ]
;;22.0;VA FileMan;**1001**;APR 1, 2003
;;22.0;VA FileMan;**9**;Mar 30, 1999
;Per VHA Directive 10-93-142, this routine should not be modified.
NOKL ;
I ($G(^DIC(.44,0,"GL"))'="^DIST(.44,")!($G(^DIC(.81,0,"GL"))'="^DI(.81,") W !!,$C(7),"SORRY. You cannot use the Data Export options",!,"because you do not have the necessary files on your system." G Q^DII1
S DIK="^DOPT(""DDXP"","
I $D(^DOPT("DDXP",5)) G CHOOSE
S ^DOPT("DDXP",0)="DATA EXPORT TO FOREIGN FORMAT OPTION^1.01^" K ^("B")
F I=1:1:5 S ^DOPT("DDXP",I,0)=$P($T(@I),";;",2)
K I D IXALL^DIK
CHOOSE ;
W ! S DIC=DIK,DIC(0)="AEQI" D ^DIC K DIC,DIK
I Y'<0 S X=+Y K Y D @X G NOKL
W !
G Q^DII1
;
1 ;;DEFINE FOREIGN FILE FORMAT
S DDXP=1 D EN1^DDXP1
D Q
Q
;
2 ;;SELECT FIELDS FOR EXPORT
S DDXP=2 D EN1^DDXP2
D Q
Q
;
3 ;;CREATE EXPORT TEMPLATE
S DDXP=3 D EN1^DDXP3
D Q
Q
;
4 ;;EXPORT DATA
S DDXP=4 D EN1^DDXP4
D Q
Q
;
5 ;;PRINT FORMAT DOCUMENTATION
S DDXP=5 D EN1^DDXP5
D Q
Q
Q ;
K DDXP,X,DIRUT,DUOUT,DTOUT Q
; Export API
EXPORT(DDXPFINO,DDXPXTNM,DDXPTMDL,DDXPBY,FR,TO,DIS,DISTOP,IOP,DQTIME) ;
; DDXPFINO = File Number or "1.1^<file number>"
; DDXPXTNM = Export Template Name
; DDXPTMDL = 0=Export Template SHOULD NOT Be Deleted
; 1=Export Template SHOULD Be Deleted
; DDXPBY = Sort Template Name
; [.]FR = FROM Values as Documentated in DIP
; [.]TO = TO Values as Documentated in DIP
; .DIS = DIS array as Documentated in DIP
; [.]DISTOP = DISTOP array as Documentated in DIP
; IOP = IOP as Documentated in DIP
; DQTIME = DQTIME as Documentated in DIP
G EN2^DDXP4
DDXP ;SFISC/DPC-EXPORT MENU DRIVER ;12:09 PM 16 Jun 1999 [ 04/02/2003 8:25 AM ]
+1 ;;22.0;VA FileMan;**1001**;APR 1, 2003
+2 ;;22.0;VA FileMan;**9**;Mar 30, 1999
+3 ;Per VHA Directive 10-93-142, this routine should not be modified.
NOKL ;
+1 IF ($GET(^DIC(.44,0,"GL"))'="^DIST(.44,")!($GET(^DIC(.81,0,"GL"))'="^DI(.81,")
WRITE !!,$CHAR(7),"SORRY. You cannot use the Data Export options",!,"because you do not have the necessary files on your system."
GOTO Q^DII1
+2 SET DIK="^DOPT(""DDXP"","
+3 IF $DATA(^DOPT("DDXP",5))
GOTO CHOOSE
+4 SET ^DOPT("DDXP",0)="DATA EXPORT TO FOREIGN FORMAT OPTION^1.01^"
KILL ^("B")
+5 FOR I=1:1:5
SET ^DOPT("DDXP",I,0)=$PIECE($TEXT(@I),";;",2)
+6 KILL I
DO IXALL^DIK
CHOOSE ;
+1 WRITE !
SET DIC=DIK
SET DIC(0)="AEQI"
DO ^DIC
KILL DIC,DIK
+2 IF Y'<0
SET X=+Y
KILL Y
DO @X
GOTO NOKL
+3 WRITE !
+4 GOTO Q^DII1
+5 ;
1 ;;DEFINE FOREIGN FILE FORMAT
+1 SET DDXP=1
DO EN1^DDXP1
+2 DO Q
+3 QUIT
+4 ;
2 ;;SELECT FIELDS FOR EXPORT
+1 SET DDXP=2
DO EN1^DDXP2
+2 DO Q
+3 QUIT
+4 ;
3 ;;CREATE EXPORT TEMPLATE
+1 SET DDXP=3
DO EN1^DDXP3
+2 DO Q
+3 QUIT
+4 ;
4 ;;EXPORT DATA
+1 SET DDXP=4
DO EN1^DDXP4
+2 DO Q
+3 QUIT
+4 ;
5 ;;PRINT FORMAT DOCUMENTATION
+1 SET DDXP=5
DO EN1^DDXP5
+2 DO Q
+3 QUIT
Q ;
+1 KILL DDXP,X,DIRUT,DUOUT,DTOUT
QUIT
+2 ; Export API
EXPORT(DDXPFINO,DDXPXTNM,DDXPTMDL,DDXPBY,FR,TO,DIS,DISTOP,IOP,DQTIME) ;
+1 ; DDXPFINO = File Number or "1.1^<file number>"
+2 ; DDXPXTNM = Export Template Name
+3 ; DDXPTMDL = 0=Export Template SHOULD NOT Be Deleted
+4 ; 1=Export Template SHOULD Be Deleted
+5 ; DDXPBY = Sort Template Name
+6 ; [.]FR = FROM Values as Documentated in DIP
+7 ; [.]TO = TO Values as Documentated in DIP
+8 ; .DIS = DIS array as Documentated in DIP
+9 ; [.]DISTOP = DISTOP array as Documentated in DIP
+10 ; IOP = IOP as Documentated in DIP
+11 ; DQTIME = DQTIME as Documentated in DIP
+12 GOTO EN2^DDXP4