Load Bulk Subject

Topics:

Use the following REST call to populate OnRamp tables with data represented by an Omni Interface Document (OID). The records written are assigned a batchId provided as a query parameter to the call.

The OnRamp batch may then be loaded into Omni through subsequent Process Bulk Subject or Process Ramp REST calls. Many OIDs may be processed together using the same batchId. However, a batch may only contain records with distinct primary keys. This is enforced by OnRamp constraints.

PUT: /server/api/v1/server/bulk/load/{subject}?batchId=

Topics:

The data payload must be a correctly formatted OID XML, which minimally requires a SourceName and SourceInstanceId. The OID may be fully or partially qualified.

  • subject – Specify the name of the subject that is being loaded. This must match the subject that is being loaded in the payload.
  • batchId – Generated that should not collide with any other bulk loading operation. This batchId will define the set of data to process using the bulk processing command.

Example:

PUT https://localhost:9514/server/api/v1/server/bulk/load/Facility?batchId=4

<Facility version="1.1.7"> 
    <SourceName>test_system</SourceName>  
    <SourceInstanceId>1499870996285_86_3</SourceInstanceId>  
    <Type sourceName="test_system" codeSet="Types">type_code</Type>  
    <Name>TestHospitalName</Name>
...  
</Facility>

-- response --

{
  "status": "OK",
  "code": 0,
  "message": "Added Facility:test_system:1499870996285_86_3 OID XML 
document to Ramp.",
  "developerMessage": null,
  "responseType": "com.ibi.omni.rest.support.ServiceOperationDto",
  "response": {
    "service": "RampProcessing",
    "operation": "writeOidToRamp",
    "code": 0,
    "message": "Added Facility:test_system:1499870996285_86_3 OID XML 
document to Ramp.",
    "start": 1500059394757,
    "end": 1500059396014
  },
  "exception": null
}

Use "code" to determine the result of the request. Any value other than zero (0) should be considered an error and the message will contain the reason.

Error Codes:

  • 100 – Missing required SourceName element.
  • 110 – Missing required SourceInstanceId element.
  • 120 – Fatal error processing the OID.
  • 130 – Invalid XML document format.