Skip to content

internal visit schedule items, collision toggle switches, form scripting lib files support#335

Merged
rkrenn merged 12 commits intomasterfrom
int_visit_schedule
Nov 19, 2024
Merged

internal visit schedule items, collision toggle switches, form scripting lib files support#335
rkrenn merged 12 commits intomasterfrom
int_visit_schedule

Conversation

@rkrenn
Copy link
Copy Markdown
Collaborator

@rkrenn rkrenn commented Nov 19, 2024

closing #332
closing #333
closing #334

Summary by CodeRabbit

  • New Features

    • “Conflicts” toggle across staff, trial, proband, inventory, and course lists with tooltips; collision icons render conditionally.
    • Visit Schedule Items gain Internal flag and Description; shown in lists, filters, exports, and counts.
    • Field calculations can load remote script utilities; improved output error handling.
    • Added Title/Description/Comment columns in several lists (eCRF, inquiries, tags).
  • Improvements

    • Broader search coverage; new column filters (group/visit/token).
    • Duration/offset display supports signed formatting.
    • Settings-driven defaults for collision visibility.
  • Documentation

    • README badges simplified; extensive new translations/labels.
  • Chores

    • Database migration/version update; dependency bump to XStream 1.4.21.

@rkrenn rkrenn requested a review from SigridDeller November 19, 2024 03:32
@rkrenn rkrenn merged commit ddcd50e into master Nov 19, 2024
@rkrenn
Copy link
Copy Markdown
Collaborator Author

rkrenn commented Aug 18, 2025

@CodeRabbit full review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 18, 2025

✅ Actions performed

Full review triggered.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Database adds internal (boolean) and description (text) to visit_schedule_item with migration to 010801080. DAO/service methods gain an optional internal filter and broadened search criteria. UI adds “Conflicts” toggles across lists, new visit-schedule columns/inputs, and label/setting keys. FieldCalculation gains secure file-backed script loading. Misc dependency bump and README cleanup.

Changes

Cohort / File(s) Summary
Docs
README.md
Remove translation/quality badges; keep Build/Test; adjust heading.
DB Schema & Migration
core/db/schema-create.sql, core/db/schema-up-master.sql, core/db/schema-set-version.sql
Add VISIT_SCHEDULE_ITEM.internal (NOT NULL) and description; backfill/init; bump version to 010801080.
DAO Query Broadening (Junction/disjunction)
core/src/.../ECRFFieldDaoImpl.java, .../ECRFFieldValueDaoImpl.java, .../InquiryDaoImpl.java
Replace nested ORs with a single disjunction; include additional fields in ilike searches.
VisitScheduleItem DAO API (+internal filter)
core/src/.../VisitScheduleItemDaoImpl.java
Add Boolean internal parameter to multiple finder/count methods; apply Restrictions.eq when provided.
ProbandListEntryTag DAO count API
core/src/.../ProbandListEntryTagDaoImpl.java
handleGetCount gains Boolean startDate filter; broaden name-infix disjunction.
Service Layer propagation
core/src/.../ProbandServiceImpl.java, .../StaffServiceImpl.java, .../TrialServiceImpl.java
Adapt to new DAO signatures; propagate internal flag; adjust interval/group logic; update FieldCalculation construction.
FieldCalculation (Java + JS engine)
core/src/.../js/FieldCalculation.java, core/src/main/resources/fieldCalculation.js, web/src/main/webapp/resources/js/fieldCalculation.js
Add FileDao-backed getScript(resource,fileId), UTF-8 decoding, Nashorn bridge; JS adds sync AJAX loader, caching, error handling, and mask exports.
Web beans: collisions toggles
web/src/.../model/** (multiple beans)
Introduce showCollisions flag (settings-backed), handlers to clear caches, and pass-through to model getters; add internal flag propagation in colliding visit items model.
Converters
web/src/.../conversion/DurationConverterBase.java, VisitScheduleDurationConverter.java, VisitScheduleOffsetConverter.java
Add signed/unsigned duration handling via isSigned(); implement in two converters.
Web utilities and settings
web/src/.../util/DefaultSettings.java, SettingCodes.java, MessageCodes.java, WebUtil.java, web/.../settings.properties, .../messages*.properties
Add numerous preset keys (showCollisions, internal, description preset), defaults, and WebUtil API update for tag count/startDate; extend visit schedule item count call.
XHTML: header filters and conditional icons
web/src/main/webapp/** includes for course/inventory/proband/staff/trial
Expand table headers to add collisions checkbox + tooltip; pass new rendered param to shared/listCollisionIcon.xhtml; add internal/description columns and inputs in visit schedule UIs.
Shared includes
web/.../includes/shared/listCollisionIcon.xhtml, .../visitScheduleItemTableColumns.xhtml, .../shared/ecrfTableColumns.xhtml
Gate icon rendering by external rendered flag; add filterBy for group/visit/token; add Title/Description columns to eCRF table.
Label resources
web/src/main/resources/**/labels*.properties
Add labels/tooltips for collisions filters; add Internal/Description, Title/Description, Comment column headers (en/de).
UML profiles (metadata churn)
mda/src/main/uml/UML_Standard_Profile...uml, andromda-*.profile.uml
Regenerate XMI ids, swap memberEnd orders; one profile (andromda-service) restructured with many stereotypes/types added; no runtime code impact.
Build
pom.xml
Bump xstream 1.4.20 → 1.4.21.

Sequence Diagram(s)

sequenceDiagram
  participant UI
  participant Service as Trial/Proband/Staff Service
  participant DAO as VisitScheduleItemDao
  participant DB

  UI->>Service: find items (trialId, groupId, probandId, internal?, interval,…)
  Service->>DAO: query(..., internal?, ...)
  DAO->>DB: SELECT ... WHERE ... AND (internal = ? if provided)
  DB-->>DAO: rows
  DAO-->>Service: items
  Service-->>UI: items
Loading
sequenceDiagram
  participant JS as fieldCalculation.js
  participant Bridge as FieldCalculation (Java)
  participant FileDao
  participant Store as DB/FileStore

  JS->>Bridge: getScript(resource, fileId)
  alt encrypted/not public
    Bridge-->>JS: throw error
  else ok
    Bridge->>FileDao: load(fileId)
    FileDao->>Store: fetch bytes
    Store-->>FileDao: bytes
    FileDao-->>Bridge: bytes
    Bridge-->>JS: UTF-8 string
    JS->>JS: cache/eval utilities
  end
Loading
sequenceDiagram
  participant User
  participant XHTML as DataTable (XHTML)
  participant Bean as *Bean.showCollisions
  participant Include as listCollisionIcon.xhtml

  User->>XHTML: Toggle collisions checkbox
  XHTML->>Bean: setShowCollisions(value), handleShowCollisionsChange()
  Bean->>Bean: clear collision caches
  XHTML->>Include: rendered = Bean.showCollisions, value = count
  Include-->>XHTML: icon rendered only if rendered && value!=null
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60–90 minutes

Possibly related PRs

Poem

In tunnels of time where schedules twine,
I nudge the flags: “internal” sign.
I tick the box for conflicts bright,
So lists can show — or hide — the light.
I fetch a script, byte-scented breeze,
Then hop along the data trees. 🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.38.6)
core/src/main/java/org/phoenixctms/ctsms/service/proband/ProbandServiceImpl.java
core/src/main/java/org/phoenixctms/ctsms/service/staff/StaffServiceImpl.java
core/src/main/java/org/phoenixctms/ctsms/service/trial/TrialServiceImpl.java
  • 1 others

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch int_visit_schedule

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

1 participant