ECLINICALWORKS
Write Patient Medications
Write patient medications in eClinicalWorks
POSThttps://api.ontross.com/api/integrations/ecw/write-patient-medications
Request Fields
input
object
requiredInput for adding safely matched medications to current-medication history.
input.patientId
string
requiredPatient id
input.encounterId
string
requiredEncounter id
input.medications
array
requiredList of medications.
input.medications[].name
string
requiredName
input.medications[].strength
string
requiredStrength
input.medications[].formulation
string
Optional ECW formulation. When omitted, the write proceeds only if name and strength resolve to exactly one ECW dose.
Default
""input.medications[].sourceText
string
requiredSource text
auth_id
string
requiredAuth id
Output Fields
medicationResults
array
List of medication Results.
medicationResults[].sourceText
string
Source text
medicationResults[].matchStatus
string
Match status
medicationResults[].status
string
Status
medicationResults[].reason
string
Reason
medicationResults[].matchedName
string
Matched name
medicationResults[].itemId
string
Item id
medicationResults[].drugNameId
string
Drug name id
medicationResults[].ndcCode
string
Ndc code
medicationResults[].strength
string
Strength
medicationResults[].formulation
string
Formulation
medicationsSaved
boolean
Medications saved
Code
curl --request POST \
--url https://api.ontross.com/api/integrations/ecw/write-patient-medications \
--header 'X-API-Key: REPLACE_KEY_VALUE' \
--header 'content-type: application/json' \
--data '{"input":{"encounterId":"200001","medications":[{"formulation":"Tablet","name":"Folic Acid","sourceText":"folic acid (folic acid 1 mg oral tablet)","strength":"1 MG"},{"formulation":"Tablet Delayed Release","name":"Pantoprazole","sourceText":"pantoprazole (pantoprazole 40 mg oral delayed release tablet)","strength":"40 MG"}],"patientId":"100001"},"auth_id":"auth_uuid_here"}'Request BODY
{
"input": {
"encounterId": "200001",
"medications": [
{
"formulation": "Tablet",
"name": "Folic Acid",
"sourceText": "folic acid (folic acid 1 mg oral tablet)",
"strength": "1 MG"
},
{
"formulation": "Tablet Delayed Release",
"name": "Pantoprazole",
"sourceText": "pantoprazole (pantoprazole 40 mg oral delayed release tablet)",
"strength": "40 MG"
}
],
"patientId": "100001"
},
"auth_id": "auth_uuid_here"
}