OHI Value-Based Payments
 PreviousHomeNext 
4.7 File Based ImportBook Index4.8 Integration Examples

4.7.1 Example : Provider Import

4.7.1.1 Step 1: Create data file set with a data file

4.7.1.1.1 Request Message

The create data file set with a data file request will have the following structure:

<dataFileSet code='ProviderImport_20141210_01' description ="Provider Import">
  <dataFile 
    code='IndividualProviderFile1' 
    descr='Individual Provider File 1'
    filepath='system1/tmp/Providers/1_1212121_v2.xml' -- This can be the reference path of the external system. This is for information only.
  />
</dataFileSet>
4.7.1.1.2 Response Message
<dataFileSet code='ProviderImport_20141210_01'>
  <links>
    <link rel='self' type='application/vnd.ohi-xml' uri='/datafilesets/ProviderImport_20141210_01'/>
  </links>
  <dataFiles>
    <dataFile code='IndividualProviderFile1'>
      <links>
        <link rel='content' type='text/xml' uri='/datafilesets/ProviderImport_20141210_01/datafiles/IndividualProviderFile1/data'/>
      </links>
    </dataFile>
  </dataFiles>
</dataFileSet>

4.7.1.2 Step 2: Upload Content

Use the URI  /datafilesets/ProviderImport_20141210_01/datafiles/IndividualProviderFile1/data  and upload the file having the structure as specified in Provider Integration point.

4.7.1.2.1 Response Message

The add content to data file request's success response will have an appropriate HTTP status code in the header and the following structure:

<dataFileSet code='ProviderImport_20141210_01'>
  <links>
    <link rel='self' type='application/vnd.ohi-xml' uri='/datafilesets/ProviderImport_20141210_01'/>
  </links>
  <dataFiles>
    <dataFile code='IndividualProviderFile1'>
      <links>
        <link rel='content'  uri='/datafilesets/ProviderImport_20141210_01/datafiles/IndividualProviderFile1/data'/>
      </links>
    </dataFile>
  </dataFiles>
</dataFileSet>

4.7.1.3 Step 3: Initiate the Provider Import Activity using Create Activity (/activities )

<activity level="GL" code="PROVIDER_IMPORT" description="Processed data file set 001.11"> 
    <parameters> 
      <parameter   name="dataFileSetCode" value="ProviderImport_20141210_01"/> 
      <parameter   name="responseDataFileSetCode" value="responseProviderImport_20141210_01"/> 
    </parameters>    
</activity>
4.7.1.3.1 Response Message

The start activity response will have an appropriate HTTP status code in the header and the following structure:

<activity code='PROVIDER_IMPORT' status ="IN">
  <links>
    <link rel='action/startprocessing' type='application/vnd.ohi-xml' uri='/activities/12345/start'/>
  </links>
</activity>

4.7.1.4 Step 4: Start Provider Import Activity

Use the URI /activities/12345/start to start the activity. 

4.7.1.4.1 Response Message

The start activity response will have an appropriate HTTP status code and location in the header and will have the following structure:

<activity 
 code="PROVIDER_IMPORT"
 status="IP">
</activity>
4.7.1.4.2 Step 5: Get Status 

Use the URI /activities/12345 to get the status of the activity

4.7.1.4.3 Response Message

When the activity has not concluded the response structure will be 

<activity code="PROVIDER_IMPORT" status="IP" />

When the activity has concluded with business errors the response structure will be 

<activity code="PROVIDER_IMPORT" status="CB">  
   <links>
     <link rel='messages' uri='/activities/12345/messages'/>
     <link rel='datafilesets' uri='datafilesets/responseProviderImport_20141210_01/datafiles/67890/data'/>
   </links>
</activity>

4.7.1.5 Step 6: Get result messages 

You can get more information about the result message by sending a request to URI /activities/12345/messages 

4.7.1.5.1 Response Message
<activityMessages>
  <resultMessages result="F" elementId="1234 A">    
    <resultMessage code ="REL-IP-PROV-031">
      REL-IP-PROV-031: Country code AA is unknown
    </resultMessage>
  </resultMessages> 
  <resultMessages result="F" elementId="1235 B">    
    <resultMessage code ="REL-IP-PROV-031">
      REL-IP-PROV-031: Country code AA is unknown
    </resultMessage>
  </resultMessages>   
</activityMessages>

4.7.1.6 Step 7: Get response file 

You can download the response file by using "Get details of a data file"  request from data file integration point with URI - datafilesets/responseProviderImport_20141210_01/datafiles/67890/data

4.7.1.6.1 File Details 
<individualProvidersResponse>
  <resultMessages result="F" elementId="1234 A">    
     <resultMessage code ="REL-IP-PROV-031">
      REL-IP-PROV-031: Country code AA is unknown
     </resultMessage>
  </resultMessages>
  <resultMessages result="F" elementId="1235 A">    
     <resultMessage code ="REL-IP-PROV-031">
      REL-IP-PROV-031: Country code AA is unknown
     </resultMessage>
  </resultMessages>   
</individualProvidersResponse>
 PreviousHomeNext 
4.7 File Based Import4.8 Integration Examples