Skip to content

22 add options to example html file for richardson collection#23

Open
aspiringLich wants to merge 4 commits into
developfrom
22-add-options-to-example-html-file-for-richardson-collection
Open

22 add options to example html file for richardson collection#23
aspiringLich wants to merge 4 commits into
developfrom
22-add-options-to-example-html-file-for-richardson-collection

Conversation

@aspiringLich
Copy link
Copy Markdown

Closes #22

Note that apparently "Occlusal Mandibulary" is not a thing and its "Occlusal Mandibular" I think.

Redid a lot of the terrible regex and duplicated string literals to
centralize it. Specifically filename and subjectId verification was
cleaned up.
@aspiringLich aspiringLich requested a review from Copilot October 29, 2025 23:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 use subjectIdParseStatus() 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.

Comment thread examples/test_scanner_api.html
Comment thread examples/test_scanner_api.html
Comment thread examples/test_scanner_api.html Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants