Repository navigation
Add shared project and protocol at time lookup columns - #1248
Merged
Merged
Conversation
Multi-valued lookups to the projects and protocols an animal held on each record's date, added by the center customizers that opt in.
This was referenced Nov 18, 2026
Also resolves values through each target's title column, skips the source dataset itself, and lists study tables once per dataset.
labkey-bpatel
approved these changes
Nov 22, 2026
labkey-bpatel
left a comment
Contributor
There was a problem hiding this comment.
Approved, but please review my comment on the intended behavior.
| public TableInfo getLookupTableInfo() | ||
| { | ||
| QueryDefinition qd = QueryService.get().createQueryDef(targetSchema.getUser(), targetSchema.getContainer(), targetSchema, queryName + "_" + name); | ||
| // Full timestamps with an exclusive end, like housingAtTime; AssignmentAtTimeForeignKey matches by date instead. |
Contributor
There was a problem hiding this comment.
Is the end date intended to be exclusive or inclusive? The PR's Changes section says, "Assignments match by date with the end date inclusive, so a transfer day shows both the old and new values." Depending on the intended behavior, may need to update the SQL below or clarify the PR description.
labkey-martyp
commented
Nov 22, 2026
labkey-martyp
left a comment
Contributor
Author
There was a problem hiding this comment.
Updated the PR description. The comment and code were the correct behavior.
labkey-martyp
added a commit
to LabKey/nbriEHRModules
that referenced
this pull request
Nov 23, 2026
## Rationale Shows the projects and protocols an animal was assigned to on each dataset record's date, alongside Housing At Time. ## Related Pull Requests - [LabKey/ehrModules#1248](LabKey/ehrModules#1248) (shared columns; merge together) ## Changes - Every dataset except demographics gets Project At Time and Protocol At Time, each value linking to its project or protocol details. - New test covering a move between projects and protocols, including the transfer day. Tested locally: the new test passes, every weight and daily health log row matched values computed from the assignment data, and the columns display, link, and filter correctly in the grid.
labkey-martyp
added a commit
to LabKey/nircEHRModules
that referenced
this pull request
Nov 23, 2026
## Rationale Shows the projects and protocols an animal was assigned to on each dataset record's date, alongside Housing At Time. ## Related Pull Requests - [LabKey/ehrModules#1248](LabKey/ehrModules#1248) (shared columns; merge together) ## Changes - Every dataset except demographics gets Project At Time and Protocol At Time, each value linking to its project or protocol details.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Gives EHR center modules a shared way to show which projects and protocols an animal was assigned to on each dataset record's date, alongside the existing Housing At Time column. Protocol comes from the protocol assignment dataset rather than the project's protocol, so it suits centers that assign the two independently. Each center opts in from its own table customizer, so modules that don't call it are unaffected.
Related Pull Requests
None.
Changes
ehr.projectandehr.protocoland can hold several values per record.