4.4 Data File Set Integration Point
OHI Claims application supports file based data import. Uploading the files and processing the file contents is a two step process:
- Load the files using the Data File Set Integration Point.
- Process the file contents by initiating the proper activity type using the Activity Integration Point or through the UI.
The data file set integration point allows uploading of the files in the following ways:
- Through multiple request -response based conversation mode.
- Through a single request by creating the data file set and loading multiple data files.
4.4.1 Creating a data file set with one or more files in conversation mode (multiple requests).
In this scenario the client performs the following steps:
- Create data file set, optionally with one or more files.
- Add data file to the data file set, if not already created with the data file set.
- Add file content.
4.4.1.1 Step 1: Create Data File Set
This request enables an external system to create a data file set.
4.4.1.1.1 Request Message
The create data file set request will have the following structure:
<dataFileSet code='' description=''> </dataFileSet>
4.4.1.1.2 Response Message
The create data file set success response will have the following structure:
<dataFileSet code=''> <links> <link rel='self' type='application/xml' href='/datafilesets/{datafilesetcode}'/> </links> </dataFileSet>
The URI received in the response could be used to perform further actions on the data file set.
4.4.1.1.3 Step 2: Create data files in a Data File Set.
A data file can be created within a previously created data file set by posting a request to the URI received in the response of "Create Data File Set request" (uri='/datafilesets/{datafilesetcode}).
4.4.1.1.4 Request Message
The create file within a data file set request will have the following structure:
<dataFile code='' description='' filePath='' -- File path can be supplied for reference purposes. The file content is uploaded through a POST operation />
4.4.1.1.5 Response Message
The create file within a data file set success response will have the following structure:
<dataFileSet code=''> <links> <link rel='self' type='application/xml' href='/datafilesets/{datafilesetcode}'/> </links> <dataFiles> <dataFile code=''> <links> <link rel='file' type='text/xml' href='/datafilesets/{datafilesetcode}/datafiles/{datafilecode}/data'/> </links> </dataFile> </dataFiles> </dataFileSet>
If the code for the data file set or data file is omitted a system generated number will be used instead.
4.4.1.2 Optional: Create data file set with a data file
Data file can be created directly in Step1. This will create a data file set with one data file or multiple data files. In this case the request - response xml for Step1 will be as mentioned below.
4.4.1.2.1 Request Message
The create data file set with a data file request will have the following structure:
<dataFileSet code='' description=''> <dataFiles> <dataFile code='' description='' filePath=''/> ... </dataFiles> </dataFileSet>
4.4.1.2.2 Response Message
The create data file set with file success response will have the following structure:
<dataFileSet code=''> <links> <link rel='self' type='application/xml' href='/datafilesets/{datafilesetcode}'/> </links> <dataFiles> <dataFile code=''> <links> <link rel='file' type='text/xml' href='/datafilesets/{datafilesetcode}/datafiles/{datafilecode}/data'/> </links> </dataFile> ... </dataFiles> </dataFileSet>
4.4.1.3 Step 3: Add data to Data File
The payload can then be submitted to the URI which was received as the response of Step 2. i.e '/datafilesets/{datafilesetcode}/datafiles/{datafilecode}/data'. The file structure is described in the specification of the file import based integration points.
4.4.1.3.1 Response Message
The add content to data file request's success response will have appropriate HTTP status code in the header and the following structure:
<dataFileSet code=''> <links> <link rel='self' type='application/xml' href='/datafilesets/{datafilesetcode}'/> </links> <dataFiles> <dataFile code=''> <links> <link rel='file' href='/datafilesets/{datafilesetcode}/datafiles/{datafilecode}/data'/> </links> </dataFile> </dataFiles> </dataFileSet>
For all of the above mentioned steps , in case of failure the response will be as specified in the standard structure under "Indicating Failure" in Response Messages.
Example : A result message for file content that could not be added as the data file code was unknown will have the following structure.
<resultMessages result='F'> <resultMessage code='DAT-IP-DAFI-005'> DAT-IP-DAFI-005:Data file code abc is unknown to data file set pqr. </resultMessage> </resultMessages>