Medication
A medication is a self-reported substance used by patients for medical treatment.
The medication model
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the medication.
- Name
object
- Type
- string
- Description
Always 'medication'.
- Name
patient
- Type
- string
- Description
Patient this medication is for.
- Name
visit_note
- Type
- string
- Description
Visit note this medication is was added in.
- Name
name
- Type
- string
- Description
Name of the medication.
- Name
dosage
- Type
- string
- Description
Dosage of the medication.
- Name
sig
- Type
- string
- Description
Instructions on how to take the medication.
- Name
active
- Type
- string
- Description
Whether this medication is still active.
- Name
start_date
- Type
- string
- Description
Start date of the medication.
- Name
end_date
- Type
- string
- Description
Only applies if medication is not active. End date of the medication.
- Name
comment
- Type
- string
- Description
Any comments associated with the medication.
- Name
created_by
- Type
- string
- Description
Creator of the medication.
- Name
created_at
- Type
- number
- Description
Timestamp (in Unix epoch time in milliseconds) of when the medication was created.
- Name
last_updated_at
- Type
- number
- Description
Timestamp (in Unix epoch time in milliseconds) of when the medication was last updated.
Response
{
"id": "med_2UxtAULYUrX7GVsTKePy",
"object": "medication",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"name": "VIIBRYD (Oral Pill)",
"dosage": "10 mg",
"sig": "Take 1 tablet by mouth daily",
"active": true,
"start_date": 1653798303000,
"comment": "Medication makes her nauseous.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Create a medication
Creates a new medication.
Required attributes
- Name
patient
- Type
- string
- Description
Patient this medication is for.
- Name
name
- Type
- string
- Description
Name of the medication.
- Name
dosage
- Type
- string
- Description
Dosage of the medication.
- Name
sig
- Type
- string
- Description
Instructions on how to take the medication.
- Name
active
- Type
- string
- Description
Whether this medication is still active.
- Name
start_date
- Type
- string
- Description
Start date of the medication.
- Name
end_date
- Type
- string
- Description
Only applies if medication is not active. End date of the medication.
- Name
created_by
- Type
- string
- Description
Creator of the medication.
Optional attributes
- Name
visit_note
- Type
- string
- Description
Visit note this medication is was added in.
- Name
comment
- Type
- string
- Description
Any comments associated with the medication.
Response
{
"id": "med_2UxtAULYUrX7GVsTKePy",
"object": "medication",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"name": "VIIBRYD (Oral Pill)",
"dosage": "10 mg",
"sig": "Take 1 tablet by mouth daily",
"active": true,
"start_date": 1653798303000,
"comment": "Medication makes her nauseous.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Retrieve a medication
Retrieves the specified medication.
Response
{
"id": "med_2UxtAULYUrX7GVsTKePy",
"object": "medication",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"name": "VIIBRYD (Oral Pill)",
"dosage": "10 mg",
"sig": "Take 1 tablet by mouth daily",
"active": true,
"start_date": 1653798303000,
"comment": "Medication makes her nauseous.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Update a medication
Updates the specified medication object by setting the values of the parameters passed. Any other parameters not provided will not be modified.
Required attributes
- Name
updated_by
- Type
- string
- Description
Updates to the medication made by.
Optional attributes
- Name
name
- Type
- string
- Description
Name of the medication.
- Name
dosage
- Type
- string
- Description
Dosage of the medication.
- Name
sig
- Type
- string
- Description
Instructions on how to take the medication.
- Name
active
- Type
- string
- Description
Whether this medication is still active.
- Name
start_date
- Type
- string
- Description
Start date of the medication.
- Name
end_date
- Type
- string
- Description
Only applies if medication is not active. End date of the medication.
- Name
comment
- Type
- string
- Description
Any comments associated with the medication.
Response
{
"id": "med_2UxtAULYUrX7GVsTKePy",
"object": "medication",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"name": "VIIBRYD (Oral Pill)",
"dosage": "10 mg",
"sig": "Take 1 tablet by mouth daily",
"active": false,
"start_date": 1653798303000,
"end_date": 1753798303000,
"comment": "Medication makes her nauseous.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1753798303000
}
List all medications
Returns a list of all medications.
Response
{
"object": "list",
"data": [
{
"id": "med_2UxtAULYUrX7GVsTKePy",
"object": "medication",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"name": "VIIBRYD (Oral Pill)",
"dosage": "10 mg",
"sig": "Take 1 tablet by mouth daily",
"active": true,
"start_date": 1653798303000,
"comment": "Medication makes her nauseous.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
},
]
}
Delete a medication
Deletes the specifed medication. Medication can't be deleted if it's associated with a visit note.
Required attributes
Optional attributes
Response
{
"id": "med_2UxtAULYUrX7GVsTKePy",
"object": "medication",
"delete": true
}