Sometimes you may need to import patient demographic data into ChartNet, but not have the ability to convert the data into one of the "standard" formats (i.e. MPI1 or MPI2). If the format of the file to be imported is in a "field delimited" type of format (e.g. each field is separated by a delimiter character), then the following techique can be used to import the data by first building a "mapping" table that describes the format of the input file. Currently, only the MTMPI program is set up to allow importing of data using a mapping table. The mapping table itself is defined on the "Mapping" tabsheet of the Program Configuration maintenance screen.
Imported by: MTMPI
Format code: DELIMITED
Delimiter character: Defined in the import profile
The following describes the layout of the mapping table used when importing delimited files. Each line of the mapping table represents a field to be extracted from the delimited record. Each line of the mapping table consists of a set of values, each value separated by a comma.
Mapping Table Syntax (one line per field):
[Field name],[Field#],[DataType],[Format Code],[Required (Y/N)],[Logical Expression],[Conversion Expression]
Where:
[Field name] is the field name in the database table to update. This is a required field.
[Field#] is the sequence number within the delimited record where the field's value is stored
[DataType] is a code that represents the type of data. C=Character, N=Numeric, D=Date, B=Boolean
[Format Code] is an optional string that represents what format the data value is in. The following is a list of valid format codes:
mm/dd/yy
mm/dd/yyyy
yyyymmdd
yymmdd
last^first^mi
lastname
firstname
middlename
[Required] is either Y or N, indicating that the value is required. Records with missing required fields will not be imported.
[Logical Expression] is an optional field that is used to determine if the record will be imported or not based on the expression evaluating true or false. If the expression returns FALSE, then the record will not be imported.
[Conversion Expression] is an optional dBase expression that can be used to convert the field's value into some other value.
Example mapping table for importing a delimited file into the MPI table:
visitdt,2,d,yyyymmdd
mrun,5,c,,y
ptname,7,c,last^first^mi,y
birthdt,9,d,yyyymmdd
acctno,20,c,,y
Example delimited patient demographic data file:
,20060816,,,M000301984,,SMITH^JOHN^M,19440416,,,,,,,,,,,L00032070765,
,20060814,,,M000211954,,JONES^WILLIAM,,19620515,,,,,,,,,,,L00031998578,
,20060817,,,M000176052,,TEST^PATIENT,,19390225,,,,,,,,,,,L00032073462,
,20060817,,,M000298973,,MOOSE^BULLWINKLE^J,,19941024,,,,,,,,,,,L00032073280,