VCPR.ORG Protocol Editor API (2.1.0)

Download OpenAPI specification:Download

API serving the Veterinary Protocol Manager™ application. © DairySight LLC, Argyle NY 2020

VOR

available to veterinarians.

loadEditor

load Protocol Editor

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

loadFarmApp

load Farm App

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

list of Users IDs

Returns the ID and names of all active Users of the type(s) specified.

Authorizations:
(apiKeyauthToken)
query Parameters
usertypes
Array of strings
Default: ["VOR"]

User types to include

Responses

Response samples

Content type
application/json
{
  • "vors": [
    ]
}

list of VORs

list of VOR users.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "vors": [
    ]
}

delete user

This endpoint supports the (reversible) "delete" of a User by setting user.status to REMOVED. Removed Users are not visible in normal queries.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer
Example: 5

User ID key

Responses

Response samples

Content type
application/json
{
  • "deleted": 0
}

create a sandbox user

Create a sandbox user of MOR UserType who is a CLIENT of logged-in VOR. This allows the VOR to prescribe to the sandbox client, then view prescriptions from the client's point of view using the Farm App.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
string

The username for the sandbox client. This must not match an existing User.username

Responses

Request samples

Content type
application/json
"string"

Response samples

Content type
application/json
{
  • "sandboxClient": "string"
}

delete sandboxClient

Delete the User and CLIENT Relation records from the database, irreversibly removing the sandbocx client, but not any existing Prescriptions.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "deleted": 0
}

add a relationship

adds a relationship of the type specified by name to the current User, who must be a VOR. Defaults to CLIENT relationship.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
string (Relationship)
Enum: "CLIENT" "EMPLOYEE" "MEMBER"

a link between two Users defining a relationship:

  • CLIENT: MOR User on right is a client of VOR User on left
  • EMPLOYEE: TOR User on right is an employee of MOR User on left
  • MEMBER: VOR User on right is a member of CLINIC on left, or MOR User on right is a manager of FARM on left

Responses

Request samples

Content type
application/json
"CLIENT"

Response samples

Content type
application/json
"string"

get my right-related users

get my right-related users

Authorizations:
(apiKeyauthToken)
query Parameters
relationship
string (Relationship)
Enum: "CLIENT" "EMPLOYEE" "MEMBER"
Example: relationship=CLIENT

a link between two Users defining a relationship:

  • CLIENT: MOR User on right is a client of VOR User on left
  • EMPLOYEE: TOR User on right is an employee of MOR User on left
  • MEMBER: VOR User on right is a member of CLINIC on left, or MOR User on right is a manager of FARM on left
withAddress
boolean
Default: false

whether to return user's addresses too

Responses

Response samples

Content type
application/json
{
  • "prescriptions": [
    ]
}

add a User with relationship

This endpoint adds a User and a relationship of the type specified by name to the current User, who must be a VOR. Defaults to CLIENT relationship.

Authorizations:
(apiKeyauthToken)
query Parameters
relationship
required
string (Relationship)
Enum: "CLIENT" "EMPLOYEE" "MEMBER"
Example: relationship=CLIENT

a link between two Users defining a relationship:

  • CLIENT: MOR User on right is a client of VOR User on left
  • EMPLOYEE: TOR User on right is an employee of MOR User on left
  • MEMBER: VOR User on right is a member of CLINIC on left, or MOR User on right is a manager of FARM on left
usertype
required
string (UserType)
Enum: "SAOR" "VOR" "MOR" "TOR" "FARM" "CLINIC" "UNCONFIRMED" "PREVOR" "UNVOR" "UNMOR" "REMOVED"
Example: usertype=VOR

an ordered list of User types associated with privilege levels:

  • SAOR: a system administrator with top level privileges
  • VOR: a veterinarian who may create and prescribe protocols
  • MOR: a farm manager to whom protocols may be prescribed, and who may create Cases in a protocol
  • TOR: a farm technician who may execute assigned protocols for assigned cases
  • FARM: an account aggregating MOR and TOR Users
  • CLINIC: an account aggregating multiple VOR Users who work together
  • UNCONFIRMED: an account that has been requested but not confirmed by the owner
  • UNVOR: a User who requests VOR status, with neither email or admin approval
  • UNMOR: a User who requests MOR status but email not yet confirmed
  • PREVOR: a confirmed User who requests VOR status but still lacks either email confirmation or approval by admin
  • REMOVED: the record of a User who is no longer active and may not log in
Request Body schema: application/json
id
integer (UserNumber)

Long integer key to a User

uname
required
string >= 7 characters

username

userType
required
string (UserType)
Enum: "SAOR" "VOR" "MOR" "TOR" "FARM" "CLINIC" "UNCONFIRMED" "PREVOR" "UNVOR" "UNMOR" "REMOVED"

an ordered list of User types associated with privilege levels:

  • SAOR: a system administrator with top level privileges
  • VOR: a veterinarian who may create and prescribe protocols
  • MOR: a farm manager to whom protocols may be prescribed, and who may create Cases in a protocol
  • TOR: a farm technician who may execute assigned protocols for assigned cases
  • FARM: an account aggregating MOR and TOR Users
  • CLINIC: an account aggregating multiple VOR Users who work together
  • UNCONFIRMED: an account that has been requested but not confirmed by the owner
  • UNVOR: a User who requests VOR status, with neither email or admin approval
  • UNMOR: a User who requests MOR status but email not yet confirmed
  • PREVOR: a confirmed User who requests VOR status but still lacks either email confirmation or approval by admin
  • REMOVED: the record of a User who is no longer active and may not log in
email
string <email>

email address

firstname
required
string >= 2 characters

first name

lastname
required
string >= 2 characters

last name

suffix
string

degree or qualifier following the name

phone
string <string>

phone number

Responses

Request samples

Content type
application/json
{
  • "id": 99,
  • "uname": "exampleUser",
  • "userType": "VOR",
  • "email": "exampleUser@email.com",
  • "firstname": "Example",
  • "lastname": "User",
  • "suffix": "DVM",
  • "phone": "string"
}

Response samples

Content type
application/json
{
  • "user": {
    }
}

get my prescriptions

get prescriptions prescribed by the current User.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "prescriptions": [
    ],
  • "of": 0
}

get prescriptions prescribed to me

get prescriptions prescribed to the current User.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "prescriptions": [
    ],
  • "of": 0
}

get my protocol shares

This endpoint retrieves a User's Protocol shares, optionally filtered by Protocol and recipient.

Authorizations:
(apiKeyauthToken)
query Parameters
pxFilter
integer

select only shares of this Protocol ID

toFilter
integer

select only shares to this VOR User

Responses

Response samples

Content type
application/json
{
  • "shares": [
    ]
}

create protocol share

This endpoint shares a protocol with another VOR User.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
pxId
integer

the id identifier of a Protocol

shareTo
integer

ID f a VOR User who may use the Protocol identified by pxId

clonable
boolean
Default: false

whether User identified by shareTo has permission to create a clone and modify the clone

Responses

Request samples

Content type
application/json
{
  • "pxId": 1,
  • "shareTo": 2,
  • "clonable": true
}

Response samples

Content type
application/json
{
  • "shared": 1
}

delete protocol share

This endpoint retracts a Protocol share with another VOR User.

Authorizations:
(apiKeyauthToken)
query Parameters
pxId
required
integer

Protocol ID

toVor
required
integer

ID of VOR to whom Protocol was shared

Responses

Response samples

Content type
application/json
{
  • "un-shared": 0
}

list of User's shared protocols

This endpoint retrieves a list of User's protocols shared to all VORs.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "shares": [
    ]
}

share Protocol with all VOR Users

This endpoint shares a User's protocol with all VOR Users.

Authorizations:
(apiKeyauthToken)
path Parameters
pxId
required
integer

