Feature/Add Key Place of Anc in ANC module#113
Feature/Add Key Place of Anc in ANC module#113SauravBizbRolly merged 1 commit intosm/release-3.10.0_tempfrom
Conversation
WalkthroughTwo new fields ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/main/java/com/iemr/flw/domain/iemr/ANCVisit.javasrc/main/java/com/iemr/flw/dto/iemr/ANCVisitDTO.java
🔇 Additional comments (2)
src/main/java/com/iemr/flw/dto/iemr/ANCVisitDTO.java (1)
66-67: LGTM! DTO fields added correctly.The new
placeOfAncandplaceOfAncIdfields are properly declared and will work with Lombok's@Dataannotation to generate the necessary getters and setters.src/main/java/com/iemr/flw/domain/iemr/ANCVisit.java (1)
170-174: Missing database migration script and unit test coverage for new fields.The PR adds
placeOfAncandplaceOfAncIdfields to the ANCVisit domain and DTO, but lacks:
- Database migration script (DDL) to add these columns to the
t_anc_visittable- Unit tests covering the new fields
Note: Service and repository layers handle the new fields automatically through ModelMapper mapping between DTO and entity.
| @Column (name = "place_of_anc") | ||
| private String placeOfAnc; | ||
|
|
||
| @Column(name = "place_of_ancId") | ||
| private Integer placeOfAncId; |
There was a problem hiding this comment.
Fix column naming inconsistency in place_of_ancId.
Line 173 uses place_of_ancId which breaks the snake_case naming convention used throughout this entity. All similar ID columns follow the pattern field_name_id in lowercase:
- Line 152:
place_of_death_id - Line 125:
method_of_termination_id - Line 131:
termination_done_by_id
The column name should be place_of_anc_id (all lowercase) to maintain consistency.
🔎 Proposed fix
@Column (name = "place_of_anc")
private String placeOfAnc;
-@Column(name = "place_of_ancId")
+@Column(name = "place_of_anc_id")
private Integer placeOfAncId;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| @Column (name = "place_of_anc") | |
| private String placeOfAnc; | |
| @Column(name = "place_of_ancId") | |
| private Integer placeOfAncId; | |
| @Column (name = "place_of_anc") | |
| private String placeOfAnc; | |
| @Column(name = "place_of_anc_id") | |
| private Integer placeOfAncId; |
🤖 Prompt for AI Agents
In src/main/java/com/iemr/flw/domain/iemr/ANCVisit.java around lines 170 to 174,
the @Column name for placeOfAncId is "place_of_ancId" which breaks the
snake_case convention used elsewhere; change the @Column name to
"place_of_anc_id" (all lowercase with underscore before id) so it matches the
existing pattern for ID columns and update any related DB mappings or
migration/DDL if necessary.
📋 Description
JIRA ID: AMM-2039
Add Key Place of Anc in ANC module
✅ Type of Change
ℹ️ Additional Information
Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.