22 add options to example html file for richardson collection#23
Open
aspiringLich wants to merge 4 commits into
Open
22 add options to example html file for richardson collection#23aspiringLich wants to merge 4 commits into
aspiringLich wants to merge 4 commits into
Conversation
Redid a lot of the terrible regex and duplicated string literals to centralize it. Specifically filename and subjectId verification was cleaned up.
There was a problem hiding this comment.
Pull Request Overview
This PR extends the scanner control interface to support multiple subject ID prefixes and adds new image type options. The changes refactor validation logic to accommodate both B-series (B0001-B5887) and R-series (R0001-R0099) subject IDs while adding dental imaging types.
- Updated subject ID pattern from
B\d{4}to[A-Z]\d{4}to support multiple prefix letters - Added four new image type options: Oblique (OB), Panoramic (PX), Occlusal Mandibular (MD), and Occlusal Maxillary (MX)
- Refactored validation logic into a reusable
subjectIdParseStatus()function to eliminate code duplication
Comments suppressed due to low confidence (1)
examples/test_scanner_api.html:491
- The
generateFilename()function still contains hardcoded validation for B-series IDs (B0001-B5887) and doesn't handle R-series IDs. This function will reject valid R-series IDs (R0001-R0099) and return null, even though they match the pattern. The validation logic should be updated to usesubjectIdParseStatus()or replicate its range checking logic.
const subjectNumber = parseInt(subjectId.substring(1));
if (subjectNumber < 1 || subjectNumber > 5887) {
return null;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Closes #22
Note that apparently "Occlusal Mandibulary" is not a thing and its "Occlusal Mandibular" I think.