ID of Protocol to be shared

query Parameters
clonable
boolean

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

cancel sharing

wip -- This endpoint probably unshares protocols to all.

Authorizations:
(apiKeyauthToken)
path Parameters
pxId
required
integer
Example: 1

ID of Protocol

Responses

AMDUCA-tag protocol

add tags to protocol per AMDUCA rules

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
integer <int64>

key value created by the database. If zero or null a new record will be created.

ownerId
required
integer

the id key of the VOR User who owns the protocol.

ownerName
required
string

the name of the VOR User who owns the protocol.

name
required
string

descriptive name of the protocol

shortname
string

short name for protocol

created
string <date-time>

ISO-8601-formatted datetime added by the server when a Protocol is first saved

edited
string <date-time>

ISO-8601-formatted datetime updated by the server whenever a Protocol is saved

status
required
string (ProtocolStatus)
Enum: "PRESCRIBED" "VALIDATED" "INITIATED" "DEPRECATED" "RECALLED" "DECLINED" "UNKNOWN"

status markers for protocols, in order of normal usage flow:

  • UNKNOWN: initial status when a protocol is being designed
  • VALIDATED: currently not used, for use when a validation process is implemented
  • PRESCRIBED: after a protocol has been prescribed for at least one client
  • INITIATED: after a protocol has been initiated (i.e., has one or more Cases)
  • RECALLED: protocol may no longer be prescribed and existing prescriptions are recalled
  • DEPRECATED: protocol has been "deleted" by the owner
vetNote
string

note visible only to the prescribing vet

wtMeatHrs
number

number of hours that must pass between exposure and slaughter

wtMilkHrs
number

number of hours that must pass between exposure and extracting milk for consumption

required
object (Instructions)

instructions to execute a protocol

shareAll
boolean
Default: false

share this protocol with all other vets using the system?

shareClonable
boolean
Default: false

when shared to another vet, may the recipient create and alter a clone?

object (CaseDefinition)

information used at the time of case selection to determine whether a particular protocol may be enrolled and the protocol initiated for a particular animal or group of animals (the Case). The Case may be enrolled with the Protocol only if the Case meets all requirements of the CaseDefinition and none of the prohibitions. Other information may be advisory, and used at the discretion of the person doing enrollment.

Array of objects (Treatment)

treatments used in this protocol

Array of objects (Tag)

keywords for classification

Array of objects (Diagnosis)

diagnostic classifiers

Array of objects (Eligibility)

eligibility criteria for potential cases

Array of objects (Promise)

wip

Array of objects (Metadata)

Responses

Request samples

Content type
application/json
{
  • "id": 12345,
  • "ownerId": 1,
  • "ownerName": 1,
  • "name": "wip",
  • "shortname": "wip",
  • "created": "2020-01-10T10:30:37Z",
  • "edited": "2020-02-10T10:30:37Z",
  • "status": "PRESCRIBED",
  • "vetNote": "consider prescribing protocol x instead",
  • "wtMeatHrs": 22,
  • "wtMilkHrs": 5,
  • "instructions": {
    },
  • "shareAll": true,
  • "shareClonable": true,
  • "caseDefinition": {
    },
  • "treatments": [
    ],
  • "tags": [
    ],
  • "diagnoses": [
    ],
  • "eligibilities": [
    ],
  • "promises": [
    ],
  • "metadata": [
    ]
}

Response samples

Content type
application/json
{
  • "protocol": {
    }
}

list of all Tags

Returns the full array of tags for protocols and treatments.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "tags": [
    ]
}

executeRemedy

Apply a Remedy to a Protocol, returning the fixed Protocol.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
object (Protocol)

a veterinary treatment protocol

any (Remedy)

directions for a proposed solution to a problem

Responses

Request samples

Content type
application/json
{
  • "protocol": {
    },
  • "remedy": {
    }
}

Response samples

Content type
application/json
{
  • "id": 12345,
  • "ownerId": 1,
  • "ownerName": 1,
  • "name": "wip",
  • "shortname": "wip",
  • "created": "2020-01-10T10:30:37Z",
  • "edited": "2020-02-10T10:30:37Z",
  • "status": "PRESCRIBED",
  • "vetNote": "consider prescribing protocol x instead",
  • "wtMeatHrs": 22,
  • "wtMilkHrs": 5,
  • "instructions": {
    },
  • "shareAll": true,
  • "shareClonable": true,
  • "caseDefinition": {
    },
  • "treatments": [
    ],
  • "tags": [
    ],
  • "diagnoses": [
    ],
  • "eligibilities": [
    ],
  • "promises": [
    ],
  • "metadata": [
    ]
}

list of Promises

VOR users have access to a set of public promises plus any Promises they have created for their own use.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "promises": [
    ]
}

create a private Promise

Create a Promise type that will be private (available only to the VOR recording it)

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
_type
required
string
Enum: "models.AffirmationPromise" "models.BooleanPromise" "models.StringPromise" "models.NumberPromise" "models.MassPromise" "models.CategoryPromise"

Class of Promise

id
integer

database primary key

ownerId
integer
Default: null

id of VOR user with exclusive access to this Promise. If null, Promise is available to all users.

name
required
string >= 8 characters

a short name

descrip
string <html>

html description describing in detail what must be done to complete the Promise

when
required
string <duration>
Default: "PT0H"

ISO-8601 duration from initiation when promise must be fulfilled

query
required
string <html>

A question the user must answer.

Responses

Request samples

Content type
application/json
{
  • "_type": "models.AffirmationPromise",
  • "id": 2345,
  • "ownerId": 123,
  • "name": "ID promise",
  • "descrip": "You must give ID for each case enrolled",
  • "when": "PT24H",
  • "query": "What is the animal's name or ID?"
}

Response samples

Content type
application/json
{
  • "promise": {
    }
}

get a Promise

get a Promise

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer
Example: 32

promise ID

Responses

Response samples

Content type
application/json
{
  • "_type": "models.AffirmationPromise",
  • "id": 2345,
  • "ownerId": 123,
  • "name": "ID promise",
  • "descrip": "You must give ID for each case enrolled",
  • "when": "PT24H",
  • "query": "What is the animal's name or ID?"
}

send a message to another user

send a message to another user

Authorizations:
(apiKeyauthToken)
query Parameters
modes
Array of strings (MessageMode)
Items Value: "EMAIL"
Example: modes=EMAIL

Mode(s) or channel(s) to use in messaging, defaulting to EMAIL

Request Body schema: application/json
_type
required
string

identifies the UserMessage subtype

from
required
integer (UserNumber)

Long integer key to a User

to
required
integer (UserNumber)

Long integer key to a User

subject
required
string

subject line for the message

message
required
string <html>

the message

detail
string <html>

Responses

Request samples

