Tross
ECLINICALWORKS

Write Patient Medications

Write patient medications in eClinicalWorks

POSThttps://api.ontross.com/api/integrations/ecw/write-patient-medications
Request Fields
input
object
required
Input for adding safely matched medications to current-medication history.
input.patientId
string
required
Patient id
input.encounterId
string
required
Encounter id
input.medications
array
required
List of medications.
input.medications[].name
string
required
Name
input.medications[].strength
string
required
Strength
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
required
Source text
auth_id
string
required
Auth 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"
}