/
IMS Near Miss Outbound API

IMS Near Miss Outbound API


Background and strategic fit

The purpose of this Integration is to pull over different incident information (Near Miss,Injury Illness, Vehicle and Environmental) to support our growing customer base to analyze the data they are entering through the ProcessMAP solution.This document provides information on how to consume the API's by the end Users.

Assumptions

  • ProcessMAP system User permissions would not be considered while exposing the data
  • ProcessMAP assumes anyone who is accessing the Outbound API has required authority to access Personal Information
  • User would have to input single Location Code (e.g. Westlake) each time to consume that Location data
  • Data to be accessed with a limitation of 2 years duration at a time to avoid any performance issues.
  • Data will be shown in Readable JSON format
  • Fields Names in the Response would be Product Field Naming. Customer will have to use mapping documentation
  • User accessing this endpoint through a valid Token & ConsumerId, provided by ProcessMAP, will have access to complete data
  • Witness Details  Information will be nested
  • BodyParts, if applicable -- Will be separated by , and side will be mentioned in braces Ex: Arm (L)(R)
  • For Nature, Cause and BodyParts, if applicable -- IF Other(List) is selected then others description will be appended with '-' Ex: Other(List) --- Some Text
  • For Employee, Supervisor, Reported By  -- LastName, MiddleName, First name and Prefix will be combined as shown as single (Prefix(if available) + Firstname+ MiddleName(if available) + LastName)
  • For Witness the First Name, Middle Name, Last Name will not be appended as no field is mandatory
  • Incident Status will be included in the JSON output
  • DATETIME, INT and FLOAT data will be shown as NULL when there is no data
  • Pin Location Information not considered
  • The date that is being shown in response is in EST Date time format ONLY
  • Certain fields are auto-populated in Application but the same will not reflect in JSON until the form is saved

User Interaction

Implementation : 

AUTHENTICATION URL DETAILS [  Base URL with Auth EndPoint ] 


Please note that the above Auth Token expires after every 120 minutes.


BASE URL FOR RESPECTIVE API CALLS : 

Near Miss

Incident Details

Request

GET papi/v1/imsoutbound/nearmissincidents?locationCode={locationCode}&dateFrom={dateFrom}&dateTo={dateTo}&lastSyncedDate={lastSyncedDate}

Ex: papi/v1/imsoutbound/nearmissincidents?locationCode=westlake&dateFrom=2019-07-01&dateTo=2019-07-30&lastSyncedDate=2019-01-01


URI Parameters

Location Code, DateFrom, DateTo and LastSyncedDate are to be passed as parameters.

DateFrom and DateTo are required when LastSyncedDate is not provided.

When DateFrom, DateTo and LastSyncedDate are provided, data will be returned based on LastSyncedDate only.

Name        Description           Type      Additional information
locationCode

        Represents the unique code of location for which Incident records to return.

           string

      Required

dateFrom

        Represents the starting date of Incident records to return.

           date

      Required but value optional

dateTo

        Represents the ending date of Incident records to return.

           date

      Required but value optional

lastSyncedDate        Represents the data from incident created date or incident modified date.           date      Required but value optional


Headers

Name       Description      Sample
Authorization       Represents the value of the authentication token.
       Allow multiple values: no.
      Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ...
ConsumerId       Represents the value of the consumer id.
       Allow multiple values: no.
      2426

Response

Sample:

{
"Incident ID (System Generated)": "sample string",

    "Incident Title/Site": "sample string",

    "Location Code": "sample string",

    "Location": "sample string",

    "Incident Date": "2019-10-06T00:00:00.000Z",

    "Time of Incident": "sample string 2",

    "Time Undetermined": "sample string",

    "Date Reported to Employer": "2019-10-06T00:00:00.000Z",

    "Time Reported To Employer": "18:40",

    "Day Of Week": "sample string",

    "Reported By": "sample string",

    "Work Shift": "sample string",

    "Incident Occurred on Employer's Premises": "sample string",

    "Operating Unit": "sample string",

    "Describe what occurred to create the Near Miss/Unsafe Act/Unsafe Condition?": "sample string.",

    "Is Contractor Involved?": "sample string",

    "Please provide Contractor Name, Company": "sample string",

    "Near Miss Incident Type": "sample string",

    "Severity": "sample string",

    "Hazard Classification": "sample string",

    "Potential Injury / Illness":

 [

      {

        "Nature of Injury / Illness": "sample string",

        "Cause of Injury/Illness": "sample string",

        "Injured Body Parts":

[

          "sample string",

          "sample string",

        ]

      }

],

    "Employee/Individual Details":

 {

      "Was an Employee / Individual involved in the Incident?": "sample string",

          },

    "Are there any Witnesses identified?": "sample string",

    "If Yes - Number of Witnesses":  "sample string",

    "Witness Information":

      [ {

"LastName": "sample string 2",

"FirstName": "sample string 3",

"MiddleName": "sample string 4",

"PhoneNumber": "sample string 5",

"Notes": "sample string 6"

       } ],

    "Incident Status": ""sample string",

    "Created By": "sample string",

    "Created Date": "2019-10-14T11:43:31.517Z",

    "Modified Date": "2019-10-14T11:47:29.440Z",

    "Modified By": "sample string",

  

"Investigation Responsibility": 
{ "Responsible Team": [ { "Salutation": null, "First Name": "John", "Last Name": "Smith" }, { "Salutation": null, "First Name": "Sagar", "Last Name": "Pradhan" } ], "Target Completion Date": "2019-11-22T00:00:00.000Z", "Note/Comments": "Test inv responsblity*", "Notify Immediate Supervisor": "Y" },

    "Investigation Details": [

     {

        "Had the job or task related to the Near Miss been risk assessed?": "sample string",

        "IF No, explain:":"sample string",

      },

      {

        "Was incident reviewed with the involved employee?":"sample string",

        "Employee Comments (If yes to answer above)": "sample string",

      },

      {

        "How long has the employee been working on the job where the Near Miss occurred?": "sample string"

      },

      {

        "Was the employee performing their normal job?": "sample string"

      },

      {

        "Select the type of the task the employee was performing when the Near Miss occurred": "sample string"

      },

      {

        "What tools, machine, equipment, object, or substances or components were involved in the Near Miss":  "sample string"

      },

      {

        "Lessons Learned from incident to be communicated to other departments?": "sample string"

      },

    

        "Name of person leading the investigation":  "sample string"

      },

      {

        "Investigation completed date":  "sample string"

      },

      {

        "Investigation completed Time":  "sample string"

      },

      {

        "Name of representative(s) approving of the investigation and corrective action?":  "sample string"

      },

      {

        "Date of representaive(s) approval": "sample string"

      }

    ],

    "Contributing Factors":

     [

      {

        "Contributing Factor Type (Parent)":  "sample string",

        "Contributing Factors":

 [

           "sample string",

           "sample string"

        ],

        "Comments":  "sample string"

      }

    ],

    "5 Why? Methodology": 