Content type
application/json
Example
{
  • "_type": "models.SimpleMessage",
  • "from": 99,
  • "to": 99,
  • "subject": "string",
  • "message": "Hello <b>world</b>",
  • "detail": "string"
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

protocols owned by user

Retrieve all Protocols owned by, or shared with, the current User. The default excludes deleted (status DEPRECATED) protocols.

Authorizations:
(apiKeyauthToken)
query Parameters
statuses
string
Example:

filter Protocols to include only Protocols with listed statuses. If this parameter is omitted, the query defaults to all status values except DEPRECATED.

tags
string
Example:

filter Protocols to include only Protocols with at least one of the tags listed.

offset
integer
Default: 0

page start

limit
integer
Default: 20

maximum page length

Responses

Response samples

Content type
application/json
{
  • "protocols": [
    ],
  • "of": 0
}

record and validate aprotocol

This endpoint saves and validates a Protocol.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
integer <int64>

key value created by the database. If zero or null a new record will be created.

ownerId
required
integer

the id key of the VOR User who owns the protocol.

ownerName
required
string

the name of the VOR User who owns the protocol.

name
required
string

descriptive name of the protocol

shortname
string

short name for protocol

created
string <date-time>

ISO-8601-formatted datetime added by the server when a Protocol is first saved

edited
string <date-time>

ISO-8601-formatted datetime updated by the server whenever a Protocol is saved

status
required
string (ProtocolStatus)
Enum: "PRESCRIBED" "VALIDATED" "INITIATED" "DEPRECATED" "RECALLED" "DECLINED" "UNKNOWN"

status markers for protocols, in order of normal usage flow:

  • UNKNOWN: initial status when a protocol is being designed
  • VALIDATED: currently not used, for use when a validation process is implemented
  • PRESCRIBED: after a protocol has been prescribed for at least one client
  • INITIATED: after a protocol has been initiated (i.e., has one or more Cases)
  • RECALLED: protocol may no longer be prescribed and existing prescriptions are recalled
  • DEPRECATED: protocol has been "deleted" by the owner
vetNote
string

note visible only to the prescribing vet

wtMeatHrs
number

number of hours that must pass between exposure and slaughter

wtMilkHrs
number

number of hours that must pass between exposure and extracting milk for consumption

required
object (Instructions)

instructions to execute a protocol

shareAll
boolean
Default: false

share this protocol with all other vets using the system?

shareClonable
boolean
Default: false

when shared to another vet, may the recipient create and alter a clone?

object (CaseDefinition)

information used at the time of case selection to determine whether a particular protocol may be enrolled and the protocol initiated for a particular animal or group of animals (the Case). The Case may be enrolled with the Protocol only if the Case meets all requirements of the CaseDefinition and none of the prohibitions. Other information may be advisory, and used at the discretion of the person doing enrollment.

Array of objects (Treatment)

treatments used in this protocol

Array of objects (Tag)

keywords for classification

Array of objects (Diagnosis)

diagnostic classifiers

Array of objects (Eligibility)

eligibility criteria for potential cases

Array of objects (Promise)

wip

Array of objects (Metadata)

Responses

Request samples

Content type
application/json
{
  • "id": 12345,
  • "ownerId": 1,
  • "ownerName": 1,
  • "name": "wip",
  • "shortname": "wip",
  • "created": "2020-01-10T10:30:37Z",
  • "edited": "2020-02-10T10:30:37Z",
  • "status": "PRESCRIBED",
  • "vetNote": "consider prescribing protocol x instead",
  • "wtMeatHrs": 22,
  • "wtMilkHrs": 5,
  • "instructions": {
    },
  • "shareAll": true,
  • "shareClonable": true,
  • "caseDefinition": {
    },
  • "treatments": [
    ],
  • "tags": [
    ],
  • "diagnoses": [
    ],
  • "eligibilities": [
    ],
  • "promises": [
    ],
  • "metadata": [
    ]
}

Response samples

Content type
application/json
{
  • "protocol": {
    }
}

update protocol

This endpoint updates and validates a Protocol.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
integer <int64>

key value created by the database. If zero or null a new record will be created.

ownerId
required
integer

the id key of the VOR User who owns the protocol.

ownerName
required
string

the name of the VOR User who owns the protocol.

name
required
string

descriptive name of the protocol

shortname
string

short name for protocol

created
string <date-time>

ISO-8601-formatted datetime added by the server when a Protocol is first saved

edited
string <date-time>

ISO-8601-formatted datetime updated by the server whenever a Protocol is saved

status
required
string (ProtocolStatus)
Enum: "PRESCRIBED" "VALIDATED" "INITIATED" "DEPRECATED" "RECALLED" "DECLINED" "UNKNOWN"

status markers for protocols, in order of normal usage flow:

  • UNKNOWN: initial status when a protocol is being designed
  • VALIDATED: currently not used, for use when a validation process is implemented
  • PRESCRIBED: after a protocol has been prescribed for at least one client
  • INITIATED: after a protocol has been initiated (i.e., has one or more Cases)
  • RECALLED: protocol may no longer be prescribed and existing prescriptions are recalled
  • DEPRECATED: protocol has been "deleted" by the owner
vetNote
string

note visible only to the prescribing vet

wtMeatHrs
number

number of hours that must pass between exposure and slaughter

wtMilkHrs
number

number of hours that must pass between exposure and extracting milk for consumption

required
object (Instructions)

instructions to execute a protocol

shareAll
boolean
Default: false

share this protocol with all other vets using the system?

shareClonable
boolean
Default: false

when shared to another vet, may the recipient create and alter a clone?

object (CaseDefinition)

information used at the time of case selection to determine whether a particular protocol may be enrolled and the protocol initiated for a particular animal or group of animals (the Case). The Case may be enrolled with the Protocol only if the Case meets all requirements of the CaseDefinition and none of the prohibitions. Other information may be advisory, and used at the discretion of the person doing enrollment.

Array of objects (Treatment)

treatments used in this protocol

Array of objects (Tag)

keywords for classification

Array of objects (Diagnosis)

diagnostic classifiers

Array of objects (Eligibility)

eligibility criteria for potential cases

Array of objects (Promise)

wip

Array of objects (Metadata)

Responses

Request samples

Content type
application/json
{
  • "id": 12345,
  • "ownerId": 1,
  • "ownerName": 1,
  • "name": "wip",
  • "shortname": "wip",
  • "created": "2020-01-10T10:30:37Z",
  • "edited": "2020-02-10T10:30:37Z",
  • "status": "PRESCRIBED",
  • "vetNote": "consider prescribing protocol x instead",
  • "wtMeatHrs": 22,
  • "wtMilkHrs": 5,
  • "instructions": {
    },
  • "shareAll": true,
  • "shareClonable": true,
  • "caseDefinition": {
    },
  • "treatments": [
    ],
  • "tags": [
    ],
  • "diagnoses": [
    ],
  • "eligibilities": [
    ],
  • "promises": [
    ],
  • "metadata": [
    ]
}

Response samples

Content type
application/json
{
  • "protocol": {
    }
}

This endpoint validates a protocol without saving it.

This endpoint validates a protocol for prescribing without saving it. It should only be called if the user wants to prescribe a protocol without saving changes. The endpoints to save or update protocols automatically include validation.4

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
integer <int64>

key value created by the database. If zero or null a new record will be created.

ownerId
required
integer

the id key of the VOR User who owns the protocol.

ownerName
required
string

the name of the VOR User who owns the protocol.

name
required
string

descriptive name of the protocol

shortname
string

short name for protocol

created
string <date-time>

ISO-8601-formatted datetime added by the server when a Protocol is first saved

edited
string <date-time>

ISO-8601-formatted datetime updated by the server whenever a Protocol is saved

status
required
string (ProtocolStatus)
Enum: "PRESCRIBED" "VALIDATED" "INITIATED" "DEPRECATED" "RECALLED" "DECLINED" "UNKNOWN"

status markers for protocols, in order of normal usage flow:

  • UNKNOWN: initial status when a protocol is being designed
  • VALIDATED: currently not used, for use when a validation process is implemented
  • PRESCRIBED: after a protocol has been prescribed for at least one client
  • INITIATED: after a protocol has been initiated (i.e., has one or more Cases)
  • RECALLED: protocol may no longer be prescribed and existing prescriptions are recalled
  • DEPRECATED: protocol has been "deleted" by the owner
vetNote
string

note visible only to the prescribing vet

wtMeatHrs
number

number of hours that must pass between exposure and slaughter

wtMilkHrs
number

number of hours that must pass between exposure and extracting milk for consumption

required
object (Instructions)

instructions to execute a protocol

shareAll
boolean
Default: false

share this protocol with all other vets using the system?

shareClonable
boolean
Default: false

when shared to another vet, may the recipient create and alter a clone?

object (CaseDefinition)

information used at the time of case selection to determine whether a particular protocol may be enrolled and the protocol initiated for a particular animal or group of animals (the Case). The Case may be enrolled with the Protocol only if the Case meets all requirements of the CaseDefinition and none of the prohibitions. Other information may be advisory, and used at the discretion of the person doing enrollment.

Array of objects (Treatment)

treatments used in this protocol

Array of objects (Tag)

keywords for classification

Array of objects (Diagnosis)

diagnostic classifiers

Array of objects (Eligibility)

eligibility criteria for potential cases

Array of objects (Promise)

wip

Array of objects (Metadata)

Responses

Request samples

Content type
application/json
{
  • "id": 12345,
  • "ownerId": 1,
  • "ownerName": 1,
  • "name": "wip",
  • "shortname": "wip",
  • "created": "2020-01-10T10:30:37Z",
  • "edited": "2020-02-10T10:30:37Z",
  • "status": "PRESCRIBED",
  • "vetNote": "consider prescribing protocol x instead",
  • "wtMeatHrs": 22,
  • "wtMilkHrs": 5,
  • "instructions": {
    },
  • "shareAll": true,
  • "shareClonable": true,
  • "caseDefinition": {
    },
  • "treatments": [
    ],
  • "tags": [
    ],
  • "diagnoses": [
    ],
  • "eligibilities": [
    ],
  • "promises": [
    ],
  • "metadata": [
    ]
}

Response samples

Content type
application/json
{
  • "protocol": {
    }
}

list of all eligibilities

This endpoint returns an array of Eligibilities from which a User may choose. The ID field is authoritative, i.e., is all that is needed to identify a particular Eligibility.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "eligibilities": [
    ]
}

