SubjectLog schemas

Table of contents

  1. How to use this page
  2. Quick type map
  3. Examples
    1. SubjectLog payload fragment
  4. Request pattern
  5. Schema reference
    1. FoodConsumption
    2. FoodDeprivation
    3. GenericObservation
    4. Genotyping
    5. Habituation
    6. Handling
    7. HargreavesTest
    8. Housing
    9. TrainingSession
    10. VonFreyTest
    11. WaterConsumption
    12. WaterDeprivation
    13. Weighing
    14. Wellness

How to use this page

  • Use this page when calling /api/private/modules/subjectlog/.
  • Set type to one schema name from the list below.
  • Send details that matches that schema exactly.
  • Schema controls shape of per-log-type observations and metrics.

Quick type map

Type valueSchema versionRequired fieldsSchema shape
FoodConsumption1.1.0foodAmountobject
FoodDeprivation1.0.0responsiblePersonobject
GenericObservation1.0.0observation, observationTypeobject
Genotyping1.0.0result, sampleobject
Habituation1.0.0noneobject
Handling1.0.0noneobject
HargreavesTest1.1.0latency, responseScore, stimulusLocationobject
Housing1.0.0noneobject
TrainingSession1.0.0noneobject
VonFreyTest1.1.0responseScore, stimulusForce, stimulusLocationobject
WaterConsumption1.1.0waterAmountobject
WaterDeprivation1.0.0responsiblePersonobject
Weighing1.1.0weightobject
Wellness1.0.0wellnessobject

Examples

SubjectLog payload fragment

{
  "type": "FoodConsumption",
  "details": {
    "foodAmount": {
      "unit": "g",
      "value": 0
    }
  }
}

Request pattern

{
  "type": "FoodConsumption",
  "details": {
    "foodAmount": {
      "unit": "g",
      "value": 0
    }
  }
}

Schema reference

FoodConsumption

  • Schema title: Food Consumption log
  • Schema version: 1.1.0
  • Source: brainstem/schemas/SubjectLog/FoodConsumption.json
  • Schema shape: object
  • Required fields: foodAmount

Example payload for this type:

{
  "foodAmount": {
    "unit": "g",
    "value": 0
  }
}
FieldExpected valueRequiredConstraints/format
foodAmountobject(value:number, unit:enum[kg, g, mg, µg])yesformat=”numberUnit”; default={“unit”: “g”}

FoodDeprivation

  • Schema title: Food deprivation log
  • Schema version: 1.0.0
  • Source: brainstem/schemas/SubjectLog/FoodDeprivation.json
  • Schema shape: object
  • Required fields: responsiblePerson

Example payload for this type:

{
  "responsiblePerson": "example"
}
FieldExpected valueRequiredConstraints/format
protocolstringno
responsiblePersonstringyes

GenericObservation

  • Schema title: Generic Observation
  • Schema version: 1.0.0
  • Source: brainstem/schemas/SubjectLog/GenericObservation.json
  • Schema shape: object
  • Required fields: observation, observationType

Example payload for this type:

{
  "observation": "example",
  "observationType": "Pain score"
}
FieldExpected valueRequiredConstraints/format
observationstringyes
observationTypestringyesenum=[“Pain score”, “Grooming”, “Exploration”, “Freezing”, “Facial expression”, “Unusual behavior”, “Other”]
repetitionsintegernominimum=1; default=1

Genotyping

  • Schema title: Genotyping
  • Schema version: 1.0.0
  • Source: brainstem/schemas/SubjectLog/Genotyping.json
  • Schema shape: object
  • Required fields: result, sample

Example payload for this type:

{
  "result": "example",
  "sample": "example"
}
FieldExpected valueRequiredConstraints/format
assayPanelstringno
lociResultsarraynoformat=”table”
qcConfidencestringnoenum=[“high”, “medium”, “low”, “ambiguous”, “failed”]
resultstringyes
samplestringyes

Habituation

  • Schema title: Habituation log
  • Schema version: 1.0.0
  • Source: brainstem/schemas/SubjectLog/Habituation.json
  • Schema shape: object
  • Required fields: none

Example payload for this type:

{
  "habituationMethod": "example"
}
FieldExpected valueRequiredConstraints/format
habituationMethodstringno

Handling

  • Schema title: Handling log
  • Schema version: 1.0.0
  • Source: brainstem/schemas/SubjectLog/Handling.json
  • Schema shape: object
  • Required fields: none

Example payload for this type:

{
  "handlingMethod": "example"
}
FieldExpected valueRequiredConstraints/format
handlingMethodstringno

