Tross
Demo dataBook a demo
ECLINICALWORKS

Write medical history

Write past medical history rows.

POSThttps://preview.ontross.com/api/integrations/ecw/write-medical-history
Request Fields
input.patientId
string
required
Patient chart being read or written, from fetch-patients.
Example
"407069"
input.encounterId
string
required
Encounter being read or written, from fetch-appointments.
Example
"1870494"
input.historyItems
array
Past medical history rows, each with text and optional ICD-10.
Example
[{"icd10":"E11.00","pl":true,"text":"Type 2 diabetes mellitus"}]
input.historyItems[].text
string
Condition narrative to include in the patient's medical history.
Example
"Essential hypertension"
input.historyItems[].icd10
string
ICD-10 codes added to or looked up in the Assessment section.
Example
["E11.00","J30.9"]
Default
""
input.historyItems[].icdId
string
Catalog item for the diagnosis, from search-icd10's itemId.
Example
"420684"
Default
""
input.historyItems[].pl
boolean
Marks the row for the problem list.
Example
true
Default
false
input.historyText
array
Plain history lines, used instead of historyItems without ICD-10 codes.
Example
["No chronic conditions reported","Appendectomy in childhood"]
auth_id
string
required
Saved 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
writeSuccess
boolean
Whether eCW accepted the chart write.
Example
true
pastHistory
string
Past medical history text eCW stored after the write.
Example
"Essential hypertension"
historyIcds
string
Pipe-joined ICD-10 codes written alongside the history lines.
Example
"I10|E11.9"
historyIcdIds
string
Pipe-joined ICD item ids written, where -1 marks a problem-list row.
Example
"900401|-1"
historyPLs
string
Problem-list markers that the handler never fills, so always empty.
Example
"1|0"
Code
curl --request POST \
  --url https://preview.ontross.com/api/integrations/ecw/write-medical-history \
  --header 'X-API-Key: REPLACE_KEY_VALUE' \
  --header 'content-type: application/json' \
  --data '{"input":{"patientId":"407069","encounterId":"1870494","historyItems":[{"icd10":"E11.00","pl":true,"text":"Type 2 diabetes mellitus"}],"historyText":["No chronic conditions reported","Appendectomy in childhood"]},"auth_id":"auth_uuid_here"}'
Request BODY
{
  "input": {
    "patientId": "407069",
    "encounterId": "1870494",
    "historyItems": [
      {
        "icd10": "E11.00",
        "pl": true,
        "text": "Type 2 diabetes mellitus"
      }
    ],
    "historyText": [
      "No chronic conditions reported",
      "Appendectomy in childhood"
    ]
  },
  "auth_id": "auth_uuid_here"
}
Response BODY
{
  "id": "string",
  "workflow_id": "string",
  "auth_id": "string",
  "status": "string",
  "input": {},
  "output": {
    "writeSuccess": true,
    "pastHistory": "Essential hypertension",
    "historyIcds": "I10|E11.9",
    "historyIcdIds": "900401|-1",
    "historyPLs": "1|0"
  },
  "files": null,
  "created_at": "2019-08-24T14:15:22Z",
  "started_at": "2019-08-24T14:15:22Z",
  "completed_at": "2019-08-24T14:15:22Z"
}