ASCII/TEXT

enaio® import-export 10.10 »

Data – ANSI or UTF8/UTF16 – can be imported and exported in Unicode installations. UTF8/UTF16 import data must have BOM. Field length specifications must adhere to the length difference between ASCII and Unicode characters.
Import data may contain control characters and special characters that may cause errors or display errors.

The TEXT/ASCII import involves importing data from TEXT/ASCII files. These data need to be made available in a structure that you can easily create.

The TEXT/ASCII import requires a format description. This is used to specify which columns are contained in the data section and the database type from which the data and individual columns come. The columns are mapped to object fields in the configuration. The format description may be placed in a field information file.

The data section must be formatted in a table-like structure. The columns are either separated by a separator that you have specified in the configuration or have a fixed length specified in the format description.

Example of a format description in a field information file:

[ASIMPEXP]
FELD00=PatientNr N(8,0)
FELD01=Name C(10)
FELD02=Geburtsdatum D(JJJJMMTT)
FELD03=Bild C(12)

The field information file begins with the section name [ASIMPEXP].

The first column (FELD00) is named 'PatientNo', the database type is 'N', and the length, including the separator, is eight characters. The value has no places ('0') after the decimal point.

The second column (FELD01) is named 'Name', the database type is 'C', and the length is ten characters.

The third column (FELD02) is named 'DateOfBirth', the database type is 'D', and the structure of the date is described with placeholders.

The fourth column (FELD03) is named 'Image', the database type is 'C', and the length is 12 characters, eight for the file name and the period, and three for the file extension.

Names cannot contain space characters.

The following database types are possible:

Characters

Database type

Allowed characters

C

Character

TEXT/ASCII characters, max. 256

N

Numeric

Numbers

Always include '1' for the separator regarding the length.

The number of spaces after the decimal must be specified. If there are none, enter '0'.

D

Date

The structure of a date is specified using the characters Y (Year), M (Month), and D (Day).

The field information file has the same name as the TEXT/ASCII data file, but with the extension 'cfg'.

The entries in the TEXT/ASCII data file are either separated by a separator and line breaks or have the specified fixed length.

Example of a file with entries separated by semicolons as separators and line breaks:

1234567;Paulson;19671023;00001234.000¶

2345678;Peterson;19590509;00002345.000¶

Example of a file with entries having fixed lengths:

1234567Paulson   1967102300001234.000¶

2345678Peterson  1959050900002345.000¶

You can include one in the first line of every data file instead of specifying the format description in a field information file.

Example:

PatientNo N(8,0);Name C(10);DateOfBirth D(YYYYMMDD)¶

1234567;Paulson;19671023¶

2345678;Peterson;19590509¶

Use the semicolon character as separator in a format description in the first line of data files with fixed lengths.
The last lines of the files/data files must end with a line break character. A TEXT/ASCII file is also considered ended if it contains a Ctrl+Z.
Specify the separator during configuration of TEXT/ASCII imports with separators. This character may not be present in any of the import values, because it would lead to false assignments.

Data of Multi-fields

Image documents are indexed page by page using multi-fields. It is only possible to import data from multi-fields using the 'TEXT/ASCII' format.

Index data for each multi-field must be stored in their own file. The file must have the same format as the data files. The data in the multi-field file must be separated by the same separator if the data in the data files are separated by separators. The data in the multi-field files must also have a fixed field length if the data in the data file have a fixed field length. If the format description is located on the first line of the data file, write the format descriptions for the multi-field files on the first lines of these files. If you are using a field information file, write the format description for the multi-field file in the same field information file.

A multi-field file is made up of two columns. A page number is specified in the first column, and in the second an index data entry for this page.

Specify in the data file the line of the multi-field file from which the data should be read, and how many lines, starting with this one, should be read in total. These entries – row number and number of rows – are separated by a comma.

Example:

Data file

Multi-field file

Landscape;0,1

Portrait;1,4

1;Original

2;LightCorrection

3;ColorCorrection

4;Scaled

4;Cropped

1;Film/digitized

The first record of the data file refers to row 0 and specifies that a row should be read. Row 0 is the first line of the multi-field file, so that the numbering starts with 0.

The second record of the data file refers to row 1 and specifies that this row and the following three rows should be read – four rows in total.

The column in the format description must be named Mutli00 so the import recognizes that the data in the data file refer to a multi-field file. For more than one multi-field, the numbers are increased in hexadecimal notation, meaning that a second column containing data for a multi-field must be named Multi01.

The multi-field files must have the same name as the data files and be placed in the same directory. Their file extensions must be the number in their name.

Example:

imageimport.txt

imageimport.00

imageimport.01

Multi-fields receive their own sections in a field information file:

[ASIMPEXP]
FELD00=Motiv C(50)
FELD01=Datum D(JJJJMMTT)
FELD02=Multi00 C(20)
FELD03=Multi01 C(20)
 
[Multi00] 
Feld00=Seite C(2) 
Feld01=Version C(20)
[Multi01] 
Feld00=Seite C(2) 
Feld01=Version C(20)

Multi-fields – Import Dialogs

If the import wizard finds a column named 'Multi', you will have to confirm through a dialog that the column contains data for multi-fields.

The format description of the multi-field file is read for every field that you have labeled as a multi-field. The data can be corrected.

The mapping of the multi-fields in the import data to the multi-fields of a document type is specified in a dialog just for this purpose.

TEXT/ASCII Import Dialogs

Enter a name for the configuration in the Configuration name and data format dialog, and select the data format.

If you select ASCII with separator, you must also specify the separator character and the character set.

If you select ASCII fixed field length, you only specify the character set.

Specify the import file in the next step. Use the '*' placeholder for any string to specify the files if there is more than one import file in the directory from which you would like to import data.

enaio® server checks whether the path of the import files corresponds exactly to that specified for enaio® server. If this is the case, these files are imported. If this is not the case, the files will be transferred from the processing computer to enaio® server.

If you are using a field information file, specify it, as well.

The following additional specifications can also be made.

  • Exclude field information file from import

    This option must be selected if the field information file matches the schema that you have entered using placeholders.

  • Field information is also in the import file

    This setting is selected if the field information is contained in the import file.

  • Redetermine column position and multi-field files during import

    Select this option if the data and field information contain additional columns, or columns are missing or in an order different from that specified in the configuration. The data will be checked before import. However, all columns that are referred to in the configuration must be contained in the file.

  • Rename import files before import

    The import data files are renamed before the import is executed. They receive the file extension 'bak'. This excludes them from the next import.

  • Delete import files after import

    Import data files can be deleted automatically after a successful import. This is recommended in combination with log settings with which you can log successfully imported records separately from corrupt records.

  • Delete field information file after import

    You can have field information files automatically deleted after a successful import.

  • Rename import files before import

    The import data files are renamed before the import is executed. They receive the file extension 'bak'. This excludes them from the next import.

  • Rename import data files after import

    The import data files are renamed after the import is executed. They receive the file extension 'bak'.