Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/main/java/com/iemr/flw/domain/iemr/ANCVisit.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ public class ANCVisit {
@Column(name = "date_of_sterilisation")
private Timestamp dateSterilisation;

@Column (name = "place_of_anc")
private String placeOfAnc;

@Column(name = "place_of_ancId")
private Integer placeOfAncId;
Comment on lines +170 to +174
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue | ๐ŸŸ  Major

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.

Suggested change
@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.





Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/iemr/flw/dto/iemr/ANCVisitDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public class ANCVisitDTO {
private Timestamp visitDate;
private Timestamp dateSterilisation;
private Boolean isYesOrNo;
private String placeOfAnc;
private Integer placeOfAncId;

}