Skip to content

Feature/dynamic form changes - #398

Merged
vishwab1 merged 5 commits into
PSMRI:release-3.13.0from
sehjotsinghunthinkable:feature/dynamic-form-changes
Nov 3, 2026
Merged

vishwab1 merged 5 commits into
PSMRI:release-3.13.0from
sehjotsinghunthinkable:feature/dynamic-form-changes

Conversation

@sehjotsinghunthinkable

@sehjotsinghunthinkable sehjotsinghunthinkable commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

📋 Description

JIRA ID: STOP-602

  • ✨ New feature (non-breaking change which adds functionality)

Summary by CodeRabbit

  • New Features
    • Added support for form questions that can be edited after submission and flagged for backfill.
    • Added unit, auto-fill, and English and Hindi helper-text information to form questions.
  • Updates
    • Updated contact follow-up questions, choices, and conditional follow-up prompts.
    • Revised TPT follow-up options and labels, and added a remarks field.
    • Added English and Hindi guidance to TB counselling questions and updated their wording.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 03f1aa1f-532b-4900-865c-8c0f8876c696

No actionable comments were generated in the recent review.

Walkthrough

The change adds question metadata and validation types, version-cloning support, and three version-2 form migrations for contact follow-up, TPT follow-up, and TB counselling. The migrations update questions, options, validations, conditions, ordering, and back-fill or post-submit flags.

Changes: Dynamic form version migrations

Layer / File(s) Summary
Question metadata and version cloning
src/main/java/com/iemr/flw/domain/iemr/QuestionValidation.java, src/main/java/com/iemr/flw/domain/iemr/SectionQuestion.java, src/main/java/com/iemr/flw/dto/iemr/SectionQuestionDTO.java, src/main/java/com/iemr/flw/masterEnum/ValidationType.java, src/main/java/com/iemr/flw/service/impl/DynamicFormReconciliationServiceImpl.java, src/main/java/com/iemr/flw/seeder/migration/FormVersionCloner.java
Adds question back-fill and post-submit edit flags, new validation types, reconciliation updates for non-null flag values, and a component that clones a form version while clearing nested entity IDs.
Contact follow-up form migration
src/main/java/com/iemr/flw/seeder/migration/V010_RestructureContactFollowUpStatus.java, src/main/java/com/iemr/flw/seeder/ContactFollowUpFormSeeder.java
Adds version 2 with revised questions, options, conditional display rules, validations, ordering, and question flags. Removes comments about routing in the existing seeder; the question and options remain unchanged.
TPT follow-up visit migration
src/main/java/com/iemr/flw/seeder/migration/V011_UpdateTptFollowUpVisitQuestions.java
Adds version 2 with revised option lists, updates to existing questions, an optional remarks question, and back-fill flags.
TB counselling helper-text migration
src/main/java/com/iemr/flw/seeder/migration/V012_AddTbCounsellingSchemeHelperText.java
Adds English and Hindi helper-text validations, updates DOTS question labels, and sets back-fill flags in version 2.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Suggested reviewers: chetansaroya, vishwab1

Merge Risk: Minimal · previous review 57781

No confirmed defect currently blocks merging. Resolve the commitlint revision-range failure and complete normal checks before merging.

Pre-merge checks: Passed 3 · Failed 1 · Inconclusive 1

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check Inconclusive The title "Feature/dynamic form changes" is vague and generic. It names the area (dynamic forms) but not the main change. The changeset covers a new SectionQuestion backfill and edit-after-submit flag… Rewrite the title to name the primary change. For example: "Add form version migrations for contact follow-up, TPT, and TB counselling forms" or "Add back-fill and edit-after-submit flags to dynamic form questions." Include the JIRA key STO…
Passed Passed checks: 3 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 9 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Title check

Explanation

The title "Feature/dynamic form changes" is vague and generic. It names the area (dynamic forms) but not the main change. The changeset covers a new SectionQuestion backfill and edit-after-submit flags, new ValidationType values (UNIT, helper text, AUTO_FILL), a FormVersionCloner, and migrations V010 to V012 that restructure the contact follow-up and TPT follow-up forms and add TB counselling helper text. The title uses the generic term "changes" and does not identify any of these.

Resolution

Rewrite the title to name the primary change. For example: "Add form version migrations for contact follow-up, TPT, and TB counselling forms" or "Add back-fill and edit-after-submit flags to dynamic form questions." Include the JIRA key STOP-602 if the team uses it in titles.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 389d4762-bd00-4688-a5be-0eda24b0f8c3
Commits

Reviewing files that changed from the base of the PR and between 0fc15c7 and 5778164.

Files selected for processing: 10
  • src/main/java/com/iemr/flw/domain/iemr/QuestionValidation.java
  • src/main/java/com/iemr/flw/domain/iemr/SectionQuestion.java
  • src/main/java/com/iemr/flw/dto/iemr/SectionQuestionDTO.java
  • src/main/java/com/iemr/flw/masterEnum/ValidationType.java
  • src/main/java/com/iemr/flw/seeder/ContactFollowUpFormSeeder.java
  • src/main/java/com/iemr/flw/seeder/migration/FormVersionCloner.java
  • src/main/java/com/iemr/flw/seeder/migration/V010_RestructureContactFollowUpStatus.java
  • src/main/java/com/iemr/flw/seeder/migration/V011_UpdateTptFollowUpVisitQuestions.java
  • src/main/java/com/iemr/flw/seeder/migration/V012_AddTbCounsellingSchemeHelperText.java
  • src/main/java/com/iemr/flw/service/impl/DynamicFormReconciliationServiceImpl.java
Files with no reviewable changes: 1
  • src/main/java/com/iemr/flw/seeder/ContactFollowUpFormSeeder.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@sehjotsinghunthinkable

Copy link
Copy Markdown
Contributor Author

@coderabbitai code review

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

@sehjotsinghunthinkable I’ll trigger a code review of this PR.

Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@sehjotsinghunthinkable

Copy link
Copy Markdown
Contributor Author

@coderabbitai code review

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

@sehjotsinghunthinkable I’ll trigger a code review of this PR.

Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@vishwab1
vishwab1 merged commit d6b9ab2 into PSMRI:release-3.13.0 Nov 3, 2026
1 of 2 checks passed
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