Medicine Usage
Medicine usage records medicine usage for each treatment history. You can attach multiple medicine usage to each single treatment history. But if one medicine doesn't work and you are using an alternative, you should supply a new treatment history.
Requests on this page assume you are sending the "Authorization" header.
For each of the requests below, you'll need to specify:
- Farm ID replacing :farmId with the farms' id in the methods below
- Animal ID replacing :animalId with the animals' id in the methods below
- Medical Record ID replacing :recordId with the records' id in the methods below
- Treatment History ID replacing :treatmentId with the treatments' id in the methods below
Fetch
GET /api/farms/:farmId/animals/:animalId/medical-records/:medicalRecordId/treatment-history/:treatmentId/medicine-usage
This returns all the medicine usage used for a treatment in the system, paged by the default value of 20.
Get a Specific Medicine Usage
GET /api/farms/:farmId/animals/:animalId/medical-records/:medicalRecordId/treatment-history/:treatmentId/medicine-usage/:medicineUseageId
Advanced Search
POST /api/farms/:farmId/animals/:animalId/medical-records/:medicalRecordId/treatment-history/:treatmentId/medicine-usage/search
This returns all matching medicine usage, paged by the default value of 20.
{
"product_id": "12345/12345"
}
Create
When creating a medicine usage, send the product ID, volume and dates only. The system will populate the other fields.
POST /api/farms/:farmId/animals/:animalId/medical-records/:medicalRecordId/treatment-history/:treatmentId/medicine-usage
{
"product_id": "12345/6789",
"total_volume":
{
"volume": 500,
"units": "ml"
},
"start_date": "2017-03-28T09:48:55.000Z",
"end_date": "2017-04-01T09:48:55.000Z",
}
Update
When updating a medicine usage, send the product ID and/or the volume only. The system will populate the other fields.
PUT /api/farms/:farmId/animals/:animalId/medical-records/:medicalRecordId/treatment-history/:treatmentId/medicine-usage/:medicineUseageId
{
"product_id": "123456/1235"
}
Delete
DELETE /api/farms/:farmId/animals/:animalId/medical-records/:medicalRecordId/treatment-history/:treatmentId/medicine-usage/:medicineUseageId
Data
Field Name | Type | Notes |
---|---|---|
_id | String | Unique ID used for the medicine usage |
product_id | String | ID of the product used - most likely a VM number |
name | String | Name of the product |
theraputic_group | [String] | Theraputic groups of the product |
active_substances | [Object] | Active substances of the product |
- name | String | Name of the active substance |
- concentration | Number | Concentration of the active substance |
total_volume | [Object] | Object containing the breakdown of the volume usage |
- volume | Number | Actual volume (i.e. 500) |
- units | String | Units of the volume (ml) |
start_date | Date | The start date the medicine was administered |
end_date | Date | The last date the medicine was administered |