HargreavesTest

  • Schema title: Hargreaves Thermal sensitivity test
  • Schema version: 1.1.0
  • Source: brainstem/schemas/SubjectLog/HargreavesTest.json
  • Schema shape: object
  • Required fields: latency, responseScore, stimulusLocation

Example payload for this type:

{
  "latency": {
    "unit": "s",
    "value": 0
  },
  "responseScore": 0,
  "stimulusLocation": "Left hind paw"
}
FieldExpected valueRequiredConstraints/format
cutoffLatencyobject(value:number, unit:enum[µs, ms, s, min, h])noformat=”numberUnit”; default={“unit”: “s”}
latencyobject(value:number, unit:enum[µs, ms, s, min, h])yesformat=”numberUnit”; default={“unit”: “s”}
repetitionsintegernominimum=1; default=3
responseScoreintegeryesenum=[0, 1, 2, 3]; minimum=0; maximum=3
stimulusLocationstringyesenum=[“Left hind paw”, “Right hind paw”, “Left forepaw”, “Right forepaw”, “Face (left)”, “Face (right)”, “Tail”, “Other”]

Housing

  • Schema title: Housing log
  • Schema version: 1.0.0
  • Source: brainstem/schemas/SubjectLog/Housing.json
  • Schema shape: object
  • Required fields: none

Example payload for this type:

{
  "location": "example",
  "cageId": "example",
  "cageType": "example",
  "lightCycle": "example"
}
FieldExpected valueRequiredConstraints/format
cageIdstringno
cageTypestringno
enrichmentstringno
lightCyclestringno
locationstringno

TrainingSession

  • Schema title: Training session log
  • Schema version: 1.0.0
  • Source: brainstem/schemas/SubjectLog/TrainingSession.json
  • Schema shape: object
  • Required fields: none

Example payload for this type:

{
  "task": "example",
  "setup": "example",
  "reinforcementType": "example",
  "performance": "example"
}
FieldExpected valueRequiredConstraints/format
performancestringno
reinforcementTypestringno
setupstringno
taskstringno

VonFreyTest

  • Schema title: Von Frey Mechanical sensitivity test
  • Schema version: 1.1.0
  • Source: brainstem/schemas/SubjectLog/VonFreyTest.json
  • Schema shape: object
  • Required fields: responseScore, stimulusForce, stimulusLocation

Example payload for this type:

{
  "responseScore": 0,
  "stimulusForce": {
    "unit": "g",
    "value": 0
  },
  "stimulusLocation": "Left hind paw"
}
FieldExpected valueRequiredConstraints/format
repetitionsintegernominimum=1; default=10
responseScoreintegeryesenum=[0, 1, 2, 3]; minimum=0; maximum=3
stimulusForceobject(value:number, unit:enum[mg, g, kg])yesformat=”numberUnit”; default={“unit”: “g”}
stimulusLocationstringyesenum=[“Left hind paw”, “Right hind paw”, “Left forepaw”, “Right forepaw”, “Face (left)”, “Face (right)”, “Tail”, “Other”]

WaterConsumption

  • Schema title: Water consumption log
  • Schema version: 1.1.0
  • Source: brainstem/schemas/SubjectLog/WaterConsumption.json
  • Schema shape: object
  • Required fields: waterAmount

Example payload for this type:

{
  "waterAmount": {
    "unit": "mL",
    "value": 0
  }
}
FieldExpected valueRequiredConstraints/format
waterAmountobject(value:number, unit:enum[L, mL, µL, nL, pL])yesformat=”numberUnit”; default={“unit”: “mL”}

WaterDeprivation

  • Schema title: Water deprivation log
  • Schema version: 1.0.0
  • Source: brainstem/schemas/SubjectLog/WaterDeprivation.json
  • Schema shape: object
  • Required fields: responsiblePerson

Example payload for this type:

{
  "responsiblePerson": "example"
}
FieldExpected valueRequiredConstraints/format
protocolstringno
responsiblePersonstringyes

Weighing

  • Schema title: Weighing log
  • Schema version: 1.1.0
  • Source: brainstem/schemas/SubjectLog/Weighing.json
  • Schema shape: object
  • Required fields: weight

Example payload for this type:

{
  "weight": {
    "unit": "g",
    "value": 0
  }
}
FieldExpected valueRequiredConstraints/format
weightobject(value:number, unit:enum[kg, g, mg, µg])yesformat=”numberUnit”; default={“unit”: “g”}

Wellness

  • Schema title: Wellness log
  • Schema version: 1.0.0
  • Source: brainstem/schemas/SubjectLog/Wellness.json
  • Schema shape: object
  • Required fields: wellness

Example payload for this type:

{
  "wellness": "example"
}
FieldExpected valueRequiredConstraints/format
wellnessstringyes