DDXP ;SFISC/DPC-EXPORT MENU DRIVER ;12:09 PM 16 Jun 1999
;;22.2;VA FileMan;;Jan 05, 2016;Build 42
;;Per VA Directive 6402, this routine should not be modified.
;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
;;Licensed under the terms of the Apache License, Version 2.0.
;
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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDDXP 1846 printed Oct 16, 2024@18:44:41 Page 2
DDXP ;SFISC/DPC-EXPORT MENU DRIVER ;12:09 PM 16 Jun 1999
+1 ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
+4 ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
+5 ;;Licensed under the terms of the Apache License, Version 2.0.
+6 ;
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