{
  "openapi": "3.0.1",
  "info": {
    "title": "Clinical Management",
    "description": "This portion of the API provides endpoints for managing clinical data related to animals, including assessments, diagnostics, consultations, and more.",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.ezyvet.com",
      "description": "ezyVet production environment"
    },
    {
      "url": "https://api.trial.ezyvet.com",
      "description": "ezyVet trial environment"
    }
  ],
  "security": [],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://api.ezyvet.com/v1/oauth/access_token",
            "scopes": {
              "read-assessment": "Read assessment resources",
              "read-consult": "Read consult resources",
              "read-diagnostic": "Read diagnostic resources",
              "read-diagnosticrequest": "Read diagnostic request resources",
              "read-diagnosticresult": "Read diagnostic result resources",
              "read-diagnosticresultitem": "Read diagnostic result item resources",
              "read-eventgroup": "Read event group resources",
              "read-healthstatus": "Read health status resources",
              "read-history": "Read history resources",
              "read-integrateddiagnostic": "Read integrated diagnostic resources",
              "read-operation": "Read operation resources",
              "read-physicalexam": "Read physical exam resources",
              "read-plan": "Read plan resources",
              "read-presentingproblem": "Read presenting problem resources",
              "read-presentingproblemlink": "Read presenting problem link resources",
              "read-standardofcare": "Read standard of care resources",
              "read-vaccination": "Read vaccination resources",
              "write-consult": "Create and update consult resources",
              "write-diagnosticrequest": "Create and update diagnostic request resources",
              "write-diagnosticresult": "Create and update diagnostic result resources",
              "write-diagnosticresultitem": "Create and update diagnostic result item resources",
              "write-healthstatus": "Create and update health status resources",
              "write-physicalexam": "Create and update physical exam resources",
              "write-vaccination": "Create and update vaccination resources",
              "read-soc": "Read standard of care records (v2.1+)"
            }
          }
        }
      }
    },
    "parameters": {
      "active": {
        "name": "active",
        "in": "query",
        "description": "If true, the record is active and usable in ezyVet.",
        "required": false,
        "style": "form",
        "schema": {
          "type": "string"
        },
        "example": "1"
      },
      "created_at": {
        "name": "created_at",
        "in": "query",
        "description": "The epoch time when the record was created.",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "string"
        },
        "example": 1695766710
      },
      "id": {
        "name": "id",
        "in": "query",
        "description": "The ezyVet ID of the record.",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "string"
        },
        "example": "1"
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "description": "Sets the number of items to be returned in each page. Default is 10, Limit is 200.",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "number"
        },
        "example": 200
      },
      "modified_at": {
        "name": "modified_at",
        "in": "query",
        "description": "The epoch time when the record was last modified",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "string"
        },
        "example": 1695766710
      },
      "nextToken": {
        "name": "nextToken",
        "in": "query",
        "description": "A token to pass back to the server to get the next page of results. Obtained from `meta.nextToken` in a previous response.\n",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "eyJpZCI6MTIzfQ"
      },
      "page": {
        "name": "page",
        "in": "query",
        "description": "Sets the page to be returned.",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "number"
        },
        "example": 1
      },
      "pageSize": {
        "name": "pageSize",
        "in": "query",
        "description": "Sets the number of items to be returned in each page.",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 2000,
          "minimum": 1,
          "maximum": 2000
        }
      },
      "socOnly": {
        "name": "socOnly",
        "in": "query",
        "required": false,
        "description": "Returns only event groups that would result in a SOC for a patient. This includes: Treatment and Vaccine Event Groups that have a valid event group association.",
        "schema": {
          "type": "boolean"
        },
        "example": true
      },
      "uid": {
        "name": "uid",
        "in": "query",
        "description": "The ezyVet UID of the record.",
        "required": false,
        "style": "form",
        "explode": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BadRequest"
            }
          }
        }
      },
      "InternalError": {
        "description": "Internal error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "error_5JBMuXC69QQoPpKDFoBow"
                },
                "status": {
                  "type": "string",
                  "example": "500"
                },
                "code": {
                  "type": "string",
                  "example": ""
                },
                "title": {
                  "type": "string",
                  "example": "An internal server error occurred"
                },
                "detail": {
                  "type": "string",
                  "example": "An error occured, please contact API support with the id, status and code provided with the response."
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "Not Found",
        "content": {
          "text/html": {
            "schema": {
              "type": "string",
              "example": "No input file specified."
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Too Many Requests",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "error_5JBMuXC69QQoPpKDFoBow"
                },
                "status": {
                  "type": "string",
                  "example": "429"
                },
                "code": {
                  "type": "string",
                  "example": ""
                },
                "title": {
                  "type": "string",
                  "example": "Too Many Requests"
                },
                "detail": {
                  "type": "string",
                  "example": "Too Many Requests"
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "messages": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "level": {
                        "type": "string",
                        "example": "error"
                      },
                      "type": {
                        "type": "string",
                        "example": "InvalidRequestException"
                      },
                      "text": {
                        "type": "string",
                        "example": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the \\\"access token\\\" parameter."
                      },
                      "fields": {
                        "type": "array",
                        "example": [],
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "Unprocessable Entity",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "error_5JBMuXC69QQoPpKDFoBow"
                },
                "status": {
                  "type": "string",
                  "example": "422"
                },
                "code": {
                  "type": "string",
                  "example": ""
                },
                "title": {
                  "type": "string",
                  "example": "Unprocessable Entity"
                },
                "detail": {
                  "type": "string",
                  "example": "Unprocessable Entity"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "BadRequest": {
        "description": "Bad Request",
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "type": "string",
                  "example": "error_3YLvb0V7eXcHqgGauTjDy"
                },
                "status": {
                  "type": "string",
                  "example": "400"
                },
                "code": {
                  "type": "string",
                  "example": "100001"
                },
                "title": {
                  "type": "string",
                  "example": "The authorization grant type is not supported by the authorization server."
                },
                "detail": {
                  "type": "string",
                  "example": "The authorization grant type is not supported by the authorization server."
                }
              }
            }
          }
        }
      },
      "ConsultResponsev1": {
        "type": "object",
        "properties": {
          "meta": {
            "type": "object",
            "properties": {
              "transaction_id": {
                "type": "string"
              },
              "timestamp": {
                "type": "number"
              },
              "items_matched": {
                "type": "number"
              },
              "items_processed": {
                "type": "number"
              }
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "consult": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "active": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "modified_at": {
                      "type": "number"
                    },
                    "code": {
                      "type": "string"
                    },
                    "date": {
                      "type": "number"
                    },
                    "animal_id": {
                      "type": "string"
                    },
                    "vet_id": {
                      "type": "string"
                    },
                    "referring_vet_contact_id": {
                      "type": "string"
                    },
                    "referring_clinic_id": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "presenting_problem_link_list": {
                      "type": "array",
                      "items": {
                        "type": "number"
                      }
                    },
                    "ownership_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "messages": {
            "type": "array",
            "items": {}
          }
        }
      },
      "DeleteResponsev1": {
        "type": "object",
        "properties": {
          "meta": {
            "type": "object",
            "properties": {
              "timestamp": {
                "type": "string"
              },
              "items_matched": {
                "type": "number"
              },
              "items_processed": {
                "type": "number"
              }
            }
          },
          "items": {
            "type": "array",
            "items": {}
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DiagnosticRequestResponsev1": {
        "type": "object",
        "properties": {
          "meta": {
            "type": "object",
            "properties": {
              "timestamp": {
                "type": "string"
              },
              "items_page": {
                "type": "string"
              },
              "items_page_total": {
                "type": "string"
              },
              "items_page_size": {
                "type": "string"
              },
              "items_total": {
                "type": "string"
              }
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "diagnosticrequest": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number"
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "modified_at": {
                      "type": "number"
                    },
                    "timestamp": {
                      "type": "number"
                    },
                    "contact_id": {
                      "type": "number"
                    },
                    "animal_id": {
                      "type": "number"
                    },
                    "consult_id": {
                      "type": "number"
                    },
                    "vet_id": {
                      "type": "number"
                    },
                    "reference_number": {
                      "type": "string"
                    },
                    "specifics": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "supplier_id": {
                      "type": "number"
                    },
                    "diagnostic_list": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "number"
                          },
                          "active": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "number"
                          },
                          "modified_at": {
                            "type": "number"
                          },
                          "diagnostic_id": {
                            "type": "number"
                          },
                          "name": {
                            "type": "string"
                          },
                          "diagnostic_class": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "DiagnosticResultItemv1": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "range_low": {
            "type": "string"
          },
          "range_high": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "value",
          "range_low",
          "range_high",
          "unit"
        ]
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "code"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID for this error instance, used to trace errors in logs. Format: `{traceId}_{errorNumber}` (e.g. the Datadog trace ID followed by an incrementing counter).\n",
            "example": "8954638926413656075_1"
          },
          "code": {
            "type": "string",
            "description": "A PascalCase string identifying this type of error. Unique and searchable in the codebase. Not a numeric code.\n",
            "example": "InvalidPageSize"
          },
          "target": {
            "type": "string",
            "description": "The name of the query parameter that caused the error. Present only when the error is attributable to a specific input.\n",
            "example": "offset"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "errors"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "EventGroup": {
        "type": "object",
        "properties": {
          "uid": {
            "type": "string",
            "example": "socGroup_yR3VokRf1OvtHWoqTrpCp",
            "description": "The ezyVet UID of the record"
          },
          "name": {
            "type": "string",
            "example": "Equine Herpes Virus"
          },
          "importance": {
            "type": "string",
            "example": "Core"
          },
          "type": {
            "type": "string",
            "example": "Vaccine"
          }
        }
      },
      "HealthStatusItemv1": {
        "type": "object",
        "properties": {
          "healthstatus": {
            "$ref": "#/components/schemas/HealthStatusv1"
          }
        }
      },
      "HealthStatusResponsev1": {
        "type": "object",
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/Metav1"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HealthStatusItemv1"
            }
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "HealthStatusv1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "active": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "modified_at": {
            "type": "string"
          },
          "consult_id": {
            "type": "string"
          },
          "animal_id": {
            "type": "string"
          },
          "timestamp": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "blood_pressure": {
            "type": "number"
          },
          "weight": {
            "type": "number"
          },
          "weight_unit": {
            "type": "string",
            "enum": [
              "kg",
              "lb",
              "g"
            ]
          },
          "temperature": {
            "type": "number"
          },
          "heart_rate": {
            "type": "number"
          },
          "respiratory_rate": {
            "type": "number"
          },
          "bcs": {
            "type": "number"
          },
          "max_bcs": {
            "type": "number",
            "default": 9
          },
          "pain_score": {
            "type": "string"
          },
          "max_pain_score": {
            "type": "number",
            "default": 5
          },
          "dental_score": {
            "type": "string"
          },
          "max_dental_score": {
            "type": "number",
            "default": 4
          },
          "crt": {
            "type": "string",
            "enum": [
              "<1 sec",
              "1-2 sec",
              ">2 sec"
            ]
          },
          "mm": {
            "type": "string",
            "enum": [
              "Blue",
              "Grey",
              "White",
              "Pale",
              "Yellow",
              "Pigmented",
              "Tacky",
              "Pale Pink",
              "Pink",
              "Injected",
              "Red"
            ]
          },
          "attitude": {
            "type": "string",
            "enum": [
              "BAR",
              "QAR",
              "Comatose",
              "Sleeping",
              "Vocalising",
              "Sedate"
            ]
          },
          "left_ovary_size": {
            "type": "number"
          },
          "left_ovary_stage": {
            "type": "string",
            "enum": [
              "CL",
              "CH",
              "ANOV"
            ]
          },
          "right_ovary_size": {
            "type": "number"
          },
          "right_ovary_stage": {
            "type": "string",
            "enum": [
              "CL",
              "CH",
              "ANOV"
            ]
          },
          "uterine_tone": {
            "type": "number"
          },
          "uterine_edema": {
            "type": "number"
          },
          "uterine_fluid": {
            "type": "string",
            "enum": [
              "Positive",
              "Negative"
            ]
          },
          "uterine_cyst": {
            "type": "string",
            "enum": [
              "Body",
              "Left Horn",
              "Right Horn",
              "Negative"
            ]
          },
          "uterine_cytology": {
            "type": "number"
          },
          "cervix_tone": {
            "type": "number"
          },
          "cervix_cytology": {
            "type": "number"
          },
          "pregnant": {
            "type": "string",
            "enum": [
              "Yes",
              "No"
            ]
          },
          "pulse_quality": {
            "type": "string",
            "enum": [
              "Bounding",
              "Normal",
              "Fair",
              "Difficult To Palpate",
              "Weak",
              "No Pulse Detected",
              "Dropped Pulse"
            ]
          },
          "respiratory_effort": {
            "type": "string",
            "enum": [
              "Normal",
              "Laboured Breathing",
              "Shallow"
            ]
          }
        }
      },
      "Messages": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "example": []
      },
      "Meta": {
        "type": "object",
        "properties": {
          "nextToken": {
            "type": "string",
            "nullable": true,
            "description": "Token for fetching the next page of results. Omitted when there are no more pages.\n",
            "example": "eyJpZCI6MTIzfQ"
          }
        }
      },
      "MetaObject": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "description": "The time (in epoch) that the response was returned",
            "example": 1695766710
          },
          "items_page": {
            "type": "integer",
            "description": "The current page number",
            "example": 1
          },
          "items_page_total": {
            "type": "integer",
            "description": "The total number of pages",
            "example": 191
          },
          "items_page_size": {
            "type": "integer",
            "description": "The total number of records contained per page",
            "nullable": true,
            "example": 1
          },
          "items_total": {
            "type": "integer",
            "description": "The total number of records",
            "nullable": true,
            "example": 29
          },
          "transaction_id": {
            "type": "string",
            "description": "A unique identifier for the API request/response transaction",
            "example": "c780c14f01293932e1d1f16db7bfe017a6f02eb6e33bb6dc13944fe07cb6a85c"
          }
        },
        "description": "Data transfer object to represent pagination metadata of a particular collection of records\n\nThe pagination data can be set by mapping a laravel pagination collection to a DTO collection,\nor can be added to a collection manually\n\nGives information on which page of data the API user is looking at\nand other important information that will help them navigate the data"
      },
      "Metav1": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string"
          },
          "items_page": {
            "type": "string"
          },
          "items_page_total": {
            "type": "string"
          },
          "items_page_size": {
            "type": "string"
          },
          "items_total": {
            "type": "string"
          }
        }
      },
      "PatchConsultRequestv1": {
        "type": "object",
        "properties": {
          "vet_id": {
            "type": "number"
          },
          "presenting_problem_link_list": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "presenting_problem_id": {
                  "type": "number"
                },
                "id": {
                  "type": "number"
                }
              }
            }
          }
        }
      },
      "PlanItemv1": {
        "type": "object",
        "properties": {
          "plan": {
            "$ref": "#/components/schemas/Planv1"
          }
        }
      },
      "PlanResponsev1": {
        "type": "object",
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/Metav1"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanItemv1"
            }
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Planv1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "active": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "modified_at": {
            "type": "string"
          },
          "consult_id": {
            "type": "string"
          },
          "animal_id": {
            "type": "string"
          },
          "vet_id": {
            "type": "string"
          },
          "timestamp": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "ResourceObject": {
        "type": "object",
        "description": "Defines the resource objects for different resource types",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID number used by the system to uniquely identify a record",
            "example": "1"
          },
          "active": {
            "type": "string",
            "description": "If true, the record is active and usable in ezyVet",
            "example": "true"
          },
          "created_at": {
            "type": "string",
            "description": "The epoch time when the record was created",
            "example": "1307487862"
          },
          "modified_at": {
            "type": "string",
            "description": "The epoch time when the record was last modified",
            "example": "1363044343"
          }
        }
      },
      "schemas_Messages": {
        "title": "Message List",
        "type": "array",
        "items": {
          "type": "string"
        },
        "example": []
      },
      "schemas_MetaObject": {
        "title": "Meta Object",
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "description": "The time (in epoch) that the response was returned",
            "example": 1695766710
          },
          "items_page": {
            "type": "integer",
            "description": "The current page number",
            "example": 1
          },
          "items_page_total": {
            "type": "integer",
            "description": "The total number of pages",
            "example": 191
          },
          "items_page_size": {
            "type": "integer",
            "description": "The total number of records contained per page",
            "nullable": true,
            "example": 1
          },
          "items_total": {
            "type": "integer",
            "description": "The total number of records",
            "nullable": true,
            "example": 29
          },
          "transaction_id": {
            "type": "string",
            "description": "A unique identifier for the API request/response transaction",
            "example": "c780c14f01293932e1d1f16db7bfe017a6f02eb6e33bb6dc13944fe07cb6a85c"
          }
        },
        "description": "Data transfer object to represent pagination metadata of a particular collection of records\n\nThe pagination data can be set by mapping a laravel pagination collection to a DTO collection,\nor can be added to a collection manually\n\nGives information on which page of data the API user is looking at\nand other important information that will help them navigate the data"
      },
      "StandardOfCare": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ezyVet ID of the record.",
            "example": 12
          },
          "uid": {
            "type": "string",
            "description": "Globally unique identifier for the record.",
            "example": "standardOfCare_jt3AXwOC6fa6QcwxAw3pE"
          },
          "deleted_at": {
            "type": "number",
            "description": "UNIX timestamp when the record was deleted.",
            "nullable": true,
            "example": 1620232140
          },
          "due_at": {
            "type": "number",
            "description": "The next due UNIX timestamp for the event.\nThe value for this can be null in some cases where the practice has decided not to remind about it.\n",
            "nullable": true,
            "example": 1620234360
          },
          "last_fulfilled_at": {
            "type": "number",
            "description": "UNIX timestamp when the SOC was last fulfilled.",
            "example": 1620232140
          },
          "animal_id": {
            "type": "number",
            "description": "Animal ID, references an Animal in ezyVet, which can be used to retrieve animal information",
            "example": 2604
          },
          "animal_uid": {
            "type": "string",
            "description": "Globally unique ID for an animal, still can not be used with the animal API endpoint.",
            "example": "animal_B4vrE744DdwUXqFxHntAY"
          },
          "soc_group_id": {
            "type": "number",
            "description": "Unique identifier for the SOC group",
            "example": 235
          },
          "soc_group_uid": {
            "type": "string",
            "description": "Globally unique identifier for the SOC group",
            "example": "socGroup_h3MWcVA6E3LIdMOJRDCNB"
          },
          "soc_group_name": {
            "type": "string",
            "description": "SOC  group name displayable for the clients via third parties",
            "example": "Yearly Dental Checkup"
          },
          "soc_group_type": {
            "type": "string",
            "description": "The type of the SOC group.",
            "example": "Treatment"
          },
          "ownership_id": {
            "type": "number",
            "description": "Unique identifier for the ownership of which the SOC record belongs.",
            "example": 3
          },
          "ownership_uid": {
            "type": "string",
            "description": "Globally unique identifier for the ownership of which the SOC record belongs.",
            "example": "ownershipSeparation_cAl0DAnmH0C1EqVw0souz"
          },
          "calculated_at": {
            "type": "number",
            "description": "UNIX timestamp when the record was calculated in ezyVet.",
            "example": 1673831655
          },
          "created_at": {
            "type": "number",
            "description": "UNIX timestamp when the record was created in ezyVet.",
            "example": 1673831655
          },
          "modified_at": {
            "type": "number",
            "description": "UNIX timestamp when the record was last modified in ezyVet.",
            "example": 1673831655
          }
        }
      },
      "StandardOfCareListResponse": {
        "type": "object",
        "required": [
          "meta",
          "data",
          "errors"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/Meta"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StandardOfCareRecord"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "StandardOfCareRecord": {
        "type": "object",
        "required": [
          "id",
          "uid",
          "animalId",
          "animalUid",
          "socGroupId",
          "socGroupName",
          "socGroupType",
          "createdAt",
          "modifiedAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "description": "Integer database ID of the standard of care record. Maps to `id` in v2. For v4 migration, use `uid`.\n",
            "example": 42
          },
          "uid": {
            "type": "string",
            "description": "Globally unique string identifier for this standard of care record. Maps to `uid` in v2. This is the preferred identifier when migrating to v4.\n",
            "example": "standardofcare_abc123xyz"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "ISO 8601 timestamp when this record was soft-deleted. `null` for active (non-deleted) records. Maps to `deleted_at` in v2 (was a Unix timestamp).\n",
            "example": null
          },
          "dueAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "ISO 8601 timestamp of when this care item is next due. `null` if no future due date has been calculated. Maps to `due_at` in v2 (was a Unix timestamp).\n",
            "example": "2025-06-15T00:00:00Z"
          },
          "lastFulfilledAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "ISO 8601 timestamp of when this care item was last fulfilled (e.g. a vaccine was administered or a treatment completed). `null` if never fulfilled. Maps to `last_fulfilled_at` in v2 (was a Unix timestamp).\n",
            "example": "2024-12-01T10:30:00Z"
          },
          "animalId": {
            "type": "integer",
            "description": "Integer database ID of the animal this SOC record belongs to. Maps to `animal_id` in v2. For v4 migration, use `animalUid`.\n",
            "example": 10002
          },
          "animalUid": {
            "type": "string",
            "description": "UID of the animal this SOC record belongs to. Maps to `animal_uid` in v2. This is the v4 animal identifier.\n",
            "example": "animal_05fcXxlB28B442P3Xu8FK"
          },
          "socGroupId": {
            "type": "integer",
            "description": "Integer database ID of the SOC group (event group / care service) this record belongs to. Maps to `soc_group_id` in v2. For v4 migration, use `socGroupUid`.\n",
            "example": 5
          },
          "socGroupUid": {
            "type": "string",
            "nullable": true,
            "description": "UID of the SOC group (care service) this record belongs to. Maps to `soc_group_uid` in v2. Corresponds to a Care Service `id` in the v4 SOC configuration API (`/v4/soc/care-services`). Use this when migrating to v4.\n",
            "example": "socGroup_0fsqvgFud1Ayp71WiR8Ns"
          },
          "socGroupName": {
            "type": "string",
            "description": "Display name of the SOC group (e.g. \"Parvovirus\", \"Rabies\"). Maps to `soc_group_name` in v2. Corresponds to `name` on a Care Service in the v4 SOC configuration API.\n",
            "example": "Parvovirus"
          },
          "socGroupType": {
            "type": "string",
            "enum": [
              "Vaccine",
              "Treatment"
            ],
            "description": "Type of the SOC group. Maps to `soc_group_type` in v2. Corresponds to `type` on a Care Service in the v4 SOC configuration API.\n",
            "example": "Vaccine"
          },
          "ownershipId": {
            "type": "integer",
            "nullable": true,
            "description": "Integer database ID of the ownership record (the animal-to-owner link). `null` if no ownership record is associated with this SOC record. Maps to `ownership_id` in v2. For v4 migration, use `ownershipUid`.\n",
            "example": 3
          },
          "ownershipUid": {
            "type": "string",
            "nullable": true,
            "description": "UID of the ownership record. Maps to `ownership_uid` in v2. `null` if no ownership record is associated.\n",
            "example": "ownership_xyz456abc"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp when this record was created. Maps to `created_at` in v2 (was a Unix timestamp).\n",
            "example": "2023-04-01T12:00:00Z"
          },
          "modifiedAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp when this record was last modified. Maps to `modified_at` in v2 (was a Unix timestamp).\n",
            "example": "2025-01-15T10:00:00Z"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Standard of Care",
      "description": "Animal-specific Standard of Care records showing due and completed care items. These records are derived from the SOC rule engine and reflect the current state of each care service for a given animal.\n\nFor SOC configuration (care services, eligibility rules, linked products, exemptions) see the v4 SOC configuration API (`/v4/soc/care-services`)."
    }
  ],
  "paths": {
    "/v1/assessment": {
      "get": {
        "summary": "Fetch an Assessment",
        "operationId": "get-assessment",
        "description": "Each Assessment must be linked to a Consult.",
        "tags": [
          "Assessment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_at",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "consult_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "animal_id",
            "in": "query",
            "schema": {
              "type": "string",
              "default": 5
            }
          },
          {
            "name": "vet_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "notes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "default": 10
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "string",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A JSON object containing the meta information and items array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "items_page": {
                          "type": "string"
                        },
                        "items_page_total": {
                          "type": "string"
                        },
                        "items_page_size": {
                          "type": "string"
                        },
                        "items_total": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "Assessment": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              },
                              "animal_id": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "notes": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-assessment"
            ]
          }
        ]
      }
    },
    "/v1/consult": {
      "post": {
        "summary": "Creates a single Consult",
        "operationId": "create-consult",
        "tags": [
          "Consult"
        ],
        "security": [
          {
            "bearerAuth": [
              "write-consult"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "number"
                  },
                  "vet_id": {
                    "type": "number"
                  },
                  "animal_id": {
                    "type": "number"
                  },
                  "active": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  },
                  "ownership_id": {
                    "type": "string"
                  },
                  "referring_vet_contact_id": {
                    "type": "number"
                  },
                  "referring_clinic_id": {
                    "type": "number"
                  },
                  "description": {
                    "type": "string"
                  },
                  "presenting_problem_link_list": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "presenting_problem_id": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "required": [
                  "date",
                  "animal_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "transaction_id": {
                          "type": "string"
                        },
                        "timestamp": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "consult": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ]
                              },
                              "active": {
                                "oneOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "number"
                                  }
                                ]
                              },
                              "created_at": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ]
                              },
                              "modified_at": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ]
                              },
                              "code": {
                                "type": "string"
                              },
                              "date": {
                                "type": "string"
                              },
                              "animal_id": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ]
                              },
                              "vet_id": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ]
                              },
                              "referring_vet_contact_id": {
                                "type": "string"
                              },
                              "referring_clinic_id": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "presenting_problem_link_list": {
                                "type": "array",
                                "items": {
                                  "type": "number"
                                }
                              },
                              "ownership_id": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "get": {
        "summary": "Fetches a list of Consults",
        "operationId": "get-consult",
        "tags": [
          "Consult"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_at",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownership_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "animal_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vet_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "default": 10
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "string",
              "default": 1
            }
          },
          {
            "name": "referring_vet_contact_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "referring_clinic_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of Consults",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "items_page": {
                          "type": "string"
                        },
                        "items_page_total": {
                          "type": "string"
                        },
                        "items_page_size": {
                          "type": "string"
                        },
                        "items_total": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "consult": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "ownership_id": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "date": {
                                "type": "string"
                              },
                              "animal_id": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "presenting_problem_link_list": {
                                "type": "array",
                                "items": {
                                  "type": "number"
                                }
                              },
                              "referring_vet_contact_id": {
                                "type": "string"
                              },
                              "referring_clinic_id": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-consult"
            ]
          }
        ]
      }
    },
    "/v1/consult/{id}": {
      "patch": {
        "summary": "Update a Consult",
        "operationId": "update-consult",
        "tags": [
          "Consult"
        ],
        "description": "Update a single [`Consult`](#consult). If a presenting_problem_link_list is included in the PATCH request you must provide the IDs of the [`PresentingProblem`](#presentingproblem) you do not want to be removed from the consult.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID number used by the system to uniquely identify a [`Consult`](#consult).",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "The [`Consult`](#consult) date of consultation.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "animal_id",
            "in": "query",
            "description": "The [`Consult`](#consult)'s associated [`Animal`](#animal) ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vet_id",
            "in": "query",
            "description": "The [`Consult`](#consult)'s associated [`User`](#user) ID, also known as the case owner.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "active",
            "in": "query",
            "description": "If **true** or **1**, the [`Consult`](#consult) is active and usable in ezyVet.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownership_id",
            "in": "query",
            "description": "The ID of the ownership [`Separation`](#separation) to which this [`Consult`](#consult) belongs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "referring_vet_contact_id",
            "in": "query",
            "description": "The referring vet for the [`Consult`](#consult), represented as a [`Contact`](#contact) marked as a vet (`is_vet=1`).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "referring_clinic_id",
            "in": "query",
            "description": "The referring clinic ID for the [`Consult`](#consult)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "description": "The [`Consult`](#consult)'s general description.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "presenting_problem_link_list",
            "in": "query",
            "description": "The [`Consult`](#consult)'s list of IDs of links, each of which bridges the [`Consult`](#consult) to a [`PresentingProblem`](#presentingproblem).",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "presenting_problem_id": {
                    "type": "number"
                  },
                  "id": {
                    "type": "number"
                  }
                }
              }
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PatchConsultRequestv1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsultResponsev1"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "write-consult"
            ]
          }
        ]
      },
      "delete": {
        "summary": "Deletes a Consult",
        "operationId": "delete-consult",
        "tags": [
          "Consult"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the consult to delete",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "Bearer token for authentication",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful deletion of consult",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "transaction_id": {
                          "type": "string"
                        },
                        "timestamp": {
                          "type": "number"
                        },
                        "items_matched": {
                          "type": "number"
                        },
                        "items_processed": {
                          "type": "number"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {}
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "write-consult"
            ]
          }
        ]
      }
    },
    "/v1/diagnostic": {
      "get": {
        "summary": "Fetch a Diagnostic",
        "operationId": "get-diagnostic",
        "tags": [
          "Diagnostic"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "The ID number used by the system to uniquely identify a Diagnostic.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "items_page": {
                          "type": "string"
                        },
                        "items_page_total": {
                          "type": "string"
                        },
                        "items_page_size": {
                          "type": "string"
                        },
                        "items_total": {
                          "type": "string"
                        },
                        "transaction_id": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "diagnostic": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "supplier_contact_id": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-diagnostic"
            ]
          }
        ]
      }
    },
    "/v1/diagnosticrequest": {
      "post": {
        "summary": "Creates a single DiagnosticRequest",
        "operationId": "create-diagnosticrequest",
        "tags": [
          "Diagnostic Request"
        ],
        "description": "Creates a single [`DiagnosticRequest`](#diagnosticrequest) that links to a [`Consult`](#consult). The objects in the diagnostic_list will all create a [`DiagnosticRequestItem`](#diagnosticrequestitem) that has the same Diagnostic using three different methods.",
        "security": [
          {
            "bearerAuth": [
              "write-diagnosticrequest"
            ]
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string"
                  },
                  "specifics": {
                    "type": "string"
                  },
                  "vet_id": {
                    "type": "number"
                  },
                  "consult_id": {
                    "type": "number"
                  },
                  "ownership_id": {
                    "type": "number"
                  },
                  "diagnostic_list": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "diagnostic_id": {
                              "type": "number"
                            },
                            "diagnostic_class": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "diagnostic_id",
                            "diagnostic_class"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "product_id": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "product_id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "diagnostic_id": {
                              "type": "number"
                            },
                            "product_id": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "diagnostic_id",
                            "product_id"
                          ]
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "status",
                  "vet_id",
                  "consult_id",
                  "ownership_id",
                  "diagnostic_list"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "diagnosticrequest": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "number"
                              },
                              "active": {
                                "type": "boolean"
                              },
                              "created_at": {
                                "type": "number"
                              },
                              "modified_at": {
                                "type": "number"
                              },
                              "timestamp": {
                                "type": "number"
                              },
                              "contact_id": {
                                "type": "number"
                              },
                              "animal_id": {
                                "type": "number"
                              },
                              "consult_id": {
                                "type": "number"
                              },
                              "vet_id": {
                                "type": "number"
                              },
                              "reference_number": {
                                "type": "string"
                              },
                              "specifics": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "supplier_id": {
                                "type": "number"
                              },
                              "ownership_id": {
                                "type": "number"
                              },
                              "diagnostic_list": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "number"
                                    },
                                    "active": {
                                      "type": "boolean"
                                    },
                                    "created_at": {
                                      "type": "number"
                                    },
                                    "modified_at": {
                                      "type": "number"
                                    },
                                    "diagnostic_id": {
                                      "type": "number"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "diagnostic_class": {
                                      "type": "string"
                                    },
                                    "code": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/diagnosticrequest/{id}": {
      "delete": {
        "summary": "Deletes a DiagnosticRequest",
        "operationId": "delete-diagnosticrequest",
        "tags": [
          "Diagnostic Request"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID number used by the system to uniquely identify a DiagnosticRequestItem.",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "Bearer token for authentication",
            "required": true,
            "schema": {
              "type": "string",
              "format": "bearer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteResponsev1"
                }
              }
            }
          },
          "404": {
            "description": "DiagnosticRequest not found"
          },
          "500": {
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "write-diagnosticrequest"
            ]
          }
        ]
      },
      "patch": {
        "summary": "Update a DiagnosticRequest",
        "operationId": "update-diagnosticrequest",
        "tags": [
          "Diagnostic Request"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "The ID of the DiagnosticRequest to update."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "type": "object",
                "properties": {
                  "active": {
                    "type": "boolean"
                  },
                  "vet_id": {
                    "type": "number"
                  },
                  "specifics": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "diagnostic_list": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "diagnostic_id": {
                              "type": "number"
                            },
                            "diagnostic_class": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "diagnostic_id",
                            "diagnostic_class"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "active",
                  "vet_id",
                  "specifics",
                  "status",
                  "diagnostic_list"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "DiagnosticRequest updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number"
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "modified_at": {
                      "type": "number"
                    },
                    "timestamp": {
                      "type": "number"
                    },
                    "contact_id": {
                      "type": "number"
                    },
                    "animal_id": {
                      "type": "number"
                    },
                    "reference_number": {
                      "type": "string"
                    },
                    "consult_id": {
                      "type": "number"
                    },
                    "supplier_id": {
                      "type": "number"
                    },
                    "ownership_id": {
                      "type": "number"
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "vet_id": {
                      "type": "number"
                    },
                    "specifics": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "diagnostic_list": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "number"
                          },
                          "diagnostic_id": {
                            "type": "number"
                          },
                          "diagnostic_class": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "created_at",
                    "modified_at",
                    "timestamp",
                    "contact_id",
                    "animal_id",
                    "reference_number",
                    "consult_id",
                    "supplier_id",
                    "ownership_id",
                    "active",
                    "vet_id",
                    "specifics",
                    "status",
                    "diagnostic_list"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "write-diagnosticrequest"
            ]
          }
        ]
      },
      "get": {
        "summary": "Fetch a DiagnosticRequest",
        "operationId": "get-diagnosticrequest",
        "tags": [
          "Diagnostic Request"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID number used by the system to uniquely identify a DiagnosticRequest.",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiagnosticRequestResponsev1"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-diagnosticrequest"
            ]
          }
        ]
      }
    },
    "/v1/diagnosticresult": {
      "post": {
        "summary": "Create a Diagnostic Result",
        "security": [
          {
            "bearerAuth": [
              "write-diagnosticresult"
            ]
          }
        ],
        "description": "Creates a single [`DiagnosticResult`](#diagnosticresult).",
        "operationId": "create-diagnosticresult",
        "tags": [
          "Diagnostic Result"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "active": {
                    "type": "string",
                    "default": "true"
                  },
                  "consult_id": {
                    "type": "string"
                  },
                  "animal_id": {
                    "type": "string"
                  },
                  "supplier_id": {
                    "type": "string"
                  },
                  "vet_id": {
                    "type": "string"
                  },
                  "diagnostic_request_id": {
                    "type": "string"
                  },
                  "timestamp": {
                    "type": "string",
                    "default": "Current epoch"
                  },
                  "specifics": {
                    "type": "string"
                  },
                  "outcome": {
                    "type": "string"
                  },
                  "diagnostic_result_item_list": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/DiagnosticResultItemv1"
                    }
                  },
                  "external_link": {
                    "type": "string"
                  },
                  "study_uid": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "The DICOM Study Instance UID of the imaging study linked to this [`DiagnosticResult`](#diagnosticresult). Write-once — the value cannot be changed after it has been set.",
                    "example": "1.2.840.113619.2.62.994044785528.114289542805"
                  }
                },
                "required": [
                  "diagnostic_request_id",
                  "diagnostic_result_item_list"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "diagnosticresult": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "ownership_id": {
                                "type": "string"
                              },
                              "contact_id": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              },
                              "animal_id": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              },
                              "diagnostic_request_id": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "specifics": {
                                "type": "string"
                              },
                              "outcome": {
                                "type": "string"
                              },
                              "diagnostic_result_item_list": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "get": {
        "summary": "Fetch a Diagnostic Result list",
        "operationId": "get-diagnosticresult",
        "security": [
          {
            "bearerAuth": [
              "read-diagnosticresult"
            ]
          }
        ],
        "tags": [
          "Diagnostic Result"
        ],
        "description": "Fetches a list containing `DiagnosticResult`(s). (up to 10)",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The ID number used by the system to uniquely identify an [`DiagnosticResult`](#diagnosticresult)."
          },
          {
            "name": "active",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "If **true**, the [`DiagnosticResult`](#diagnosticresult) is active and usable in ezyVet."
          },
          {
            "name": "created_at",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The epoch time when the [`DiagnosticResult`](#diagnosticresult) was created."
          },
          {
            "name": "modified_at",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The epoch time when the [`DiagnosticResult`](#diagnosticresult) was last modified."
          },
          {
            "name": "ownership_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The ID of the [`Separation`](#separation) to which this [`DiagnosticResult`](#diagnosticresult) belongs."
          },
          {
            "name": "consult_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the [`Consult`](#consult) where the [`DiagnosticResult`](#diagnosticresult) is attached."
          },
          {
            "name": "animal_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the [`Animal`](#animal)."
          },
          {
            "name": "supplier_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the [`Contact`](#contact) (who is a supplier) of the diagnostic."
          },
          {
            "name": "vet_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the [`User`](#user) (who is a vet) associated with the [`DiagnosticResult`](#diagnosticresult)."
          },
          {
            "name": "diagnostic_request_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the [`DiagnosticRequest`](#diagnosticrequest) linked to the [`DiagnosticResult`](#diagnosticresult)."
          },
          {
            "name": "reference_number",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the reference number of the [`DiagnosticRequest`](#diagnosticrequest) linked to the [`DiagnosticResult`](#diagnosticresult)."
          },
          {
            "name": "timestamp",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Generally refers to the date when the results of the diagnostic were released. This doesn't necessarily refer to when the [`DiagnosticResult`](#diagnosticresult) record was created."
          },
          {
            "name": "specifics",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Specifics/notes about the [`DiagnosticResult`](#diagnosticresult)."
          },
          {
            "name": "outcome",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Notes about the result of the [`DiagnosticResult`](#diagnosticresult). This can be in markdown format."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "default": 10
            },
            "description": "Sets the limit on the number of items returned (range: 1 - 50)"
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "string",
              "default": 1
            },
            "description": "Specifies the page number of the result."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "items_page": {
                          "type": "string"
                        },
                        "items_page_total": {
                          "type": "string"
                        },
                        "items_page_size": {
                          "type": "string"
                        },
                        "items_total": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "diagnosticresult": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "ownership_id": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              },
                              "animal_id": {
                                "type": "string"
                              },
                              "supplier_id": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              },
                              "diagnostic_request_id": {
                                "type": "string"
                              },
                              "reference_number": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "specifics": {
                                "type": "string"
                              },
                              "outcome": {
                                "type": "string"
                              },
                              "diagnostic_result_item_list": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/diagnosticresult/{id}": {
      "delete": {
        "summary": "Delete a Diagnostic Result",
        "operationId": "delete-diagnosticresult",
        "security": [
          {
            "bearerAuth": [
              "write-diagnosticresult"
            ]
          }
        ],
        "tags": [
          "Diagnostic Result"
        ],
        "description": "Deletes a DiagnosticResult with the specified ID.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response with meta information and empty items.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "items_matched": {
                          "type": "number"
                        },
                        "items_processed": {
                          "type": "number"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {}
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "patch": {
        "summary": "Update a Diagnostic Result",
        "operationId": "update-diagnosticresult",
        "security": [
          {
            "bearerAuth": [
              "write-diagnosticresult"
            ]
          }
        ],
        "tags": [
          "Diagnostic Result"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the DiagnosticResult to update",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "description": "If true, the DiagnosticResult is active and usable in ezyVet.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "consult_id",
            "in": "query",
            "description": "Refers to the ID of the Consult where the DiagnosticResult is attached.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "animal_id",
            "in": "query",
            "description": "Refers to the ID of the Animal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "supplier_id",
            "in": "query",
            "description": "Refers to the ID of the Contact (who is a supplier) of the diagnostic.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vet_id",
            "in": "query",
            "description": "Refers to the ID of the User (who is a vet) associated with the DiagnosticResult.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "diagnostic_request_id",
            "in": "query",
            "description": "Refers to the ID of the DiagnosticRequest linked to the DiagnosticResult.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "description": "Generally refers to the date when the results of the diagnostic were released.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "specifics",
            "in": "query",
            "description": "Specifics/notes about the DiagnosticResult.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "description": "Notes about the result of the DiagnosticResult. This can be in markdown format.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "diagnostic_result_item_list",
            "in": "query",
            "description": "Contains a list of DiagnosticResultItem(s).",
            "schema": {
              "type": "array",
              "items": {
                "type": "number",
                "format": "int64"
              }
            }
          },
          {
            "name": "external_link",
            "in": "query",
            "description": "An external link for users to view any additional data.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "study_uid",
            "in": "query",
            "description": "The DICOM Study Instance UID of the imaging study linked to this DiagnosticResult. Write-once — it can be set on a DiagnosticResult that doesn't have one yet, but changing an existing value is rejected with a validation error.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "type": "object",
                "properties": {
                  "specifics": {
                    "type": "string"
                  },
                  "external_link": {
                    "type": "string"
                  },
                  "study_uid": {
                    "type": "string",
                    "maxLength": 64,
                    "example": "1.2.840.113619.2.62.994044785528.114289542805"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful update",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "diagnosticresult": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "ownership_id": {
                                "type": "string"
                              },
                              "contact_id": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              },
                              "animal_id": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              },
                              "diagnostic_request_id": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "specifics": {
                                "type": "string"
                              },
                              "outcome": {
                                "type": "string"
                              },
                              "diagnostic_result_item_list": {
                                "type": "array",
                                "items": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/diagnosticresultitem": {
      "post": {
        "summary": "Creates a single DiagnosticResultItem",
        "operationId": "create-diagnosticresultitem",
        "tags": [
          "Diagnostic Result Item"
        ],
        "description": "Each DiagnosticResultItem must be linked to a DiagnosticResult. A DiagnosticResultItem requires either a name or a value.",
        "parameters": [
          {
            "name": "timestamp",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Generally refers to the date when the particular item was finished. This doesn't necessarily refer to when the DiagnosticResultItem record was created."
          },
          {
            "name": "diagnostic_result_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the DiagnosticResult where the DiagnosticResultItem is attached."
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Name of the DiagnosticResultItem."
          },
          {
            "name": "value",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Resulting value of the DiagnosticResultItem."
          },
          {
            "name": "unit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Unit of measurement of the DiagnosticResultItem."
          },
          {
            "name": "range_low",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Low threshold value of the DiagnosticResultItem."
          },
          {
            "name": "range_high",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "High threshold value of the DiagnosticResultItem."
          },
          {
            "name": "qualifier",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The qualifier of the DiagnosticResultItem."
          },
          {
            "name": "notes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Notes about the DiagnosticResultItem."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  },
                  "range_low": {
                    "type": "string"
                  },
                  "range_high": {
                    "type": "string"
                  },
                  "unit": {
                    "type": "string"
                  },
                  "diagnostic_result_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful creation of DiagnosticResultItem",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "diagnosticresultitem": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "diagnostic_result_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "unit": {
                                "type": "string"
                              },
                              "range_low": {
                                "type": "string"
                              },
                              "range_high": {
                                "type": "string"
                              },
                              "qualifier": {
                                "type": "string"
                              },
                              "notes": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "write-diagnosticresultitem"
            ]
          }
        ]
      },
      "get": {
        "summary": "Fetch a DiagnosticResultItem list",
        "operationId": "get-diagnosticresultitem",
        "security": [
          {
            "bearerAuth": [
              "read-diagnosticresultitem"
            ]
          }
        ],
        "tags": [
          "Diagnostic Result Item"
        ],
        "description": "Fetches a list of `DiagnosticResultItem`(s) for a `DiagnosticResult`.",
        "parameters": [
          {
            "name": "diagnostic_result_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_at",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unit",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "range_low",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "range_high",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qualifier",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "notes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "default": 10
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "string",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of DiagnosticResultItem(s)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "items_page": {
                          "type": "string"
                        },
                        "items_page_total": {
                          "type": "string"
                        },
                        "items_page_size": {
                          "type": "string"
                        },
                        "items_total": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "diagnosticresultitem": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "diagnostic_result_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "unit": {
                                "type": "string"
                              },
                              "range_low": {
                                "type": "string"
                              },
                              "range_high": {
                                "type": "string"
                              },
                              "qualifier": {
                                "type": "string"
                              },
                              "notes": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/healthstatus": {
      "patch": {
        "summary": "Updates a Health Status",
        "description": "Updates a [`HealthStatus`](#healthstatus).",
        "operationId": "update-healthstatus",
        "security": [
          {
            "bearerAuth": [
              "write-healthstatus"
            ]
          }
        ],
        "tags": [
          "Health Status"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "The ID number used by the system to uniquely identify an [`HealthStatus`](#healthstatus)."
          },
          {
            "name": "consult_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "Refers to the ID of the [`Consult`](#consult) where the [`HealthStatus`](#healthstatus) is attached."
          },
          {
            "name": "animal_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "Refers to the ID of the [`Animal`](#animal)."
          }
        ],
        "requestBody": {
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "type": "object",
                "properties": {
                  "active": {
                    "type": "number",
                    "description": "If set to 1 (true) the [`HealthStatus`](#healthstatus) is active and usable in ezyVet."
                  },
                  "created_at": {
                    "type": "number",
                    "description": "The epoch time when the [`HealthStatus`](#healthstatus) was created."
                  },
                  "modified_at": {
                    "type": "number",
                    "description": "The epoch time when the [`HealthStatus`](#healthstatus) was last modified."
                  },
                  "consult_id": {
                    "type": "number",
                    "description": "The unique identifier for the [`Consult`](#consult) the [`HealthStatus`](#healthstatus) relates to."
                  },
                  "animal_id": {
                    "type": "number",
                    "description": "The unique identifier for the [`Animal`](#animal) the [`HealthStatus`](#healthstatus) relates to."
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "The epoch creation date of the [`HealthStatus`](#healthstatus)."
                  },
                  "notes": {
                    "type": "string",
                    "description": "[`HealthStatus`](#healthstatus) notes."
                  },
                  "blood_pressure": {
                    "type": "number",
                    "description": "[`Animal`](#animal) blood pressure."
                  },
                  "weight": {
                    "type": "number",
                    "description": "[`Animal`](#animal) weight (kg)"
                  },
                  "weight_unit": {
                    "type": "string",
                    "enum": [
                      "kg",
                      "lb",
                      "g"
                    ],
                    "description": "The [`Animal`](#animal) weight [`Unit`](#unit) name abbreviation."
                  },
                  "temperature": {
                    "type": "number",
                    "description": "[`Animal`](#animal) temperature (°c)"
                  },
                  "heart_rate": {
                    "type": "number",
                    "description": "[`Animal`](#animal) heart rate (bpm)"
                  },
                  "respiratory_rate": {
                    "type": "number",
                    "description": "[`Animal`](#animal) respiratory rate (bpm)"
                  },
                  "bcs": {
                    "type": "number",
                    "description": "[`Animal`](#animal) body condition score."
                  },
                  "max_bcs": {
                    "type": "number",
                    "description": "[`Animal`](#animal) body condition score (max)."
                  },
                  "pain_score": {
                    "type": "number",
                    "description": "[`Animal`](#animal) pain score."
                  },
                  "max_pain_score": {
                    "type": "number",
                    "description": "[`Animal`](#animal) pain score (max)."
                  },
                  "dental_score": {
                    "type": "number",
                    "description": "[`Animal`](#animal) dental score."
                  },
                  "max_dental_score": {
                    "type": "number",
                    "description": "[`Animal`](#animal) dental score (max)."
                  },
                  "crt": {
                    "type": "string",
                    "enum": [
                      "<1 sec",
                      "1-2 sec",
                      ">2 sec"
                    ],
                    "description": "[`Animal`](#animal) capillary refill rate."
                  },
                  "mm": {
                    "type": "string",
                    "enum": [
                      "Blue",
                      "Grey",
                      "White",
                      "Pale",
                      "Yellow",
                      "Pigmented",
                      "Tacky",
                      "Pale Pink",
                      "Pink",
                      "Injected",
                      "Red"
                    ],
                    "description": "[`Animal`](#animal) mucous membrane."
                  },
                  "attitude": {
                    "type": "string",
                    "enum": [
                      "BAR",
                      "QAR",
                      "Comatose",
                      "Sleeping",
                      "Vocalising",
                      "Sedate"
                    ],
                    "description": "[`Animal`](#animal) attitude."
                  },
                  "left_ovary_size": {
                    "type": "number",
                    "description": "The size of the [`Animal`](#animal) left ovary."
                  },
                  "left_ovary_stage": {
                    "type": "string",
                    "enum": [
                      "CL",
                      "CH",
                      "ANOV"
                    ],
                    "description": "The stage of the [`Animal`](#animal) left ovary."
                  },
                  "right_ovary_size": {
                    "type": "number",
                    "description": "The size of the [`Animal`](#animal) right ovary."
                  },
                  "right_ovary_stage": {
                    "type": "string",
                    "enum": [
                      "CL",
                      "CH",
                      "ANOV"
                    ],
                    "description": "The stage of the [`Animal`](#animal) right ovary."
                  },
                  "uterine_tone": {
                    "type": "number",
                    "description": "The uterine tone of the [`Animal`](#animal)."
                  },
                  "uterine_edema": {
                    "type": "number",
                    "description": "The uterine edema of the [`Animal`](#animal)."
                  },
                  "uterine_fluid": {
                    "type": "string",
                    "enum": [
                      "Positive",
                      "Negative"
                    ],
                    "description": "The uterine fluid of the [`Animal`](#animal)."
                  },
                  "uterine_cyst": {
                    "type": "string",
                    "enum": [
                      "Body",
                      "Left Horn",
                      "Right Horn",
                      "Negative"
                    ],
                    "description": "The uterine cyst of the [`Animal`](#animal)."
                  },
                  "uterine_cytology": {
                    "type": "number",
                    "description": "The uterine cytology of the [`Animal`](#animal)."
                  },
                  "cervix_tone": {
                    "type": "number",
                    "description": "The cervix tone of the [`Animal`](#animal)."
                  },
                  "cervix_cytology": {
                    "type": "number",
                    "description": "The cervix cytology of the [`Animal`](#animal)."
                  },
                  "pregnant": {
                    "type": "string",
                    "enum": [
                      "Yes",
                      "No"
                    ],
                    "description": "The status of pregnancy of the [`Animal`](#animal)."
                  },
                  "pulse_quality": {
                    "type": "string",
                    "enum": [
                      "Bounding",
                      "Normal",
                      "Fair",
                      "Difficult To Palpate",
                      "Weak",
                      "No Pulse Detected",
                      "Dropped Pulse"
                    ],
                    "description": "The pulse quality of the [`Animal`](#animal)."
                  },
                  "respiratory_effort": {
                    "type": "string",
                    "enum": [
                      "Normal",
                      "Laboured Breathing",
                      "Shallow"
                    ],
                    "description": "The respiratory effort of the [`Animal`](#animal)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A JSON response with the updated Health Status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "healthstatus": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "number"
                              },
                              "created_at": {
                                "type": "number"
                              },
                              "modified_at": {
                                "type": "number"
                              },
                              "consult_id": {
                                "type": "number"
                              },
                              "animal_id": {
                                "type": "number"
                              },
                              "timestamp": {
                                "type": "number"
                              },
                              "notes": {
                                "type": "string"
                              },
                              "blood_pressure": {
                                "type": "number"
                              },
                              "weight": {
                                "type": "number"
                              },
                              "weight_unit": {
                                "type": "string",
                                "enum": [
                                  "kg",
                                  "lb",
                                  "g"
                                ]
                              },
                              "temperature": {
                                "type": "number"
                              },
                              "heart_rate": {
                                "type": "number"
                              },
                              "respiratory_rate": {
                                "type": "number"
                              },
                              "bcs": {
                                "type": "number"
                              },
                              "max_bcs": {
                                "type": "number"
                              },
                              "pain_score": {
                                "type": "number"
                              },
                              "max_pain_score": {
                                "type": "number"
                              },
                              "dental_score": {
                                "type": "number"
                              },
                              "max_dental_score": {
                                "type": "number"
                              },
                              "crt": {
                                "type": "string",
                                "enum": [
                                  "<1 sec",
                                  "1-2 sec",
                                  ">2 sec"
                                ]
                              },
                              "mm": {
                                "type": "string",
                                "enum": [
                                  "Blue",
                                  "Grey",
                                  "White",
                                  "Pale",
                                  "Yellow",
                                  "Pigmented",
                                  "Tacky",
                                  "Pale Pink",
                                  "Pink",
                                  "Injected",
                                  "Red"
                                ]
                              },
                              "attitude": {
                                "type": "string",
                                "enum": [
                                  "BAR",
                                  "QAR",
                                  "Comatose",
                                  "Sleeping",
                                  "Vocalising",
                                  "Sedate"
                                ]
                              },
                              "left_ovary_size": {
                                "type": "number"
                              },
                              "left_ovary_stage": {
                                "type": "string",
                                "enum": [
                                  "CL",
                                  "CH",
                                  "ANOV"
                                ]
                              },
                              "right_ovary_size": {
                                "type": "number"
                              },
                              "right_ovary_stage": {
                                "type": "string",
                                "enum": [
                                  "CL",
                                  "CH",
                                  "ANOV"
                                ]
                              },
                              "uterine_tone": {
                                "type": "number"
                              },
                              "uterine_edema": {
                                "type": "number"
                              },
                              "uterine_fluid": {
                                "type": "string",
                                "enum": [
                                  "Positive",
                                  "Negative"
                                ]
                              },
                              "uterine_cyst": {
                                "type": "string",
                                "enum": [
                                  "Body",
                                  "Left Horn",
                                  "Right Horn",
                                  "Negative"
                                ]
                              },
                              "uterine_cytology": {
                                "type": "number"
                              },
                              "cervix_tone": {
                                "type": "number"
                              },
                              "cervix_cytology": {
                                "type": "number"
                              },
                              "pregnant": {
                                "type": "string",
                                "enum": [
                                  "Yes",
                                  "No"
                                ]
                              },
                              "pulse_quality": {
                                "type": "string",
                                "enum": [
                                  "Bounding",
                                  "Normal",
                                  "Fair",
                                  "Difficult To Palpate",
                                  "Weak",
                                  "No Pulse Detected",
                                  "Dropped Pulse"
                                ]
                              },
                              "respiratory_effort": {
                                "type": "string",
                                "enum": [
                                  "Normal",
                                  "Laboured Breathing",
                                  "Shallow"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "get": {
        "summary": "Fetch a HealthStatus list",
        "operationId": "get-healthstatus",
        "tags": [
          "Health Status"
        ],
        "parameters": [
          {
            "name": "animal_id",
            "in": "query",
            "description": "The ID number used by the system to uniquely identify an Animal.",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatusResponsev1"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-healthstatus"
            ]
          }
        ]
      },
      "post": {
        "summary": "Creates a HealthStatus",
        "operationId": "create-healthstatus",
        "tags": [
          "Health Status"
        ],
        "description": "Creates a [`HealthStatus`](#healthstatus).",
        "security": [
          {
            "bearerAuth": [
              "write-healthstatus"
            ]
          }
        ],
        "parameters": [
          {
            "name": "consult_id",
            "in": "query",
            "description": "Refers to the ID of the [`Consult`](#consult) where the [`HealthStatus`](#healthstatus) is attached.",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "animal_id",
            "in": "query",
            "description": "Refers to the ID of the [`Animal`](#animal).",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "description": "HealthStatus details to be created.",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "active": {
                    "type": "number"
                  },
                  "created_at": {
                    "type": "number"
                  },
                  "modified_at": {
                    "type": "number"
                  },
                  "timestamp": {
                    "type": "number"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "blood_pressure": {
                    "type": "number"
                  },
                  "weight": {
                    "type": "number"
                  },
                  "weight_unit": {
                    "type": "string",
                    "enum": [
                      "kg",
                      "lb",
                      "g"
                    ],
                    "default": "lb"
                  },
                  "temperature": {
                    "type": "number"
                  },
                  "heart_rate": {
                    "type": "number"
                  },
                  "respiratory_rate": {
                    "type": "number"
                  },
                  "bcs": {
                    "type": "number"
                  },
                  "max_bcs": {
                    "type": "number",
                    "default": 9
                  },
                  "pain_score": {
                    "type": "number"
                  },
                  "max_pain_score": {
                    "type": "number",
                    "default": 5
                  },
                  "dental_score": {
                    "type": "number"
                  },
                  "max_dental_score": {
                    "type": "number",
                    "default": 4
                  },
                  "crt": {
                    "type": "string",
                    "enum": [
                      "<1 sec",
                      "1-2 sec",
                      ">2 sec"
                    ]
                  },
                  "mm": {
                    "type": "string",
                    "enum": [
                      "Blue",
                      "Grey",
                      "White",
                      "Pale",
                      "Yellow",
                      "Pigmented",
                      "Tacky",
                      "Pale Pink",
                      "Pink",
                      "Injected",
                      "Red"
                    ]
                  },
                  "attitude": {
                    "type": "string",
                    "enum": [
                      "BAR",
                      "QAR",
                      "Comatose",
                      "Sleeping",
                      "Vocalising",
                      "Sedate"
                    ]
                  },
                  "left_ovary_size": {
                    "type": "number"
                  },
                  "left_ovary_stage": {
                    "type": "string",
                    "enum": [
                      "CL",
                      "CH",
                      "ANOV"
                    ]
                  },
                  "right_ovary_size": {
                    "type": "number"
                  },
                  "right_ovary_stage": {
                    "type": "string",
                    "enum": [
                      "CL",
                      "CH",
                      "ANOV"
                    ]
                  },
                  "uterine_tone": {
                    "type": "number"
                  },
                  "uterine_edema": {
                    "type": "number"
                  },
                  "uterine_fluid": {
                    "type": "string",
                    "enum": [
                      "Positive",
                      "Negative"
                    ]
                  },
                  "uterine_cyst": {
                    "type": "string",
                    "enum": [
                      "Body",
                      "Left Horn",
                      "Right Horn",
                      "Negative"
                    ]
                  },
                  "uterine_cytology": {
                    "type": "number"
                  },
                  "cervix_tone": {
                    "type": "number"
                  },
                  "cervix_cytology": {
                    "type": "number"
                  },
                  "pregnant": {
                    "type": "string",
                    "enum": [
                      "Yes",
                      "No"
                    ]
                  },
                  "pulse_quality": {
                    "type": "string",
                    "enum": [
                      "Bounding",
                      "Normal",
                      "Fair",
                      "Difficult To Palpate",
                      "Weak",
                      "No Pulse Detected",
                      "Dropped Pulse"
                    ]
                  },
                  "respiratory_effort": {
                    "type": "string",
                    "enum": [
                      "Normal",
                      "Laboured Breathing",
                      "Shallow"
                    ]
                  }
                },
                "required": [
                  "consult_id",
                  "animal_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "HealthStatus created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatusResponsev1"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/healthstatus/{id}": {
      "delete": {
        "summary": "Deletes a HealthStatus",
        "operationId": "delete-healthstatus",
        "tags": [
          "Health Status"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the HealthStatus to delete",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "description": "Bearer token for authentication",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "HealthStatus deleted successfully with no content"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": [
              "write-healthstatus"
            ]
          }
        ]
      }
    },
    "/v1/history": {
      "get": {
        "summary": "Fetch a History list",
        "description": "Fetches a list containing [`History`](#history)(s). (up to 10)",
        "operationId": "get-history",
        "tags": [
          "History"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "consult_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "animal_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "history_system",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comments",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vet_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of History items",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "items_page": {
                          "type": "string"
                        },
                        "items_page_total": {
                          "type": "string"
                        },
                        "items_page_size": {
                          "type": "string"
                        },
                        "items_total": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "history": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              },
                              "animal_id": {
                                "type": "string"
                              },
                              "history_system": {
                                "type": "string"
                              },
                              "chain": {
                                "type": "string"
                              },
                              "comments": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-history"
            ]
          }
        ]
      }
    },
    "/v1/integrateddiagnostic": {
      "get": {
        "summary": "Fetch an array of IntegratedDiagnostic objects",
        "operationId": "get-integrated-diagnostic",
        "tags": [
          "Integrated Diagnostic"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "number"
            },
            "description": "The ID number used by the system to uniquely identify a IntegratedDiagnostic."
          },
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "A code assigned by an ezyVet user to keep track of the IntegratedDiagnostic. This value is subject to change."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "items_page": {
                          "type": "number"
                        },
                        "items_page_total": {
                          "type": "number"
                        },
                        "items_page_size": {
                          "type": "number"
                        },
                        "items_total": {
                          "type": "number"
                        },
                        "transaction_id": {
                          "type": "string"
                        },
                        "timestamp": {
                          "type": "number"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "integrateddiagnostic": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "number"
                              },
                              "created_at": {
                                "type": "number"
                              },
                              "modified_at": {
                                "type": "number"
                              },
                              "active": {
                                "type": "boolean"
                              },
                              "name": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "supplier_price": {
                                "type": "number",
                                "nullable": true
                              },
                              "supplier_currency": {
                                "type": "string",
                                "nullable": true
                              },
                              "description": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-integrateddiagnostic"
            ]
          }
        ]
      }
    },
    "/v1/operation": {
      "get": {
        "summary": "Fetches a list of Operations",
        "operationId": "get-operation",
        "tags": [
          "Operation"
        ],
        "parameters": [
          {
            "name": "animal_id",
            "in": "query",
            "description": "The ID number used by the system to uniquely identify an Operation.",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "The ID number used by the system to uniquely identify an Operation.",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "active",
            "in": "query",
            "description": "If true, the Operation is active and usable in ezyVet.",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "description": "The epoch time when the Operation was created.",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "modified_at",
            "in": "query",
            "description": "The epoch time when the Operation was last modified.",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "consult_id",
            "in": "query",
            "description": "Refers to the ID of the Consult where the Operation is attached.",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "vet_id",
            "in": "query",
            "description": "Refers to the ID of the User who is a Vet and is linked to the Operation.",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "description": "The date when the clinic did a performed the examination for the health status of the Animal. Note that this doesn't necessarily refer to when the Operation record was created.",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "therapeutic_id",
            "in": "query",
            "description": "Refers to the ID of the Therapeutic performed in the Operation.",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "specifics",
            "in": "query",
            "description": "Contains specifics/notes about the Operation.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "description": "Contains notes about the result of the Operation.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of Operations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "items_page": {
                          "type": "string"
                        },
                        "items_page_total": {
                          "type": "string"
                        },
                        "items_page_size": {
                          "type": "string"
                        },
                        "items_total": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "operation": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              },
                              "animal_id": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "therapeutic_id": {
                                "type": "string"
                              },
                              "specifics": {
                                "type": "string"
                              },
                              "outcome": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-operation"
            ]
          }
        ]
      }
    },
    "/v1/physicalexam": {
      "post": {
        "summary": "Creates a single PhysicalExam",
        "operationId": "create-physicalexam",
        "tags": [
          "Physical Exam"
        ],
        "security": [
          {
            "bearerAuth": [
              "write-physicalexam"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consult_id": {
                    "type": "string"
                  },
                  "animal_id": {
                    "type": "string"
                  },
                  "vet_id": {
                    "type": "string"
                  },
                  "ownership_id": {
                    "type": "string"
                  },
                  "body_system": {
                    "type": "string",
                    "default": 0
                  },
                  "comments": {
                    "type": "string"
                  },
                  "timestamp": {
                    "type": "string",
                    "default": "The epoch now"
                  },
                  "historical_record_id": {
                    "type": "string",
                    "default": 0
                  },
                  "active": {
                    "type": "number",
                    "default": 1
                  }
                },
                "required": [
                  "consult_id",
                  "animal_id",
                  "vet_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "transaction_id": {
                          "type": "string"
                        },
                        "timestamp": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "physicalexam": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              },
                              "animal_id": {
                                "type": "string"
                              },
                              "body_system": {
                                "type": "string"
                              },
                              "chain": {
                                "type": "string"
                              },
                              "comments": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              },
                              "historical_record_id": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "get": {
        "summary": "Fetch a PhysicalExam list",
        "description": "Fetches a list containing [`PhysicalExam`](#physicalexam)(s). (up to 10)",
        "operationId": "get-physicalexam",
        "tags": [
          "Physical Exam"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The ID number used by the system to uniquely identify an [`PhysicalExam`](#physicalexam)."
          },
          {
            "name": "active",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "If **true**, the [`PhysicalExam`](#physicalexam) is active and usable in ezyVet."
          },
          {
            "name": "created_at",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The epoch time when the [`PhysicalExam`](#physicalexam) was created."
          },
          {
            "name": "modified_at",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The epoch time when the [`PhysicalExam`](#physicalexam) was last modified."
          },
          {
            "name": "consult_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the [`Consult`](#consult) where the [`PhysicalExam`](#physicalexam) is attached."
          },
          {
            "name": "animal_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the [`Animal`](#animal)."
          },
          {
            "name": "body_system",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the [`BodySystem`](#bodysystem)."
          },
          {
            "name": "chain",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The chain of [`BodySystem`](#bodysystem) items thus far."
          },
          {
            "name": "comments",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comments for the [`PhysicalExam`](#physicalexam) record."
          },
          {
            "name": "timestamp",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The date when [`PhysicalExam`](#physicalexam) was noted for the consult. Note that this doesn't necessarily refer to when the [`PhysicalExam`](#physicalexam) record was created."
          },
          {
            "name": "vet_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the [`User`](#user) who is a Vet and is linked to the [`PhysicalExam`](#physicalexam)."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of PhysicalExams",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "items_page": {
                          "type": "string"
                        },
                        "items_page_total": {
                          "type": "string"
                        },
                        "items_page_size": {
                          "type": "string"
                        },
                        "items_total": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "physicalexam": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              },
                              "animal_id": {
                                "type": "string"
                              },
                              "body_system": {
                                "type": "string"
                              },
                              "chain": {
                                "type": "string"
                              },
                              "comments": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-physicalexam"
            ]
          }
        ]
      }
    },
    "/v1/physicalexam/{id}": {
      "patch": {
        "summary": "Update a PhysicalExam",
        "operationId": "update-physicalexam",
        "tags": [
          "Physical Exam"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID number used by the system to uniquely identify a PhysicalExam."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consult_id": {
                    "type": "string"
                  },
                  "animal_id": {
                    "type": "string"
                  },
                  "vet_id": {
                    "type": "string"
                  },
                  "ownership_id": {
                    "type": "string"
                  },
                  "body_system": {
                    "type": "string",
                    "default": 0
                  },
                  "comments": {
                    "type": "string"
                  },
                  "timestamp": {
                    "type": "string",
                    "default": "The epoch now"
                  },
                  "historical_record_id": {
                    "type": "string",
                    "default": 0
                  },
                  "active": {
                    "type": "number",
                    "default": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "transaction_id": {
                          "type": "string"
                        },
                        "timestamp": {
                          "type": "string"
                        },
                        "items_matched": {
                          "type": "number"
                        },
                        "items_processed": {
                          "type": "number"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "physicalexam": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              },
                              "animal_id": {
                                "type": "string"
                              },
                              "body_system": {
                                "type": "string"
                              },
                              "chain": {
                                "type": "string"
                              },
                              "comments": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              },
                              "historical_record_id": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "write-physicalexam"
            ]
          }
        ]
      }
    },
    "/v1/plan": {
      "get": {
        "summary": "Fetch a Plan",
        "description": "Each Plan must be linked to a Consult.",
        "operationId": "get-plan",
        "tags": [
          "Plan"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The ID number used by the system to uniquely identify an Plan."
          },
          {
            "name": "active",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "If true, the Plan is active and usable in ezyVet."
          },
          {
            "name": "created_at",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The epoch time when the Plan was created."
          },
          {
            "name": "modified_at",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The epoch time when the Plan was last modified."
          },
          {
            "name": "consult_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the Consult where the Plan is attached."
          },
          {
            "name": "animal_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the Animal."
          },
          {
            "name": "vet_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the User who is the Vet linked to the Plan."
          },
          {
            "name": "timestamp",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The date when the clinic did a performed the examination for the health status of the Animal. Note that this doesn't necessarily refer to when the Plan record was created."
          },
          {
            "name": "notes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Notes about the Plan record."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number",
              "default": 10
            },
            "description": "Limits the number of items returned."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number",
              "default": 1
            },
            "description": "Specifies the page number of the result."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanResponsev1"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-plan"
            ]
          }
        ]
      }
    },
    "/v1/presentingproblem": {
      "get": {
        "summary": "Fetch a PresentingProblem list",
        "operationId": "get-presentingproblem",
        "tags": [
          "Presenting Problem"
        ],
        "description": "Fetches a list containing [`PresentingProblem`](#presentingproblem)(s).",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The ID number used by the system to uniquely identify an [`PresentingProblem`](#presentingproblem)."
          },
          {
            "name": "active",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "If **true**, the [`PresentingProblem`](#presentingproblem) is active and usable in ezyVet."
          },
          {
            "name": "created_at",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The epoch time when the [`PresentingProblem`](#presentingproblem) was created."
          },
          {
            "name": "modified_at",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The epoch time when the [`PresentingProblem`](#presentingproblem) was last modified."
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The name of the [`PresentingProblem`](#presentingproblem)."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            },
            "description": "Sets the limit on the number of items returned (range: 1 - 50)."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "string",
              "minimum": 1,
              "default": 1
            },
            "description": "Specifies the page number of the result."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of presenting problems",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "items_page": {
                          "type": "string"
                        },
                        "items_page_total": {
                          "type": "string"
                        },
                        "items_page_size": {
                          "type": "string"
                        },
                        "items_total": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "presentingproblem": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-presentingproblem"
            ]
          }
        ]
      }
    },
    "/v1/presentingproblemlink": {
      "get": {
        "summary": "Fetch a PresentingProblemLink list",
        "operationId": "get-presentingproblemlink",
        "tags": [
          "Presenting Problem Link"
        ],
        "description": "Fetch all the [`PresentingProblemLink`](#presentingproblemlink)s. (up to 10)",
        "parameters": [
          {
            "name": "consult_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "active",
            "in": "query",
            "schema": {
              "oneOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "modified_at",
            "in": "query",
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "name": "presenting_problem_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ],
              "default": 10
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ],
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of PresentingProblemLinks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "items_page": {
                          "type": "string"
                        },
                        "items_page_total": {
                          "type": "string"
                        },
                        "items_page_size": {
                          "type": "string"
                        },
                        "items_total": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "presentingproblemlink": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "presenting_problem_id": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-presentingproblemlink"
            ]
          }
        ]
      }
    },
    "/v1/vaccination": {
      "get": {
        "summary": "Fetch a list containing Vaccinations",
        "operationId": "get-vaccination",
        "tags": [
          "Vaccination"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "The ID number used by the system to uniquely identify a Vaccination.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "description": "If true, the Vaccination is active and usable in ezyVet.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "description": "The epoch time when the Vaccination was created.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_at",
            "in": "query",
            "description": "The epoch time when the Vaccination was last modified.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vet_id",
            "in": "query",
            "description": "Refers to the ID of the User (vets only) who performed the vaccination.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "consult_id",
            "in": "query",
            "description": "Refers to the ID of the Consult related to the Vaccination.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_id",
            "in": "query",
            "description": "Refers to the ID of the vaccine Product used for the Vaccination.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qty",
            "in": "query",
            "description": "Refers to the amount of product units administered.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "description": "Description and notes for the Vaccination.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_of_administration",
            "in": "query",
            "description": "The epoch time when the vaccine Product was administered.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_of_next_administration",
            "in": "query",
            "description": "The epoch time when the vaccine Product will next be administered.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limits the number of items returned.",
            "schema": {
              "type": "string",
              "default": 10
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Specifies the page number of the result.",
            "schema": {
              "type": "string",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of Vaccinations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "items_page": {
                          "type": "string"
                        },
                        "items_page_total": {
                          "type": "string"
                        },
                        "items_page_size": {
                          "type": "string"
                        },
                        "items_total": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "vaccination": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              },
                              "product_id": {
                                "type": "string"
                              },
                              "qty": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "notes": {
                                "type": "string"
                              },
                              "date_of_administration": {
                                "type": "string"
                              },
                              "date_of_next_administration": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "read-vaccination"
            ]
          }
        ]
      },
      "post": {
        "summary": "Create a new Vaccination",
        "operationId": "create-vaccination",
        "tags": [
          "Vaccination"
        ],
        "description": "Creates a new [`Vaccination`](#vaccination).",
        "parameters": [
          {
            "name": "vet_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID number used by the system to uniquely identify a [`Vet`](#vet)."
          },
          {
            "name": "animal_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the [`Animal`](#animal) that the vaccination is assigned to."
          },
          {
            "name": "consult_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the [`Consult`](#consult) related to the [`Vaccination`](#vaccination)."
          },
          {
            "name": "product_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Refers to the ID of the vaccine [`Product`](#product) used for the [`Vaccination`](#vaccination)."
          },
          {
            "name": "qty",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Refers to the amount of product units administered."
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Description for the [`Vaccination`](#vaccination)."
          },
          {
            "name": "notes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Notes for the [`Vaccination`](#vaccination)."
          },
          {
            "name": "date_of_administration",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The date that the [`Vaccination`](#vaccination) was administered."
          },
          {
            "name": "batch_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The batch ID for the product [`Vaccination`](#vaccination) (if applicable)."
          },
          {
            "name": "date_of_next_administration",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The date that the next [`Vaccination`](#vaccination) will be administered."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "transaction_id": {
                          "type": "string"
                        },
                        "timestamp": {
                          "type": "string"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "vaccination": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              },
                              "animal_id": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              },
                              "product_id": {
                                "type": "string"
                              },
                              "qty": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "notes": {
                                "type": "string"
                              },
                              "date_of_administration": {
                                "type": "string"
                              },
                              "batch_id": {
                                "type": "string"
                              },
                              "date_of_next_administration": {
                                "type": "string"
                              },
                              "sales_resource_id": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "write-vaccination"
            ]
          }
        ]
      }
    },
    "/v1/vaccination/{id}": {
      "patch": {
        "summary": "Update a Vaccination",
        "operationId": "update-vaccination",
        "tags": [
          "Vaccination"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "ID of the vaccination to update."
          },
          {
            "name": "vet_id",
            "in": "query",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            },
            "description": "The ID number used by the system to uniquely identify a Vet."
          },
          {
            "name": "animal_id",
            "in": "query",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            },
            "description": "Refers to the ID of the Animal that the vaccination is assigned to."
          },
          {
            "name": "consult_id",
            "in": "query",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            },
            "description": "Refers to the ID of the Consult related to the Vaccination."
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            },
            "description": "Refers to the ID of the vaccine Product used for the Vaccination."
          },
          {
            "name": "qty",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Refers to the amount of product units administered."
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Description for the Vaccination."
          },
          {
            "name": "notes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Notes for the Vaccination."
          },
          {
            "name": "date_of_administration",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The date that the Vaccination was administered."
          },
          {
            "name": "batch_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The batch ID for the product Vaccination (if applicable)."
          },
          {
            "name": "date_of_next_administration",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The date that the next Vaccination will be administered."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vaccination": {
                    "type": "object",
                    "properties": {
                      "notes": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful update",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "transaction_id": {
                          "type": "string"
                        },
                        "timestamp": {
                          "type": "string"
                        },
                        "items_matched": {
                          "type": "number"
                        },
                        "items_processed": {
                          "type": "number"
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "vaccination": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "active": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "modified_at": {
                                "type": "string"
                              },
                              "vet_id": {
                                "type": "string"
                              },
                              "animal_id": {
                                "type": "string"
                              },
                              "consult_id": {
                                "type": "string"
                              },
                              "product_id": {
                                "type": "string"
                              },
                              "qty": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "notes": {
                                "type": "string"
                              },
                              "date_of_administration": {
                                "type": "string"
                              },
                              "batch_id": {
                                "type": "string"
                              },
                              "date_of_next_administration": {
                                "type": "string"
                              },
                              "sales_resource_id": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "write-vaccination"
            ]
          }
        ]
      }
    },
    "/v2/eventgroup": {
      "get": {
        "security": [
          {
            "bearerAuth": [
              "read-eventgroup"
            ]
          }
        ],
        "summary": "Get event groups",
        "tags": [
          "Event Group"
        ],
        "operationId": "get-eventgroup",
        "parameters": [
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/uid"
          },
          {
            "$ref": "#/components/parameters/active"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/created_at"
          },
          {
            "$ref": "#/components/parameters/modified_at"
          },
          {
            "$ref": "#/components/parameters/socOnly"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of event groups.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "$ref": "#/components/schemas/MetaObject"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "eventgroup": {
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/ResourceObject"
                              },
                              {
                                "$ref": "#/components/schemas/EventGroup"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "messages": {
                      "$ref": "#/components/schemas/Messages"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v2/standardofcare": {
      "get": {
        "security": [
          {
            "bearerAuth": [
              "read-standardofcare"
            ]
          }
        ],
        "operationId": "get-standardofcare",
        "tags": [
          "Standard of Care"
        ],
        "summary": "Get standard of care events",
        "description": "Gets standard of care events",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Sets the number of items to be returned on each page. Min: 1, Max: 5000",
            "schema": {
              "type": "integer"
            },
            "example": 5000
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "example": 1
          },
          {
            "$ref": "#/components/parameters/modified_at"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of SOC events.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "$ref": "#/components/schemas/schemas_MetaObject"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "standardofcare": {
                            "$ref": "#/components/schemas/StandardOfCare"
                          }
                        }
                      }
                    },
                    "messages": {
                      "$ref": "#/components/schemas/schemas_Messages"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v2.1/standardofcare": {
      "get": {
        "summary": "List standard of care records",
        "description": "<p>Retrieve a paginated list of standard of care records.</p>\n<p>Filter by <code>animalId</code> or <code>animalUid</code> to retrieve records for a specific animal. Optionally filter by <code>modifiedAt</code> to retrieve records modified within a date range.</p>\n<p>The <code>limit</code> and <code>offset</code> parameters from v2 are not supported and return HTTP 400 if provided. Any unrecognised query parameter also returns HTTP 400.</p>\n<p>A transition v2.1 API for retrieving animal Standard of Care (SOC) care schedule records from ezyVet.</p>\n<p>This endpoint bridges the legacy v2 <code>standardofcare</code> endpoint and the future v4 SOC records API. It preserves the complete v2 field set and retains both integer <code>id</code> and string <code>uid</code> fields for all entity references to support a gradual migration from v2 integer IDs to v4 UIDs.</p>\n<h2>Key improvements over v2</h2>\n<ul>\n<li><strong>Token-based pagination</strong> (<code>nextToken</code>/<code>pageSize</code>) replaces <code>limit</code>/<code>offset</code> for significantly better query performance on large datasets.</li>\n<li><strong>camelCase field names</strong> aligned with v4 conventions.</li>\n<li><strong>ISO 8601 date strings</strong> replace Unix epoch timestamps.</li>\n<li><strong>v4-style response envelope</strong> (<code>{ meta, data, errors }</code>).</li>\n</ul>\n<p>The <code>limit</code> and <code>offset</code> query parameters from v2 are <strong>not supported</strong>. They return HTTP 400 if provided.</p>\n<h2>Migration from v2</h2>\n<table>\n<thead>\n<tr><th>v2 field</th><th>v2.1 field</th><th>Type change</th></tr>\n</thead>\n<tbody>\n<tr><td><code>id</code></td><td><code>id</code></td><td>—</td></tr>\n<tr><td><code>uid</code></td><td><code>uid</code></td><td>—</td></tr>\n<tr><td><code>calculated_at</code></td><td><code>modifiedAt</code></td><td>Unix int → ISO 8601 string (see note below)</td></tr>\n<tr><td><code>due_at</code></td><td><code>dueAt</code></td><td>Unix int → ISO 8601 string</td></tr>\n<tr><td><code>last_fulfilled_at</code></td><td><code>lastFulfilledAt</code></td><td>Unix int → ISO 8601 string</td></tr>\n<tr><td><code>deleted_at</code></td><td><code>deletedAt</code></td><td>Unix int → ISO 8601 string</td></tr>\n<tr><td><code>created_at</code></td><td><code>createdAt</code></td><td>Unix int → ISO 8601 string</td></tr>\n<tr><td><code>modified_at</code></td><td><code>modifiedAt</code></td><td>Unix int → ISO 8601 string</td></tr>\n<tr><td><code>animal_id</code></td><td><code>animalId</code></td><td>—</td></tr>\n<tr><td><code>animal_uid</code></td><td><code>animalUid</code></td><td>—</td></tr>\n<tr><td><code>soc_group_id</code></td><td><code>socGroupId</code></td><td>—</td></tr>\n<tr><td><code>soc_group_uid</code></td><td><code>socGroupUid</code></td><td>—</td></tr>\n<tr><td><code>soc_group_name</code></td><td><code>socGroupName</code></td><td>—</td></tr>\n<tr><td><code>soc_group_type</code></td><td><code>socGroupType</code></td><td>—</td></tr>\n<tr><td><code>ownership_id</code></td><td><code>ownershipId</code></td><td>—</td></tr>\n<tr><td><code>ownership_uid</code></td><td><code>ownershipUid</code></td><td>—</td></tr>\n</tbody>\n</table>\n<blockquote>\n<p><strong>Note on <code>calculated_at</code>:</strong> In the v2 API the <code>calculated_at</code> and <code>modified_at</code> fields were aliases for the same underlying database column. The v2.1 API exposes this as the single field <code>modifiedAt</code>. If you were filtering by <code>calculated_at</code> in v2, use <code>modifiedAt</code> in v2.1 — it is equivalent.</p>\n</blockquote>\n<h2>Pagination</h2>\n<p>On the first request, omit <code>nextToken</code>. Each response includes <code>meta.nextToken</code> when more pages exist. Pass that value as <code>nextToken</code> in the next request. When <code>meta</code> contains no <code>nextToken</code> property, you have reached the last page.</p>\n<h2>Date filter syntax</h2>\n<p>The <code>modifiedAt</code> filter accepts a JSON-encoded comparison object for range queries. Supported operators: <code>eq</code>, <code>lt</code>, <code>lte</code>, <code>gt</code>, <code>gte</code>.</p>\n<p>Example range query: <code>?modifiedAt={\"gte\":\"2025-01-01T00:00:00Z\"}</code></p>",
        "operationId": "get-standardofcare-v2-1",
        "x-implemented": false,
        "security": [
          {
            "bearerAuth": [
              "read-standardofcare"
            ]
          }
        ],
        "tags": [
          "Standard of Care"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/nextToken"
          },
          {
            "name": "animalId",
            "in": "query",
            "description": "Filter to records belonging to a specific animal by their integer ID. Maps to `animal_id` in v2. For v4 migration, prefer `animalUid`.\n",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "example": 10002
          },
          {
            "name": "animalUid",
            "in": "query",
            "description": "Filter to records belonging to a specific animal by their UID. Maps to `animal_uid` in v2.\n",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "animal_05fcXxlB28B442P3Xu8FK"
          },
          {
            "name": "modifiedAt",
            "in": "query",
            "description": "Filter by last modification timestamp. Accepts a JSON-encoded comparison object for range queries (e.g. `{\"gte\":\"2025-01-01T00:00:00Z\"}`). Supported operators: `eq`, `lt`, `lte`, `gt`, `gte`. Maps to `modified_at` in v2 (was a Unix timestamp comparison object).\n",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "{\"gte\":\"2025-01-01T00:00:00Z\"}"
          },
          {
            "name": "deletedAt",
            "in": "query",
            "description": "Filter by the soft-delete timestamp. By default only active (non-deleted) records are returned. Use this filter to retrieve soft-deleted records. Accepts a JSON-encoded comparison object (e.g. `{\"gt\":\"2025-01-01T00:00:00Z\"}`). Supported operators: `eq`, `lt`, `lte`, `gt`, `gte`. Maps to `deleted_at` in v2 (was a Unix timestamp comparison object).\n",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "{\"gt\":\"2025-01-01T00:00:00Z\"}"
          },
          {
            "name": "dueAt",
            "in": "query",
            "description": "Filter by the next due date of the care item. Accepts a JSON-encoded comparison object (e.g. `{\"lte\":\"2025-12-31T23:59:59Z\"}`). Supported operators: `eq`, `lt`, `lte`, `gt`, `gte`. Maps to `due_at` in v2 (was a Unix timestamp comparison object).\n",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "{\"lte\":\"2025-12-31T23:59:59Z\"}"
          },
          {
            "name": "lastFulfilledAt",
            "in": "query",
            "description": "Filter by the timestamp when the care item was last fulfilled. Accepts a JSON-encoded comparison object (e.g. `{\"gte\":\"2024-01-01T00:00:00Z\"}`). Supported operators: `eq`, `lt`, `lte`, `gt`, `gte`. Maps to `last_fulfilled_at` in v2 (was a Unix timestamp comparison object).\n",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "{\"gte\":\"2024-01-01T00:00:00Z\"}"
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of standard of care records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardOfCareListResponse"
                },
                "examples": {
                  "Example": {
                    "summary": "",
                    "value": {
                      "meta": {
                        "nextToken": "eyJpZCI6MTIzfQ"
                      },
                      "data": [
                        {
                          "id": 42,
                          "uid": "standardofcare_abc123xyz",
                          "deletedAt": null,
                          "dueAt": "2025-06-15T00:00:00Z",
                          "lastFulfilledAt": "2024-12-01T10:30:00Z",
                          "animalId": 10002,
                          "animalUid": "animal_05fcXxlB28B442P3Xu8FK",
                          "socGroupId": 5,
                          "socGroupUid": "socGroup_0fsqvgFud1Ayp71WiR8Ns",
                          "socGroupName": "Parvovirus",
                          "socGroupType": "Vaccine",
                          "ownershipId": 3,
                          "ownershipUid": "ownership_xyz456abc",
                          "createdAt": "2023-04-01T12:00:00Z",
                          "modifiedAt": "2025-01-15T10:00:00Z"
                        }
                      ],
                      "errors": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Returned when:\n- `limit` or `offset` parameters are provided (not supported in v2.1)\n- An unrecognised query parameter is provided\n- `pageSize` exceeds the maximum value\n- `nextToken` cannot be decoded\n- A date filter (`modifiedAt`, `deletedAt`, `dueAt`, `lastFulfilledAt`) conflicts with the value encoded in `nextToken`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "UnsupportedFilter": {
                    "summary": "Unrecognised or legacy parameter used",
                    "value": {
                      "errors": [
                        {
                          "id": "8954638926413656075_1",
                          "code": "UnsupportedFilter",
                          "target": "offset"
                        }
                      ]
                    }
                  },
                  "InvalidPageSize": {
                    "summary": "pageSize exceeds maximum",
                    "value": {
                      "errors": [
                        {
                          "id": "8954638926413656075_1",
                          "code": "InvalidPageSize"
                        }
                      ]
                    }
                  },
                  "InvalidPaginationCursor": {
                    "summary": "nextToken cannot be decoded",
                    "value": {
                      "errors": [
                        {
                          "id": "8954638926413656075_1",
                          "code": "InvalidPaginationCursor"
                        }
                      ]
                    }
                  },
                  "MismatchedPaginationParameters": {
                    "summary": "modifiedAt filter conflicts with nextToken",
                    "value": {
                      "errors": [
                        {
                          "id": "8954638926413656075_1",
                          "code": "MismatchedPaginationParameters"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid authentication token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Example": {
                    "summary": "",
                    "value": {
                      "errors": [
                        {
                          "id": "8954638926413656075_1",
                          "code": "Unauthorized"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Example": {
                    "summary": "",
                    "value": {
                      "errors": [
                        {
                          "id": "8954638926413656075_1",
                          "code": "NotFound"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity — request was well-formed but semantically invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Example": {
                    "summary": "",
                    "value": {
                      "errors": [
                        {
                          "id": "8954638926413656075_1",
                          "code": "UnprocessableEntity"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests — rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Example": {
                    "summary": "",
                    "value": {
                      "errors": [
                        {
                          "id": "8954638926413656075_1",
                          "code": "TooManyRequests"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Example": {
                    "summary": "",
                    "value": {
                      "errors": [
                        {
                          "id": "8954638926413656075_1",
                          "code": "InternalError"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