list of fda species

"Species" is the term FDA uses to describe a class of animals in a label claim.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "eligibilities": [
    ]
}

list of all diagnoses

Returns an array of all coded Diagnoses known to the system.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "diagnoses": [
    ]
}

list of library protocols

This endpoint retrieves all protocols owned by, or shared with, the current User.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "protocols": [
    ],
  • "of": 0
}

list of all diagnoses

returns an array of Pxes .

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "diagnoses": [
    ]
}

validate a structured Dosage

validate a Dosage with SizeFunction and SequewnceFunction returning an test '_dose" description.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
any (SequenceFunction)

function to calculate times for a series of doses

any (SizeFunction)

function to calculate dose size

Responses

Request samples

Content type
application/json
{
  • "sequenceFunction": {
    },
  • "sizeFunction": {
    }
}

Response samples

Content type
application/json
{
  • "_dose": "string"
}

list of library pxes

This endpoint returns all the Protocols owned by, or shared with, the current User.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "pxes": [
    ]
}

retrieve protocol by ID

This endpoint retrieves a Protocol by protocol.id.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer
Example: 7

Protocol ID key

Responses

Response samples

Content type
{
  • "protocol": {
    }
}

delete protocol

Change protocol.status to DELETED (this does not actually remove it from the database).

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer

Protocol ID key

Responses

Response samples

Content type
application/json
{
  • "deprecated": 0
}

list of all diagnoses

This

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "diagnoses": [
    ]
}

Prescribe a Protocol to a client

create a Prescription and email it if requested

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
required
object (Protocol)

a veterinary treatment protocol

morId
required
integer

ID of MOR this is prescribed for

refills
integer
Default: 0

number of repeats for this prescription

expiration
string <date-time>

expiration date

emailToClient
boolean

email PDF of prescription to client

emailToVOR
boolean

email PDF of prescription to precribing doctor

Array of objects (Metadata)
status
string (PrescriptionStatus)
Enum: "REQUESTED" "PRESCRIBED" "VALIDATED" "INITIATED" "DEPRECATED" "RECALLED" "DECLINED" "UNKNOWN"

status markers for prescriptions, in order of normal usage flow:

  • UNKNOWN: initial status when a protocol is being designed
  • VALIDATED: currently not used, for use when a validation process is implemented
  • REQUESTED:
  • PRESCRIBED: after a protocol has been prescribed for at least one client
  • INITIATED: after a protocol has been initiated (i.e., has one or more Cases)
  • RECALLED: protocol may no longer be prescribed and existing prescriptions are recalled
  • DEPRECATED: protocol has been "deleted" by the owner

Responses

Request samples

Content type
application/json
{
  • "protocol": {
    },
  • "morId": 2,
  • "refills": 0,
  • "expiration": "2021-01-10T10:30:37Z",
  • "emailToClient": true,
  • "emailToVOR": true,
  • "metadata": [
    ],
  • "status": "PRESCRIBED"
}

Response samples

Content type
application/json
{
  • "prescription": {
    },
  • "pdfError": {
    }
}

list of all diagnoses

returns an array of Prescriptions

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer

Protocol ID key

Responses

Response samples

Content type
application/json
{
  • "diagnoses": [
    ]
}

retrieve prescription by ID

Retrieve a Prescription by prescription.id.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
string
Example: Vi1y9kbpEj7Upqy7

Prescription ID key

Responses

Response samples

Content type
{
  • "prescription": {
    }
}

list of all labelclaims

This endpoint returns the full array of drug labels.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "labels": [
    ]
}

labelclaim

Return specified labelclaim.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer
Example: 32

labelclaim ID

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "fdaSpecies": [
    ],
  • "diagnosis": "pain (colic), symptomatic treatment",
  • "dxId": 2002,
  • "product": "Prevail™ Flunixin Meglumine Injection",
  • "productId": 1315018,
  • "_dose": "3.0 ml per kg repeat in 6 hours and again in 24 hours",
  • "route": "intr-corporeal",
  • "sequenceFunction": {
    },
  • "sizeFunction": {
    },
  • "doseNote": "THis can contain <b>html</b> tags",
  • "wtMeatHrs": 22,
  • "wtMilkHrs": 5,
  • "wtNote": "not for dairy animals",
  • "ndc": "200-308",
  • "generic": "OXYTETRACYCLINE",
  • "isRx": true
}

package insert

Retrieve the product package insert.

Authorizations:
(apiKeyauthToken)
path Parameters
lxId
required
integer
Example: 32

label ID

Responses

Response samples

Content type
application/json
"string"

get detail of a Greenbook Drug as a link

This

Authorizations:
(apiKeyauthToken)
path Parameters
ndc
required
string
Example: 0010-3832

unique hyphenated number with up to 10 digits in 2 or 3 segments as labelerCode-productCode-packageCode. packageCode may not be needed.

Responses

get detail of a Greenbook Drug as a link

This

Authorizations:
(apiKeyauthToken)
path Parameters
ndc
required
string
Example: 0010-3495

unique hyphenated number with up to 10 digits in 2 or 3 segments as labelerCode-productCode-packageCode. packageCode may not be needed.

image
required
string
Example: 601588-image-fake.jpg

name of image file

Responses

Response samples

Content type
application/json
"string"

retrieve prescription by ID

Retrieve a Prescription by prescription.id.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
string
Example: Vi1y9kbpEj7Upqy7

Prescription ID key

Responses

Response samples

Content type
{
  • "prescription": {
    }
}

recall or decline a prescription

Prescriptions are immutable except for metadata, and cannot actually be deleted. This endpoint makes a prescription unavailable for use. If called by the VOR, it sets staus to RECALLED. If called by the MOR to whom it is prescribed, it sets status to DECLINED. New cases cannot be enrolled if either RECALLED or DECLIENED.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
string
Example: Vi1y9kbpEj7Upqy7

Prescription ID key

Responses

Response samples

Content type
application/json
{
  • "updated": 0
}

enroll case, deprecated in favor of POST /api/cases2 which will be moved to this path eventually

Creates a Case linked to a prescription.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
required
integer <int64>
Default: null

Case ID number

rxId
required
string