[

      {

        "Select Action or Condition that may have directly caused incident":

        [

           "sample string"

        ],

        "Whys": 

[

          {

            "Why or what created the scenario above to affect the action or condition":  "sample string"

          },

          {

            "Final Root Cause Checked":  "sample string"

          }

]

    ],

    "Root Cause Analysis": 

[

      {

        "Root cause Type (Parent)":  "sample string",

        "Root Cause":

[

          "Tools/Equipment -  "sample string",

        ],

        "Comments":  "sample string"

       }

 ],

    "Action Items": [

      {

        "Source ID":  "sample string",

        "Source Title": "sample string",

        "Action Item Title": "sample string",

        "Action Item Category": "Incident Management",

        "Action Item Type": "Corrective Action",

        "Action Item Description":"sample string",

        "Action Item Priority": "sample string",

        "Action Item Due Date": "2019-11-06T00:00:00.000Z",

        "Owners":

      [

          "sample string"

      ],

        "Responsible Department": "sample string",

        "Applicable to Expansion": "sample string",

        "Description of Actions to be Expanded": "sample string",

        "Applicable to EEM/EPM Info": "sample string",

        "EEM / EPM":"sample string",

        "EEM/EPM Info Submitted": "sample string",

        "Document Number": "sample string",

        "Assigned By":  "sample string",

        "Verification Required":  "sample string",

        "Action Item Status":  "sample string",

        "Action Taken":  "sample string",

        "Action Item Completed By":  "sample string",

        "Completed Date": "2019-10-06T00:00:00.000Z",

        "Due Date Extension": "sample string",

        "Requested Due Date Extension":  "sample string",

        "Reason for Due Date Extension": "sample string",

        "Due Date Extension Request Approved?": "sample string",

        "Reason for not extending the Due Date": "sample string",

        "Verification Status": "sample string",

        "Verification Performed": "sample string",

        "Verified By": "sample string"

        "Verification Date":"sample string"

        "Comments":"sample string",     

      }

    ]

Near Miss Field List

SectionField NameDatabase Column Size
Incident Detail

Incident ID *NVARCHAR(400)

Internal incident IdNVARCHAR(200)

Incident Title (No Personal data to be entered) *NVARCHAR(400)
General Detail

Incident Date *DATETIME

Time of Incident *NVARCHAR(100)

Time UndeterminedNVARCHAR(10)

Day of Week *NVARCHAR(50)

Date Reported to EmployerDATETIME

Time Reported to EmployerNVARCHAR(200)

Reported ByNVARCHAR(200)

Work Shift *NVARCHAR(200)

Incident Occurred on Employer's Premises *NVARCHAR(3)

Address of Incident Location *NVARCHAR(500)

City *NVARCHAR(50)

CountyNVARCHAR(50)

Country * NVARCHAR(50)

State *NVARCHAR(50)

Postal CodeNVARCHAR(50)

Department *NVARCHAR(100)

Department where the incident/injury occurredNVARCHAR(100)

Could this have resulted in a life altering injury or fatality? *NVARCHAR(100)

Describe what occurred to create the Near Miss? *NVARCHAR(8000)

Is Contractor Involved? *NVARCHAR(50)

Please provide Contractor Name, Company *NVARCHAR(500)

Nearmiss Incident type *NVARCHAR(200)

Severity *NVARCHAR(50)

Hazard Classification *NVARCHAR(100)

Was a Corrective Action completed at time of reporting incident?NVARCHAR(3)

Action Item TitleNVARCHAR(500)

Action TakenNVARCHAR(4000)

Primary OwnersNVARCHAR(100)

Assigned ByNVARCHAR(100)

Completion DateDATETIME
Potentially Injury illness section  

Nature of Illness/Injury *NVARCHAR(100)

Cause of Illness/Injury *

NVARCHAR(200)


Injured Body PartNVARCHAR(100)
Employee / Individual Details  

Was an Employee / Individual involved in the Incident? *NVARCHAR(50)

Personnel Type *NVARCHAR(50)

Employee / Individual Involved ( Last, First, M.I.) *NVARCHAR(200),
NVARCHAR(200),
NVARCHAR(200)

Employee Id *NVARCHAR(200)

GenderNVARCHAR(200)

Occupation/Job TitleNVARCHAR(200)

Hire DateDATETIME

Employee / Individual DepartmentNVARCHAR(100)

Supervisor ( Last, First, M.I) NVARCHAR(200),
NVARCHAR(200),
NVARCHAR(200)

Supervisor's Email NVARCHAR(50)

Do you want to further classify Unsupervised Contract EmployeeNVARCHAR(10)

Type of Client PersonnelNVARCHAR(20)

Client CompanyNVARCHAR(100)

Name of ContractorNVARCHAR(800)

Name of Sub-ContractorNVARCHAR(800)
Witness Information  

Are there any Witness identified?NVARCHAR(20)

If Yes - Number of Witnesses  INT

Last NameNVARCHAR(50)

First NameNVARCHAR(50)

Middle NameNVARCHAR(50)

Phone NumberNVARCHAR(100)

NotesNVARCHAR(2000)

Investigation Sections Field List

SectionField NameDatabase Column Size
Investigation Responsibility

Responsible Team *

Target Completion Date *DATE

Note/CommentsNVARCHAR(2000)
Investigation Questions  

All QuestionsNVARCHAR(2000)

All AnswersNVARCHAR(500)

All DependenciesINT / INT

Questions Configuration based on Business Types & Operation Types (Near Miss & Injury / Illness)INT / INT / INT
Contributing Factors  

Contributing FactorsINT / INT
5 Why ? Methodology  

Root Cause EvaluationINT / INT

Contributing FactorsINT / NVARCHAR(50)

WhysNVARCHAR(2000)

Check this box (If the above is FINAL ROOT CAUSE)NVARCHAR(2000)
Root Cause Analysis  

Root Cause analysisINT / INT

Comments
Final Root Cause Statement  

Final Root cause statementNVARCHAR(4000)

Primary CountermeasureINT / INT

Primary Root CauseINT

Action Item Field List

Section Field NameDatabase Column Size
Source Details  

Source IDNVARCHAR(400)

Source TitleNVARCHAR(400)

Management Review RoleVARCHAR(50)

TMS Enabled DepartmentNVARCHAR(50)

TMS Work Order NumberNVARCHAR(100)
Create  

Action Item TitleNVARCHAR(50)

Action Item CategoryNVARCHAR (2000)

Action Item TypeNVARCHAR(50)

Root CauseNVARCHAR(MAX)

Action Item DescriptionNVARCHAR(2000)

Action Item PriorityNVARCHAR(1000)

Action Item Due DateDATETIME

OwnerINT, NVARCHAR(50)

Responsible DepartmentINT,NVARCHAR(MAX)

Countermeasure INT,NVARCHAR(MAX)

Applicable to Expansion?NVARCHAR(10) 

Description of Actions to be Expanded  *NVARCHAR(1000) 

Applicable to EEM/EPM Info ?NVARCHAR(10) 

EEM / EPM  *NVARCHAR(10) 

EEM/EPM Info Submitted ?NVARCHAR(10) 

Document Number  *NVARCHAR(200)

Assigned ByVARCHAR(50)

Verification requiredINT, NVARCHAR(50)

Verify UserNVARCHAR(MAX)
Approval  

Approval StatusINT, NVARCHAR(100)

ApproversNVARCHAR(MAX)

Approval CommentNVARCHAR(2000)

Approval DateDATETIME
Complete  

Action Item StatusNVARCHAR(200)

Action TakenNVARCHAR(2000)

Action item Completed ByVARCHAR(1000)

Action item Completed DateDATETIME

Due Date ExtensionNVARCHAR(50)

Requested Due Date Extension NCHAR(10)

Reason for Due Date ExtensionNVARCHAR(2000)

Due Date Extension Request Approved?NVARCHAR(2000)

Reason for not extending the Due Date.DATETIME
Review/Verify  

Verification StatusINT

Verification PerformedVARCHAR(50)

Verified ByINT

Verification DateDATETIME

CommentsNVARCHAR(2000)
Cost Information  

Capital Expenditure involved

Approximate cost

Estimated Budget

Management Review

SectionField NameDatabase Column Size

RoleNVARCHAR(100)

OwnerNVARCHAR(2000)

Approval Due DateDATETIME

CommentsNVARCHAR(1000)

Completed ByNVARCHAR(100)

Management Review StatusVARCHAR(50)

Errors/Validation Messages

Generic Error codes are given below.

HTTP ERROR 401

{
"HttpStatusCode": 401,
"HttpStatus": "Unauthorized",
"ErrorCode": 1030,
"ErrorMessage": "Invalid tenant."
}

If the location code given is invalid:

{
"Message": "Invalid Location Code"
}

(When FromDate, ToDate and LastSyncedDate are empty) or (FromDate, ToDate and LastSyncedDate are given in incorrect format of DD-MM-YYYY)

{
"Message": "Date From or Date To should not be empty"
}

When FromDate is greater than ToDate and LastSyncedDate is empty

{
"Message": "Date From is greater than Date To"
}

When LastSyncedDate is greater than current date

{

"Message": "Last Synced Date is a Future Date"
}

© 2018 ProcessMAP Corporation, All Rights Reserved Confidential, may not be disclosed without the express permission of ProcessMAP Corporation