DIFMEDT1 ;O-OIFO/BI - FM23 Extensible Data Types ;27-Oct-2015
;;22.2;VA FileMan;**2,10**;Jan 05, 2016;Build 11
;;Per VA Directive 6402, this routine should not be modified.
0 ;
S DIC="^DOPT(""DIFMEDT"","
G OPT:$D(^DOPT("DIFMEDT",3)) S ^(0)="EXTENSIBLE DATA TYPE OPTIONS^1.01" K ^("B")
F X=1:1:3 S ^DOPT("DIFMEDT",X,0)=$P($T(@X),";;",2)
S DIK=DIC D IXALL^DIK
OPT ;
S DIC(0)="AEQIZ" D ^DIC G Q:Y<0 S DI=+Y D EN G 0
;
EN ;Entry point for all options
D @DI W !!
Q K %,DI,DIC,DIK,X,Y Q
;
1 ;;ENTER OR EDIT DATA TYPE FILE
G ENP81^DIFMEDT1
;
2 ;;ENTER OR EDIT DATA TYPE METHOD FILE
G ENP87^DIFMEDT1
;
3 ;;ENTER OR EDIT DATA TYPE PROPERTY FILE
G ENP86^DIFMEDT1
;
;
ENP81 ; Entry Point to Enter or Edit DATA TYPE FILE (#.81)
D MAIN(.81) Q
;
ENP86 ; Entry Point to Enter or Edit DATA TYPE PROPERTY FILE (#.86)
D MAIN(.86) Q
;
ENP87 ; Entry Point to Enter or Edit DATA TYPE METHOD FILE (#.87)
D MAIN(.87) Q
;
MAIN(FILE) ; Private Entry Point
N DIC,DIR,SCREEN,Y
S SCREEN=0
;
; Ask about using Screen-Mode
S DIR(0)="Y"
S DIR("A")="Do you want to use the screen-mode version"
S DIR("B")="YES"
D ^DIR
S:Y>0 SCREEN=1
;
SELECT ; Private Loop for user input
; Select Prompt
S DIC="^DI("_FILE_",",DIC(0)="AELMQ" D ^DIC
;
; Exit if nothing is selected
Q:Y<1
;
; Use Screen-Mode
D:SCREEN
. N DIC,DIE,DR,DA,DDSPARM,DDSFILE,DDSPAGE
. S DA=+Y,DDSFILE=FILE,DR="[DIP"_$P(FILE,".",2)_"S]",DDSPAGE=1
. D ^DDS
;
; Use Roll-And-Scroll Mode
D:'SCREEN
. S DIE="^DI("_FILE_",",DA=+Y,DR="[DIP"_$P(FILE,".",2)_"IT]" D ^DIE
. W !!
G SELECT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDIFMEDT1 1621 printed Nov 22, 2024@17:57:51 Page 2
DIFMEDT1 ;O-OIFO/BI - FM23 Extensible Data Types ;27-Oct-2015
+1 ;;22.2;VA FileMan;**2,10**;Jan 05, 2016;Build 11
+2 ;;Per VA Directive 6402, this routine should not be modified.
0 ;
+1 SET DIC="^DOPT(""DIFMEDT"","
+2 if $DATA(^DOPT("DIFMEDT",3))
GOTO OPT
SET ^(0)="EXTENSIBLE DATA TYPE OPTIONS^1.01"
KILL ^("B")
+3 FOR X=1:1:3
SET ^DOPT("DIFMEDT",X,0)=$PIECE($TEXT(@X),";;",2)
+4 SET DIK=DIC
DO IXALL^DIK
OPT ;
+1 SET DIC(0)="AEQIZ"
DO ^DIC
if Y<0
GOTO Q
SET DI=+Y
DO EN
GOTO 0
+2 ;
EN ;Entry point for all options
+1 DO @DI
WRITE !!
Q KILL %,DI,DIC,DIK,X,Y
QUIT
+1 ;
1 ;;ENTER OR EDIT DATA TYPE FILE
+1 GOTO ENP81^DIFMEDT1
+2 ;
2 ;;ENTER OR EDIT DATA TYPE METHOD FILE
+1 GOTO ENP87^DIFMEDT1
+2 ;
3 ;;ENTER OR EDIT DATA TYPE PROPERTY FILE
+1 GOTO ENP86^DIFMEDT1
+2 ;
+3 ;
ENP81 ; Entry Point to Enter or Edit DATA TYPE FILE (#.81)
+1 DO MAIN(.81)
QUIT
+2 ;
ENP86 ; Entry Point to Enter or Edit DATA TYPE PROPERTY FILE (#.86)
+1 DO MAIN(.86)
QUIT
+2 ;
ENP87 ; Entry Point to Enter or Edit DATA TYPE METHOD FILE (#.87)
+1 DO MAIN(.87)
QUIT
+2 ;
MAIN(FILE) ; Private Entry Point
+1 NEW DIC,DIR,SCREEN,Y
+2 SET SCREEN=0
+3 ;
+4 ; Ask about using Screen-Mode
+5 SET DIR(0)="Y"
+6 SET DIR("A")="Do you want to use the screen-mode version"
+7 SET DIR("B")="YES"
+8 DO ^DIR
+9 if Y>0
SET SCREEN=1
+10 ;
SELECT ; Private Loop for user input
+1 ; Select Prompt
+2 SET DIC="^DI("_FILE_","
SET DIC(0)="AELMQ"
DO ^DIC
+3 ;
+4 ; Exit if nothing is selected
+5 if Y<1
QUIT
+6 ;
+7 ; Use Screen-Mode
+8 if SCREEN
Begin DoDot:1
+9 NEW DIC,DIE,DR,DA,DDSPARM,DDSFILE,DDSPAGE
+10 SET DA=+Y
SET DDSFILE=FILE
SET DR="[DIP"_$PIECE(FILE,".",2)_"S]"
SET DDSPAGE=1
+11 DO ^DDS
End DoDot:1
+12 ;
+13 ; Use Roll-And-Scroll Mode
+14 if 'SCREEN
Begin DoDot:1
+15 SET DIE="^DI("_FILE_","
SET DA=+Y
SET DR="[DIP"_$PIECE(FILE,".",2)_"IT]"
DO ^DIE
+16 WRITE !!
End DoDot:1
+17 GOTO SELECT
+18 QUIT