UUID identifying the prescription

animalId
required
string
initiationTime
required
string <date-time>
note
string
morId
integer
required
any (CaseData)

data for an individual Case

Responses

Request samples

Content type
application/json
{
  • "id": 123,
  • "rxId": "gG3pBCR1GCMKm89c",
  • "animalId": "Bossie34",
  • "initiationTime": "2019-08-24T14:15:22Z",
  • "note": "string",
  • "morId": 0,
  • "caseData": {
    }
}

Response samples

Content type
application/json
{
  • "case": {
    }
}

list of cases

Get all current cases for this user

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "cases": [
    ]
}

enroll Case returning tasks

Enrolls a Case from its Prescription and generates DoseTasks, Promise tasks, and Withhold as specified in the Protocol.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
required
integer <int64>
Default: null

Case ID number

rxId
required
string

UUID identifying the prescription

animalId
required
string
initiationTime
required
string <date-time>
note
string
morId
integer
required
any (CaseData)

data for an individual Case

Responses

Request samples

Content type
application/json
{
  • "id": 123,
  • "rxId": "gG3pBCR1GCMKm89c",
  • "animalId": "Bossie34",
  • "initiationTime": "2019-08-24T14:15:22Z",
  • "note": "string",
  • "morId": 0,
  • "caseData": {
    }
}

Response samples

Content type
application/json
{
  • "case": {
    }
}

get history for a single Case (with tasks)

Case plus tasks generated for the Case plus any data returned on task execution

Authorizations:
(apiKeyauthToken)
path Parameters
caseId
required
integer

ID number of Case

Responses

Response samples

Content type
application/json
{
  • "caseHx": {
    }
}

prescriptions with cases

A filtered list of Prescriptions with Cases enrolled to each.

Authorizations:
(apiKeyauthToken)
query Parameters
vorId
integer

ID number of prescribing VOR

morId
integer

ID number of MOR prescribed to

protocolId
integer

ID number of protocol prescribed

enrolledBefore
string <date-time>
Example: enrolledBefore=2020-01-10T22:20:39Z

last date limit for Case enrollment

enrolledAfter
string <date-time>
Example: enrolledAfter=2019-01-10T22:20:39Z

earliest date limit for Case enrollment

offset
integer
Default: 0

page start

limit
integer
Default: 20

maximum page length

Responses

Response samples

Content type
application/json
{
  • "rxesWithCases": [
    ],
  • "of": 0
}

list of cases for a rx

Get all current cases for this prescription and this user

Authorizations:
(apiKeyauthToken)
path Parameters
rxId
required
string
Example: Vi1y9kbpEj7Upqy7

prescription uuid

Responses

Response samples

Content type
application/json
{
  • "cases": [
    ]
}

execute task

Mark task status as completed

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
promId
required
integer <int64>

ID of Promise

any (PData)

a task

_type
required
string

identifies the task subtype as shown in the AnimalTask discriminator mapping, like models.DoseTask

id
required
integer <int64>

PTask ID number

caseId
required
integer <int64>

ID number of Case that includes this task

morId
required
integer <int64>

ID of MOR user responsible for execution of this task

vorId
required
integer <int64>

ID of VOR prescribing the task

animalId
string

ID of animal to which the task applies

doAt
required
string <date-time>

ISO-8601-formatted datetime when the task should be executed

executor
integer <int64>

ID of Person who should execute the task

status
required
string (TaskStatus)
Enum: "REQUIRED" "SUGGESTED" "DUE" "OPTIONAL" "OVERDUE" "CANCELLED" "REJECTED" "RECALLED" "EXECUTED" "UNKNOWN"

task status

Responses

Request samples

Content type
application/json
Example
{
  • "promId": 123,
  • "data": {
    },
  • "_type": "models.PTask",
  • "id": 123,
  • "caseId": 123,
  • "morId": 123,
  • "vorId": 123,
  • "animalId": "this",
  • "doAt": "2020-01-10T10:30:37Z",
  • "executor": 123,
  • "status": "REQUIRED"
}

Response samples

Content type
application/json
{
  • "case": {
    }
}

list of cases by Rx

Get all current cases for this Rx

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "cases": [
    ]
}

get Greenbook Drug summary by NDC pattern

This endpoint returns the summary listing of a Greenbook Drug by NDC pattern.

Authorizations:
(apiKeyauthToken)
query Parameters
ndcProd
integer

first section labeler code of a NDC

ndcLabeler
integer

mid section product code of a NDC

ndcBrand
integer

end section package code of a NDC

Responses

Response samples

Content type
application/json
[
  • {
    }
]

get summary listing of a Greenbook Drug

This endpoint returns the summary listing of a Greenbook Drug by ndc identifier.

Authorizations:
(apiKeyauthToken)
path Parameters
ndc
required
string
Example: 0061-4321-03

unique 10-digit, 3-segment number. labelerCode-productCode-packageCode

Responses

Response samples

Content type
{
  • "id": 0,
  • "companyId": 0,
  • "nada": "string",
  • "name": "string",
  • "imageURL": "string",
  • "insertURL": "string"
}

getSPL

Authorizations:
(apiKeyauthToken)
path Parameters
ndc
required
string
Example: 0061-4321-03

unique 10-digit, 3-segment number. labelerCode-productCode-packageCode

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

record an image

REcords link for loading an image.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
required
integer
link
required
string
thumbnail
string
keywords
Array of strings
name
required
string <= 80 characters

description of image

required
object (ImageStore)

An online source for images

Responses

Request samples

Content type
application/json
{
  • "id": 888,
  • "link": "string",
  • "thumbnail": "string",
  • "keywords": [
    ],
  • "name": "string",
  • "store": {
    }
}

Response samples

Content type
application/json
{
  • "case": {
    }
}

MOR

available to farm managers.

loadFarmApp

load Farm App

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

withholds

get withholds that include present or future time.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "labels": [
    ]
}

get a Promise

get a Promise

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer
Example: 32

promise ID

Responses

Response samples

Content type
application/json
{
  • "_type": "models.AffirmationPromise",
  • "id": 2345,
  • "ownerId": 123,
  • "name": "ID promise",
  • "descrip": "You must give ID for each case enrolled",
  • "when": "PT24H",
  • "query": "What is the animal's name or ID?"
}

send a message to another user

send a message to another user

Authorizations:
(apiKeyauthToken)
query Parameters
modes
Array of strings (MessageMode)
Items Value: "EMAIL"
Example: modes=EMAIL

Mode(s) or channel(s) to use in messaging, defaulting to EMAIL

Request Body schema: application/json
_type
required
string

identifies the UserMessage subtype

from
required
integer (UserNumber)

Long integer key to a User

to
required
integer (UserNumber)

Long integer key to a User

subject
required
string

subject line for the message

message
required
string <html>

the message

detail
string <html>

Responses

Request samples

