Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ETL] Incorrect table name used for undoing exits and cancels #112

Open
Tracked by #109
mahalakshme opened this issue Nov 6, 2024 · 0 comments
Open
Tracked by #109

[ETL] Incorrect table name used for undoing exits and cancels #112

mahalakshme opened this issue Nov 6, 2024 · 0 comments

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Nov 6, 2024

Issue:

org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [delete from "poweratuat"."indivi_exit_compensation_in_case_exit"
using "poweratuat"."indivi_exit_compensation_in_case"
where "poweratuat"."indivi_exit_compensation_in_case_exit".id = "poweratuat"."indivi_exit_compensation_in_case".id
and "poweratuat"."indivi_exit_compensation_in_case".program_exit_date_time is null;]
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:99)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1538)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:393)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:431)

Tech analysis:

  • The program enrolment table name is not always a substring of program exit table name like coded here
  • In power org, exit table is truncated table name, and enrolment table is full name without any truncation.
  • Similar case for encounter cancel table names like coded here

AC:

  • The ETLs of power and poweratuat in prerelease should pass after the fix
  • Create general encounter type with name 'maternity benefit claims documentationaaaaaaaaaaaa' for subject type 'Individual' and check for the case in this card. Applicable for program encounter as well.
  • This and this cards AC should continue to work as expected.

Questions:

exit and cancel suffixes added at two places when truncated. - just by searching for exit we can find the usage

@mahalakshme mahalakshme converted this from a draft issue Nov 6, 2024
@mahalakshme mahalakshme changed the title [ETL] Incorrect table name used for undoing exits [ETL] Incorrect table name used for undoing exits and cancels Nov 6, 2024
@mahalakshme mahalakshme moved this from In Analysis to In Analysis Review in Avni Product Nov 6, 2024
@mahalakshme mahalakshme moved this from In Analysis Review to Ready in Avni Product Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

1 participant