DINIT27 ;SFISC/DPC-LOADS DD OF FOREIGN FORMAT FILE ;01:40 PM 13 Sep 1994
;;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.
;
F I=1:2 S X=$T(Q+I) G ^DINIT270:X="" S Y=$E($T(Q+I+1),5,999),X=$E(X,4,999),@X=Y
Q Q
;;^DIC(.44,0,"GL")
;;=^DIST(.44,
;;^DIC("B","FOREIGN FORMAT",.44)
;;=
;;^DD(.44,0)
;;=FIELD^^11^19
;;^DD(.44,0,"DDA")
;;=N
;;^DD(.44,0,"DT")
;;=2930107
;;^DD(.44,0,"ID","WRITE")
;;=D:Y<1 EN^DDIOL("** DISTRIBUTED BY VA FILEMAN **","","?35")
;;^DD(.44,0,"IX","B",.44,.01)
;;=
;;^DD(.44,0,"IX","C",.441,.01)
;;=
;;^DD(.44,0,"NM","FOREIGN FORMAT")
;;=
;;^DD(.44,0,"PT",.4,105)
;;=
;;^DD(.44,.01,0)
;;=NAME^RF^^0;1^K:$L(X)>30!($L(X)<3)!'(X'?1P.E) X
;;^DD(.44,.01,1,0)
;;=^.1
;;^DD(.44,.01,1,1,0)
;;=.44^B
;;^DD(.44,.01,1,1,1)
;;=S ^DIST(.44,"B",$E(X,1,30),DA)=""
;;^DD(.44,.01,1,1,2)
;;=K ^DIST(.44,"B",$E(X,1,30),DA)
;;^DD(.44,.01,3)
;;=Name must be 3-30 characters in length, not starting with punctuation.
;;^DD(.44,.01,21,0)
;;=^^1^1^2920914^
;;^DD(.44,.01,21,1,0)
;;=This field identifies the format used by the non-VA FileMan application.
;;^DD(.44,.01,"DEL",1,0)
;;=I DA<1
;;^DD(.44,.01,"DT")
;;=2920914
;;^DD(.44,1,0)
;;=FIELD DELIMITER^FX^^0;2^K:$L(X)>15!($L(X)<1)!'((X?1AP.E)!(X?3N)!(X?3N1","3N)!(X?3N1","3N1","3N)!(X?3N1","3N1","3N1","3N)) X
;;^DD(.44,1,3)
;;=Answer must be 1-15 characters in length.
;;^DD(.44,1,21,0)
;;=^^10^10^2921028^
;;^DD(.44,1,21,1,0)
;;=Contents of the field delimiter is output between each field. Depending
;;^DD(.44,1,21,2,0)
;;=on the contents of the SEND LAST FIELD DELIMITER? field, the delimiter may
;;^DD(.44,1,21,3,0)
;;=be output after the last field, too. Identify the delimiter either by 1-15
;;^DD(.44,1,21,4,0)
;;=characters not beginning with a number or by the ASCII value of the
;;^DD(.44,1,21,5,0)
;;=delimiter. When specifying the ASCII value, use 3 numbers (e.g., '009'
;;^DD(.44,1,21,6,0)
;;=for ASCII 9). Up to four ASCII-character values can be specified,
;;^DD(.44,1,21,7,0)
;;=separated by commas.
;;^DD(.44,1,21,8,0)
;;=
;;^DD(.44,1,21,9,0)
;;=If 'Ask' is entered, the user will be prompted for the field delimiter
;;^DD(.44,1,21,10,0)
;;=when creating the EXPORT template.
;;^DD(.44,1,"DT")
;;=2920914
;;^DD(.44,2,0)
;;=RECORD DELIMITER^F^^0;3^K:$L(X)>15!($L(X)<1)!'((X?1AP.E)!(X?3N)!(X?3N1","3N)!(X?3N1","3N1","3N)!(X?3N1","3N1","3N1","3N)) X
;;^DD(.44,2,3)
;;=Answer must be 1-15 characters in length.
;;^DD(.44,2,21,0)
;;=^^8^8^2921026^
;;^DD(.44,2,21,1,0)
;;=Contents of the record delimiter is output after each record. Identify
;;^DD(.44,2,21,2,0)
;;=the delimiter either by 1-15 characters not beginning with a number or by
;;^DD(.44,2,21,3,0)
;;=the ASCII value of the delimiter. When specifying the ASCII value, use 3
;;^DD(.44,2,21,4,0)
;;=numbers (e.g., '009' for ASCII 9). Up to four ASCII-character values can
;;^DD(.44,2,21,5,0)
;;=be specified, separated by commas.
;;^DD(.44,2,21,6,0)
;;=
;;^DD(.44,2,21,7,0)
;;=If 'Ask' is entered, the user is prompted for the record delimiter when
;;^DD(.44,2,21,8,0)
;;=creating the EXPORT template.
;;^DD(.44,2,"DT")
;;=2920914
;;^DD(.44,3,0)
;;=LINE CONTINUATION CHARACTER^F^^0;4^K:$L(X)>15!($L(X)<1) X
;;^DD(.44,3,3)
;;=Answer must be 1-15 characters in length.
;;^DD(.44,3,21,0)
;;=^^1^1^2921028^
;;^DD(.44,3,21,1,0)
;;=Not used yet.
;;^DD(.44,3,"DT")
;;=2920828
;;^DD(.44,4,0)
;;=LINE CONTINUATION LOCATION^S^e:END OF LINE;b:BEGINNING OF LINE;^0;5^Q
;;^DD(.44,4,21,0)
;;=^^1^1^2920917^
;;^DD(.44,4,21,1,0)
;;=Not used yet.
;;^DD(.44,4,"DT")
;;=2920828
;;^DD(.44,5,0)
;;=RECORD LENGTH FIXED?^S^1:YES;0:NO;^0;6^Q
;;^DD(.44,5,21,0)
;;=^^3^3^2920917^
;;^DD(.44,5,21,1,0)
;;=Enter YES if the fields will be fixed length causing a fixed length record
;;^DD(.44,5,21,2,0)
;;=to be created. When the EXPORT template is created, the user is prompted
;;^DD(.44,5,21,3,0)
;;=for the length of each field in the TARGET file.
;;^DD(.44,5,"DT")
;;=2920828
;;^DD(.44,6,0)
;;=NEED FOREIGN FIELD NAMES?^S^1:YES;0:NO;^0;7^Q
;;^DD(.44,6,21,0)
;;=^^3^3^2921013^
;;^DD(.44,6,21,1,0)
;;=Answer YES if it is necessary to save the field names from the foreign
;;^DD(.44,6,21,2,0)
;;=file in the export file. The user will be prompted for the names when the
;;^DD(.44,6,21,3,0)
;;=EXPORT template is created.
;;^DD(.44,6,"DT")
;;=2920828
;;^DD(.44,7,0)
;;=MAXIMUM OUTPUT LENGTH^NJ4,0^^0;8^K:+X'=X!(X>9999)!(X<0)!(X?.E1"."1N.N) X
;;^DD(.44,7,3)
;;=Type a Number between 0 and 9999, 0 Decimal Digits
;;^DD(.44,7,21,0)
;;=^^7^7^2921026^
;;^DD(.44,7,21,1,0)
;;=The maximum length of a "line" of output; maximum number of characters
;;^DD(.44,7,21,2,0)
;;=before a LINE FEED is issued. For most exports, this will be the maximum
;;^DD(.44,7,21,3,0)
;;=record length.
;;^DD(.44,7,21,4,0)
;;=
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDINIT27 5258 printed Dec 13, 2024@02:50:57 Page 2
DINIT27 ;SFISC/DPC-LOADS DD OF FOREIGN FORMAT FILE ;01:40 PM 13 Sep 1994
+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 ;
+7 FOR I=1:2
SET X=$TEXT(Q+I)
if X=""
GOTO ^DINIT270
SET Y=$EXTRACT($TEXT(Q+I+1),5,999)
SET X=$EXTRACT(X,4,999)
SET @X=Y
Q QUIT
+1 ;;^DIC(.44,0,"GL")
+2 ;;=^DIST(.44,
+3 ;;^DIC("B","FOREIGN FORMAT",.44)
+4 ;;=
+5 ;;^DD(.44,0)
+6 ;;=FIELD^^11^19
+7 ;;^DD(.44,0,"DDA")
+8 ;;=N
+9 ;;^DD(.44,0,"DT")
+10 ;;=2930107
+11 ;;^DD(.44,0,"ID","WRITE")
+12 ;;=D:Y<1 EN^DDIOL("** DISTRIBUTED BY VA FILEMAN **","","?35")
+13 ;;^DD(.44,0,"IX","B",.44,.01)
+14 ;;=
+15 ;;^DD(.44,0,"IX","C",.441,.01)
+16 ;;=
+17 ;;^DD(.44,0,"NM","FOREIGN FORMAT")
+18 ;;=
+19 ;;^DD(.44,0,"PT",.4,105)
+20 ;;=
+21 ;;^DD(.44,.01,0)
+22 ;;=NAME^RF^^0;1^K:$L(X)>30!($L(X)<3)!'(X'?1P.E) X
+23 ;;^DD(.44,.01,1,0)
+24 ;;=^.1
+25 ;;^DD(.44,.01,1,1,0)
+26 ;;=.44^B
+27 ;;^DD(.44,.01,1,1,1)
+28 ;;=S ^DIST(.44,"B",$E(X,1,30),DA)=""
+29 ;;^DD(.44,.01,1,1,2)
+30 ;;=K ^DIST(.44,"B",$E(X,1,30),DA)
+31 ;;^DD(.44,.01,3)
+32 ;;=Name must be 3-30 characters in length, not starting with punctuation.
+33 ;;^DD(.44,.01,21,0)
+34 ;;=^^1^1^2920914^
+35 ;;^DD(.44,.01,21,1,0)
+36 ;;=This field identifies the format used by the non-VA FileMan application.
+37 ;;^DD(.44,.01,"DEL",1,0)
+38 ;;=I DA<1
+39 ;;^DD(.44,.01,"DT")
+40 ;;=2920914
+41 ;;^DD(.44,1,0)
+42 ;;=FIELD DELIMITER^FX^^0;2^K:$L(X)>15!($L(X)<1)!'((X?1AP.E)!(X?3N)!(X?3N1","3N)!(X?3N1","3N1","3N)!(X?3N1","3N1","3N1","3N)) X
+43 ;;^DD(.44,1,3)
+44 ;;=Answer must be 1-15 characters in length.
+45 ;;^DD(.44,1,21,0)
+46 ;;=^^10^10^2921028^
+47 ;;^DD(.44,1,21,1,0)
+48 ;;=Contents of the field delimiter is output between each field. Depending
+49 ;;^DD(.44,1,21,2,0)
+50 ;;=on the contents of the SEND LAST FIELD DELIMITER? field, the delimiter may
+51 ;;^DD(.44,1,21,3,0)
+52 ;;=be output after the last field, too. Identify the delimiter either by 1-15
+53 ;;^DD(.44,1,21,4,0)
+54 ;;=characters not beginning with a number or by the ASCII value of the
+55 ;;^DD(.44,1,21,5,0)
+56 ;;=delimiter. When specifying the ASCII value, use 3 numbers (e.g., '009'
+57 ;;^DD(.44,1,21,6,0)
+58 ;;=for ASCII 9). Up to four ASCII-character values can be specified,
+59 ;;^DD(.44,1,21,7,0)
+60 ;;=separated by commas.
+61 ;;^DD(.44,1,21,8,0)
+62 ;;=
+63 ;;^DD(.44,1,21,9,0)
+64 ;;=If 'Ask' is entered, the user will be prompted for the field delimiter
+65 ;;^DD(.44,1,21,10,0)
+66 ;;=when creating the EXPORT template.
+67 ;;^DD(.44,1,"DT")
+68 ;;=2920914
+69 ;;^DD(.44,2,0)
+70 ;;=RECORD DELIMITER^F^^0;3^K:$L(X)>15!($L(X)<1)!'((X?1AP.E)!(X?3N)!(X?3N1","3N)!(X?3N1","3N1","3N)!(X?3N1","3N1","3N1","3N)) X
+71 ;;^DD(.44,2,3)
+72 ;;=Answer must be 1-15 characters in length.
+73 ;;^DD(.44,2,21,0)
+74 ;;=^^8^8^2921026^
+75 ;;^DD(.44,2,21,1,0)
+76 ;;=Contents of the record delimiter is output after each record. Identify
+77 ;;^DD(.44,2,21,2,0)
+78 ;;=the delimiter either by 1-15 characters not beginning with a number or by
+79 ;;^DD(.44,2,21,3,0)
+80 ;;=the ASCII value of the delimiter. When specifying the ASCII value, use 3
+81 ;;^DD(.44,2,21,4,0)
+82 ;;=numbers (e.g., '009' for ASCII 9). Up to four ASCII-character values can
+83 ;;^DD(.44,2,21,5,0)
+84 ;;=be specified, separated by commas.
+85 ;;^DD(.44,2,21,6,0)
+86 ;;=
+87 ;;^DD(.44,2,21,7,0)
+88 ;;=If 'Ask' is entered, the user is prompted for the record delimiter when
+89 ;;^DD(.44,2,21,8,0)
+90 ;;=creating the EXPORT template.
+91 ;;^DD(.44,2,"DT")
+92 ;;=2920914
+93 ;;^DD(.44,3,0)
+94 ;;=LINE CONTINUATION CHARACTER^F^^0;4^K:$L(X)>15!($L(X)<1) X
+95 ;;^DD(.44,3,3)
+96 ;;=Answer must be 1-15 characters in length.
+97 ;;^DD(.44,3,21,0)
+98 ;;=^^1^1^2921028^
+99 ;;^DD(.44,3,21,1,0)
+100 ;;=Not used yet.
+101 ;;^DD(.44,3,"DT")
+102 ;;=2920828
+103 ;;^DD(.44,4,0)
+104 ;;=LINE CONTINUATION LOCATION^S^e:END OF LINE;b:BEGINNING OF LINE;^0;5^Q
+105 ;;^DD(.44,4,21,0)
+106 ;;=^^1^1^2920917^
+107 ;;^DD(.44,4,21,1,0)
+108 ;;=Not used yet.
+109 ;;^DD(.44,4,"DT")
+110 ;;=2920828
+111 ;;^DD(.44,5,0)
+112 ;;=RECORD LENGTH FIXED?^S^1:YES;0:NO;^0;6^Q
+113 ;;^DD(.44,5,21,0)
+114 ;;=^^3^3^2920917^
+115 ;;^DD(.44,5,21,1,0)
+116 ;;=Enter YES if the fields will be fixed length causing a fixed length record
+117 ;;^DD(.44,5,21,2,0)
+118 ;;=to be created. When the EXPORT template is created, the user is prompted
+119 ;;^DD(.44,5,21,3,0)
+120 ;;=for the length of each field in the TARGET file.
+121 ;;^DD(.44,5,"DT")
+122 ;;=2920828
+123 ;;^DD(.44,6,0)
+124 ;;=NEED FOREIGN FIELD NAMES?^S^1:YES;0:NO;^0;7^Q
+125 ;;^DD(.44,6,21,0)
+126 ;;=^^3^3^2921013^
+127 ;;^DD(.44,6,21,1,0)
+128 ;;=Answer YES if it is necessary to save the field names from the foreign
+129 ;;^DD(.44,6,21,2,0)
+130 ;;=file in the export file. The user will be prompted for the names when the
+131 ;;^DD(.44,6,21,3,0)
+132 ;;=EXPORT template is created.
+133 ;;^DD(.44,6,"DT")
+134 ;;=2920828
+135 ;;^DD(.44,7,0)
+136 ;;=MAXIMUM OUTPUT LENGTH^NJ4,0^^0;8^K:+X'=X!(X>9999)!(X<0)!(X?.E1"."1N.N) X
+137 ;;^DD(.44,7,3)
+138 ;;=Type a Number between 0 and 9999, 0 Decimal Digits
+139 ;;^DD(.44,7,21,0)
+140 ;;=^^7^7^2921026^
+141 ;;^DD(.44,7,21,1,0)
+142 ;;=The maximum length of a "line" of output; maximum number of characters
+143 ;;^DD(.44,7,21,2,0)
+144 ;;=before a LINE FEED is issued. For most exports, this will be the maximum
+145 ;;^DD(.44,7,21,3,0)
+146 ;;=record length.
+147 ;;^DD(.44,7,21,4,0)
+148 ;;=