Content type
application/json
Example
{
  • "_type": "models.SimpleMessage",
  • "from": 99,
  • "to": 99,
  • "subject": "string",
  • "message": "Hello <b>world</b>",
  • "detail": "string"
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

recall or decline a prescription

Prescriptions are immutable except for metadata, and cannot actually be deleted. This endpoint makes a prescription unavailable for use. If called by the VOR, it sets staus to RECALLED. If called by the MOR to whom it is prescribed, it sets status to DECLINED. New cases cannot be enrolled if either RECALLED or DECLIENED.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
string
Example: Vi1y9kbpEj7Upqy7

Prescription ID key

Responses

Response samples

Content type
application/json
{
  • "updated": 0
}

enroll case, deprecated in favor of POST /api/cases2 which will be moved to this path eventually

Creates a Case linked to a prescription.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
required
integer <int64>
Default: null

Case ID number

rxId
required
string

UUID identifying the prescription

animalId
required
string
initiationTime
required
string <date-time>
note
string
morId
integer
required
any (CaseData)

data for an individual Case

Responses

Request samples

Content type
application/json
{
  • "id": 123,
  • "rxId": "gG3pBCR1GCMKm89c",
  • "animalId": "Bossie34",
  • "initiationTime": "2019-08-24T14:15:22Z",
  • "note": "string",
  • "morId": 0,
  • "caseData": {
    }
}

Response samples

Content type
application/json
{
  • "case": {
    }
}

enroll Case returning tasks

Enrolls a Case from its Prescription and generates DoseTasks, Promise tasks, and Withhold as specified in the Protocol.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
required
integer <int64>
Default: null

Case ID number

rxId
required
string

UUID identifying the prescription

animalId
required
string
initiationTime
required
string <date-time>
note
string
morId
integer
required
any (CaseData)

data for an individual Case

Responses

Request samples

Content type
application/json
{
  • "id": 123,
  • "rxId": "gG3pBCR1GCMKm89c",
  • "animalId": "Bossie34",
  • "initiationTime": "2019-08-24T14:15:22Z",
  • "note": "string",
  • "morId": 0,
  • "caseData": {
    }
}

Response samples

Content type
application/json
{
  • "case": {
    }
}

get history for a single Case (with tasks)

Case plus tasks generated for the Case plus any data returned on task execution

Authorizations:
(apiKeyauthToken)
path Parameters
caseId
required
integer

ID number of Case

Responses

Response samples

Content type
application/json
{
  • "caseHx": {
    }
}

prescriptions with cases

A filtered list of Prescriptions with Cases enrolled to each.

Authorizations:
(apiKeyauthToken)
query Parameters
vorId
integer

ID number of prescribing VOR

morId
integer

ID number of MOR prescribed to

protocolId
integer

ID number of protocol prescribed

enrolledBefore
string <date-time>
Example: enrolledBefore=2020-01-10T22:20:39Z

last date limit for Case enrollment

enrolledAfter
string <date-time>
Example: enrolledAfter=2019-01-10T22:20:39Z

earliest date limit for Case enrollment

offset
integer
Default: 0

page start

limit
integer
Default: 20

maximum page length

Responses

Response samples

Content type
application/json
{
  • "rxesWithCases": [
    ],
  • "of": 0
}

execute task

Mark task status as completed

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
promId
required
integer <int64>

ID of Promise

any (PData)

a task

_type
required
string

identifies the task subtype as shown in the AnimalTask discriminator mapping, like models.DoseTask

id
required
integer <int64>

PTask ID number

caseId
required
integer <int64>

ID number of Case that includes this task

morId
required
integer <int64>

ID of MOR user responsible for execution of this task

vorId
required
integer <int64>

ID of VOR prescribing the task

animalId
string

ID of animal to which the task applies

doAt
required
string <date-time>

ISO-8601-formatted datetime when the task should be executed

executor
integer <int64>

ID of Person who should execute the task

status
required
string (TaskStatus)
Enum: "REQUIRED" "SUGGESTED" "DUE" "OPTIONAL" "OVERDUE" "CANCELLED" "REJECTED" "RECALLED" "EXECUTED" "UNKNOWN"

task status

Responses

Request samples

Content type
application/json
Example
{
  • "promId": 123,
  • "data": {
    },
  • "_type": "models.PTask",
  • "id": 123,
  • "caseId": 123,
  • "morId": 123,
  • "vorId": 123,
  • "animalId": "this",
  • "doAt": "2020-01-10T10:30:37Z",
  • "executor": 123,
  • "status": "REQUIRED"
}

Response samples

Content type
application/json
{
  • "case": {
    }
}

getSPL

Authorizations:
(apiKeyauthToken)
path Parameters
ndc
required
string
Example: 0061-4321-03

unique 10-digit, 3-segment number. labelerCode-productCode-packageCode

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

record an image

REcords link for loading an image.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
required
integer
link
required
string
thumbnail
string
keywords
Array of strings
name
required
string <= 80 characters

description of image

required
object (ImageStore)

An online source for images

Responses

Request samples

Content type
application/json
{
  • "id": 888,
  • "link": "string",
  • "thumbnail": "string",
  • "keywords": [
    ],
  • "name": "string",
  • "store": {
    }
}

Response samples

Content type
application/json
{
  • "case": {
    }
}

ALL_USERS

available to all users.

signin

Log in with user credentials

Authorizations:
(apiKeyauthToken)
query Parameters
returnPath
string
Example: returnPath=/spa/editor

After a successful signin, the server will attempt to redirect to this path, if supplied.

Responses

update user data

Users may update their own data. A VOR may also update User data of a User in a CLIENT relationship with that VOR. A SAOR may update data of any User.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
object (User)

a User of a UserType class

Responses

Request samples

Content type
application/json
{
  • "user": {
    }
}

Response samples

Content type
application/json
{
  • "updated-records": 0
}

user login

Authenticate a User and the app requesting a token, returning a token for use in future secured requests.

Request Body schema: application/json
apikey
required
string

An API key assigned to an application for access to this API. To request a free API key please contact the system administrator.

identifier
required
string

User.uname, normally the same as User.email

password
required
string >= 8 characters

User password

Responses

Request samples

Content type
application/json
{
  • "apikey": "t0CGzpQ4cgu1OBy44sBt",
  • "identifier": "someUser",
  • "password": "somePassword"
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzMmFXUmxja2xFSWpvaVkzSmxaR1Z1ZEdsp3Y205MmFXUmxja3RsZVNJNkluUmxjM1JXVDFJaWZRPT0iLCJpc3MiOiJwbGF5LXNpbGhvdWV0dGUiLCJle***...",
  • "filePolicy": "3da8c83495cb00d21690d00de5611d9a",
  • "fileSignature": "eyJleHBpcnkiOjE1Nzg3NTY2MDIsIm1MDAwMDAwfQ==",
  • "wsTicket": "eyJleHBpcnkiOjE2MDIsIm1heFNpemUiOjEwMDAwMDAwfQ=="
}

renew token

Renews the User's access token for use in future secured requests.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "user": {
    },
  • "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzMmFXUmxja2xFSWpvaVkzSmxaR1Z1ZEdsp3Y205MmFXUmxja3RsZVNJNkluUmxjM1JXVDFJaWZRPT0iLCJpc3MiOiJwbGF5LXNpbGhvdWV0dGUiLCJle***...",
  • "filePolicy": "3da8c83495cb00d21690d00de5611d9a",
  • "fileSignature": "eyJleHBpcnkiOjE1Nzg3NTY2MDIsIm1MDAwMDAwfQ==",
  • "wsTicket": "eyJleHBpcnkiOjE2MDIsIm1heFNpemUiOjEwMDAwMDAwfQ=="
}

get user data

Returns User data as specified by User id. Any User may get their own data. A VOR may get User data of Users in a CLIENT relationship with that VOR. A SAOR may get data of any User.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer
Example: 2

User ID key

Responses

Response samples

Content type
application/json
{
  • "user": {
    }
}

list of all

list of .

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer
Example: 2

User ID key

Responses

Response samples

Content type
application/json
{
  • "visits": [
    ]
}

update address

A User may update their own address.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
object (User)

a User of a UserType class

Responses

Request samples

Content type
application/json
{
  • "user": {
    }
}

Response samples

Content type
application/json
{
  • "updated-records": 0
}

address of user

Address of user specified by id.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer
Example: 2

User ID key

Responses

Response samples

Content type
application/json
{
  • "user": {
    }
}

update profile

A User may update their own profile.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
object (Profile)

User data including Address and preferences

Responses

Request samples

Content type
application/json
{
  • "user": {
    }
}

Response samples

Content type
application/json
{
  • "profile": {
    }
}

Profile of user

Profile of user specified by id.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer
Example: 2

