From 2f5097aa96e6ef702e413b3d99decd7e956c2aff Mon Sep 17 00:00:00 2001 From: Christopher Date: Tue, 25 Jun 2024 16:34:25 -0700 Subject: [PATCH 01/15] switch to typevar to avoid mypy errors for returning subclass --- src/aind_slims_api/core.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/aind_slims_api/core.py b/src/aind_slims_api/core.py index f7646cf..f340c41 100644 --- a/src/aind_slims_api/core.py +++ b/src/aind_slims_api/core.py @@ -18,7 +18,7 @@ ) from pydantic.fields import FieldInfo import logging -from typing import Literal, Optional +from typing import Literal, Optional, TypeVar, Type from slims.slims import Slims, _SlimsApiException from slims.internal import ( @@ -132,6 +132,10 @@ def _serialize(self, field, info): # TODO: Support attachments +SlimsBaseModelTypeVar = TypeVar( + 'SlimsBaseModelTypeVar', bound=SlimsBaseModel) + + class SlimsClient: """Wrapper around slims-python-api client with convenience methods""" @@ -233,7 +237,12 @@ def rest_link(self, table: SLIMSTABLES, **kwargs): queries = [f"?{k}={v}" for k, v in kwargs.items()] return base_url + "".join(queries) - def add_model(self, model: SlimsBaseModel, *args, **kwargs) -> SlimsBaseModel: + def add_model( + self, + model: SlimsBaseModelTypeVar, + *args, + **kwargs + ) -> SlimsBaseModelTypeVar: """Given a SlimsBaseModel object, add it to SLIMS Args model (SlimsBaseModel): object to add @@ -256,7 +265,7 @@ def add_model(self, model: SlimsBaseModel, *args, **kwargs) -> SlimsBaseModel: by_alias=True, ), ) - return type(model).model_validate(rtn) + return model.model_validate(rtn) def update_model(self, model: SlimsBaseModel, *args, **kwargs): """Given a SlimsBaseModel object, update its (existing) SLIMS record From a2417ec5cb9a55791185e19e9fd9f92656e23b4c Mon Sep 17 00:00:00 2001 From: Christopher Date: Tue, 25 Jun 2024 16:37:44 -0700 Subject: [PATCH 02/15] remove unnuecesary commit --- src/aind_slims_api/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aind_slims_api/core.py b/src/aind_slims_api/core.py index f340c41..31cc7fc 100644 --- a/src/aind_slims_api/core.py +++ b/src/aind_slims_api/core.py @@ -18,7 +18,7 @@ ) from pydantic.fields import FieldInfo import logging -from typing import Literal, Optional, TypeVar, Type +from typing import Literal, Optional, TypeVar from slims.slims import Slims, _SlimsApiException from slims.internal import ( From 139a86ac06ac8a663c3d797ef3a1f0d7269ba952 Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 26 Jun 2024 14:24:42 -0700 Subject: [PATCH 03/15] use class to validate --- src/aind_slims_api/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aind_slims_api/core.py b/src/aind_slims_api/core.py index 31cc7fc..d54483f 100644 --- a/src/aind_slims_api/core.py +++ b/src/aind_slims_api/core.py @@ -265,7 +265,7 @@ def add_model( by_alias=True, ), ) - return model.model_validate(rtn) + return type(model).model_validate(rtn) def update_model(self, model: SlimsBaseModel, *args, **kwargs): """Given a SlimsBaseModel object, update its (existing) SLIMS record From 3c40a9fd069f48f744b1f25c49aaddbd4113d480 Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 26 Jun 2024 14:24:54 -0700 Subject: [PATCH 04/15] update column names --- src/aind_slims_api/behavior_session.py | 82 ++++++++++++++++ tests/test_behavior_session.py | 128 +++++++++++++++++++++++++ 2 files changed, 210 insertions(+) create mode 100644 src/aind_slims_api/behavior_session.py create mode 100644 tests/test_behavior_session.py diff --git a/src/aind_slims_api/behavior_session.py b/src/aind_slims_api/behavior_session.py new file mode 100644 index 0000000..cf167f5 --- /dev/null +++ b/src/aind_slims_api/behavior_session.py @@ -0,0 +1,82 @@ +"""Contains a model for the mouse content, and a method for fetching it""" + +import logging +from typing import Any +from datetime import date as _date + +from pydantic import Field, ValidationError + +from aind_slims_api.core import SlimsBaseModel, SlimsClient, SLIMSTABLES + +logger = logging.getLogger() + + +class SlimsBehaviorSessionContentEvent(SlimsBaseModel): + """Model for an instance of the Behavior Session ContentEvent""" + + mouse_name: str | None = Field(default=None, alias="cnvn_fk_content") # used as reference to mouse + notes: str = Field(..., alias="cnvn_cf_notes") + task_stage: str = Field(..., alias="cnvn_cf_taskStage") + instrument: str = Field(..., alias="cnvn_cf_fk_instrument") # TODO: Check if we want to use str for this, Dynamic Choice + trainer: str = Field(..., alias="cnvn_cf_fk_trainer") # TODO: Check if we want to use str for this, Dynamic Choice + task: str = Field(..., alias="cnvn_cf_task") + is_curriculum_suggestion: bool = Field( + ..., alias="cnvn_cf_stageIsOnCurriculum") + task_version: str = Field(..., alias="cnvn_cf_taskSchemaVersion") + software_version: str | None = Field( + default=None, alias="cnvn_cf_softwareVersion") + date: _date = Field(..., alias="cnvn_cf_scheduledDate") + + _slims_table: SLIMSTABLES = "ContentEvent" + + +def fetch_behavior_session_content_events( + client: SlimsClient, + mouse_name: str, +) -> list[SlimsBehaviorSessionContentEvent | dict[str, Any]]: + """Fetches behavior sessions for a mouse with labtracks id {mouse_name}""" + response = client.fetch( + SlimsBehaviorSessionContentEvent._slims_table, + cnvn_fk_content=mouse_name, + sort="cnvn_cf_scheduledDate", + ) + + validated: list[SlimsBehaviorSessionContentEvent | dict[str, Any]] = [] + for behavior_session in response: + try: + validated.append( + SlimsBehaviorSessionContentEvent + .model_validate(behavior_session) + ) + except ValidationError as e: + logger.error(f"SLIMS data validation failed, {repr(e)}") + validated.append(behavior_session.json_entity) + + return validated + + +def write_behavior_session_content_events( + client: SlimsClient, + mouse_name: str, + *behavior_sessions: SlimsBehaviorSessionContentEvent, +) -> list[SlimsBehaviorSessionContentEvent]: + """Writes behavior sessions for a mouse with labtracks id {mouse_name} + + Notes + ----- + - All supplied `behavior_sessions` will have their `mouse_name` field set + to the value supplied as `mouse_name` to this function + """ + added = [] + for behavior_session in behavior_sessions: + updated = behavior_session.model_copy( + update={"mouse_name": mouse_name}) + try: + validated = SlimsBehaviorSessionContentEvent.model_validate(updated) + except ValidationError as e: + logger.error( + f"SLIMS data validation failed. Skipping write, {repr(e)}") + continue + added.append(client.add_model(validated)) + + return added diff --git a/tests/test_behavior_session.py b/tests/test_behavior_session.py new file mode 100644 index 0000000..dd68f42 --- /dev/null +++ b/tests/test_behavior_session.py @@ -0,0 +1,128 @@ +"""Tests methods in mouse module""" + +import json +import os +import unittest +from pathlib import Path +from unittest.mock import MagicMock, patch +from copy import deepcopy + +from slims.internal import Record + +from aind_slims_api.core import SlimsClient +from aind_slims_api.behavior_session import ( + fetch_behavior_session_content_events, + write_behavior_session_content_events, + SlimsBehaviorSessionContentEvent +) + +RESOURCES_DIR = Path(os.path.dirname(os.path.realpath(__file__))) / "resources" + + +class TestBehaviorSession(unittest.TestCase): + """Tests top level methods in mouse module""" + + example_client: SlimsClient + example_response: list[Record] + example_behavior_sessions: list[SlimsBehaviorSessionContentEvent] + + @classmethod + def setUpClass(cls): + """Load json files of expected responses from slims""" + cls.example_client = SlimsClient( + url="http://fake_url", username="user", password="pass" + ) + cls.example_response = [ + Record(json_entity=r, slims_api=cls.example_client.db.slims_api) + for r in json.loads( + ( + RESOURCES_DIR / + "example_fetch_behavior_sessions_response.json" + ).read_text() + ) + ] + assert len(cls.example_response) > 1, \ + "Example response must be greater than 1 for tests to work..." + cls.example_behavior_sessions = [ + SlimsBehaviorSessionContentEvent( + notes="Test notes", + task_stage="Test stage", + instrument="Test instrument", + trainer="Test trainer", + task="Test task", + date="2021-01-01", + ), + SlimsBehaviorSessionContentEvent( + notes="Test notes", + task_stage="Test stage", + instrument="Test instrument", + trainer="Test trainer", + task="Test task", + date="2021-01-02", + ) + ] + + @patch("slims.slims.Slims.fetch") + def test_fetch_behavior_session_content_events_success( + self, + mock_fetch: MagicMock + ): + """Test fetch_behavior_session_content_events when successful""" + mock_fetch.return_value = self.example_response + response = fetch_behavior_session_content_events( + self.example_client, mouse_name="123456") + self.assertEqual( + [item.json_entity for item in self.example_response], + [item.json_entity for item in response], + ) + self.assertTrue(response[0].date < response[1].date) + + @patch("logging.Logger.error") + @patch("slims.slims.Slims.fetch") + def test_fetch_behavior_session_content_events_validation_fail( + self, mock_fetch: MagicMock, mock_log_error: MagicMock + ): + """Test fetch_behavior_session_content_events when bad values returned""" + wrong_return = deepcopy(self.example_response) + wrong_return[0].cnvn_cf_fk_instrument.value = 14 + mock_fetch.return_value = wrong_return + fetch_behavior_session_content_events( + self.example_client, mouse_name="123456") + mock_log_error.assert_called() + + @patch("slims.slims.Slims.add") + def test_write_behavior_session_content_events_success( + self, mock_add: MagicMock, + ): + """Test write_behavior_session_content_events success""" + mock_add.return_value = self.example_response + mouse_name = "123456" + added = write_behavior_session_content_events( + self.example_client, + mouse_name=mouse_name, + *self.example_behavior_sessions, + ) + self.assertTrue( + all((item.mouse_name == mouse_name for item in added)) + ) + self.assertTrue(len(added) == len(self.example_behavior_sessions)) + + @patch("logging.Logger.error") + @patch("slims.slims.Slims.add") + def test_write_behavior_session_content_events_validation_fail( + self, mock_add: MagicMock, mock_log_error: MagicMock + ): + """Test write_behavior_session_content_events when bad values""" + mock_add.return_value = None + bad_behavior_sessions = deepcopy(self.example_behavior_sessions) + bad_behavior_sessions[0].cnvn_cf_fk_instrument.value = 14 + added = write_behavior_session_content_events( + self.example_client, mouse_name="123456") + self.assertTrue( + (len(bad_behavior_sessions) - 1) == len(added) + ) + mock_log_error.assert_called() + + +if __name__ == "__main__": + unittest.main() From 05e1e1edf505299241206bfeb5393958a8c32b60 Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 27 Jun 2024 09:24:32 -0700 Subject: [PATCH 05/15] move fetch_models to core --- src/aind_slims_api/core.py | 44 +++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/aind_slims_api/core.py b/src/aind_slims_api/core.py index d54483f..7b54076 100644 --- a/src/aind_slims_api/core.py +++ b/src/aind_slims_api/core.py @@ -13,12 +13,13 @@ from pydantic import ( BaseModel, ValidationInfo, + ValidationError, field_serializer, field_validator, ) from pydantic.fields import FieldInfo import logging -from typing import Literal, Optional, TypeVar +from typing import Any, Literal, Optional, Type, TypeVar from slims.slims import Slims, _SlimsApiException from slims.internal import ( @@ -203,6 +204,47 @@ def fetch( return records + def fetch_models( + self, + model: Type[SlimsBaseModelTypeVar], + *args, + sort: Optional[str | list[str]] = None, + start: Optional[int] = None, + end: Optional[int] = None, + **kwargs, + ) -> tuple[list[SlimsBaseModelTypeVar], list[dict[str, Any]]]: + """Fetch records from SLIMS and return them as SlimsBaseModel objects + + Returns + ------- + tuple: + list: + Validated SlimsBaseModel objects + list: + Dictionaries representations of objects that failed validation + """ + response = self.fetch( + model._slims_table, + *args, + sort=sort or None, + start=start or None, + end=end or None, + **kwargs, + ) + + validated = [] + unvalidated = [] + for record in response: + try: + validated.append( + model.model_validate(record) + ) + except ValidationError as e: + logger.error(f"SLIMS data validation failed, {repr(e)}") + unvalidated.append(record.json_entity) + + return validated, unvalidated + @lru_cache(maxsize=None) def fetch_pk(self, table: SLIMSTABLES, *args, **kwargs) -> int | None: """SlimsClient.fetch but returns the pk of the first returned record""" From 273d928d43168e9fea6e7c42f369d9c9821944fa Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 28 Jun 2024 09:29:26 -0700 Subject: [PATCH 06/15] temp for showing --- src/aind_slims_api/behavior_session.py | 159 +++++++++++++++--- src/aind_slims_api/core.py | 26 ++- src/aind_slims_api/instrument.py | 86 ++++++++++ src/aind_slims_api/mouse.py | 6 + ...avior_session_content_events_response.json | 1 + 5 files changed, 247 insertions(+), 31 deletions(-) create mode 100644 src/aind_slims_api/instrument.py create mode 100644 tests/resources/example_fetch_behavior_session_content_events_response.json diff --git a/src/aind_slims_api/behavior_session.py b/src/aind_slims_api/behavior_session.py index cf167f5..7fd7bcf 100644 --- a/src/aind_slims_api/behavior_session.py +++ b/src/aind_slims_api/behavior_session.py @@ -2,11 +2,13 @@ import logging from typing import Any -from datetime import date as _date +from datetime import datetime -from pydantic import Field, ValidationError +from pydantic import Field, ValidationError, field_serializer from aind_slims_api.core import SlimsBaseModel, SlimsClient, SLIMSTABLES +from aind_slims_api.mouse import fetch_mouse_content, SlimsMouseContent +from aind_slims_api.user import fetch_user logger = logging.getLogger() @@ -14,50 +16,115 @@ class SlimsBehaviorSessionContentEvent(SlimsBaseModel): """Model for an instance of the Behavior Session ContentEvent""" - mouse_name: str | None = Field(default=None, alias="cnvn_fk_content") # used as reference to mouse + pk: int = Field(..., alias="cnvn_pk") + mouse_name: int | None = Field(default=None, alias="cnvn_fk_content") # used as reference to mouse notes: str = Field(..., alias="cnvn_cf_notes") task_stage: str = Field(..., alias="cnvn_cf_taskStage") - instrument: str = Field(..., alias="cnvn_cf_fk_instrument") # TODO: Check if we want to use str for this, Dynamic Choice - trainer: str = Field(..., alias="cnvn_cf_fk_trainer") # TODO: Check if we want to use str for this, Dynamic Choice + instrument: int = Field(..., alias="cnvn_cf_fk_instrument") # TODO: Check if we want to use str for this, Dynamic Choice + trainer: list[int] = Field(..., alias="cnvn_cf_fk_trainer") # TODO: Check if we want to use str for this, Dynamic Choice task: str = Field(..., alias="cnvn_cf_task") is_curriculum_suggestion: bool = Field( ..., alias="cnvn_cf_stageIsOnCurriculum") task_version: str = Field(..., alias="cnvn_cf_taskSchemaVersion") software_version: str | None = Field( default=None, alias="cnvn_cf_softwareVersion") - date: _date = Field(..., alias="cnvn_cf_scheduledDate") + date: datetime = Field(..., alias="cnvn_cf_scheduledDate") + + cnvn_fk_contentEventType: int = 10 _slims_table: SLIMSTABLES = "ContentEvent" -def fetch_behavior_session_content_events( +def _fetch_mouse_pk( client: SlimsClient, mouse_name: str, -) -> list[SlimsBehaviorSessionContentEvent | dict[str, Any]]: - """Fetches behavior sessions for a mouse with labtracks id {mouse_name}""" - response = client.fetch( - SlimsBehaviorSessionContentEvent._slims_table, - cnvn_fk_content=mouse_name, - sort="cnvn_cf_scheduledDate", - ) +) -> int | None: + """Utility function shared across read/write - validated: list[SlimsBehaviorSessionContentEvent | dict[str, Any]] = [] - for behavior_session in response: - try: - validated.append( - SlimsBehaviorSessionContentEvent - .model_validate(behavior_session) - ) - except ValidationError as e: - logger.error(f"SLIMS data validation failed, {repr(e)}") - validated.append(behavior_session.json_entity) + Notes + ----- + - TODO: Change return type of fetch_mouse_content to match pattern in + fetch_behavior_session_content_events, or the other way around? + """ + mouse = fetch_mouse_content(client, mouse_name) + if isinstance(mouse, dict): + return mouse["pk"] + elif isinstance(mouse, SlimsMouseContent): + return mouse.pk + elif mouse is None: + logger.warning(f"No mouse found with name {mouse_name}") + return None + else: + raise ValueError( + "Unexpected return type from fetch_mouse_content: %s" + % type(mouse) + ) - return validated + +def fetch_behavior_session_content_events( + client: SlimsClient, + mouse_name: str, +) -> tuple[list[SlimsBehaviorSessionContentEvent], list[dict[str, Any]]]: + """Fetches behavior sessions for a mouse with labtracks id {mouse_name} + + Returns + ------- + tuple: + list: + Validated SlimsBehaviorSessionContentEvent objects + list: + Dictionaries representations of objects that failed validation + """ + # mouse = fetch_mouse_content(client, mouse_name) + # print(mouse.model_dump().keys()) + mouse_pk = _fetch_mouse_pk(client, mouse_name) + logger.debug(f"Mouse pk: {mouse_pk}") + if mouse_pk is None: + return [], [] + + # response = client.fetch( + # "ContentEvent", + # cnvt_name="Behavior Session", + # cnvn_fk_content=mouse.pk, + # ) + # print(len(response)) + # import json + # import pathlib + # pathlib.Path("temp.json").write_text(json.dumps([r.json_entity for r in response])) + # # print(dir(response[1])) + # # print(response[1].cnvt_name.value) + # # return + # # for attr in dir(response[1]): + # # if attr.startswith("cn"): + # # print(attr) + # # print(f"{attr}: {getattr(response[0], attr).value}") + # # return + # # print([ + # # item.cnvn_fk_contentEventType + # # for item in response + # # ]) + # # response = client.fetch( + # # "ContentEvent", + # # cnvn_fk_content_type="cnvt_behavior_session", + # # cnvn_fk_content=mouse.pk, + # # ) + + # # print(len(response)) + # # print(dir(response[1])) + # # print(mouse.barcode) + return client.fetch_models( + SlimsBehaviorSessionContentEvent, + cnvn_fk_content=mouse_pk, + cnvt_name="Behavior Session", + sort=["cnvn_cf_scheduledDate"], + ) def write_behavior_session_content_events( client: SlimsClient, mouse_name: str, + instrument_name: str, + trainer_names: list[str], *behavior_sessions: SlimsBehaviorSessionContentEvent, ) -> list[SlimsBehaviorSessionContentEvent]: """Writes behavior sessions for a mouse with labtracks id {mouse_name} @@ -67,10 +134,15 @@ def write_behavior_session_content_events( - All supplied `behavior_sessions` will have their `mouse_name` field set to the value supplied as `mouse_name` to this function """ + mouse_pk = _fetch_mouse_pk(client, mouse_name) + logger.debug(f"Mouse pk: {mouse_pk}") + if mouse_pk is None: + raise ValueError(f"No mouse found with name {mouse_name}") + added = [] for behavior_session in behavior_sessions: updated = behavior_session.model_copy( - update={"mouse_name": mouse_name}) + update={"mouse_name": mouse_pk}) try: validated = SlimsBehaviorSessionContentEvent.model_validate(updated) except ValidationError as e: @@ -80,3 +152,38 @@ def write_behavior_session_content_events( added.append(client.add_model(validated)) return added + + +if __name__ == "__main__": + import os + logger.setLevel(logging.DEBUG) + client = SlimsClient( + username=os.getenv("SLIMS_USERNAME"), + password=os.getenv("SLIMS_PASSWORD"), + ) + ret = fetch_behavior_session_content_events( + client, + mouse_name="00000000", + ) + response = client.fetch( + "Instrument", + ) + print(response[0].pk()) + # raise Exception("bur") + # print(ret) + # print(fetch_user(client, "ClarkR")) + write_behavior_session_content_events( + client, + "00000000", + SlimsBehaviorSessionContentEvent( + cnvn_cf_notes="Test", + cnvn_cf_taskStage="Test", + cnvn_cf_fk_instrument=1743, + cnvn_cf_fk_trainer=[19], + cnvn_cf_task="Test", + cnvn_cf_stageIsOnCurriculum=True, + cnvn_cf_taskSchemaVersion="Test", + cnvn_cf_softwareVersion="Test", + cnvn_cf_scheduledDate=datetime(2021, 1, 1), + ), + ) diff --git a/src/aind_slims_api/core.py b/src/aind_slims_api/core.py index 7b54076..f65cb0a 100644 --- a/src/aind_slims_api/core.py +++ b/src/aind_slims_api/core.py @@ -42,6 +42,7 @@ "Test", "User", "Groups", + "Instrument", ] @@ -95,6 +96,11 @@ class MyModel(SlimsBaseModel): def _validate(cls, value, info: ValidationInfo): """Validates a field, accounts for Quantities""" if isinstance(value, SlimsColumn): + # if value.name == "pk": + # raise Exception("Bur") + # print(value.name) + # print(type(value)) + # print(dir(value)) if value.datatype == "QUANTITY": unit_spec = _find_unit_spec(cls.model_fields[info.field_name]) if unit_spec is None: @@ -224,14 +230,14 @@ def fetch_models( Dictionaries representations of objects that failed validation """ response = self.fetch( - model._slims_table, + model._slims_table.default, # TODO: consider changing fetch method *args, - sort=sort or None, - start=start or None, - end=end or None, + sort=sort, + start=start, + end=end, **kwargs, ) - + print(response) validated = [] unvalidated = [] for record in response: @@ -298,6 +304,15 @@ def add_model( fields_to_include = set(args) or None fields_to_exclude = set(kwargs.get("exclude", [])) fields_to_exclude.add("pk") + import json + import pathlib + # dumped = model.model_dump_json( + # include=fields_to_include, + # exclude=fields_to_exclude, + # **kwargs, + # by_alias=True, + # ) + # pathlib.Path("temp.json").write_text(dumped) rtn = self.add( model._slims_table, model.model_dump( @@ -307,6 +322,7 @@ def add_model( by_alias=True, ), ) + pathlib.Path("temp.json").write_text(json.dumps(rtn.json_entity)) return type(model).model_validate(rtn) def update_model(self, model: SlimsBaseModel, *args, **kwargs): diff --git a/src/aind_slims_api/instrument.py b/src/aind_slims_api/instrument.py new file mode 100644 index 0000000..192df98 --- /dev/null +++ b/src/aind_slims_api/instrument.py @@ -0,0 +1,86 @@ +"""Contains a model for the mouse content, and a method for fetching it""" + +import logging +from typing import Any +from datetime import datetime + +from pydantic import Field, ValidationError, field_serializer + +from aind_slims_api.core import SlimsBaseModel, SlimsClient, SLIMSTABLES +from aind_slims_api.mouse import fetch_mouse_content, SlimsMouseContent +from aind_slims_api.user import fetch_user + +logger = logging.getLogger() + + +class SlimsInstrument(SlimsBaseModel): + """Model for an instance of the Behavior Session ContentEvent""" + + name: str = Field(..., serialization_alias="nstr_name") + pk: int = Field(..., serialization_alias="nstr_pk") + _slims_table: SLIMSTABLES = "Instrument" + + # todo add more useful fields + + +def fetch_instrument_content( + client: SlimsClient, + instrument_name: str, +) -> SlimsInstrument | dict[str, Any] | None: + """Fetches behavior sessions for a mouse with labtracks id {mouse_name} + + Returns + ------- + tuple: + list: + Validated SlimsBehaviorSessionContentEvent objects + list: + Dictionaries representations of objects that failed validation + + Notes + ----- + - Todo: add partial name match or some other type of filtering + """ + validated, unvalidated = client.fetch_models( + SlimsInstrument, + nstr_name=instrument_name, + ) + if len(validated) > 0: + instrument_details = validated[0] + if len(validated) > 1: + logger.warning( + f"Warning, Multiple instruments in SLIMS with name {instrument_name}, " + f"using pk={instrument_details.pk}" + ) + return instrument_details + else: + if len(unvalidated) > 0: + logger.warning( + f"Warning, Multiple instruments in SLIMS with name {instrument_name}, " + f"using pk={unvalidated[0]['pk']}" + ) + return unvalidated[0] + + return None + + +if __name__ == "__main__": + import os + logger.setLevel(logging.DEBUG) + client = SlimsClient( + username=os.getenv("SLIMS_USERNAME"), + password=os.getenv("SLIMS_PASSWORD"), + ) + ret = client.fetch( + "Instrument", + nstr_name="323_EPHYS1_OPTO", + ) + import json + + # ret = fetch_instrument_content( + # client, + # "323_EPHYS1_OPTO_20240212", + # ) + print([ + item.nstr_name.value for item in ret + ]) diff --git a/src/aind_slims_api/mouse.py b/src/aind_slims_api/mouse.py index f11717e..c318b19 100644 --- a/src/aind_slims_api/mouse.py +++ b/src/aind_slims_api/mouse.py @@ -71,3 +71,9 @@ def fetch_mouse_content( return mouse_details.json_entity return mouse + + +if __name__ == "__main__": + fetch_mouse_content( + + ) \ No newline at end of file diff --git a/tests/resources/example_fetch_behavior_session_content_events_response.json b/tests/resources/example_fetch_behavior_session_content_events_response.json new file mode 100644 index 0000000..6a799bc --- /dev/null +++ b/tests/resources/example_fetch_behavior_session_content_events_response.json @@ -0,0 +1 @@ +[{"pk": 16, "tableName": "ContentEvent", "columns": [{"datatype": "FOREIGN_KEY", "name": "cnvn_fk_study", "title": "Study", "position": 0, "value": null, "hidden": false, "editable": true, "foreignTable": "Study", "displayValue": null, "displayField": "stud_name", "foreignDisplayColumn": "stud_name"}, {"datatype": "DATE", "name": "cnvn_cf_scheduledDate", "title": "Scheduled Date", "position": 1, "value": null, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_date", "title": "Date", "position": 2, "value": 1714478400000, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_dateFrom", "title": "From date", "position": 3, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_contentEventType", "title": "Content event type", "position": 4, "value": 10, "hidden": false, "editable": false, "foreignTable": "ContentEventType", "displayValue": "Behavior Session", "displayField": "cnvt_name", "foreignDisplayColumn": "cnvt_name"}, {"datatype": "DATE", "name": "cnvn_dateUntil", "title": "Until date", "position": 5, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_cf_task", "title": "Task", "position": 6, "value": null, "hidden": false, "editable": true}, {"datatype": "MULTIPLE_FOREIGN_KEY", "name": "cnvn_cf_fk_trainer", "title": "Trainer", "position": 7, "value": [], "hidden": false, "editable": true, "foreignTable": "User", "displayValues": [], "foreignDisplayColumn": "user_userName", "joinedDisplayValue": ""}, {"datatype": "FOREIGN_KEY", "name": "cnvn_cf_fk_instrument", "title": "Instrument", "position": 8, "value": null, "hidden": false, "editable": true, "foreignTable": "ReferenceDataRecord", "displayValue": null, "displayField": "cnvn_cf_fk_instrument_display", "foreignDisplayColumn": "rdrc_name"}, {"datatype": "BOOLEAN", "name": "cnvn_cf_stageIsOnCurriculum", "title": "Stage Is On Curriculum", "position": 9, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskStage", "title": "Task Stage", "position": 10, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskSchemaVersion", "title": "Task Schema Version", "position": 11, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_softwareVersion", "title": "Software Version", "position": 12, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_notes", "title": "Notes", "position": 13, "value": null, "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_content", "title": "Content", "position": 14, "value": 1, "hidden": false, "editable": true, "foreignTable": "Content", "displayValue": "00000000", "displayField": "cntn_id", "foreignDisplayColumn": "cntn_id"}, {"datatype": "STRING", "name": "cnvn_barCode", "title": "Barcode", "position": 15, "value": "CE00000010", "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_group", "title": "Group", "position": 16, "value": null, "hidden": false, "editable": true, "foreignTable": "Groups", "displayValue": null, "displayField": "grps_groupName", "foreignDisplayColumn": "grps_groupName"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_experimentRunStep", "title": "Experiment run step", "position": 17, "value": null, "hidden": true, "editable": true, "foreignTable": "ExperimentRunStep", "displayValue": null, "displayField": "xprs_name", "foreignDisplayColumn": "xprs_name"}, {"datatype": "STRING", "name": "cnvn_createdBy", "title": "Created by", "position": 18, "value": "LKim", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_createdOn", "title": "Created on", "position": 19, "value": 1714500198793, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_modifiedBy", "title": "Modified by", "position": 20, "value": "LKim", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_modifiedOn", "title": "Modified on", "position": 21, "value": 1714500198793, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_user", "title": "User", "position": 22, "value": null, "hidden": true, "editable": true, "foreignTable": "User", "displayValue": null, "displayField": "user_userName", "foreignDisplayColumn": "user_userName"}, {"datatype": "STRING", "name": "xprs_name", "title": "Name", "position": 23, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "stud_name", "title": "Name", "position": 24, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cntn_id", "title": "Id", "position": 25, "value": "00000000", "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cnvt_name", "title": "Name", "position": 26, "value": "Behavior Session", "hidden": true, "editable": true}, {"datatype": "INTEGER", "name": "cnvn_pk", "title": "cnvn_pk", "position": 27, "value": 16, "hidden": true, "editable": true}], "canUpdate": true, "canDelete": true, "links": [{"rel": "self", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/16"}, {"rel": "cnvn_fk_contentEventType", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10"}, {"rel": "cnvn_fk_content", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1"}, {"rel": "-crfr_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=16"}, {"rel": "-qrcv_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=16"}, {"rel": "-wfsf_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=16"}, {"rel": "attachments", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/16"}]}, {"pk": 17, "tableName": "ContentEvent", "columns": [{"datatype": "FOREIGN_KEY", "name": "cnvn_fk_study", "title": "Study", "position": 0, "value": null, "hidden": false, "editable": true, "foreignTable": "Study", "displayValue": null, "displayField": "stud_name", "foreignDisplayColumn": "stud_name"}, {"datatype": "DATE", "name": "cnvn_cf_scheduledDate", "title": "Scheduled Date", "position": 1, "value": null, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_date", "title": "Date", "position": 2, "value": 1714478400000, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_dateFrom", "title": "From date", "position": 3, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_contentEventType", "title": "Content event type", "position": 4, "value": 10, "hidden": false, "editable": false, "foreignTable": "ContentEventType", "displayValue": "Behavior Session", "displayField": "cnvt_name", "foreignDisplayColumn": "cnvt_name"}, {"datatype": "DATE", "name": "cnvn_dateUntil", "title": "Until date", "position": 5, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_cf_task", "title": "Task", "position": 6, "value": null, "hidden": false, "editable": true}, {"datatype": "MULTIPLE_FOREIGN_KEY", "name": "cnvn_cf_fk_trainer", "title": "Trainer", "position": 7, "value": [], "hidden": false, "editable": true, "foreignTable": "User", "displayValues": [], "foreignDisplayColumn": "user_userName", "joinedDisplayValue": ""}, {"datatype": "FOREIGN_KEY", "name": "cnvn_cf_fk_instrument", "title": "Instrument", "position": 8, "value": null, "hidden": false, "editable": true, "foreignTable": "ReferenceDataRecord", "displayValue": null, "displayField": "cnvn_cf_fk_instrument_display", "foreignDisplayColumn": "rdrc_name"}, {"datatype": "BOOLEAN", "name": "cnvn_cf_stageIsOnCurriculum", "title": "Stage Is On Curriculum", "position": 9, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskStage", "title": "Task Stage", "position": 10, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskSchemaVersion", "title": "Task Schema Version", "position": 11, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_softwareVersion", "title": "Software Version", "position": 12, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_notes", "title": "Notes", "position": 13, "value": null, "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_content", "title": "Content", "position": 14, "value": 1, "hidden": false, "editable": true, "foreignTable": "Content", "displayValue": "00000000", "displayField": "cntn_id", "foreignDisplayColumn": "cntn_id"}, {"datatype": "STRING", "name": "cnvn_barCode", "title": "Barcode", "position": 15, "value": "CE00000011", "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_group", "title": "Group", "position": 16, "value": null, "hidden": false, "editable": true, "foreignTable": "Groups", "displayValue": null, "displayField": "grps_groupName", "foreignDisplayColumn": "grps_groupName"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_experimentRunStep", "title": "Experiment run step", "position": 17, "value": null, "hidden": true, "editable": true, "foreignTable": "ExperimentRunStep", "displayValue": null, "displayField": "xprs_name", "foreignDisplayColumn": "xprs_name"}, {"datatype": "STRING", "name": "cnvn_createdBy", "title": "Created by", "position": 18, "value": "LKim", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_createdOn", "title": "Created on", "position": 19, "value": 1714500305462, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_modifiedBy", "title": "Modified by", "position": 20, "value": "LKim", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_modifiedOn", "title": "Modified on", "position": 21, "value": 1714500305462, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_user", "title": "User", "position": 22, "value": null, "hidden": true, "editable": true, "foreignTable": "User", "displayValue": null, "displayField": "user_userName", "foreignDisplayColumn": "user_userName"}, {"datatype": "STRING", "name": "xprs_name", "title": "Name", "position": 23, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "stud_name", "title": "Name", "position": 24, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cntn_id", "title": "Id", "position": 25, "value": "00000000", "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cnvt_name", "title": "Name", "position": 26, "value": "Behavior Session", "hidden": true, "editable": true}, {"datatype": "INTEGER", "name": "cnvn_pk", "title": "cnvn_pk", "position": 27, "value": 17, "hidden": true, "editable": true}], "canUpdate": true, "canDelete": true, "links": [{"rel": "self", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/17"}, {"rel": "cnvn_fk_contentEventType", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10"}, {"rel": "cnvn_fk_content", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1"}, {"rel": "-crfr_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=17"}, {"rel": "-qrcv_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=17"}, {"rel": "-wfsf_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=17"}, {"rel": "attachments", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/17"}]}, {"pk": 55, "tableName": "ContentEvent", "columns": [{"datatype": "FOREIGN_KEY", "name": "cnvn_fk_study", "title": "Study", "position": 0, "value": null, "hidden": false, "editable": true, "foreignTable": "Study", "displayValue": null, "displayField": "stud_name", "foreignDisplayColumn": "stud_name"}, {"datatype": "DATE", "name": "cnvn_cf_scheduledDate", "title": "Scheduled Date", "position": 1, "value": 1711958460000, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_date", "title": "Date", "position": 2, "value": 1719446900803, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_dateFrom", "title": "From date", "position": 3, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_contentEventType", "title": "Content event type", "position": 4, "value": 10, "hidden": false, "editable": false, "foreignTable": "ContentEventType", "displayValue": "Behavior Session", "displayField": "cnvt_name", "foreignDisplayColumn": "cnvt_name"}, {"datatype": "DATE", "name": "cnvn_dateUntil", "title": "Until date", "position": 5, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_cf_task", "title": "Task", "position": 6, "value": "TestTask", "hidden": false, "editable": true}, {"datatype": "MULTIPLE_FOREIGN_KEY", "name": "cnvn_cf_fk_trainer", "title": "Trainer", "position": 7, "value": [19], "hidden": false, "editable": true, "foreignTable": "User", "displayValues": ["ClarkR"], "foreignDisplayColumn": "user_userName", "joinedDisplayValue": "ClarkR"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_cf_fk_instrument", "title": "Instrument", "position": 8, "value": 1743, "hidden": false, "editable": true, "foreignTable": "ReferenceDataRecord", "displayValue": "323_EPHYS1_OPTO_20240212", "displayField": "cnvn_cf_fk_instrument_display", "foreignDisplayColumn": "rdrc_name"}, {"datatype": "BOOLEAN", "name": "cnvn_cf_stageIsOnCurriculum", "title": "Stage Is On Curriculum", "position": 9, "value": true, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskStage", "title": "Task Stage", "position": 10, "value": "TestTaskStage", "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskSchemaVersion", "title": "Task Schema Version", "position": 11, "value": "TestTaskSchemaVersion", "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_softwareVersion", "title": "Software Version", "position": 12, "value": "TestSoftwareVersion", "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_notes", "title": "Notes", "position": 13, "value": null, "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_content", "title": "Content", "position": 14, "value": 1, "hidden": false, "editable": true, "foreignTable": "Content", "displayValue": "00000000", "displayField": "cntn_id", "foreignDisplayColumn": "cntn_id"}, {"datatype": "STRING", "name": "cnvn_barCode", "title": "Barcode", "position": 15, "value": "CE00000060", "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_group", "title": "Group", "position": 16, "value": null, "hidden": false, "editable": true, "foreignTable": "Groups", "displayValue": null, "displayField": "grps_groupName", "foreignDisplayColumn": "grps_groupName"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_experimentRunStep", "title": "Experiment run step", "position": 17, "value": null, "hidden": true, "editable": true, "foreignTable": "ExperimentRunStep", "displayValue": null, "displayField": "xprs_name", "foreignDisplayColumn": "xprs_name"}, {"datatype": "STRING", "name": "cnvn_createdBy", "title": "Created by", "position": 18, "value": "SIPE", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_createdOn", "title": "Created on", "position": 19, "value": 1719447031384, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_modifiedBy", "title": "Modified by", "position": 20, "value": "SIPE", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_modifiedOn", "title": "Modified on", "position": 21, "value": 1719447031384, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_user", "title": "User", "position": 22, "value": null, "hidden": true, "editable": true, "foreignTable": "User", "displayValue": null, "displayField": "user_userName", "foreignDisplayColumn": "user_userName"}, {"datatype": "STRING", "name": "xprs_name", "title": "Name", "position": 23, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "stud_name", "title": "Name", "position": 24, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cntn_id", "title": "Id", "position": 25, "value": "00000000", "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cnvt_name", "title": "Name", "position": 26, "value": "Behavior Session", "hidden": true, "editable": true}, {"datatype": "INTEGER", "name": "cnvn_pk", "title": "cnvn_pk", "position": 27, "value": 55, "hidden": true, "editable": true}], "canUpdate": true, "canDelete": true, "links": [{"rel": "self", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/55"}, {"rel": "cnvn_fk_contentEventType", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10"}, {"rel": "cnvn_cf_fk_instrument", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743"}, {"rel": "cnvn_fk_content", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1"}, {"rel": "-crfr_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=55"}, {"rel": "-qrcv_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=55"}, {"rel": "-wfsf_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=55"}, {"rel": "attachments", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/55"}]}] \ No newline at end of file From d1e115fc4a01d924bcad231f43c06e166ba0a032 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 28 Jun 2024 14:12:23 -0700 Subject: [PATCH 07/15] add explicit None return --- src/aind_slims_api/mouse.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/aind_slims_api/mouse.py b/src/aind_slims_api/mouse.py index c318b19..ad3a439 100644 --- a/src/aind_slims_api/mouse.py +++ b/src/aind_slims_api/mouse.py @@ -62,7 +62,7 @@ def fetch_mouse_content( ) else: logger.warning("Warning, Mouse not in SLIMS") - return + return None try: mouse = SlimsMouseContent.model_validate(mouse_details) @@ -71,9 +71,3 @@ def fetch_mouse_content( return mouse_details.json_entity return mouse - - -if __name__ == "__main__": - fetch_mouse_content( - - ) \ No newline at end of file From b0ddd8d301f97bfa80ada584a0ebc778510e6db5 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 28 Jun 2024 14:13:12 -0700 Subject: [PATCH 08/15] add instrument fetching --- src/aind_slims_api/instrument.py | 37 +-- ...fetch_instrument_response.json_entity.json | 294 ++++++++++++++++++ tests/test_instrument.py | 69 ++++ 3 files changed, 369 insertions(+), 31 deletions(-) create mode 100644 tests/resources/example_fetch_instrument_response.json_entity.json create mode 100644 tests/test_instrument.py diff --git a/src/aind_slims_api/instrument.py b/src/aind_slims_api/instrument.py index 192df98..8568ecb 100644 --- a/src/aind_slims_api/instrument.py +++ b/src/aind_slims_api/instrument.py @@ -2,13 +2,10 @@ import logging from typing import Any -from datetime import datetime -from pydantic import Field, ValidationError, field_serializer +from pydantic import Field from aind_slims_api.core import SlimsBaseModel, SlimsClient, SLIMSTABLES -from aind_slims_api.mouse import fetch_mouse_content, SlimsMouseContent -from aind_slims_api.user import fetch_user logger = logging.getLogger() @@ -16,8 +13,8 @@ class SlimsInstrument(SlimsBaseModel): """Model for an instance of the Behavior Session ContentEvent""" - name: str = Field(..., serialization_alias="nstr_name") - pk: int = Field(..., serialization_alias="nstr_pk") + name: str = Field(..., alias="nstr_name") + pk: int = Field(..., alias="nstr_pk") _slims_table: SLIMSTABLES = "Instrument" # todo add more useful fields @@ -33,7 +30,7 @@ def fetch_instrument_content( ------- tuple: list: - Validated SlimsBehaviorSessionContentEvent objects + Validated SlimsInstrument objects list: Dictionaries representations of objects that failed validation @@ -52,7 +49,7 @@ def fetch_instrument_content( f"Warning, Multiple instruments in SLIMS with name {instrument_name}, " f"using pk={instrument_details.pk}" ) - return instrument_details + return instrument_details else: if len(unvalidated) > 0: logger.warning( @@ -60,27 +57,5 @@ def fetch_instrument_content( f"using pk={unvalidated[0]['pk']}" ) return unvalidated[0] - - return None - - -if __name__ == "__main__": - import os - logger.setLevel(logging.DEBUG) - client = SlimsClient( - username=os.getenv("SLIMS_USERNAME"), - password=os.getenv("SLIMS_PASSWORD"), - ) - ret = client.fetch( - "Instrument", - nstr_name="323_EPHYS1_OPTO", - ) - import json - # ret = fetch_instrument_content( - # client, - # "323_EPHYS1_OPTO_20240212", - # ) - print([ - item.nstr_name.value for item in ret - ]) + return None diff --git a/tests/resources/example_fetch_instrument_response.json_entity.json b/tests/resources/example_fetch_instrument_response.json_entity.json new file mode 100644 index 0000000..a463e79 --- /dev/null +++ b/tests/resources/example_fetch_instrument_response.json_entity.json @@ -0,0 +1,294 @@ +[ + { + "pk": 4, + "tableName": "Instrument", + "columns": [ + { + "datatype": "STRING", + "name": "nstr_name", + "title": "Name", + "position": 0, + "value": "323_EPHYS1_OPTO", + "hidden": false, + "editable": true + }, + { + "datatype": "ENUM", + "name": "icon", + "title": "Icon", + "position": 1, + "value": "data_icons/rat.png", + "hidden": false, + "editable": true, + "displayValue": "data_icons/rat.png" + }, + { + "datatype": "STRING", + "name": "nstr_uniqueIdentifier", + "title": "Unique identifier", + "position": 2, + "value": "nstr_323_dot_rig1", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "nstr_description", + "title": "Description", + "position": 3, + "value": "

EPHYS1 Rig configuration for opto experiments

\n\n

Main User: Anna Lakunina

\n", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "nstr_fk_instrumentType", + "title": "Instrument type", + "position": 4, + "value": 3, + "hidden": false, + "editable": false, + "foreignTable": "InstrumentType", + "displayValue": "Behavior and Physiology Rig", + "displayField": "nstp_name", + "foreignDisplayColumn": "nstp_name" + }, + { + "datatype": "FOREIGN_KEY", + "name": "nstr_fk_user", + "title": "User", + "position": 5, + "value": 7, + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValue": "LKim", + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "nstr_fk_group", + "title": "Group", + "position": 6, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "nstr_fk_status", + "title": "Status", + "position": 7, + "value": 34, + "hidden": false, + "editable": true, + "foreignTable": "Status", + "displayValue": "Available", + "displayField": "stts_name", + "foreignDisplayColumn": "stts_name" + }, + { + "datatype": "BOOLEAN", + "name": "nstr_active", + "title": "Active", + "position": 8, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "nstr_cf_facilitiesId", + "title": "Facilities ID", + "position": 9, + "value": null, + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "nstr_cf_fk_instrumentLocation", + "title": "Instrument Location", + "position": 10, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Location", + "displayValue": null, + "displayField": "nstr_cf_fk_instrumentLocation_display", + "foreignDisplayColumn": "lctn_name" + }, + { + "datatype": "BOOLEAN", + "name": "nstr_calibrated", + "title": "Calibrated", + "position": 11, + "value": false, + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "nstr_calibrationExpiryDate", + "title": "Calibration expiry date", + "position": 12, + "value": null, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "nstr_createdBy", + "title": "Created by", + "position": 13, + "value": "LKim", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "nstr_createdOn", + "title": "Created on", + "position": 14, + "value": 1698096044392, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "nstr_modifiedBy", + "title": "Modified by", + "position": 15, + "value": "LKim", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "nstr_modifiedOn", + "title": "Modified on", + "position": 16, + "value": 1716321087534, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "INTEGER", + "name": "nstr_pk", + "title": "nstr_pk", + "position": 17, + "value": 4, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "nstp_name", + "title": "Name", + "position": 18, + "value": "Behavior and Physiology Rig", + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "nstr_fk_calibrationRun", + "title": "nstr_fk_calibrationRun", + "position": 19, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRun", + "displayValue": null, + "displayField": "xprn_name", + "foreignDisplayColumn": "xprn_name" + } + ], + "canUpdate": false, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Instrument/4" + }, + { + "rel": "nstr_fk_instrumentType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/InstrumentType/3" + }, + { + "rel": "nstr_fk_user", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/User/7" + }, + { + "rel": "nstr_fk_status", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Status/34" + }, + { + "rel": "-xptm_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ExperimentTemplate?xptm_cf_fk_instrument=4" + }, + { + "rel": "-rdrc_cf_fk_rigInstrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord?rdrc_cf_fk_rigInstrument=4" + }, + { + "rel": "-rdrc_cf_fk_deviceName", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord?rdrc_cf_fk_deviceName=4" + }, + { + "rel": "-rdrc_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord?rdrc_cf_fk_instrument=4" + }, + { + "rel": "-xprn_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ExperimentRun?xprn_fk_instrument=4" + }, + { + "rel": "-xprs_cf_fk_rigInstrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ExperimentRunStep?xprs_cf_fk_rigInstrument=4" + }, + { + "rel": "-rslt_cf_fk_balance", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Result?rslt_cf_fk_balance=4" + }, + { + "rel": "-rslt_cf_fk_workStation", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Result?rslt_cf_fk_workStation=4" + }, + { + "rel": "-rslt_cf_fk_injectionDevice", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Result?rslt_cf_fk_injectionDevice=4" + }, + { + "rel": "-rslt_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Result?rslt_cf_fk_instrument=4" + }, + { + "rel": "-xprm_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Experiment?xprm_fk_instrument=4" + }, + { + "rel": "-nsrn_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/InstrumentRun?nsrn_fk_instrument=4" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/Instrument/4" + } + ] + } +] \ No newline at end of file diff --git a/tests/test_instrument.py b/tests/test_instrument.py new file mode 100644 index 0000000..dcf89ec --- /dev/null +++ b/tests/test_instrument.py @@ -0,0 +1,69 @@ +"""Tests methods in mouse module""" + +import json +import os +import unittest +from pathlib import Path +from unittest.mock import MagicMock, patch +from copy import deepcopy + +from slims.internal import Record + +from aind_slims_api.core import SlimsClient +from aind_slims_api.instrument import ( + fetch_instrument_content, +) + +RESOURCES_DIR = Path(os.path.dirname(os.path.realpath(__file__))) / "resources" + + +class TestInstrument(unittest.TestCase): + """Tests top level methods in mouse module""" + + example_client: SlimsClient + example_response: Record + + @classmethod + def setUpClass(cls): + """Load json files of expected responses from slims""" + cls.example_client = SlimsClient( + url="http://fake_url", username="user", password="pass" + ) + cls.example_response = [ + Record(json_entity=r, slims_api=cls.example_client.db.slims_api) + for r in json.loads( + ( + RESOURCES_DIR / + "example_fetch_instrument_response.json_entity.json" + ).read_text() + ) + ] + + @patch("slims.slims.Slims.fetch") + def test_fetch_content_success( + self, + mock_fetch: MagicMock + ): + """Test fetch_instrument_content when successful""" + mock_fetch.return_value = self.example_response + response = fetch_instrument_content( + self.example_client, "323_EPHYS1_OPTO") + self.assertEqual( + response.json_entity, self.example_response[0].json_entity + ) + + @patch("slims.slims.Slims.fetch") + def test_fetch_fail( + self, mock_fetch: MagicMock, + ): + """Test fetch_instrument_content when invalid instrument name is given. + """ + mock_fetch.return_value = [] + response = fetch_instrument_content( + self.example_client, + "Hopefully not a valid instrument name right?") + self.assertTrue(response is None) + + +if __name__ == "__main__": + unittest.main() From 274d5cf227dcc7f89f4dce1a25bd0464c29fc917 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 28 Jun 2024 17:12:14 -0700 Subject: [PATCH 09/15] behavior session testing --- src/aind_slims_api/behavior_session.py | 139 +- src/aind_slims_api/core.py | 12 +- ...avior_session_content_events_response.json | 1 - ...n_content_events_response.json_entity.json | 4526 +++++++++++++++++ ...n_content_events_response.json_entity.json | 350 ++ tests/test_behavior_session.py | 132 +- tests/test_instrument.py | 1 - 7 files changed, 5030 insertions(+), 131 deletions(-) delete mode 100644 tests/resources/example_fetch_behavior_session_content_events_response.json create mode 100644 tests/resources/example_fetch_behavior_session_content_events_response.json_entity.json create mode 100644 tests/resources/example_write_behavior_session_content_events_response.json_entity.json diff --git a/src/aind_slims_api/behavior_session.py b/src/aind_slims_api/behavior_session.py index 7fd7bcf..f0d9031 100644 --- a/src/aind_slims_api/behavior_session.py +++ b/src/aind_slims_api/behavior_session.py @@ -4,11 +4,12 @@ from typing import Any from datetime import datetime -from pydantic import Field, ValidationError, field_serializer +from pydantic import Field, ValidationError from aind_slims_api.core import SlimsBaseModel, SlimsClient, SLIMSTABLES from aind_slims_api.mouse import fetch_mouse_content, SlimsMouseContent -from aind_slims_api.user import fetch_user +from aind_slims_api.user import fetch_user, SlimsUser +from aind_slims_api.instrument import fetch_instrument_content, SlimsInstrument logger = logging.getLogger() @@ -16,21 +17,25 @@ class SlimsBehaviorSessionContentEvent(SlimsBaseModel): """Model for an instance of the Behavior Session ContentEvent""" - pk: int = Field(..., alias="cnvn_pk") - mouse_name: int | None = Field(default=None, alias="cnvn_fk_content") # used as reference to mouse - notes: str = Field(..., alias="cnvn_cf_notes") - task_stage: str = Field(..., alias="cnvn_cf_taskStage") - instrument: int = Field(..., alias="cnvn_cf_fk_instrument") # TODO: Check if we want to use str for this, Dynamic Choice - trainer: list[int] = Field(..., alias="cnvn_cf_fk_trainer") # TODO: Check if we want to use str for this, Dynamic Choice - task: str = Field(..., alias="cnvn_cf_task") - is_curriculum_suggestion: bool = Field( - ..., alias="cnvn_cf_stageIsOnCurriculum") - task_version: str = Field(..., alias="cnvn_cf_taskSchemaVersion") + pk: int | None = Field(default=None, alias="cnvn_pk") + mouse_name: int | None = Field( + default=None, alias="cnvn_fk_content") # used as reference to mouse + notes: str | None = Field(default=None, alias="cnvn_cf_notes") + task_stage: str | None = Field(default=None, alias="cnvn_cf_taskStage") + instrument: int | None = Field( + default=None, alias="cnvn_cf_fk_instrument") + trainers: list[int] = Field( + default=[], alias="cnvn_cf_fk_trainer") + task: str | None = Field(default=None, alias="cnvn_cf_task") + is_curriculum_suggestion: bool | None = Field( + default=None, alias="cnvn_cf_stageIsOnCurriculum") + task_schema_version: str | None = Field( + default=None, alias="cnvn_cf_taskSchemaVersion") software_version: str | None = Field( default=None, alias="cnvn_cf_softwareVersion") - date: datetime = Field(..., alias="cnvn_cf_scheduledDate") + date: datetime | None = Field(..., alias="cnvn_cf_scheduledDate") - cnvn_fk_contentEventType: int = 10 + cnvn_fk_contentEventType: int = 10 # pk of Behavior Session ContentEvent _slims_table: SLIMSTABLES = "ContentEvent" @@ -75,43 +80,11 @@ def fetch_behavior_session_content_events( list: Dictionaries representations of objects that failed validation """ - # mouse = fetch_mouse_content(client, mouse_name) - # print(mouse.model_dump().keys()) mouse_pk = _fetch_mouse_pk(client, mouse_name) logger.debug(f"Mouse pk: {mouse_pk}") if mouse_pk is None: return [], [] - - # response = client.fetch( - # "ContentEvent", - # cnvt_name="Behavior Session", - # cnvn_fk_content=mouse.pk, - # ) - # print(len(response)) - # import json - # import pathlib - # pathlib.Path("temp.json").write_text(json.dumps([r.json_entity for r in response])) - # # print(dir(response[1])) - # # print(response[1].cnvt_name.value) - # # return - # # for attr in dir(response[1]): - # # if attr.startswith("cn"): - # # print(attr) - # # print(f"{attr}: {getattr(response[0], attr).value}") - # # return - # # print([ - # # item.cnvn_fk_contentEventType - # # for item in response - # # ]) - # # response = client.fetch( - # # "ContentEvent", - # # cnvn_fk_content_type="cnvt_behavior_session", - # # cnvn_fk_content=mouse.pk, - # # ) - - # # print(len(response)) - # # print(dir(response[1])) - # # print(mouse.barcode) + return client.fetch_models( SlimsBehaviorSessionContentEvent, cnvn_fk_content=mouse_pk, @@ -138,13 +111,44 @@ def write_behavior_session_content_events( logger.debug(f"Mouse pk: {mouse_pk}") if mouse_pk is None: raise ValueError(f"No mouse found with name {mouse_name}") - + instrument = fetch_instrument_content(client, instrument_name) + if isinstance(instrument, dict): + instrument_pk = instrument["pk"] + elif isinstance(instrument, SlimsInstrument): + instrument_pk = instrument.pk + elif instrument is None: + raise ValueError(f"No instrument found with name {instrument_name}") + else: + raise ValueError( + "Unexpected return type from fetch_instrument_content: %s" + % type(instrument) + ) + trainer_pks = [] + for trainer_name in trainer_names: + trainer = fetch_user(client, trainer_name) + if isinstance(trainer, dict): + trainer_pks.append(trainer["pk"]) + elif isinstance(trainer, SlimsUser): + trainer_pks.append(trainer.pk) + elif trainer is None: + raise ValueError(f"No trainer found with name {trainer_name}") + else: + raise ValueError( + "Unexpected return type from fetch_user: %s" + % type(trainer) + ) added = [] for behavior_session in behavior_sessions: updated = behavior_session.model_copy( - update={"mouse_name": mouse_pk}) + update={ + "mouse_name": mouse_pk, + "instrument": instrument_pk, + "trainers": trainer_pks, + }, + ) try: - validated = SlimsBehaviorSessionContentEvent.model_validate(updated) + validated = SlimsBehaviorSessionContentEvent.model_validate( + updated, from_attributes=True) except ValidationError as e: logger.error( f"SLIMS data validation failed. Skipping write, {repr(e)}") @@ -152,38 +156,3 @@ def write_behavior_session_content_events( added.append(client.add_model(validated)) return added - - -if __name__ == "__main__": - import os - logger.setLevel(logging.DEBUG) - client = SlimsClient( - username=os.getenv("SLIMS_USERNAME"), - password=os.getenv("SLIMS_PASSWORD"), - ) - ret = fetch_behavior_session_content_events( - client, - mouse_name="00000000", - ) - response = client.fetch( - "Instrument", - ) - print(response[0].pk()) - # raise Exception("bur") - # print(ret) - # print(fetch_user(client, "ClarkR")) - write_behavior_session_content_events( - client, - "00000000", - SlimsBehaviorSessionContentEvent( - cnvn_cf_notes="Test", - cnvn_cf_taskStage="Test", - cnvn_cf_fk_instrument=1743, - cnvn_cf_fk_trainer=[19], - cnvn_cf_task="Test", - cnvn_cf_stageIsOnCurriculum=True, - cnvn_cf_taskSchemaVersion="Test", - cnvn_cf_softwareVersion="Test", - cnvn_cf_scheduledDate=datetime(2021, 1, 1), - ), - ) diff --git a/src/aind_slims_api/core.py b/src/aind_slims_api/core.py index f65cb0a..1605973 100644 --- a/src/aind_slims_api/core.py +++ b/src/aind_slims_api/core.py @@ -237,7 +237,7 @@ def fetch_models( end=end, **kwargs, ) - print(response) + # print(response) validated = [] unvalidated = [] for record in response: @@ -304,15 +304,6 @@ def add_model( fields_to_include = set(args) or None fields_to_exclude = set(kwargs.get("exclude", [])) fields_to_exclude.add("pk") - import json - import pathlib - # dumped = model.model_dump_json( - # include=fields_to_include, - # exclude=fields_to_exclude, - # **kwargs, - # by_alias=True, - # ) - # pathlib.Path("temp.json").write_text(dumped) rtn = self.add( model._slims_table, model.model_dump( @@ -322,7 +313,6 @@ def add_model( by_alias=True, ), ) - pathlib.Path("temp.json").write_text(json.dumps(rtn.json_entity)) return type(model).model_validate(rtn) def update_model(self, model: SlimsBaseModel, *args, **kwargs): diff --git a/tests/resources/example_fetch_behavior_session_content_events_response.json b/tests/resources/example_fetch_behavior_session_content_events_response.json deleted file mode 100644 index 6a799bc..0000000 --- a/tests/resources/example_fetch_behavior_session_content_events_response.json +++ /dev/null @@ -1 +0,0 @@ -[{"pk": 16, "tableName": "ContentEvent", "columns": [{"datatype": "FOREIGN_KEY", "name": "cnvn_fk_study", "title": "Study", "position": 0, "value": null, "hidden": false, "editable": true, "foreignTable": "Study", "displayValue": null, "displayField": "stud_name", "foreignDisplayColumn": "stud_name"}, {"datatype": "DATE", "name": "cnvn_cf_scheduledDate", "title": "Scheduled Date", "position": 1, "value": null, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_date", "title": "Date", "position": 2, "value": 1714478400000, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_dateFrom", "title": "From date", "position": 3, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_contentEventType", "title": "Content event type", "position": 4, "value": 10, "hidden": false, "editable": false, "foreignTable": "ContentEventType", "displayValue": "Behavior Session", "displayField": "cnvt_name", "foreignDisplayColumn": "cnvt_name"}, {"datatype": "DATE", "name": "cnvn_dateUntil", "title": "Until date", "position": 5, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_cf_task", "title": "Task", "position": 6, "value": null, "hidden": false, "editable": true}, {"datatype": "MULTIPLE_FOREIGN_KEY", "name": "cnvn_cf_fk_trainer", "title": "Trainer", "position": 7, "value": [], "hidden": false, "editable": true, "foreignTable": "User", "displayValues": [], "foreignDisplayColumn": "user_userName", "joinedDisplayValue": ""}, {"datatype": "FOREIGN_KEY", "name": "cnvn_cf_fk_instrument", "title": "Instrument", "position": 8, "value": null, "hidden": false, "editable": true, "foreignTable": "ReferenceDataRecord", "displayValue": null, "displayField": "cnvn_cf_fk_instrument_display", "foreignDisplayColumn": "rdrc_name"}, {"datatype": "BOOLEAN", "name": "cnvn_cf_stageIsOnCurriculum", "title": "Stage Is On Curriculum", "position": 9, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskStage", "title": "Task Stage", "position": 10, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskSchemaVersion", "title": "Task Schema Version", "position": 11, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_softwareVersion", "title": "Software Version", "position": 12, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_notes", "title": "Notes", "position": 13, "value": null, "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_content", "title": "Content", "position": 14, "value": 1, "hidden": false, "editable": true, "foreignTable": "Content", "displayValue": "00000000", "displayField": "cntn_id", "foreignDisplayColumn": "cntn_id"}, {"datatype": "STRING", "name": "cnvn_barCode", "title": "Barcode", "position": 15, "value": "CE00000010", "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_group", "title": "Group", "position": 16, "value": null, "hidden": false, "editable": true, "foreignTable": "Groups", "displayValue": null, "displayField": "grps_groupName", "foreignDisplayColumn": "grps_groupName"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_experimentRunStep", "title": "Experiment run step", "position": 17, "value": null, "hidden": true, "editable": true, "foreignTable": "ExperimentRunStep", "displayValue": null, "displayField": "xprs_name", "foreignDisplayColumn": "xprs_name"}, {"datatype": "STRING", "name": "cnvn_createdBy", "title": "Created by", "position": 18, "value": "LKim", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_createdOn", "title": "Created on", "position": 19, "value": 1714500198793, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_modifiedBy", "title": "Modified by", "position": 20, "value": "LKim", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_modifiedOn", "title": "Modified on", "position": 21, "value": 1714500198793, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_user", "title": "User", "position": 22, "value": null, "hidden": true, "editable": true, "foreignTable": "User", "displayValue": null, "displayField": "user_userName", "foreignDisplayColumn": "user_userName"}, {"datatype": "STRING", "name": "xprs_name", "title": "Name", "position": 23, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "stud_name", "title": "Name", "position": 24, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cntn_id", "title": "Id", "position": 25, "value": "00000000", "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cnvt_name", "title": "Name", "position": 26, "value": "Behavior Session", "hidden": true, "editable": true}, {"datatype": "INTEGER", "name": "cnvn_pk", "title": "cnvn_pk", "position": 27, "value": 16, "hidden": true, "editable": true}], "canUpdate": true, "canDelete": true, "links": [{"rel": "self", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/16"}, {"rel": "cnvn_fk_contentEventType", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10"}, {"rel": "cnvn_fk_content", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1"}, {"rel": "-crfr_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=16"}, {"rel": "-qrcv_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=16"}, {"rel": "-wfsf_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=16"}, {"rel": "attachments", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/16"}]}, {"pk": 17, "tableName": "ContentEvent", "columns": [{"datatype": "FOREIGN_KEY", "name": "cnvn_fk_study", "title": "Study", "position": 0, "value": null, "hidden": false, "editable": true, "foreignTable": "Study", "displayValue": null, "displayField": "stud_name", "foreignDisplayColumn": "stud_name"}, {"datatype": "DATE", "name": "cnvn_cf_scheduledDate", "title": "Scheduled Date", "position": 1, "value": null, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_date", "title": "Date", "position": 2, "value": 1714478400000, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_dateFrom", "title": "From date", "position": 3, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_contentEventType", "title": "Content event type", "position": 4, "value": 10, "hidden": false, "editable": false, "foreignTable": "ContentEventType", "displayValue": "Behavior Session", "displayField": "cnvt_name", "foreignDisplayColumn": "cnvt_name"}, {"datatype": "DATE", "name": "cnvn_dateUntil", "title": "Until date", "position": 5, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_cf_task", "title": "Task", "position": 6, "value": null, "hidden": false, "editable": true}, {"datatype": "MULTIPLE_FOREIGN_KEY", "name": "cnvn_cf_fk_trainer", "title": "Trainer", "position": 7, "value": [], "hidden": false, "editable": true, "foreignTable": "User", "displayValues": [], "foreignDisplayColumn": "user_userName", "joinedDisplayValue": ""}, {"datatype": "FOREIGN_KEY", "name": "cnvn_cf_fk_instrument", "title": "Instrument", "position": 8, "value": null, "hidden": false, "editable": true, "foreignTable": "ReferenceDataRecord", "displayValue": null, "displayField": "cnvn_cf_fk_instrument_display", "foreignDisplayColumn": "rdrc_name"}, {"datatype": "BOOLEAN", "name": "cnvn_cf_stageIsOnCurriculum", "title": "Stage Is On Curriculum", "position": 9, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskStage", "title": "Task Stage", "position": 10, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskSchemaVersion", "title": "Task Schema Version", "position": 11, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_softwareVersion", "title": "Software Version", "position": 12, "value": null, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_notes", "title": "Notes", "position": 13, "value": null, "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_content", "title": "Content", "position": 14, "value": 1, "hidden": false, "editable": true, "foreignTable": "Content", "displayValue": "00000000", "displayField": "cntn_id", "foreignDisplayColumn": "cntn_id"}, {"datatype": "STRING", "name": "cnvn_barCode", "title": "Barcode", "position": 15, "value": "CE00000011", "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_group", "title": "Group", "position": 16, "value": null, "hidden": false, "editable": true, "foreignTable": "Groups", "displayValue": null, "displayField": "grps_groupName", "foreignDisplayColumn": "grps_groupName"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_experimentRunStep", "title": "Experiment run step", "position": 17, "value": null, "hidden": true, "editable": true, "foreignTable": "ExperimentRunStep", "displayValue": null, "displayField": "xprs_name", "foreignDisplayColumn": "xprs_name"}, {"datatype": "STRING", "name": "cnvn_createdBy", "title": "Created by", "position": 18, "value": "LKim", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_createdOn", "title": "Created on", "position": 19, "value": 1714500305462, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_modifiedBy", "title": "Modified by", "position": 20, "value": "LKim", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_modifiedOn", "title": "Modified on", "position": 21, "value": 1714500305462, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_user", "title": "User", "position": 22, "value": null, "hidden": true, "editable": true, "foreignTable": "User", "displayValue": null, "displayField": "user_userName", "foreignDisplayColumn": "user_userName"}, {"datatype": "STRING", "name": "xprs_name", "title": "Name", "position": 23, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "stud_name", "title": "Name", "position": 24, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cntn_id", "title": "Id", "position": 25, "value": "00000000", "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cnvt_name", "title": "Name", "position": 26, "value": "Behavior Session", "hidden": true, "editable": true}, {"datatype": "INTEGER", "name": "cnvn_pk", "title": "cnvn_pk", "position": 27, "value": 17, "hidden": true, "editable": true}], "canUpdate": true, "canDelete": true, "links": [{"rel": "self", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/17"}, {"rel": "cnvn_fk_contentEventType", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10"}, {"rel": "cnvn_fk_content", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1"}, {"rel": "-crfr_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=17"}, {"rel": "-qrcv_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=17"}, {"rel": "-wfsf_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=17"}, {"rel": "attachments", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/17"}]}, {"pk": 55, "tableName": "ContentEvent", "columns": [{"datatype": "FOREIGN_KEY", "name": "cnvn_fk_study", "title": "Study", "position": 0, "value": null, "hidden": false, "editable": true, "foreignTable": "Study", "displayValue": null, "displayField": "stud_name", "foreignDisplayColumn": "stud_name"}, {"datatype": "DATE", "name": "cnvn_cf_scheduledDate", "title": "Scheduled Date", "position": 1, "value": 1711958460000, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_date", "title": "Date", "position": 2, "value": 1719446900803, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_dateFrom", "title": "From date", "position": 3, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_contentEventType", "title": "Content event type", "position": 4, "value": 10, "hidden": false, "editable": false, "foreignTable": "ContentEventType", "displayValue": "Behavior Session", "displayField": "cnvt_name", "foreignDisplayColumn": "cnvt_name"}, {"datatype": "DATE", "name": "cnvn_dateUntil", "title": "Until date", "position": 5, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_cf_task", "title": "Task", "position": 6, "value": "TestTask", "hidden": false, "editable": true}, {"datatype": "MULTIPLE_FOREIGN_KEY", "name": "cnvn_cf_fk_trainer", "title": "Trainer", "position": 7, "value": [19], "hidden": false, "editable": true, "foreignTable": "User", "displayValues": ["ClarkR"], "foreignDisplayColumn": "user_userName", "joinedDisplayValue": "ClarkR"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_cf_fk_instrument", "title": "Instrument", "position": 8, "value": 1743, "hidden": false, "editable": true, "foreignTable": "ReferenceDataRecord", "displayValue": "323_EPHYS1_OPTO_20240212", "displayField": "cnvn_cf_fk_instrument_display", "foreignDisplayColumn": "rdrc_name"}, {"datatype": "BOOLEAN", "name": "cnvn_cf_stageIsOnCurriculum", "title": "Stage Is On Curriculum", "position": 9, "value": true, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskStage", "title": "Task Stage", "position": 10, "value": "TestTaskStage", "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskSchemaVersion", "title": "Task Schema Version", "position": 11, "value": "TestTaskSchemaVersion", "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_softwareVersion", "title": "Software Version", "position": 12, "value": "TestSoftwareVersion", "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_notes", "title": "Notes", "position": 13, "value": null, "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_content", "title": "Content", "position": 14, "value": 1, "hidden": false, "editable": true, "foreignTable": "Content", "displayValue": "00000000", "displayField": "cntn_id", "foreignDisplayColumn": "cntn_id"}, {"datatype": "STRING", "name": "cnvn_barCode", "title": "Barcode", "position": 15, "value": "CE00000060", "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_group", "title": "Group", "position": 16, "value": null, "hidden": false, "editable": true, "foreignTable": "Groups", "displayValue": null, "displayField": "grps_groupName", "foreignDisplayColumn": "grps_groupName"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_experimentRunStep", "title": "Experiment run step", "position": 17, "value": null, "hidden": true, "editable": true, "foreignTable": "ExperimentRunStep", "displayValue": null, "displayField": "xprs_name", "foreignDisplayColumn": "xprs_name"}, {"datatype": "STRING", "name": "cnvn_createdBy", "title": "Created by", "position": 18, "value": "SIPE", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_createdOn", "title": "Created on", "position": 19, "value": 1719447031384, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_modifiedBy", "title": "Modified by", "position": 20, "value": "SIPE", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_modifiedOn", "title": "Modified on", "position": 21, "value": 1719447031384, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_user", "title": "User", "position": 22, "value": null, "hidden": true, "editable": true, "foreignTable": "User", "displayValue": null, "displayField": "user_userName", "foreignDisplayColumn": "user_userName"}, {"datatype": "STRING", "name": "xprs_name", "title": "Name", "position": 23, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "stud_name", "title": "Name", "position": 24, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cntn_id", "title": "Id", "position": 25, "value": "00000000", "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cnvt_name", "title": "Name", "position": 26, "value": "Behavior Session", "hidden": true, "editable": true}, {"datatype": "INTEGER", "name": "cnvn_pk", "title": "cnvn_pk", "position": 27, "value": 55, "hidden": true, "editable": true}], "canUpdate": true, "canDelete": true, "links": [{"rel": "self", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/55"}, {"rel": "cnvn_fk_contentEventType", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10"}, {"rel": "cnvn_cf_fk_instrument", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743"}, {"rel": "cnvn_fk_content", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1"}, {"rel": "-crfr_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=55"}, {"rel": "-qrcv_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=55"}, {"rel": "-wfsf_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=55"}, {"rel": "attachments", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/55"}]}] \ No newline at end of file diff --git a/tests/resources/example_fetch_behavior_session_content_events_response.json_entity.json b/tests/resources/example_fetch_behavior_session_content_events_response.json_entity.json new file mode 100644 index 0000000..89f10d1 --- /dev/null +++ b/tests/resources/example_fetch_behavior_session_content_events_response.json_entity.json @@ -0,0 +1,4526 @@ +[ + { + "pk": 63, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609488000000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 1743, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "323_EPHYS1_OPTO_20240212", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000068", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719519578574, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719519578574, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 63, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/63" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=63" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=63" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=63" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/63" + } + ] + }, + { + "pk": 64, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609488000000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 1743, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "323_EPHYS1_OPTO_20240212", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000069", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719519770162, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719519770162, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 64, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/64" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=64" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=64" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=64" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/64" + } + ] + }, + { + "pk": 65, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609488000000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 1743, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "323_EPHYS1_OPTO_20240212", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000070", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719519807839, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719519807839, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 65, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/65" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=65" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=65" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=65" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/65" + } + ] + }, + { + "pk": 66, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609488000000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 1743, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "323_EPHYS1_OPTO_20240212", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000071", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719519920678, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719519920678, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 66, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/66" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=66" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=66" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=66" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/66" + } + ] + }, + { + "pk": 67, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609488000000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 1743, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "323_EPHYS1_OPTO_20240212", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000072", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719520076355, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719520076355, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 67, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/67" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=67" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=67" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=67" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/67" + } + ] + }, + { + "pk": 68, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609488000000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 1743, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "323_EPHYS1_OPTO_20240212", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000073", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719520175665, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719520175665, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 68, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/68" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=68" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=68" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=68" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/68" + } + ] + }, + { + "pk": 69, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609488000000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 1743, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "323_EPHYS1_OPTO_20240212", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000074", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719520241934, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719520241934, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 69, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/69" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=69" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=69" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=69" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/69" + } + ] + }, + { + "pk": 70, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609488000000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 1743, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "323_EPHYS1_OPTO_20240212", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000075", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719520290131, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719520290131, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 70, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/70" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=70" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=70" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=70" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/70" + } + ] + }, + { + "pk": 71, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609488000000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 1743, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "323_EPHYS1_OPTO_20240212", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000076", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719520328984, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719520328984, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 71, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/71" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=71" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=71" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=71" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/71" + } + ] + }, + { + "pk": 72, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609488000000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 4, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "EasyIndex", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000077", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719596214079, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719596214079, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 72, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/72" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/4" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=72" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=72" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=72" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/72" + } + ] + }, + { + "pk": 73, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609488000000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 4, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "EasyIndex", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000078", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719596274063, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719596274063, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 73, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/73" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/4" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=73" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=73" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=73" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/73" + } + ] + }, + { + "pk": 74, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609488000000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 4, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "EasyIndex", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000079", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719596330058, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719596330058, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 74, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/74" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/4" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=74" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=74" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=74" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/74" + } + ] + }, + { + "pk": 55, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1711958460000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": 1719446900803, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "TestTask", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 1743, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "323_EPHYS1_OPTO_20240212", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": true, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "TestTaskStage", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": "TestTaskSchemaVersion", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": "TestSoftwareVersion", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": null, + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000060", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719447031384, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719447031384, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 55, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/55" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=55" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=55" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=55" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/55" + } + ] + } +] \ No newline at end of file diff --git a/tests/resources/example_write_behavior_session_content_events_response.json_entity.json b/tests/resources/example_write_behavior_session_content_events_response.json_entity.json new file mode 100644 index 0000000..e1d8f7c --- /dev/null +++ b/tests/resources/example_write_behavior_session_content_events_response.json_entity.json @@ -0,0 +1,350 @@ +[ + { + "pk": 79, + "tableName": "ContentEvent", + "columns": [ + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_study", + "title": "Study", + "position": 0, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Study", + "displayValue": null, + "displayField": "stud_name", + "foreignDisplayColumn": "stud_name" + }, + { + "datatype": "DATE", + "name": "cnvn_cf_scheduledDate", + "title": "Scheduled Date", + "position": 1, + "value": 1609574400000, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_date", + "title": "Date", + "position": 2, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "DATE", + "name": "cnvn_dateFrom", + "title": "From date", + "position": 3, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_contentEventType", + "title": "Content event type", + "position": 4, + "value": 10, + "hidden": false, + "editable": false, + "foreignTable": "ContentEventType", + "displayValue": "Behavior Session", + "displayField": "cnvt_name", + "foreignDisplayColumn": "cnvt_name" + }, + { + "datatype": "DATE", + "name": "cnvn_dateUntil", + "title": "Until date", + "position": 5, + "value": null, + "hidden": true, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_cf_task", + "title": "Task", + "position": 6, + "value": "Test task", + "hidden": false, + "editable": true + }, + { + "datatype": "MULTIPLE_FOREIGN_KEY", + "name": "cnvn_cf_fk_trainer", + "title": "Trainer", + "position": 7, + "value": [ + 19 + ], + "hidden": false, + "editable": true, + "foreignTable": "User", + "displayValues": [ + "ClarkR" + ], + "foreignDisplayColumn": "user_userName", + "joinedDisplayValue": "ClarkR" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_cf_fk_instrument", + "title": "Instrument", + "position": 8, + "value": 4, + "hidden": false, + "editable": true, + "foreignTable": "ReferenceDataRecord", + "displayValue": "EasyIndex", + "displayField": "cnvn_cf_fk_instrument_display", + "foreignDisplayColumn": "rdrc_name" + }, + { + "datatype": "BOOLEAN", + "name": "cnvn_cf_stageIsOnCurriculum", + "title": "Stage Is On Curriculum", + "position": 9, + "value": null, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskStage", + "title": "Task Stage", + "position": 10, + "value": "Test stage", + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_taskSchemaVersion", + "title": "Task Schema Version", + "position": 11, + "value": null, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_softwareVersion", + "title": "Software Version", + "position": 12, + "value": null, + "hidden": false, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvn_cf_notes", + "title": "Notes", + "position": 13, + "value": "Test notes", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_content", + "title": "Content", + "position": 14, + "value": 1, + "hidden": false, + "editable": true, + "foreignTable": "Content", + "displayValue": "00000000", + "displayField": "cntn_id", + "foreignDisplayColumn": "cntn_id" + }, + { + "datatype": "STRING", + "name": "cnvn_barCode", + "title": "Barcode", + "position": 15, + "value": "CE00000084", + "hidden": false, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_group", + "title": "Group", + "position": 16, + "value": null, + "hidden": false, + "editable": true, + "foreignTable": "Groups", + "displayValue": null, + "displayField": "grps_groupName", + "foreignDisplayColumn": "grps_groupName" + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_experimentRunStep", + "title": "Experiment run step", + "position": 17, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "ExperimentRunStep", + "displayValue": null, + "displayField": "xprs_name", + "foreignDisplayColumn": "xprs_name" + }, + { + "datatype": "STRING", + "name": "cnvn_createdBy", + "title": "Created by", + "position": 18, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_createdOn", + "title": "Created on", + "position": 19, + "value": 1719615306529, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "cnvn_modifiedBy", + "title": "Modified by", + "position": 20, + "value": "SIPE", + "hidden": false, + "editable": true + }, + { + "datatype": "DATE", + "name": "cnvn_modifiedOn", + "title": "Modified on", + "position": 21, + "value": 1719615306529, + "hidden": false, + "editable": true, + "dateFormat": "MM/dd/yyyy HH:mm:ss", + "subType": "datetime", + "timeZone": "America/Los_Angeles" + }, + { + "datatype": "STRING", + "name": "stud_name", + "title": "Name", + "position": 22, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "FOREIGN_KEY", + "name": "cnvn_fk_user", + "title": "User", + "position": 23, + "value": null, + "hidden": true, + "editable": true, + "foreignTable": "User", + "displayValue": null, + "displayField": "user_userName", + "foreignDisplayColumn": "user_userName" + }, + { + "datatype": "STRING", + "name": "cntn_id", + "title": "Id", + "position": 24, + "value": "00000000", + "hidden": true, + "editable": true + }, + { + "datatype": "INTEGER", + "name": "cnvn_pk", + "title": "cnvn_pk", + "position": 25, + "value": 79, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "xprs_name", + "title": "Name", + "position": 26, + "value": null, + "hidden": true, + "editable": true + }, + { + "datatype": "STRING", + "name": "cnvt_name", + "title": "Name", + "position": 27, + "value": "Behavior Session", + "hidden": true, + "editable": true + } + ], + "canUpdate": true, + "canDelete": true, + "links": [ + { + "rel": "self", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/79" + }, + { + "rel": "cnvn_fk_contentEventType", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" + }, + { + "rel": "cnvn_cf_fk_instrument", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/4" + }, + { + "rel": "cnvn_fk_content", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" + }, + { + "rel": "-crfr_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=79" + }, + { + "rel": "-qrcv_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=79" + }, + { + "rel": "-wfsf_fk_contentEvent", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=79" + }, + { + "rel": "attachments", + "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/79" + } + ] + } + ] \ No newline at end of file diff --git a/tests/test_behavior_session.py b/tests/test_behavior_session.py index dd68f42..d40ee17 100644 --- a/tests/test_behavior_session.py +++ b/tests/test_behavior_session.py @@ -6,10 +6,20 @@ from pathlib import Path from unittest.mock import MagicMock, patch from copy import deepcopy +from datetime import datetime from slims.internal import Record from aind_slims_api.core import SlimsClient +from aind_slims_api.mouse import ( + SlimsMouseContent, +) +from aind_slims_api.user import ( + SlimsUser +) +from aind_slims_api.instrument import ( + SlimsInstrument +) from aind_slims_api.behavior_session import ( fetch_behavior_session_content_events, write_behavior_session_content_events, @@ -25,6 +35,10 @@ class TestBehaviorSession(unittest.TestCase): example_client: SlimsClient example_response: list[Record] example_behavior_sessions: list[SlimsBehaviorSessionContentEvent] + example_mouse: SlimsMouseContent + example_write_sessions_response: list[Record] + example_instrument: SlimsInstrument + example_trainer: SlimsUser @classmethod def setUpClass(cls): @@ -37,90 +51,142 @@ def setUpClass(cls): for r in json.loads( ( RESOURCES_DIR / - "example_fetch_behavior_sessions_response.json" + "example_fetch_behavior_session_content_events_response.json_entity.json" ).read_text() ) ] assert len(cls.example_response) > 1, \ "Example response must be greater than 1 for tests to work..." + + cls.example_instrument = SlimsInstrument( + nstr_name="323_EPHYS1_OPTO", + nstr_pk=1, + ) + cls.example_trainer = SlimsUser( + user_userName="ClarkR", + user_pk=1, + ) + cls.example_mouse = SlimsMouseContent( + cntn_barCode="00000000", + cntn_pk=1, + cntn_cf_waterRestricted=False, + cntn_cf_scientificPointOfContact=None, + cntn_cf_baselineWeight=None, + ) cls.example_behavior_sessions = [ SlimsBehaviorSessionContentEvent( - notes="Test notes", - task_stage="Test stage", - instrument="Test instrument", - trainer="Test trainer", - task="Test task", - date="2021-01-01", + cnvn_cf_notes="Test notes", + cnvn_cf_taskStage="Test stage", + cnvn_cf_task="Test task", + cnvn_cf_scheduledDate=datetime(2021, 1, 2), ), - SlimsBehaviorSessionContentEvent( - notes="Test notes", - task_stage="Test stage", - instrument="Test instrument", - trainer="Test trainer", - task="Test task", - date="2021-01-02", - ) ] + cls.example_write_sessions_response = [ + Record(json_entity=r, slims_api=cls.example_client.db.slims_api) + for r in json.loads( + ( + RESOURCES_DIR / + "example_write_behavior_session_content_events_response.json_entity.json" + ).read_text() + ) + ][0] @patch("slims.slims.Slims.fetch") + @patch("aind_slims_api.behavior_session.fetch_mouse_content") def test_fetch_behavior_session_content_events_success( self, + mock_fetch_mouse_content: MagicMock, mock_fetch: MagicMock ): """Test fetch_behavior_session_content_events when successful""" + mock_fetch_mouse_content.return_value = self.example_mouse mock_fetch.return_value = self.example_response - response = fetch_behavior_session_content_events( + validated, unvalidated = fetch_behavior_session_content_events( self.example_client, mouse_name="123456") + ret_entities = [item.json_entity for item in validated] + \ + [item["json_entity"] for item in unvalidated] self.assertEqual( [item.json_entity for item in self.example_response], - [item.json_entity for item in response], + ret_entities, ) - self.assertTrue(response[0].date < response[1].date) @patch("logging.Logger.error") + @patch("aind_slims_api.behavior_session.fetch_mouse_content") @patch("slims.slims.Slims.fetch") def test_fetch_behavior_session_content_events_validation_fail( - self, mock_fetch: MagicMock, mock_log_error: MagicMock + self, mock_fetch: MagicMock, mock_fetch_mouse_content: MagicMock, + mock_log_error: MagicMock ): - """Test fetch_behavior_session_content_events when bad values returned""" + """Test fetch_behavior_session_content_events when bad values returned + """ + mock_fetch_mouse_content.return_value = self.example_mouse wrong_return = deepcopy(self.example_response) - wrong_return[0].cnvn_cf_fk_instrument.value = 14 + wrong_return[0].cnvn_cf_fk_instrument.value = "burrito" mock_fetch.return_value = wrong_return fetch_behavior_session_content_events( self.example_client, mouse_name="123456") mock_log_error.assert_called() + @patch("aind_slims_api.behavior_session.fetch_user") + @patch("aind_slims_api.behavior_session.fetch_instrument_content") + @patch("aind_slims_api.behavior_session.fetch_mouse_content") @patch("slims.slims.Slims.add") def test_write_behavior_session_content_events_success( - self, mock_add: MagicMock, + self, + mock_add: MagicMock, + mock_fetch_mouse_content: MagicMock, + mock_fetch_instrument_content: MagicMock, + mock_fetch_user: MagicMock, ): """Test write_behavior_session_content_events success""" - mock_add.return_value = self.example_response - mouse_name = "123456" + mouse_name = "00000000" + mock_fetch_mouse_content.return_value = self.example_mouse + mock_fetch_instrument_content.return_value = self.example_instrument + mock_fetch_user.return_value = self.example_trainer + mock_add.return_value = self.example_write_sessions_response added = write_behavior_session_content_events( self.example_client, - mouse_name=mouse_name, + mouse_name, + self.example_instrument.name, + [self.example_trainer.username], *self.example_behavior_sessions, ) self.assertTrue( - all((item.mouse_name == mouse_name for item in added)) + all((item.mouse_name == self.example_mouse.pk for item in added)) ) self.assertTrue(len(added) == len(self.example_behavior_sessions)) + # @patch("aind_slims_api.behavior_session.SlimsBehaviorSessionContentEvent.model_validate") + @patch("aind_slims_api.behavior_session.fetch_user") + @patch("aind_slims_api.behavior_session.fetch_instrument_content") + @patch("aind_slims_api.behavior_session.fetch_mouse_content") @patch("logging.Logger.error") @patch("slims.slims.Slims.add") def test_write_behavior_session_content_events_validation_fail( - self, mock_add: MagicMock, mock_log_error: MagicMock + self, + mock_add: MagicMock, + mock_log_error: MagicMock, + mock_fetch_mouse_content: MagicMock, + mock_fetch_instrument_content: MagicMock, + mock_fetch_user: MagicMock, + # mock_model_validate: MagicMock, ): """Test write_behavior_session_content_events when bad values""" - mock_add.return_value = None - bad_behavior_sessions = deepcopy(self.example_behavior_sessions) - bad_behavior_sessions[0].cnvn_cf_fk_instrument.value = 14 + mouse_name = "00000000" + mock_fetch_mouse_content.return_value = self.example_mouse + bad_instrument = deepcopy(self.example_instrument) + bad_instrument = bad_instrument.model_copy(update={"pk": "burrito"}) + mock_fetch_instrument_content.return_value = bad_instrument + mock_fetch_user.return_value = self.example_trainer + mock_add.return_value = self.example_write_sessions_response added = write_behavior_session_content_events( - self.example_client, mouse_name="123456") - self.assertTrue( - (len(bad_behavior_sessions) - 1) == len(added) + self.example_client, + mouse_name, + self.example_instrument.name, + [self.example_trainer.username], + *self.example_behavior_sessions, ) + self.assertTrue(len(added) == 0) mock_log_error.assert_called() diff --git a/tests/test_instrument.py b/tests/test_instrument.py index dcf89ec..734d481 100644 --- a/tests/test_instrument.py +++ b/tests/test_instrument.py @@ -5,7 +5,6 @@ import unittest from pathlib import Path from unittest.mock import MagicMock, patch -from copy import deepcopy from slims.internal import Record From d235998fa6d6bdb996df12193a97eab7baa2a804 Mon Sep 17 00:00:00 2001 From: Christopher Date: Sat, 29 Jun 2024 13:16:14 -0700 Subject: [PATCH 10/15] add tests and more finalized version of behavior_session and instrument --- src/aind_slims_api/behavior_session.py | 97 ++++++++------------- src/aind_slims_api/core.py | 1 - src/aind_slims_api/instrument.py | 18 ++-- tests/test_behavior_session.py | 111 +++++++++++-------------- tests/test_instrument.py | 27 +++++- 5 files changed, 116 insertions(+), 138 deletions(-) diff --git a/src/aind_slims_api/behavior_session.py b/src/aind_slims_api/behavior_session.py index f0d9031..06ac9d0 100644 --- a/src/aind_slims_api/behavior_session.py +++ b/src/aind_slims_api/behavior_session.py @@ -1,12 +1,13 @@ """Contains a model for the mouse content, and a method for fetching it""" import logging -from typing import Any +from typing import Any, Callable from datetime import datetime from pydantic import Field, ValidationError -from aind_slims_api.core import SlimsBaseModel, SlimsClient, SLIMSTABLES +from aind_slims_api.core import SlimsBaseModel, SlimsClient, SLIMSTABLES, \ + SlimsBaseModelTypeVar from aind_slims_api.mouse import fetch_mouse_content, SlimsMouseContent from aind_slims_api.user import fetch_user, SlimsUser from aind_slims_api.instrument import fetch_instrument_content, SlimsInstrument @@ -40,35 +41,40 @@ class SlimsBehaviorSessionContentEvent(SlimsBaseModel): _slims_table: SLIMSTABLES = "ContentEvent" -def _fetch_mouse_pk( - client: SlimsClient, - mouse_name: str, -) -> int | None: +SlimsSingletonFetchReturn = SlimsBaseModel | dict[str, Any] | None + + +def _resolve_pk( + model: SlimsSingletonFetchReturn, + primary_key_name: str = "pk", +) -> int: """Utility function shared across read/write Notes ----- - TODO: Change return type of fetch_mouse_content to match pattern in fetch_behavior_session_content_events, or the other way around? + - TODO: Move to core to have better centralized control of when references + are resolved """ - mouse = fetch_mouse_content(client, mouse_name) - if isinstance(mouse, dict): - return mouse["pk"] - elif isinstance(mouse, SlimsMouseContent): - return mouse.pk - elif mouse is None: - logger.warning(f"No mouse found with name {mouse_name}") - return None + if isinstance(model, dict): + logger.warning("Extracting primary key from unvalidated dict.") + return model[primary_key_name] + elif isinstance(model, SlimsBaseModel): + return getattr(model, primary_key_name) + elif model is None: + raise ValueError( + f"Cannot resolve primary key from {model}" + ) else: raise ValueError( - "Unexpected return type from fetch_mouse_content: %s" - % type(mouse) + "Unexpected type for model: %s" % type(model) ) def fetch_behavior_session_content_events( client: SlimsClient, - mouse_name: str, + mouse: SlimsSingletonFetchReturn, ) -> tuple[list[SlimsBehaviorSessionContentEvent], list[dict[str, Any]]]: """Fetches behavior sessions for a mouse with labtracks id {mouse_name} @@ -80,14 +86,9 @@ def fetch_behavior_session_content_events( list: Dictionaries representations of objects that failed validation """ - mouse_pk = _fetch_mouse_pk(client, mouse_name) - logger.debug(f"Mouse pk: {mouse_pk}") - if mouse_pk is None: - return [], [] - return client.fetch_models( SlimsBehaviorSessionContentEvent, - cnvn_fk_content=mouse_pk, + cnvn_fk_content=_resolve_pk(mouse), cnvt_name="Behavior Session", sort=["cnvn_cf_scheduledDate"], ) @@ -95,9 +96,9 @@ def fetch_behavior_session_content_events( def write_behavior_session_content_events( client: SlimsClient, - mouse_name: str, - instrument_name: str, - trainer_names: list[str], + mouse: SlimsSingletonFetchReturn, + instrument: SlimsSingletonFetchReturn, + trainers: list[SlimsSingletonFetchReturn], *behavior_sessions: SlimsBehaviorSessionContentEvent, ) -> list[SlimsBehaviorSessionContentEvent]: """Writes behavior sessions for a mouse with labtracks id {mouse_name} @@ -107,36 +108,12 @@ def write_behavior_session_content_events( - All supplied `behavior_sessions` will have their `mouse_name` field set to the value supplied as `mouse_name` to this function """ - mouse_pk = _fetch_mouse_pk(client, mouse_name) + mouse_pk = _resolve_pk(mouse) logger.debug(f"Mouse pk: {mouse_pk}") - if mouse_pk is None: - raise ValueError(f"No mouse found with name {mouse_name}") - instrument = fetch_instrument_content(client, instrument_name) - if isinstance(instrument, dict): - instrument_pk = instrument["pk"] - elif isinstance(instrument, SlimsInstrument): - instrument_pk = instrument.pk - elif instrument is None: - raise ValueError(f"No instrument found with name {instrument_name}") - else: - raise ValueError( - "Unexpected return type from fetch_instrument_content: %s" - % type(instrument) - ) - trainer_pks = [] - for trainer_name in trainer_names: - trainer = fetch_user(client, trainer_name) - if isinstance(trainer, dict): - trainer_pks.append(trainer["pk"]) - elif isinstance(trainer, SlimsUser): - trainer_pks.append(trainer.pk) - elif trainer is None: - raise ValueError(f"No trainer found with name {trainer_name}") - else: - raise ValueError( - "Unexpected return type from fetch_user: %s" - % type(trainer) - ) + instrument_pk = _resolve_pk(instrument) + logger.debug(f"Instrument pk: {instrument_pk}") + trainer_pks = [_resolve_pk(trainer) for trainer in trainers] + logger.debug(f"Trainer pks: {trainer_pks}") added = [] for behavior_session in behavior_sessions: updated = behavior_session.model_copy( @@ -146,13 +123,7 @@ def write_behavior_session_content_events( "trainers": trainer_pks, }, ) - try: - validated = SlimsBehaviorSessionContentEvent.model_validate( - updated, from_attributes=True) - except ValidationError as e: - logger.error( - f"SLIMS data validation failed. Skipping write, {repr(e)}") - continue - added.append(client.add_model(validated)) + logger.debug(f"Resolved behavior session: {updated}") + added.append(client.add_model(updated)) return added diff --git a/src/aind_slims_api/core.py b/src/aind_slims_api/core.py index 1605973..8c6c2d2 100644 --- a/src/aind_slims_api/core.py +++ b/src/aind_slims_api/core.py @@ -237,7 +237,6 @@ def fetch_models( end=end, **kwargs, ) - # print(response) validated = [] unvalidated = [] for record in response: diff --git a/src/aind_slims_api/instrument.py b/src/aind_slims_api/instrument.py index 8568ecb..50f0850 100644 --- a/src/aind_slims_api/instrument.py +++ b/src/aind_slims_api/instrument.py @@ -37,25 +37,29 @@ def fetch_instrument_content( Notes ----- - Todo: add partial name match or some other type of filtering + - TODO: reconsider this pattern, consider just returning all records or + having number returned be a parameter or setting """ validated, unvalidated = client.fetch_models( SlimsInstrument, nstr_name=instrument_name, ) if len(validated) > 0: - instrument_details = validated[0] + validated_details = validated[0] if len(validated) > 1: logger.warning( f"Warning, Multiple instruments in SLIMS with name {instrument_name}, " - f"using pk={instrument_details.pk}" + f"using pk={validated_details.pk}" ) - return instrument_details + return validated_details else: if len(unvalidated) > 0: - logger.warning( - f"Warning, Multiple instruments in SLIMS with name {instrument_name}, " - f"using pk={unvalidated[0]['pk']}" - ) + unvalidated_details = unvalidated[0] + if len(unvalidated) > 1: + logger.warning( + f"Warning, Multiple instruments in SLIMS with name {instrument_name}, " + f"using pk={unvalidated_details['pk']}" + ) return unvalidated[0] return None diff --git a/tests/test_behavior_session.py b/tests/test_behavior_session.py index d40ee17..e27f3ae 100644 --- a/tests/test_behavior_session.py +++ b/tests/test_behavior_session.py @@ -34,6 +34,7 @@ class TestBehaviorSession(unittest.TestCase): example_client: SlimsClient example_response: list[Record] + example_mouse_response: list[Record] example_behavior_sessions: list[SlimsBehaviorSessionContentEvent] example_mouse: SlimsMouseContent example_write_sessions_response: list[Record] @@ -55,6 +56,15 @@ def setUpClass(cls): ).read_text() ) ] + cls.example_mouse_response = [ + Record(json_entity=r, slims_api=cls.example_client.db.slims_api) + for r in json.loads( + ( + RESOURCES_DIR / + "example_fetch_mouse_response.json" + ).read_text() + ) + ] assert len(cls.example_response) > 1, \ "Example response must be greater than 1 for tests to work..." @@ -92,17 +102,30 @@ def setUpClass(cls): ][0] @patch("slims.slims.Slims.fetch") - @patch("aind_slims_api.behavior_session.fetch_mouse_content") def test_fetch_behavior_session_content_events_success( self, - mock_fetch_mouse_content: MagicMock, mock_fetch: MagicMock ): """Test fetch_behavior_session_content_events when successful""" - mock_fetch_mouse_content.return_value = self.example_mouse mock_fetch.return_value = self.example_response validated, unvalidated = fetch_behavior_session_content_events( - self.example_client, mouse_name="123456") + self.example_client, self.example_mouse) + ret_entities = [item.json_entity for item in validated] + \ + [item["json_entity"] for item in unvalidated] + self.assertEqual( + [item.json_entity for item in self.example_response], + ret_entities, + ) + + @patch("slims.slims.Slims.fetch") + def test_fetch_behavior_session_content_events_success_unvalidated( + self, + mock_fetch: MagicMock + ): + """Test fetch_behavior_session_content_events when successful""" + mock_fetch.return_value = self.example_response + validated, unvalidated = fetch_behavior_session_content_events( + self.example_client, self.example_mouse_response[0].json_entity) ret_entities = [item.json_entity for item in validated] + \ [item["json_entity"] for item in unvalidated] self.assertEqual( @@ -110,45 +133,38 @@ def test_fetch_behavior_session_content_events_success( ret_entities, ) - @patch("logging.Logger.error") - @patch("aind_slims_api.behavior_session.fetch_mouse_content") @patch("slims.slims.Slims.fetch") - def test_fetch_behavior_session_content_events_validation_fail( - self, mock_fetch: MagicMock, mock_fetch_mouse_content: MagicMock, - mock_log_error: MagicMock + def test_fetch_behavior_session_content_events_failure_none( + self, + mock_fetch: MagicMock + ): + """Test fetch_behavior_session_content_events when supplied with None""" + mock_fetch.return_value = self.example_response + with self.assertRaises(ValueError): + fetch_behavior_session_content_events(self.example_client, None) + + @patch("slims.slims.Slims.fetch") + def test_fetch_behavior_session_content_events_failure_bad_value( + self, + mock_fetch: MagicMock ): - """Test fetch_behavior_session_content_events when bad values returned - """ - mock_fetch_mouse_content.return_value = self.example_mouse - wrong_return = deepcopy(self.example_response) - wrong_return[0].cnvn_cf_fk_instrument.value = "burrito" - mock_fetch.return_value = wrong_return - fetch_behavior_session_content_events( - self.example_client, mouse_name="123456") - mock_log_error.assert_called() + """Test fetch_behavior_session_content_events when supplied with None""" + mock_fetch.return_value = self.example_response + with self.assertRaises(ValueError): + fetch_behavior_session_content_events(self.example_client, 1) - @patch("aind_slims_api.behavior_session.fetch_user") - @patch("aind_slims_api.behavior_session.fetch_instrument_content") - @patch("aind_slims_api.behavior_session.fetch_mouse_content") @patch("slims.slims.Slims.add") def test_write_behavior_session_content_events_success( self, mock_add: MagicMock, - mock_fetch_mouse_content: MagicMock, - mock_fetch_instrument_content: MagicMock, - mock_fetch_user: MagicMock, ): """Test write_behavior_session_content_events success""" - mouse_name = "00000000" - mock_fetch_mouse_content.return_value = self.example_mouse - mock_fetch_instrument_content.return_value = self.example_instrument - mock_fetch_user.return_value = self.example_trainer mock_add.return_value = self.example_write_sessions_response added = write_behavior_session_content_events( self.example_client, - mouse_name, - self.example_instrument.name, - [self.example_trainer.username], + self.example_mouse, + self.example_instrument, + [self.example_trainer], *self.example_behavior_sessions, ) self.assertTrue( @@ -156,39 +172,6 @@ def test_write_behavior_session_content_events_success( ) self.assertTrue(len(added) == len(self.example_behavior_sessions)) - # @patch("aind_slims_api.behavior_session.SlimsBehaviorSessionContentEvent.model_validate") - @patch("aind_slims_api.behavior_session.fetch_user") - @patch("aind_slims_api.behavior_session.fetch_instrument_content") - @patch("aind_slims_api.behavior_session.fetch_mouse_content") - @patch("logging.Logger.error") - @patch("slims.slims.Slims.add") - def test_write_behavior_session_content_events_validation_fail( - self, - mock_add: MagicMock, - mock_log_error: MagicMock, - mock_fetch_mouse_content: MagicMock, - mock_fetch_instrument_content: MagicMock, - mock_fetch_user: MagicMock, - # mock_model_validate: MagicMock, - ): - """Test write_behavior_session_content_events when bad values""" - mouse_name = "00000000" - mock_fetch_mouse_content.return_value = self.example_mouse - bad_instrument = deepcopy(self.example_instrument) - bad_instrument = bad_instrument.model_copy(update={"pk": "burrito"}) - mock_fetch_instrument_content.return_value = bad_instrument - mock_fetch_user.return_value = self.example_trainer - mock_add.return_value = self.example_write_sessions_response - added = write_behavior_session_content_events( - self.example_client, - mouse_name, - self.example_instrument.name, - [self.example_trainer.username], - *self.example_behavior_sessions, - ) - self.assertTrue(len(added) == 0) - mock_log_error.assert_called() - if __name__ == "__main__": unittest.main() diff --git a/tests/test_instrument.py b/tests/test_instrument.py index 734d481..3b2b679 100644 --- a/tests/test_instrument.py +++ b/tests/test_instrument.py @@ -3,6 +3,7 @@ import json import os import unittest +from copy import deepcopy from pathlib import Path from unittest.mock import MagicMock, patch @@ -38,18 +39,23 @@ def setUpClass(cls): ) ] + @patch("logging.Logger.warning") @patch("slims.slims.Slims.fetch") def test_fetch_content_success( self, - mock_fetch: MagicMock + mock_fetch: MagicMock, + mock_log_warn: MagicMock, ): - """Test fetch_instrument_content when successful""" - mock_fetch.return_value = self.example_response + """Test fetch_instrument_content when successful and multiple are + returned from fetch + """ + mock_fetch.return_value = self.example_response + self.example_response response = fetch_instrument_content( self.example_client, "323_EPHYS1_OPTO") self.assertEqual( response.json_entity, self.example_response[0].json_entity ) + self.assertTrue(mock_log_warn.called) @patch("slims.slims.Slims.fetch") def test_fetch_fail( @@ -63,6 +69,21 @@ def test_fetch_fail( "Hopefully not a valid instrument name right?") self.assertTrue(response is None) + @patch("slims.slims.Slims.fetch") + def test_fetch_unvalidated_success( + self, mock_fetch: MagicMock, + ): + """Test fetch_instrument_content when unvalidated instrument data + returned. + """ + bad_return = deepcopy(self.example_response[0]) + bad_return.nstr_pk.value = "burrito" + mock_fetch.return_value = [bad_return, bad_return] + response = fetch_instrument_content( + self.example_client, + "323_EPHYS1_OPTO") + self.assertTrue(isinstance(response, dict)) + if __name__ == "__main__": unittest.main() From 6c1132ee332be747f0b337d70fdaa86409568a64 Mon Sep 17 00:00:00 2001 From: Christopher Date: Sat, 29 Jun 2024 13:27:53 -0700 Subject: [PATCH 11/15] styling and linting --- src/aind_slims_api/behavior_session.py | 36 ++++++-------- src/aind_slims_api/core.py | 12 ++--- src/aind_slims_api/instrument.py | 3 +- tests/test_behavior_session.py | 69 ++++++++++++-------------- tests/test_instrument.py | 31 +++++------- 5 files changed, 65 insertions(+), 86 deletions(-) diff --git a/src/aind_slims_api/behavior_session.py b/src/aind_slims_api/behavior_session.py index 06ac9d0..5e7086a 100644 --- a/src/aind_slims_api/behavior_session.py +++ b/src/aind_slims_api/behavior_session.py @@ -1,16 +1,12 @@ """Contains a model for the mouse content, and a method for fetching it""" import logging -from typing import Any, Callable +from typing import Any from datetime import datetime -from pydantic import Field, ValidationError +from pydantic import Field -from aind_slims_api.core import SlimsBaseModel, SlimsClient, SLIMSTABLES, \ - SlimsBaseModelTypeVar -from aind_slims_api.mouse import fetch_mouse_content, SlimsMouseContent -from aind_slims_api.user import fetch_user, SlimsUser -from aind_slims_api.instrument import fetch_instrument_content, SlimsInstrument +from aind_slims_api.core import SlimsBaseModel, SlimsClient, SLIMSTABLES logger = logging.getLogger() @@ -20,20 +16,20 @@ class SlimsBehaviorSessionContentEvent(SlimsBaseModel): pk: int | None = Field(default=None, alias="cnvn_pk") mouse_name: int | None = Field( - default=None, alias="cnvn_fk_content") # used as reference to mouse + default=None, alias="cnvn_fk_content" + ) # used as reference to mouse notes: str | None = Field(default=None, alias="cnvn_cf_notes") task_stage: str | None = Field(default=None, alias="cnvn_cf_taskStage") - instrument: int | None = Field( - default=None, alias="cnvn_cf_fk_instrument") - trainers: list[int] = Field( - default=[], alias="cnvn_cf_fk_trainer") + instrument: int | None = Field(default=None, alias="cnvn_cf_fk_instrument") + trainers: list[int] = Field(default=[], alias="cnvn_cf_fk_trainer") task: str | None = Field(default=None, alias="cnvn_cf_task") is_curriculum_suggestion: bool | None = Field( - default=None, alias="cnvn_cf_stageIsOnCurriculum") + default=None, alias="cnvn_cf_stageIsOnCurriculum" + ) task_schema_version: str | None = Field( - default=None, alias="cnvn_cf_taskSchemaVersion") - software_version: str | None = Field( - default=None, alias="cnvn_cf_softwareVersion") + default=None, alias="cnvn_cf_taskSchemaVersion" + ) + software_version: str | None = Field(default=None, alias="cnvn_cf_softwareVersion") date: datetime | None = Field(..., alias="cnvn_cf_scheduledDate") cnvn_fk_contentEventType: int = 10 # pk of Behavior Session ContentEvent @@ -63,13 +59,9 @@ def _resolve_pk( elif isinstance(model, SlimsBaseModel): return getattr(model, primary_key_name) elif model is None: - raise ValueError( - f"Cannot resolve primary key from {model}" - ) + raise ValueError(f"Cannot resolve primary key from {model}") else: - raise ValueError( - "Unexpected type for model: %s" % type(model) - ) + raise ValueError("Unexpected type for model: %s" % type(model)) def fetch_behavior_session_content_events( diff --git a/src/aind_slims_api/core.py b/src/aind_slims_api/core.py index 8c6c2d2..ff7e783 100644 --- a/src/aind_slims_api/core.py +++ b/src/aind_slims_api/core.py @@ -139,8 +139,7 @@ def _serialize(self, field, info): # TODO: Support attachments -SlimsBaseModelTypeVar = TypeVar( - 'SlimsBaseModelTypeVar', bound=SlimsBaseModel) +SlimsBaseModelTypeVar = TypeVar("SlimsBaseModelTypeVar", bound=SlimsBaseModel) class SlimsClient: @@ -241,9 +240,7 @@ def fetch_models( unvalidated = [] for record in response: try: - validated.append( - model.model_validate(record) - ) + validated.append(model.model_validate(record)) except ValidationError as e: logger.error(f"SLIMS data validation failed, {repr(e)}") unvalidated.append(record.json_entity) @@ -285,10 +282,7 @@ def rest_link(self, table: SLIMSTABLES, **kwargs): return base_url + "".join(queries) def add_model( - self, - model: SlimsBaseModelTypeVar, - *args, - **kwargs + self, model: SlimsBaseModelTypeVar, *args, **kwargs ) -> SlimsBaseModelTypeVar: """Given a SlimsBaseModel object, add it to SLIMS Args diff --git a/src/aind_slims_api/instrument.py b/src/aind_slims_api/instrument.py index 50f0850..e86b55c 100644 --- a/src/aind_slims_api/instrument.py +++ b/src/aind_slims_api/instrument.py @@ -57,7 +57,8 @@ def fetch_instrument_content( unvalidated_details = unvalidated[0] if len(unvalidated) > 1: logger.warning( - f"Warning, Multiple instruments in SLIMS with name {instrument_name}, " + "Warning, Multiple instruments in SLIMS with name " + f"{instrument_name}, " f"using pk={unvalidated_details['pk']}" ) return unvalidated[0] diff --git a/tests/test_behavior_session.py b/tests/test_behavior_session.py index e27f3ae..8c54035 100644 --- a/tests/test_behavior_session.py +++ b/tests/test_behavior_session.py @@ -5,7 +5,6 @@ import unittest from pathlib import Path from unittest.mock import MagicMock, patch -from copy import deepcopy from datetime import datetime from slims.internal import Record @@ -14,16 +13,12 @@ from aind_slims_api.mouse import ( SlimsMouseContent, ) -from aind_slims_api.user import ( - SlimsUser -) -from aind_slims_api.instrument import ( - SlimsInstrument -) +from aind_slims_api.user import SlimsUser +from aind_slims_api.instrument import SlimsInstrument from aind_slims_api.behavior_session import ( fetch_behavior_session_content_events, write_behavior_session_content_events, - SlimsBehaviorSessionContentEvent + SlimsBehaviorSessionContentEvent, ) RESOURCES_DIR = Path(os.path.dirname(os.path.realpath(__file__))) / "resources" @@ -51,22 +46,23 @@ def setUpClass(cls): Record(json_entity=r, slims_api=cls.example_client.db.slims_api) for r in json.loads( ( - RESOURCES_DIR / - "example_fetch_behavior_session_content_events_response.json_entity.json" + RESOURCES_DIR + / ( + "example_fetch_behavior_session_content_events_response" + ".json_entity.json" + ) ).read_text() ) ] cls.example_mouse_response = [ Record(json_entity=r, slims_api=cls.example_client.db.slims_api) for r in json.loads( - ( - RESOURCES_DIR / - "example_fetch_mouse_response.json" - ).read_text() + (RESOURCES_DIR / "example_fetch_mouse_response.json").read_text() ) ] - assert len(cls.example_response) > 1, \ - "Example response must be greater than 1 for tests to work..." + assert ( + len(cls.example_response) > 1 + ), "Example response must be greater than 1 for tests to work..." cls.example_instrument = SlimsInstrument( nstr_name="323_EPHYS1_OPTO", @@ -95,39 +91,42 @@ def setUpClass(cls): Record(json_entity=r, slims_api=cls.example_client.db.slims_api) for r in json.loads( ( - RESOURCES_DIR / - "example_write_behavior_session_content_events_response.json_entity.json" + RESOURCES_DIR + / ( + "example_write_behavior_session_content_events_response." + "json_entity.json" + ) ).read_text() ) ][0] @patch("slims.slims.Slims.fetch") - def test_fetch_behavior_session_content_events_success( - self, - mock_fetch: MagicMock - ): + def test_fetch_behavior_session_content_events_success(self, mock_fetch: MagicMock): """Test fetch_behavior_session_content_events when successful""" mock_fetch.return_value = self.example_response validated, unvalidated = fetch_behavior_session_content_events( - self.example_client, self.example_mouse) - ret_entities = [item.json_entity for item in validated] + \ - [item["json_entity"] for item in unvalidated] + self.example_client, self.example_mouse + ) + ret_entities = [item.json_entity for item in validated] + [ + item["json_entity"] for item in unvalidated + ] self.assertEqual( [item.json_entity for item in self.example_response], ret_entities, ) - + @patch("slims.slims.Slims.fetch") def test_fetch_behavior_session_content_events_success_unvalidated( - self, - mock_fetch: MagicMock + self, mock_fetch: MagicMock ): """Test fetch_behavior_session_content_events when successful""" mock_fetch.return_value = self.example_response validated, unvalidated = fetch_behavior_session_content_events( - self.example_client, self.example_mouse_response[0].json_entity) - ret_entities = [item.json_entity for item in validated] + \ - [item["json_entity"] for item in unvalidated] + self.example_client, self.example_mouse_response[0].json_entity + ) + ret_entities = [item.json_entity for item in validated] + [ + item["json_entity"] for item in unvalidated + ] self.assertEqual( [item.json_entity for item in self.example_response], ret_entities, @@ -135,18 +134,16 @@ def test_fetch_behavior_session_content_events_success_unvalidated( @patch("slims.slims.Slims.fetch") def test_fetch_behavior_session_content_events_failure_none( - self, - mock_fetch: MagicMock + self, mock_fetch: MagicMock ): """Test fetch_behavior_session_content_events when supplied with None""" mock_fetch.return_value = self.example_response with self.assertRaises(ValueError): fetch_behavior_session_content_events(self.example_client, None) - + @patch("slims.slims.Slims.fetch") def test_fetch_behavior_session_content_events_failure_bad_value( - self, - mock_fetch: MagicMock + self, mock_fetch: MagicMock ): """Test fetch_behavior_session_content_events when supplied with None""" mock_fetch.return_value = self.example_response diff --git a/tests/test_instrument.py b/tests/test_instrument.py index 3b2b679..f6c8d0d 100644 --- a/tests/test_instrument.py +++ b/tests/test_instrument.py @@ -33,8 +33,7 @@ def setUpClass(cls): Record(json_entity=r, slims_api=cls.example_client.db.slims_api) for r in json.loads( ( - RESOURCES_DIR / - "example_fetch_instrument_response.json_entity.json" + RESOURCES_DIR / "example_fetch_instrument_response.json_entity.json" ).read_text() ) ] @@ -47,41 +46,37 @@ def test_fetch_content_success( mock_log_warn: MagicMock, ): """Test fetch_instrument_content when successful and multiple are - returned from fetch + returned from fetch """ mock_fetch.return_value = self.example_response + self.example_response - response = fetch_instrument_content( - self.example_client, "323_EPHYS1_OPTO") - self.assertEqual( - response.json_entity, self.example_response[0].json_entity - ) + response = fetch_instrument_content(self.example_client, "323_EPHYS1_OPTO") + self.assertEqual(response.json_entity, self.example_response[0].json_entity) self.assertTrue(mock_log_warn.called) @patch("slims.slims.Slims.fetch") def test_fetch_fail( - self, mock_fetch: MagicMock, + self, + mock_fetch: MagicMock, ): - """Test fetch_instrument_content when invalid instrument name is given. - """ + """Test fetch_instrument_content when invalid instrument name is given.""" mock_fetch.return_value = [] response = fetch_instrument_content( - self.example_client, - "Hopefully not a valid instrument name right?") + self.example_client, "Hopefully not a valid instrument name right?" + ) self.assertTrue(response is None) @patch("slims.slims.Slims.fetch") def test_fetch_unvalidated_success( - self, mock_fetch: MagicMock, + self, + mock_fetch: MagicMock, ): """Test fetch_instrument_content when unvalidated instrument data - returned. + returned. """ bad_return = deepcopy(self.example_response[0]) bad_return.nstr_pk.value = "burrito" mock_fetch.return_value = [bad_return, bad_return] - response = fetch_instrument_content( - self.example_client, - "323_EPHYS1_OPTO") + response = fetch_instrument_content(self.example_client, "323_EPHYS1_OPTO") self.assertTrue(isinstance(response, dict)) From a896b929dee1bb966dc3436915073c044b80f5c0 Mon Sep 17 00:00:00 2001 From: Christopher Date: Sun, 30 Jun 2024 05:16:21 -0700 Subject: [PATCH 12/15] remove cruft, improve docs --- src/aind_slims_api/behavior_session.py | 4 +++- src/aind_slims_api/core.py | 5 ----- src/aind_slims_api/instrument.py | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/aind_slims_api/behavior_session.py b/src/aind_slims_api/behavior_session.py index 5e7086a..d6a08ab 100644 --- a/src/aind_slims_api/behavior_session.py +++ b/src/aind_slims_api/behavior_session.py @@ -1,4 +1,6 @@ -"""Contains a model for the mouse content, and a method for fetching it""" +"""Contains a model for the behavior session content events, a method for + fetching it and writing it. +""" import logging from typing import Any diff --git a/src/aind_slims_api/core.py b/src/aind_slims_api/core.py index ff7e783..b94844e 100644 --- a/src/aind_slims_api/core.py +++ b/src/aind_slims_api/core.py @@ -96,11 +96,6 @@ class MyModel(SlimsBaseModel): def _validate(cls, value, info: ValidationInfo): """Validates a field, accounts for Quantities""" if isinstance(value, SlimsColumn): - # if value.name == "pk": - # raise Exception("Bur") - # print(value.name) - # print(type(value)) - # print(dir(value)) if value.datatype == "QUANTITY": unit_spec = _find_unit_spec(cls.model_fields[info.field_name]) if unit_spec is None: diff --git a/src/aind_slims_api/instrument.py b/src/aind_slims_api/instrument.py index e86b55c..4314fcf 100644 --- a/src/aind_slims_api/instrument.py +++ b/src/aind_slims_api/instrument.py @@ -1,4 +1,4 @@ -"""Contains a model for the mouse content, and a method for fetching it""" +"""Contains a model for the instrument content, and a method for fetching it""" import logging from typing import Any From 74e32b8a05426321ce826fe5501a270e059c327a Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 1 Jul 2024 16:10:05 -0700 Subject: [PATCH 13/15] switch mouse_name to mouse_pk --- src/aind_slims_api/behavior_session.py | 4 ++-- tests/test_behavior_session.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/aind_slims_api/behavior_session.py b/src/aind_slims_api/behavior_session.py index d6a08ab..cfaff44 100644 --- a/src/aind_slims_api/behavior_session.py +++ b/src/aind_slims_api/behavior_session.py @@ -17,7 +17,7 @@ class SlimsBehaviorSessionContentEvent(SlimsBaseModel): """Model for an instance of the Behavior Session ContentEvent""" pk: int | None = Field(default=None, alias="cnvn_pk") - mouse_name: int | None = Field( + mouse_pk: int | None = Field( default=None, alias="cnvn_fk_content" ) # used as reference to mouse notes: str | None = Field(default=None, alias="cnvn_cf_notes") @@ -112,7 +112,7 @@ def write_behavior_session_content_events( for behavior_session in behavior_sessions: updated = behavior_session.model_copy( update={ - "mouse_name": mouse_pk, + "mouse_pk": mouse_pk, "instrument": instrument_pk, "trainers": trainer_pks, }, diff --git a/tests/test_behavior_session.py b/tests/test_behavior_session.py index 8c54035..71644a3 100644 --- a/tests/test_behavior_session.py +++ b/tests/test_behavior_session.py @@ -165,7 +165,7 @@ def test_write_behavior_session_content_events_success( *self.example_behavior_sessions, ) self.assertTrue( - all((item.mouse_name == self.example_mouse.pk for item in added)) + all((item.mouse_pk == self.example_mouse.pk for item in added)) ) self.assertTrue(len(added) == len(self.example_behavior_sessions)) From 90840f2581527da8f1dccfdd50f5f0e13d87c70e Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 1 Jul 2024 16:17:36 -0700 Subject: [PATCH 14/15] reduce amount of test data --- ...n_content_events_response.json_entity.json | 4527 +---------------- 1 file changed, 1 insertion(+), 4526 deletions(-) diff --git a/tests/resources/example_fetch_behavior_session_content_events_response.json_entity.json b/tests/resources/example_fetch_behavior_session_content_events_response.json_entity.json index 89f10d1..8500a96 100644 --- a/tests/resources/example_fetch_behavior_session_content_events_response.json_entity.json +++ b/tests/resources/example_fetch_behavior_session_content_events_response.json_entity.json @@ -1,4526 +1 @@ -[ - { - "pk": 63, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1609488000000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 1743, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "323_EPHYS1_OPTO_20240212", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000068", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719519578574, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719519578574, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 63, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/63" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=63" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=63" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=63" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/63" - } - ] - }, - { - "pk": 64, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1609488000000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 1743, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "323_EPHYS1_OPTO_20240212", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000069", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719519770162, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719519770162, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 64, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/64" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=64" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=64" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=64" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/64" - } - ] - }, - { - "pk": 65, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1609488000000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 1743, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "323_EPHYS1_OPTO_20240212", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000070", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719519807839, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719519807839, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 65, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/65" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=65" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=65" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=65" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/65" - } - ] - }, - { - "pk": 66, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1609488000000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 1743, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "323_EPHYS1_OPTO_20240212", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000071", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719519920678, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719519920678, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 66, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/66" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=66" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=66" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=66" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/66" - } - ] - }, - { - "pk": 67, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1609488000000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 1743, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "323_EPHYS1_OPTO_20240212", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000072", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719520076355, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719520076355, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 67, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/67" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=67" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=67" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=67" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/67" - } - ] - }, - { - "pk": 68, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1609488000000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 1743, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "323_EPHYS1_OPTO_20240212", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000073", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719520175665, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719520175665, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 68, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/68" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=68" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=68" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=68" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/68" - } - ] - }, - { - "pk": 69, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1609488000000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 1743, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "323_EPHYS1_OPTO_20240212", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000074", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719520241934, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719520241934, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 69, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/69" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=69" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=69" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=69" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/69" - } - ] - }, - { - "pk": 70, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1609488000000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 1743, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "323_EPHYS1_OPTO_20240212", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000075", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719520290131, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719520290131, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 70, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/70" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=70" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=70" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=70" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/70" - } - ] - }, - { - "pk": 71, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1609488000000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 1743, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "323_EPHYS1_OPTO_20240212", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000076", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719520328984, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719520328984, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 71, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/71" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=71" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=71" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=71" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/71" - } - ] - }, - { - "pk": 72, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1609488000000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 4, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "EasyIndex", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000077", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719596214079, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719596214079, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 72, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/72" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/4" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=72" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=72" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=72" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/72" - } - ] - }, - { - "pk": 73, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1609488000000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 4, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "EasyIndex", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000078", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719596274063, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719596274063, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 73, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/73" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/4" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=73" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=73" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=73" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/73" - } - ] - }, - { - "pk": 74, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1609488000000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 4, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "EasyIndex", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": "Test", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000079", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719596330058, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719596330058, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 74, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/74" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/4" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=74" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=74" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=74" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/74" - } - ] - }, - { - "pk": 55, - "tableName": "ContentEvent", - "columns": [ - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_study", - "title": "Study", - "position": 0, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Study", - "displayValue": null, - "displayField": "stud_name", - "foreignDisplayColumn": "stud_name" - }, - { - "datatype": "DATE", - "name": "cnvn_cf_scheduledDate", - "title": "Scheduled Date", - "position": 1, - "value": 1711958460000, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_date", - "title": "Date", - "position": 2, - "value": 1719446900803, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "DATE", - "name": "cnvn_dateFrom", - "title": "From date", - "position": 3, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_contentEventType", - "title": "Content event type", - "position": 4, - "value": 10, - "hidden": false, - "editable": false, - "foreignTable": "ContentEventType", - "displayValue": "Behavior Session", - "displayField": "cnvt_name", - "foreignDisplayColumn": "cnvt_name" - }, - { - "datatype": "DATE", - "name": "cnvn_dateUntil", - "title": "Until date", - "position": 5, - "value": null, - "hidden": true, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_cf_task", - "title": "Task", - "position": 6, - "value": "TestTask", - "hidden": false, - "editable": true - }, - { - "datatype": "MULTIPLE_FOREIGN_KEY", - "name": "cnvn_cf_fk_trainer", - "title": "Trainer", - "position": 7, - "value": [ - 19 - ], - "hidden": false, - "editable": true, - "foreignTable": "User", - "displayValues": [ - "ClarkR" - ], - "foreignDisplayColumn": "user_userName", - "joinedDisplayValue": "ClarkR" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_cf_fk_instrument", - "title": "Instrument", - "position": 8, - "value": 1743, - "hidden": false, - "editable": true, - "foreignTable": "ReferenceDataRecord", - "displayValue": "323_EPHYS1_OPTO_20240212", - "displayField": "cnvn_cf_fk_instrument_display", - "foreignDisplayColumn": "rdrc_name" - }, - { - "datatype": "BOOLEAN", - "name": "cnvn_cf_stageIsOnCurriculum", - "title": "Stage Is On Curriculum", - "position": 9, - "value": true, - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskStage", - "title": "Task Stage", - "position": 10, - "value": "TestTaskStage", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_taskSchemaVersion", - "title": "Task Schema Version", - "position": 11, - "value": "TestTaskSchemaVersion", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_softwareVersion", - "title": "Software Version", - "position": 12, - "value": "TestSoftwareVersion", - "hidden": false, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvn_cf_notes", - "title": "Notes", - "position": 13, - "value": null, - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_content", - "title": "Content", - "position": 14, - "value": 1, - "hidden": false, - "editable": true, - "foreignTable": "Content", - "displayValue": "00000000", - "displayField": "cntn_id", - "foreignDisplayColumn": "cntn_id" - }, - { - "datatype": "STRING", - "name": "cnvn_barCode", - "title": "Barcode", - "position": 15, - "value": "CE00000060", - "hidden": false, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_group", - "title": "Group", - "position": 16, - "value": null, - "hidden": false, - "editable": true, - "foreignTable": "Groups", - "displayValue": null, - "displayField": "grps_groupName", - "foreignDisplayColumn": "grps_groupName" - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_experimentRunStep", - "title": "Experiment run step", - "position": 17, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "ExperimentRunStep", - "displayValue": null, - "displayField": "xprs_name", - "foreignDisplayColumn": "xprs_name" - }, - { - "datatype": "STRING", - "name": "cnvn_createdBy", - "title": "Created by", - "position": 18, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_createdOn", - "title": "Created on", - "position": 19, - "value": 1719447031384, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "cnvn_modifiedBy", - "title": "Modified by", - "position": 20, - "value": "SIPE", - "hidden": false, - "editable": true - }, - { - "datatype": "DATE", - "name": "cnvn_modifiedOn", - "title": "Modified on", - "position": 21, - "value": 1719447031384, - "hidden": false, - "editable": true, - "dateFormat": "MM/dd/yyyy HH:mm:ss", - "subType": "datetime", - "timeZone": "America/Los_Angeles" - }, - { - "datatype": "STRING", - "name": "stud_name", - "title": "Name", - "position": 22, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "FOREIGN_KEY", - "name": "cnvn_fk_user", - "title": "User", - "position": 23, - "value": null, - "hidden": true, - "editable": true, - "foreignTable": "User", - "displayValue": null, - "displayField": "user_userName", - "foreignDisplayColumn": "user_userName" - }, - { - "datatype": "STRING", - "name": "cntn_id", - "title": "Id", - "position": 24, - "value": "00000000", - "hidden": true, - "editable": true - }, - { - "datatype": "INTEGER", - "name": "cnvn_pk", - "title": "cnvn_pk", - "position": 25, - "value": 55, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "xprs_name", - "title": "Name", - "position": 26, - "value": null, - "hidden": true, - "editable": true - }, - { - "datatype": "STRING", - "name": "cnvt_name", - "title": "Name", - "position": 27, - "value": "Behavior Session", - "hidden": true, - "editable": true - } - ], - "canUpdate": true, - "canDelete": true, - "links": [ - { - "rel": "self", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/55" - }, - { - "rel": "cnvn_fk_contentEventType", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10" - }, - { - "rel": "cnvn_cf_fk_instrument", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743" - }, - { - "rel": "cnvn_fk_content", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1" - }, - { - "rel": "-crfr_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=55" - }, - { - "rel": "-qrcv_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=55" - }, - { - "rel": "-wfsf_fk_contentEvent", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=55" - }, - { - "rel": "attachments", - "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/55" - } - ] - } -] \ No newline at end of file +[{"pk": 63, "tableName": "ContentEvent", "columns": [{"datatype": "FOREIGN_KEY", "name": "cnvn_fk_study", "title": "Study", "position": 0, "value": null, "hidden": false, "editable": true, "foreignTable": "Study", "displayValue": null, "displayField": "stud_name", "foreignDisplayColumn": "stud_name"}, {"datatype": "DATE", "name": "cnvn_cf_scheduledDate", "title": "Scheduled Date", "position": 1, "value": 1609488000000, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_date", "title": "Date", "position": 2, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_dateFrom", "title": "From date", "position": 3, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_contentEventType", "title": "Content event type", "position": 4, "value": 10, "hidden": false, "editable": false, "foreignTable": "ContentEventType", "displayValue": "Behavior Session", "displayField": "cnvt_name", "foreignDisplayColumn": "cnvt_name"}, {"datatype": "DATE", "name": "cnvn_dateUntil", "title": "Until date", "position": 5, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_cf_task", "title": "Task", "position": 6, "value": "Test", "hidden": false, "editable": true}, {"datatype": "MULTIPLE_FOREIGN_KEY", "name": "cnvn_cf_fk_trainer", "title": "Trainer", "position": 7, "value": [19], "hidden": false, "editable": true, "foreignTable": "User", "displayValues": ["ClarkR"], "foreignDisplayColumn": "user_userName", "joinedDisplayValue": "ClarkR"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_cf_fk_instrument", "title": "Instrument", "position": 8, "value": 1743, "hidden": false, "editable": true, "foreignTable": "ReferenceDataRecord", "displayValue": "323_EPHYS1_OPTO_20240212", "displayField": "cnvn_cf_fk_instrument_display", "foreignDisplayColumn": "rdrc_name"}, {"datatype": "BOOLEAN", "name": "cnvn_cf_stageIsOnCurriculum", "title": "Stage Is On Curriculum", "position": 9, "value": true, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskStage", "title": "Task Stage", "position": 10, "value": "Test", "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskSchemaVersion", "title": "Task Schema Version", "position": 11, "value": "Test", "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_softwareVersion", "title": "Software Version", "position": 12, "value": "Test", "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_notes", "title": "Notes", "position": 13, "value": "Test", "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_content", "title": "Content", "position": 14, "value": 1, "hidden": false, "editable": true, "foreignTable": "Content", "displayValue": "00000000", "displayField": "cntn_id", "foreignDisplayColumn": "cntn_id"}, {"datatype": "STRING", "name": "cnvn_barCode", "title": "Barcode", "position": 15, "value": "CE00000068", "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_group", "title": "Group", "position": 16, "value": null, "hidden": false, "editable": true, "foreignTable": "Groups", "displayValue": null, "displayField": "grps_groupName", "foreignDisplayColumn": "grps_groupName"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_experimentRunStep", "title": "Experiment run step", "position": 17, "value": null, "hidden": true, "editable": true, "foreignTable": "ExperimentRunStep", "displayValue": null, "displayField": "xprs_name", "foreignDisplayColumn": "xprs_name"}, {"datatype": "STRING", "name": "cnvn_createdBy", "title": "Created by", "position": 18, "value": "SIPE", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_createdOn", "title": "Created on", "position": 19, "value": 1719519578574, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_modifiedBy", "title": "Modified by", "position": 20, "value": "SIPE", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_modifiedOn", "title": "Modified on", "position": 21, "value": 1719519578574, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "stud_name", "title": "Name", "position": 22, "value": null, "hidden": true, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_user", "title": "User", "position": 23, "value": null, "hidden": true, "editable": true, "foreignTable": "User", "displayValue": null, "displayField": "user_userName", "foreignDisplayColumn": "user_userName"}, {"datatype": "STRING", "name": "cntn_id", "title": "Id", "position": 24, "value": "00000000", "hidden": true, "editable": true}, {"datatype": "INTEGER", "name": "cnvn_pk", "title": "cnvn_pk", "position": 25, "value": 63, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "xprs_name", "title": "Name", "position": 26, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cnvt_name", "title": "Name", "position": 27, "value": "Behavior Session", "hidden": true, "editable": true}], "canUpdate": true, "canDelete": true, "links": [{"rel": "self", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/63"}, {"rel": "cnvn_fk_contentEventType", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10"}, {"rel": "cnvn_cf_fk_instrument", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743"}, {"rel": "cnvn_fk_content", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1"}, {"rel": "-crfr_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=63"}, {"rel": "-qrcv_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=63"}, {"rel": "-wfsf_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=63"}, {"rel": "attachments", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/63"}]}, {"pk": 64, "tableName": "ContentEvent", "columns": [{"datatype": "FOREIGN_KEY", "name": "cnvn_fk_study", "title": "Study", "position": 0, "value": null, "hidden": false, "editable": true, "foreignTable": "Study", "displayValue": null, "displayField": "stud_name", "foreignDisplayColumn": "stud_name"}, {"datatype": "DATE", "name": "cnvn_cf_scheduledDate", "title": "Scheduled Date", "position": 1, "value": 1609488000000, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_date", "title": "Date", "position": 2, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "DATE", "name": "cnvn_dateFrom", "title": "From date", "position": 3, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_contentEventType", "title": "Content event type", "position": 4, "value": 10, "hidden": false, "editable": false, "foreignTable": "ContentEventType", "displayValue": "Behavior Session", "displayField": "cnvt_name", "foreignDisplayColumn": "cnvt_name"}, {"datatype": "DATE", "name": "cnvn_dateUntil", "title": "Until date", "position": 5, "value": null, "hidden": true, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_cf_task", "title": "Task", "position": 6, "value": "Test", "hidden": false, "editable": true}, {"datatype": "MULTIPLE_FOREIGN_KEY", "name": "cnvn_cf_fk_trainer", "title": "Trainer", "position": 7, "value": [19], "hidden": false, "editable": true, "foreignTable": "User", "displayValues": ["ClarkR"], "foreignDisplayColumn": "user_userName", "joinedDisplayValue": "ClarkR"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_cf_fk_instrument", "title": "Instrument", "position": 8, "value": 1743, "hidden": false, "editable": true, "foreignTable": "ReferenceDataRecord", "displayValue": "323_EPHYS1_OPTO_20240212", "displayField": "cnvn_cf_fk_instrument_display", "foreignDisplayColumn": "rdrc_name"}, {"datatype": "BOOLEAN", "name": "cnvn_cf_stageIsOnCurriculum", "title": "Stage Is On Curriculum", "position": 9, "value": true, "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskStage", "title": "Task Stage", "position": 10, "value": "Test", "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_taskSchemaVersion", "title": "Task Schema Version", "position": 11, "value": "Test", "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_softwareVersion", "title": "Software Version", "position": 12, "value": "Test", "hidden": false, "editable": true}, {"datatype": "STRING", "name": "cnvn_cf_notes", "title": "Notes", "position": 13, "value": "Test", "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_content", "title": "Content", "position": 14, "value": 1, "hidden": false, "editable": true, "foreignTable": "Content", "displayValue": "00000000", "displayField": "cntn_id", "foreignDisplayColumn": "cntn_id"}, {"datatype": "STRING", "name": "cnvn_barCode", "title": "Barcode", "position": 15, "value": "CE00000069", "hidden": false, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_group", "title": "Group", "position": 16, "value": null, "hidden": false, "editable": true, "foreignTable": "Groups", "displayValue": null, "displayField": "grps_groupName", "foreignDisplayColumn": "grps_groupName"}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_experimentRunStep", "title": "Experiment run step", "position": 17, "value": null, "hidden": true, "editable": true, "foreignTable": "ExperimentRunStep", "displayValue": null, "displayField": "xprs_name", "foreignDisplayColumn": "xprs_name"}, {"datatype": "STRING", "name": "cnvn_createdBy", "title": "Created by", "position": 18, "value": "SIPE", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_createdOn", "title": "Created on", "position": 19, "value": 1719519770162, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "cnvn_modifiedBy", "title": "Modified by", "position": 20, "value": "SIPE", "hidden": false, "editable": true}, {"datatype": "DATE", "name": "cnvn_modifiedOn", "title": "Modified on", "position": 21, "value": 1719519770162, "hidden": false, "editable": true, "dateFormat": "MM/dd/yyyy HH:mm:ss", "subType": "datetime", "timeZone": "America/Los_Angeles"}, {"datatype": "STRING", "name": "stud_name", "title": "Name", "position": 22, "value": null, "hidden": true, "editable": true}, {"datatype": "FOREIGN_KEY", "name": "cnvn_fk_user", "title": "User", "position": 23, "value": null, "hidden": true, "editable": true, "foreignTable": "User", "displayValue": null, "displayField": "user_userName", "foreignDisplayColumn": "user_userName"}, {"datatype": "STRING", "name": "cntn_id", "title": "Id", "position": 24, "value": "00000000", "hidden": true, "editable": true}, {"datatype": "INTEGER", "name": "cnvn_pk", "title": "cnvn_pk", "position": 25, "value": 64, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "xprs_name", "title": "Name", "position": 26, "value": null, "hidden": true, "editable": true}, {"datatype": "STRING", "name": "cnvt_name", "title": "Name", "position": 27, "value": "Behavior Session", "hidden": true, "editable": true}], "canUpdate": true, "canDelete": true, "links": [{"rel": "self", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEvent/64"}, {"rel": "cnvn_fk_contentEventType", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ContentEventType/10"}, {"rel": "cnvn_cf_fk_instrument", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/ReferenceDataRecord/1743"}, {"rel": "cnvn_fk_content", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/Content/1"}, {"rel": "-crfr_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/CaseReportForm?crfr_fk_contentEvent=64"}, {"rel": "-qrcv_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/QueueElementRequestContentEvent?qrcv_fk_contentEvent=64"}, {"rel": "-wfsf_fk_contentEvent", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/WorkflowScheduleFlag?wfsf_fk_contentEvent=64"}, {"rel": "attachments", "href": "https://aind-test.us.slims.agilent.com/slimsrest/rest/attachment/ContentEvent/64"}]}] \ No newline at end of file From b9a30bb39637bb3441e5c9ccf59afdd3d1d15e8e Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 3 Jul 2024 13:42:23 -0700 Subject: [PATCH 15/15] scrub out real name from test data --- .../example_fetch_instrument_response.json_entity.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/resources/example_fetch_instrument_response.json_entity.json b/tests/resources/example_fetch_instrument_response.json_entity.json index a463e79..c76de2f 100644 --- a/tests/resources/example_fetch_instrument_response.json_entity.json +++ b/tests/resources/example_fetch_instrument_response.json_entity.json @@ -36,7 +36,7 @@ "name": "nstr_description", "title": "Description", "position": 3, - "value": "

EPHYS1 Rig configuration for opto experiments

\n\n

Main User: Anna Lakunina

\n", + "value": "

EPHYS1 Rig configuration for opto experiments

\n\n

Main User: Burt Rappapor

\n", "hidden": false, "editable": true },