ECLINICALWORKS
Merge hpi notes
Merge HPI notes from earlier encounters.
POSThttps://preview.ontross.com/api/integrations/ecw/merge-hpi-notes
Request Fields
input.patientId
string
requiredeClinicalWorks patient identifier for the current chart.
Example
"100001"input.encounterId
string
requiredCurrent encounter ID where prior HPI notes should be merged into.
Example
"200001"input.encounterDate
string
requiredEncounter date in MM/DD/YYYY format (for example, 06/17/2026).
Example
"06/17/2026"input.sourceEncounterIds
array
requiredOrdered list of source encounter IDs to merge into the target encounter.
Example
["300001","300002"]auth_id
string
requiredSaved connection to run this operation through, from the Authentication page. It decides which practice and login the call uses.
Example
"00000000-0000-4000-8000-000000000000"Output Fields
importSuccess
boolean
True when the HPI merge request is submitted successfully to ECW.
Example
truenoOp
boolean
True when ECW did not expose one or more requested source encounters as HPI merge candidates, so no merge was submitted.
Example
falseunavailableSourceEncounterIds
array
Requested source encounter IDs that ECW did not expose in the HPI merge popup.
Example
["300002"]hpiEncIdsMerged
array
Resolved composite HPI merge tokens submitted to ECW, aligned to sourceEncounterIdsMerged.
Example
["900001_300001","900002_300002"]sourceEncounterIdsMerged
array
Source encounter IDs merged in submit order.
Example
["300001","300002"]Code
curl --request POST \
--url https://preview.ontross.com/api/integrations/ecw/merge-hpi-notes \
--header 'X-API-Key: REPLACE_KEY_VALUE' \
--header 'content-type: application/json' \
--data '{"input":{"patientId":"100001","encounterId":"200001","encounterDate":"06/17/2026","sourceEncounterIds":["300001","300002"]},"auth_id":"auth_uuid_here"}'Request BODY
{
"input": {
"patientId": "100001",
"encounterId": "200001",
"encounterDate": "06/17/2026",
"sourceEncounterIds": [
"300001",
"300002"
]
},
"auth_id": "auth_uuid_here"
}Response BODY
{
"id": "string",
"workflow_id": "string",
"auth_id": "string",
"status": "string",
"input": {},
"output": {
"importSuccess": true,
"noOp": false,
"unavailableSourceEncounterIds": [
"300002"
],
"hpiEncIdsMerged": [
"900001_300001",
"900002_300002"
],
"sourceEncounterIdsMerged": [
"300001",
"300002"
]
},
"files": null,
"created_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
}