User ID key

Responses

Response samples

Content type
application/json
{
  • "user": {
    }
}

confirmToken

used for clickable link to confirm a token sent in email.

Authorizations:
(apiKeyauthToken)
path Parameters
token
required
string
Example: 2frfgjty

single-use token required for authentication

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

record a User comment

Records a User comment to the database and emails admin. It supports privacy controls.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
userId
integer
Default: null

set null or zero if User wishes to be anonymous

public
boolean
Default: false

if false, comment is private to site managers

comment
required
string

user's comment

Responses

Request samples

Content type
application/json
{
  • "userId": 1,
  • "public": false,
  • "comment": "some comment"
}

Response samples

Content type
application/json
{
  • "recorded": 0
}

respond to a message identified by token

Respond to a message according to the content in the message, secured by a token that links the response to a UserMessage. Typically token expires in 48 hr.

path Parameters
token
required
string

a token supplied in a message asking for a response. Token typically expires in 48 hr.

query Parameters
response
boolean
Default: false

A message may include a question requiring a yes-or-no response. For example, an email message could include links for "confirm" or decline" with only the first setting the response parameter to true.

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

list of all diagnoses

Returns an array of keys used to identify help messages.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "keys": [
    ]
}

help message

return a help message, normally to be displayed in a popup help screen.

Authorizations:
(apiKeyauthToken)
path Parameters
key
required
string

help screen key

Responses

Response samples

Content type
application/json
{
  • "help": "string"
}

confirmVOR

Authorizations:
(apiKeyauthToken)
query Parameters
sendEmail
boolean
Default: true

Responses

Response samples

Content type
application/json
{
  • "vor": {
    }
}

getImage

Authorizations:
(apiKeyauthToken)
query Parameters
keywords
Array of strings
productId
integer
dx
integer
ex
integer

Responses

Response samples

Content type
application/json
{
  • "image": {
    }
}

getImage

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "image": {
    }
}

getImageKeywards

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "keywords": [
    ]
}

getImageStores

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "stores": [
    ]
}

SAOR

available to system administrators.

loadEditor

load Protocol Editor

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

loadFarmApp

load Farm App

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

loadAdminApp

load Admin app

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

delete user

This endpoint supports the (reversible) "delete" of a User by setting user.status to REMOVED. Removed Users are not visible in normal queries.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer
Example: 5

User ID key

Responses

Response samples

Content type
application/json
{
  • "deleted": 0
}

delete sandboxClient

Delete the User and CLIENT Relation records from the database, irreversibly removing the sandbocx client, but not any existing Prescriptions.

Authorizations:
(apiKeyauthToken)

Responses

Response samples

Content type
application/json
{
  • "deleted": 0
}

create Tag

Create a Tag.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
required
integer

Tag ID number

color
required
string

color code

name
required
string <= 15 characters

keyword code identifying tag

Array of any (Remedy)

Responses

Request samples

Content type
application/json
{
  • "id": 8,
  • "color": "#516cc6",
  • "name": "string",
  • "fixes": [
    ]
}

Response samples

Content type
application/json
{
  • "tag": {
    }
}

Tag

Delete Tag.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer

Responses

Response samples

Content type
application/json
{
  • "deleted": 0
}

create a public Promise

REcord a Promise type that will be public (available to all VORs)

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
_type
required
string
Enum: "models.AffirmationPromise" "models.BooleanPromise" "models.StringPromise" "models.NumberPromise" "models.MassPromise" "models.CategoryPromise"

Class of Promise

id
integer

database primary key

ownerId
integer
Default: null

id of VOR user with exclusive access to this Promise. If null, Promise is available to all users.

name
required
string >= 8 characters

a short name

descrip
string <html>

html description describing in detail what must be done to complete the Promise

when
required
string <duration>
Default: "PT0H"

ISO-8601 duration from initiation when promise must be fulfilled

query
required
string <html>

A question the user must answer.

Responses

Request samples

Content type
application/json
{
  • "_type": "models.AffirmationPromise",
  • "id": 2345,
  • "ownerId": 123,
  • "name": "ID promise",
  • "descrip": "You must give ID for each case enrolled",
  • "when": "PT24H",
  • "query": "What is the animal's name or ID?"
}

Response samples

Content type
application/json
{
  • "promise": {
    }
}

send a message to another user

send a message to another user

Authorizations:
(apiKeyauthToken)
query Parameters
modes
Array of strings (MessageMode)
Items Value: "EMAIL"
Example: modes=EMAIL

Mode(s) or channel(s) to use in messaging, defaulting to EMAIL

Request Body schema: application/json
_type
required
string

identifies the UserMessage subtype

from
required
integer (UserNumber)

Long integer key to a User

to
required
integer (UserNumber)

Long integer key to a User

subject
required
string

subject line for the message

message
required
string <html>

the message

detail
string <html>

Responses

Request samples

Content type
application/json
Example
{
  • "_type": "models.SimpleMessage",
  • "from": 99,
  • "to": 99,
  • "subject": "string",
  • "message": "Hello <b>world</b>",
  • "detail": "string"
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

create Eligibility

Creation a Eligibility.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
integer

Eligibility ID number

name
required
string

A type of animal which is eligible to be treated using a protocol having this Eligibility

fdaSpecies
required
string (FDASpecies)

a class of animals recognized by the FDA. In FDA literature this is called a "species", which conflicts with the typical usage of that word. "fdaSpecies" in the labeling domain usually corresponds with "Eligibility" in the Protocol domain.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "Beef Cattle",
  • "fdaSpecies": "string"
}

Response samples

Content type
application/json
{
  • "protocol": {
    }
}

Eligibility

Delete Eligibility.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer

Responses

Response samples

Content type
application/json
{
  • "deleted": 0
}

create Eligibility

Create a Diagnosis.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
integer

Diagnosis ID number

name
string <= 255 characters

free-form text description of the Diagnosis

Responses

Request samples

Content type
application/json
{
  • "id": 8,
  • "name": "Pain/inflammation (musculoskeletal), treatment"
}

Response samples

Content type
application/json
{
  • "protocol": {
    }
}

Diagnosis

Delete Diagnosis.

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer

Responses

Response samples

Content type
application/json
{
  • "deleted": 0
}

create help screen

Creation a help screen.

Authorizations:
(apiKeyauthToken)
path Parameters
key
required
string

help screen key

Request Body schema: application/json
key
required
string
msg
required
string <html>

the html message to display

lang
string

language code

Responses

Request samples

Content type
application/json
{
  • "key": "string",
  • "msg": "string",
  • "lang": "string"
}

Response samples

Content type
application/json
{
  • "protocol": {
    }
}

delete help screen

Delete help screen.

Authorizations:
(apiKeyauthToken)
path Parameters
key
required
string

help screen key

Responses

Response samples

Content type
application/json
{
  • "deleted": 0
}

create labelclaim

Creation a labelclaim.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
required
integer

unique identifier for label

fdaSpecies
required
Array of strings (FDAspecies)
Items Enum: "BeefCattle" "Calves" "CalvesNotVeal" "Cats" "Chickens" "ChickensBroilers" "ChickensNotLaying" "ChickensReplacements" "DairyCalves" "DairyHeifers" "DairyCattle" "DairyCattleNonLactating" "Dogs" "Fish" "Goats" "Horses" "Sheep" "Swine" "SwineBreeding" "Turkeys" "TurkeysGrowing" "TurkeysMeatProducing" "TurkeysNotLaying" "Catfish" "Gamebirds" "Llamas" "Salmon" "Emus" "Bison" "Other" "Unidentified"

a class of animals recognized by the FDA. In FDA literature this is called a "species", which conflicts with the typical usage of that word. "fdaSpecies" in the labeling domain usually corresponds with "Eligibility" in the Protocol domain.

diagnosis
required
string

