ECLINICALWORKS
Write allergies
Record allergies or no known drug allergies.
POSThttps://preview.ontross.com/api/integrations/ecw/write-allergies
Request Fields
input.patientId
string
requiredPatient chart being read or written, from fetch-patients.
Example
"407069"input.encounterId
string
requiredEncounter being read or written, from fetch-appointments.
Example
"1870494"input.noKnownDrugAllergies
boolean
Records NKDA instead of rows, and cannot accompany any allergy.
Example
trueDefault
falseinput.allergyItems
array
Allergy rows to save, empty only when noKnownDrugAllergies is true.
input.allergyItems[].allergy
string
Allergen or drug name, from search-allergy results.
Example
"Penicillin"input.allergyItems[].reaction
string
Reaction saved as the description text on the allergy row.
Example
"hives"Accepted values
anaphylaxisAnaphylaxis-Bakers YeastAnaphylaxis-NeomycinAnaphylaxis-PolymyxinBAnaphylaxis-StreptomycindiarrheadizzinessEncephalopathyHistiocytic Tissue CancerousHIV-InfectedhivesImmunodeficiencyLeukemiaLymphoreticular CancerMultiple Myelomanausea and vomitingrashshortness of breathstomach upsetvomitinginput.allergyItems[].allergyType
string
Whether this is a true allergy, side effect, or contraindication.
Example
"Allergy"Default
"Allergy"Accepted values
AllergySide effectsContraindicationLack of Therapeutic Effectinput.allergyItems[].status
string
Whether the recorded sensitivity is active or inactive.
Example
"Active"Default
"Active"Accepted values
ActiveInactiveinput.allergyItems[].criticality
string
Severity recorded for the allergy on the chart.
Example
"High"Default
"High"Accepted values
UnknownHighLowinput.allergyItems[].onsetDate
string
Date the allergy was first noted on the chart.
Example
"03/14/2026"Default
""input.allergyItems[].SMDamConceptID
string
Drug-concept identifier stored on the allergy row.
Example
"0"Default
"0"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
writeSuccess
boolean
Whether eCW accepted the chart write.
Example
truewritten
array
The rows eCW actually wrote, with assigned ids.
written[].allergy
string
Allergen or drug name, from search-allergy results.
Example
"Penicillin"written[].rxId
string
eCW allergy record id created by the write.
Example
"9000301"written[].allergyDesc
string
Reaction text written with the allergy, taken from your input.
Example
"hives"written[].displayIndex
integer
Row position, either the smart form's order or the allergy's.
Example
1Code
curl --request POST \
--url https://preview.ontross.com/api/integrations/ecw/write-allergies \
--header 'X-API-Key: REPLACE_KEY_VALUE' \
--header 'content-type: application/json' \
--data '{"input":{"patientId":"407069","encounterId":"1870494","noKnownDrugAllergies":true,"allergyItems":[{"allergy":"Penicillin","allergyType":"Allergy","criticality":"High","onsetDate":"03/14/2026","reaction":"hives","status":"Active"}]},"auth_id":"auth_uuid_here"}'Request BODY
{
"input": {
"patientId": "407069",
"encounterId": "1870494",
"noKnownDrugAllergies": true,
"allergyItems": [
{
"allergy": "Penicillin",
"allergyType": "Allergy",
"criticality": "High",
"onsetDate": "03/14/2026",
"reaction": "hives",
"status": "Active"
}
]
},
"auth_id": "auth_uuid_here"
}Response BODY
{
"id": "string",
"workflow_id": "string",
"auth_id": "string",
"status": "string",
"input": {},
"output": {
"writeSuccess": true,
"written": [
{
"allergy": "Penicillin",
"rxId": "9000301",
"allergyDesc": "hives",
"displayIndex": 1
}
]
},
"files": null,
"created_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
}