-
Notifications
You must be signed in to change notification settings - Fork 3
Disable Id on Exam forms when case created. #1707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
labkey-martyp
merged 10 commits into
release25.11-SNAPSHOT
from
25.11_fb_disable_id_on_case
May 20, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6a76e3e
Disable Id on case select
labkey-martyp 2cf8a2a
Remove unused form
labkey-martyp 49ada66
test
labkey-martyp 189b6c9
Test
labkey-martyp 5d1dc8f
Refinements
labkey-martyp acda070
Style update
labkey-martyp 2303c3e
Update tooltip from user feedback
labkey-martyp 6929bae
Merge remote-tracking branch 'ORIGIN/release25.11-SNAPSHOT' into 25.1…
labkey-martyp 135ad67
Fix test
labkey-martyp 36542a1
Merge remote-tracking branch 'ORIGIN/release25.11-SNAPSHOT' into 25.1…
labkey-martyp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
onprc_ehr/resources/web/onprc_ehr/model/sources/CaseMgmt.js
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| /* | ||
| * Copyright (c) 2025 LabKey Corporation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 | ||
| */ | ||
| EHR.model.DataModelManager.registerMetadata('CaseMgmt', { | ||
| byQuery: { | ||
| 'study.clinremarks': { | ||
| Id: { | ||
| columnConfig: { | ||
| getEditor: function(rec){ | ||
| if (rec && rec.get('caseid')){ | ||
| return false; | ||
| } | ||
| return { | ||
| xtype: 'ehr-animalfield', | ||
| dataIndex: 'Id' | ||
| }; | ||
| } | ||
| }, | ||
| formEditorConfig: { | ||
| listeners: { | ||
| afterrender: function(field){ | ||
| var TOOLTIP = 'Refresh the form to enter data for a different animal.'; | ||
| var syncDisabledStyle = function(readOnly){ | ||
| var inputEl = field.inputEl; | ||
| if (inputEl){ | ||
| inputEl.setStyle({ | ||
| 'background-color': readOnly ? '#f0f0f0' : '', | ||
| color: readOnly ? '#666666' : '', | ||
| cursor: readOnly ? 'not-allowed' : '' | ||
| }); | ||
| } | ||
| }; | ||
| var setTooltip = function(readOnly){ | ||
| var el = field.getEl(); | ||
| if (el){ | ||
| el.set({'data-qtip': readOnly ? TOOLTIP : ''}); | ||
| } | ||
| }; | ||
| var syncReadOnly = function(){ | ||
| var rec = EHR.DataEntryUtils.getBoundRecord(field); | ||
| var readOnly = !!(rec && rec.get('caseid')); | ||
| field.setReadOnly(readOnly); | ||
| syncDisabledStyle(readOnly); | ||
| setTooltip(readOnly); | ||
| }; | ||
| syncReadOnly(); | ||
| var formPanel = field.up('ehr-formpanel'); | ||
| if (formPanel){ | ||
| field.mon(formPanel, 'bindrecord', syncReadOnly, field, {buffer: 50}); | ||
| } | ||
| if (EHR.DemographicsCache){ | ||
| field.mon(EHR.DemographicsCache, 'casecreated', function(animalId){ | ||
| var rec = EHR.DataEntryUtils.getBoundRecord(field); | ||
| if (rec && rec.get('Id') === animalId){ | ||
| field.setReadOnly(true); | ||
| syncDisabledStyle(true); | ||
| setTooltip(true); | ||
| } | ||
| }, field); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }); | ||
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
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
74 changes: 0 additions & 74 deletions
74
onprc_ehr/src/org/labkey/onprc_ehr/dataentry/CagemateClinicalReportFormType.java
This file was deleted.
Oops, something went wrong.
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to gray out the disabled Id? so that it doesn't look like it is available for updating - just a little better visually/user experience, imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes done thanks