label diagnosis

dxId
required
integer

id of label diagnosis

product
required
string

product trade name

productId
integer

unique identifier for the product described

_dose
string

free-form text note on dosage

route
required
string

route of administration

any (SequenceFunction)

function to calculate times for a series of doses

any (SizeFunction)

function to calculate dose size

doseNote
string <html>

test note about dose

wtMeatHrs
required
integer

meat withholding in hours

wtMilkHrs
required
integer

milk withholding in hours

wtNote
string

note on withholding

ndc
string

FDA NADA or ANADA number

generic
string

generic name for product

isRx
required
boolean
Default: true

Is this a prescription drug?

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "fdaSpecies": [
    ],
  • "diagnosis": "pain (colic), symptomatic treatment",
  • "dxId": 2002,
  • "product": "Prevail™ Flunixin Meglumine Injection",
  • "productId": 1315018,
  • "_dose": "3.0 ml per kg repeat in 6 hours and again in 24 hours",
  • "route": "intr-corporeal",
  • "sequenceFunction": {
    },
  • "sizeFunction": {
    },
  • "doseNote": "THis can contain <b>html</b> tags",
  • "wtMeatHrs": 22,
  • "wtMilkHrs": 5,
  • "wtNote": "not for dairy animals",
  • "ndc": "200-308",
  • "generic": "OXYTETRACYCLINE",
  • "isRx": true
}

Response samples

Content type
application/json
{
  • "protocol": {
    }
}

update labelclaim

update a labelclaim.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
id
required
integer

unique identifier for label

fdaSpecies
required
Array of strings (FDAspecies)
Items Enum: "BeefCattle" "Calves" "CalvesNotVeal" "Cats" "Chickens" "ChickensBroilers" "ChickensNotLaying" "ChickensReplacements" "DairyCalves" "DairyHeifers" "DairyCattle" "DairyCattleNonLactating" "Dogs" "Fish" "Goats" "Horses" "Sheep" "Swine" "SwineBreeding" "Turkeys" "TurkeysGrowing" "TurkeysMeatProducing" "TurkeysNotLaying" "Catfish" "Gamebirds" "Llamas" "Salmon" "Emus" "Bison" "Other" "Unidentified"

a class of animals recognized by the FDA. In FDA literature this is called a "species", which conflicts with the typical usage of that word. "fdaSpecies" in the labeling domain usually corresponds with "Eligibility" in the Protocol domain.

diagnosis
required
string

label diagnosis

dxId
required
integer

id of label diagnosis

product
required
string

product trade name

productId
integer

unique identifier for the product described

_dose
string

free-form text note on dosage

route
required
string

route of administration

any (SequenceFunction)

function to calculate times for a series of doses

any (SizeFunction)

function to calculate dose size

doseNote
string <html>

test note about dose

wtMeatHrs
required
integer

meat withholding in hours

wtMilkHrs
required
integer

milk withholding in hours

wtNote
string

note on withholding

ndc
string

FDA NADA or ANADA number

generic
string

generic name for product

isRx
required
boolean
Default: true

Is this a prescription drug?

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "fdaSpecies": [
    ],
  • "diagnosis": "pain (colic), symptomatic treatment",
  • "dxId": 2002,
  • "product": "Prevail™ Flunixin Meglumine Injection",
  • "productId": 1315018,
  • "_dose": "3.0 ml per kg repeat in 6 hours and again in 24 hours",
  • "route": "intr-corporeal",
  • "sequenceFunction": {
    },
  • "sizeFunction": {
    },
  • "doseNote": "THis can contain <b>html</b> tags",
  • "wtMeatHrs": 22,
  • "wtMilkHrs": 5,
  • "wtNote": "not for dairy animals",
  • "ndc": "200-308",
  • "generic": "OXYTETRACYCLINE",
  • "isRx": true
}

Response samples

Content type
application/json
{
  • "protocol": {
    }
}

getSPL

Authorizations:
(apiKeyauthToken)
path Parameters
ndc
required
string
Example: 0061-4321-03

unique 10-digit, 3-segment number. labelerCode-productCode-packageCode

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

greenbook drugs

Return GBDs.

Authorizations:
(apiKeyauthToken)
query Parameters
ndcProd
integer

first section labeler code of a NDC

ndcLabeler
integer

mid section product code of a NDC

ndcBrand
integer

starting row number in GBD table

offset
integer

maximum number of rows to return

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJleUp3Y205MmFXUmxja2xFSWpvaVkzSmxaR1Z1ZEdsaGJITWlMQ0p3Y205MmFXUmxja3RsZVNJNkluUmxjM1JXVDFJaWZRPT0iLCJpc3MiOiJwbGF5LXNpbGhvdWV0dGUiLCJle***...
integer

end section package code of a NDC

Responses

Response samples

Content type
application/json
[]

update GBD

M

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
ndc
required
string

FDA NDC number

proprietary
required
string

proprietary name

nonProp
required
string

generic name

ingredients
required
string

ingredient or ingredients

labeler
required
string

name of labeler

productType
required
string

type of product

marketCat
required
string

market category

appNumber
required
string

application number

link
required
string

public link to fda label

status
required
integer

FDA status

lastChanged
required
string <date-time>

date of last label change

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

getGreenbookDrug

Authorizations:
(apiKeyauthToken)
path Parameters
ndc
required
string
Example: 0061-4321-03

unique 10-digit, 3-segment number. labelerCode-productCode-packageCode

Responses

Response samples

Content type
{
  • "errorType": "Duplicate entry 'testVOR2' for key 'userid.uname_idx'",
  • "title": "Processing Error",
  • "status": 400,
  • "detail": "java.sql.SQLIntegrityConstraintViolationException",
  • "instance": "/login/log/abc123"
}

TOR

available to farm employees.

get a Promise

get a Promise

Authorizations:
(apiKeyauthToken)
path Parameters
id
required
integer
Example: 32

promise ID

Responses

Response samples

Content type
application/json
{
  • "_type": "models.AffirmationPromise",
  • "id": 2345,
  • "ownerId": 123,
  • "name": "ID promise",
  • "descrip": "You must give ID for each case enrolled",
  • "when": "PT24H",
  • "query": "What is the animal's name or ID?"
}

LOR

available to pharmacy curators.

FARM

available to farm accounts.

CLINIC

available to vet clinic accounts.

User

Endpoints and models related to user management.

Protocol

Endpoints and models related to protocol management.

Prescription

Endpoints and models related to prescription management.

Case

Endpoints and models related to case management.

Promise

Endpoints and models related to promise management.

create profile

Create a User with Address, and UserPrefs.

Authorizations:
(apiKeyauthToken)
Request Body schema: application/json
object (Profile)

User data including Address and preferences

Responses

Request samples

Content type
application/json
{
  • "user": {
    }
}

Response samples

Content type
application/json
{
  • "id": 99,
  • "uname": "exampleUser",
  • "userType": "VOR",
  • "email": "exampleUser@email.com",
  • "firstname": "Example",
  • "lastname": "User",
  • "suffix": "DVM",
  • "phone": "string",
  • "userId": 0,
  • "busName": "testVOR Clinic",
  • "address1": "123 Main St.",
  • "address2": "123 Main St.",
  • "town": "Anytown",
  • "state": "Any State",
  • "zip": "12345-abcd",
  • "country": "USA",
  • "sandboxName": "string",
  • "emailTips": true,
  • "emailNews": true,
  • "rxHeader": "string"
}

ANY_USER

log a message to server

adds a timestamped entry to server logs

Authorizations:
(apiKeyauthToken)
query Parameters
severity
string
Default: "INFO"
Enum: "INFO" "ERROR" "DEBUG" "WARN"

logging level severity, defaulting to INFO

Responses

Response samples

Content type
application/json
{
  • "logged": "string"
}