Skip to content

Commit 1465fc5

Browse files
authored
Mri habituation form (CoBrALab#92)
* add instructions and description * add room number, set default measures to be visible * fix title and add room nunber question * add tags * add poop/dropping related questions * add measure and instructions about preyers reflext test * add chamber number instead of row/shelf number * add chamber number help in instructions
1 parent f7cf01a commit 1465fc5

File tree

1 file changed

+95
-0
lines changed
  • public/forms/CoBrALab-MRI-Habituation-Form

1 file changed

+95
-0
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
/* eslint-disable perfectionist/sort-objects */
2+
3+
const { defineInstrument } = await import(
4+
"/runtime/v1/@opendatacapture/runtime-core/index.js"
5+
);
6+
const { z } = await import("/runtime/v1/zod@3.23.x/index.js");
7+
8+
export default defineInstrument({
9+
kind: "FORM",
10+
language: "en",
11+
tags: ["Mouse", "MRI Habituation", "Sound", "Preyer reflex"],
12+
internal: {
13+
edition: 1,
14+
name: "MRI_HABITUATION_FORM",
15+
},
16+
defaultMeasureVisibility: "visible",
17+
content: {
18+
roomNumber: {
19+
kind: "string",
20+
variant: "input",
21+
label: "Room number",
22+
},
23+
chamberNumber: {
24+
kind: "string",
25+
variant: "input",
26+
label: "Chamber number",
27+
},
28+
numberOfPoopPellets: {
29+
kind: "number",
30+
variant: "input",
31+
label: "Number of droppings/poop pellet produced by animal",
32+
},
33+
weightOfPoop: {
34+
kind: "number",
35+
variant: "input",
36+
label: "Weight of poop/dropping pellets (grams)",
37+
},
38+
preyerReflexTestSuccessful: {
39+
kind: "boolean",
40+
variant: "radio",
41+
label: "Animal passes the preyer reflex test",
42+
},
43+
additionalComments: {
44+
kind: "string",
45+
variant: "textarea",
46+
label: "Additional Comments",
47+
},
48+
},
49+
clientDetails: {
50+
estimatedDuration: 1,
51+
instructions: [
52+
"To be filled in whenever and animal completes a MRI habituation session. On must track information on the location of the session, tracking dropping done by the animal, and room position. The preyer's reflex test must also be completed on the animal before completion of the form. A pre-existing chamber identification system must be referred to when filling out the chamber number section of the form.",
53+
],
54+
},
55+
details: {
56+
description:
57+
"A form to track data from whenever an animal goes through an MRI Habituation session",
58+
license: "Apache-2.0",
59+
title: "MRI Habituation Form",
60+
},
61+
measures: {
62+
roomNumber: {
63+
kind: "const",
64+
ref: "roomNumber",
65+
},
66+
chamberNumber: {
67+
kind: "const",
68+
ref: "chamberNumber",
69+
},
70+
numberOfPoopPellets: {
71+
kind: "const",
72+
ref: "numberOfPoopPellets",
73+
},
74+
weightOfPoop: {
75+
kind: "const",
76+
ref: "weightOfPoop",
77+
},
78+
preyerReflexTestSuccessful: {
79+
kind: "const",
80+
ref: "preyerReflexTestSuccessful",
81+
},
82+
additionalComments: {
83+
kind: "const",
84+
ref: "additionalComments",
85+
},
86+
},
87+
validationSchema: z.object({
88+
roomNumber: z.string(),
89+
chamberNumber: z.string(),
90+
numberOfPoopPellets: z.number().int().min(0),
91+
weightOfPoop: z.number().min(0),
92+
preyerReflexTestSuccessful: z.boolean(),
93+
additionalComments: z.string().optional(),
94+
}),
95+
});

0 commit comments

Comments
 (0)