Medical Records
A medical record is an individual medical case for an animal. You can supply different conditions if the case evolves, along with different treatment strategies - giving a full historical treatment history for the animal. It is left up to the app provider / user to determine what constitutes as a new medical record.
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
Fetch
GET /api/farms/:farmId/animals/:animalId/medical-records
This returns all the animals medical records in the system, paged by the default value of 20.
Get a Specific Record
GET /api/farms/:farmId/animals/:animalId/medical-records/:medicalRecordId
Advanced Search
POST /api/farms/:farmId/animals/:animalId/medical-records/search
{
"tentative_conditions": ["12345678"]
}
This returns all matching medical records, paged by the default value of 20.
Create
When creating a medical record, send the condition ID for each of the conditions. The diagnosis methods you send MUST exist on the condition.
POST /api/farms/:farmId/animals/:animalId/medical-records
{
"tentative_conditions": [
"123456789"
],
"tentative_diagnosis_methods": [
{
"name": "Milk drop",
"notes": ""
}
]
}
Update
PUT /api/farms/:farmId/animals/:animalId/medical-records/:medicalRecordId
When updating a medical record, send the condition ID for each of the conditions. The diagnosis methods you send MUST exist on the condition.
When updating a record, any conditions and methods you send will overwrite values already stored. i.e. You are setting the values, not appending to.
{
"presumptive_conditions": [
"12345678910"
],
"presumptive_diagnosis_methods": [
{
"name": "Clinical signs",
"notes": ""
}
]
}
Delete
DELETE /api/farms/:farmId/animals/:animalId/medical-records/:medicalRecordId
Data
| Field Name | Type | Notes |
|---|---|---|
| _id | String | Unique ID for the medical record |
| tentative_conditions | Object (array) | An array of the tentative conditions for this medical record. Only send the condition id when creating / updating a medical record. |
| - condition_id | String | The id of the condition |
| - date_diagnosed | Date | The date this condition as diagnosed. |
| - name | String | Name of the condition |
| - organ | String | Organ affected by the condition |
| - system | String | System affected by the condition |
| tentative_diagnosis_methods | Object (array) | An array of the tentative diagnoisis methods for the tentative conditions |
| - name | String | The diagnosis method |
| - notes | String | Any notes associated with the diagnosis method |
| presumptive_conditions | Object (array) | An array of the presumptive conditions for this medical record. Only send the condition id when creating / updating a medical record. |
| - condition_id | String | The id of the condition |
| - date_diagnosed | Date | The date this condition as diagnosed. |
| - name | String | Name of the condition |
| - organ | String | Organ affected by the condition |
| - system | String | System affected by the condition |
| presumptive_diagnosis_methods | Object (array) | An array of the presumptive diagnoisis methods for the presumptive conditions |
| - name | String | The diagnosis method |
| - notes | String | Any notes associated with the diagnosis method |
| confirmed_conditions | Object (array) | An array of the confirmed conditions for this medical record. Only send the condition id when creating / updating a medical record. |
| - condition_id | String | The id of the condition |
| - date_diagnosed | Date | The date this condition as diagnosed. |
| - name | String | Name of the condition |
| - organ | String | Organ affected by the condition |
| - system | String | System affected by the condition |
| confirmed_diagnosis_methods | Object (array) | An array of the confirmed diagnoisis methods for the confirmed conditions |
| - name | String | The diagnosis method |
| - notes | String | Any notes associated with the diagnosis method |