-
Notifications
You must be signed in to change notification settings - Fork 13
Optimised stored procedure Pr_GetCallHistory #66
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
8cac32a
fix:changes in face embedding sql file version 2
paras-dba 7e663c3
fix:changes sql file for migratio
paras-dba b3b99c3
fix:changes for all migrationsql
paras-dba 3681580
fix:new final fixes for deployement
paras-dba 4b258be
fix:changes on 28thNov
paras-dba 22d0dff
fix:resolved conficts
paras-dba 0b597d7
fix:new changes 30/11/2025
paras-dba 7499691
fix:new changes part-2 30/11/2025
paras-dba 3ba90ad
fix:new changes 02/12/2025
paras-dba 2760d73
fix:new changes part-2 02/12/2025
paras-dba e920f52
fix:new changes part-3 02/12/2025
paras-dba 46606dd
Merge branch 'main' of https://github.com/PSMRI/AMRIT-DB into amrit_m…
vishwab1 c364219
Merge branch 'main' of github.com:PSMRI/AMRIT-DB into amrit_migration…
paras-dba 562da00
fix: new fixes for sanofi prod 5/12/2025
paras-dba facda19
fix:t_idrdetails column modification
paras-dba 6d46cbe
Merge branch 'main' of github.com:PSMRI/AMRIT-DB into amrit_migration…
paras-dba e882f84
Merge branch 'main' of github.com:PSMRI/AMRIT-DB into amrit_migration…
paras-dba 952f4df
fix:Modify table's column and added SP
paras-dba d6dc9fc
fix:change in v_23
paras-dba fd91e03
fix:v28 file
paras-dba 428fe2e
Merge branch 'main' of github.com:PSMRI/AMRIT-DB into amrit_migration…
paras-dba 2876365
fix:12/12/2025
paras-dba 94b184c
fix:query fixed acc. to coderabbit
paras-dba 63da25c
Merge branch 'main' of github.com:PSMRI/AMRIT-DB into amrit_migration…
paras-dba fee3e01
Merge branch 'main' of github.com:PSMRI/AMRIT-DB into amrit_migration…
paras-dba a906909
fix:optimised stored procedure
paras-dba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| DROP PROCEDURE IF EXISTS Pr_GetCallHistory; | ||
|
|
||
|
|
||
|
|
||
| DELIMITER $$ | ||
|
|
||
| CREATE DEFINER=`piramaldev`@`%` PROCEDURE `Pr_GetCallHistory`( | ||
| IN v_obcallid INT | ||
| ) | ||
| BEGIN | ||
|
|
||
| SELECT | ||
| t1.callid, | ||
| t2.MotherID, | ||
| t3.Name, | ||
| NULL AS Child_id, | ||
| NULL AS child_name, | ||
| t1.PhoneNo, | ||
| t3.ASHA_Name, | ||
| t1.ReceivedRoleName, | ||
| t3.LMP_Date, | ||
| NULL AS dob, | ||
| t1.calltime, | ||
| t2.OutboundCallType AS `ECD CallType`, | ||
| t1.TypeOfComplaint, | ||
| t1.complaintRemarks, | ||
| t1.Remarks AS AdviceProvided | ||
| FROM t_bencall t1 | ||
| INNER JOIN t_mctsoutboundcalls t2 | ||
| ON t1.obcallid = t2.obcallid | ||
| INNER JOIN t_mothervalidrecord t3 | ||
| ON t2.MotherID = t3.MCTSID_no | ||
| WHERE | ||
| (v_obcallid IS NULL OR t1.obcallid = v_obcallid) | ||
|
|
||
| UNION ALL | ||
|
|
||
| SELECT | ||
| t1.callid, | ||
| t2.MotherID, | ||
| t3.Mother_Name, | ||
| t3.MCTSID_no_Child_ID AS Child_id, | ||
| t3.Child_Name AS child_name, | ||
| t1.PhoneNo, | ||
| t3.ASHA_Name, | ||
| t1.ReceivedRoleName, | ||
| NULL AS LMP_Date, | ||
| t3.DOB AS dob, | ||
| t1.calltime, | ||
| t2.OutboundCallType AS `ECD CallType`, | ||
| t1.TypeOfComplaint, | ||
| t1.complaintRemarks, | ||
| t1.Remarks AS AdviceProvided | ||
| FROM t_bencall t1 | ||
| INNER JOIN t_mctsoutboundcalls t2 | ||
| ON t1.obcallid = t2.obcallid | ||
| INNER JOIN t_childvaliddata t3 | ||
| ON t2.childID = t3.MCTSID_no_Child_ID | ||
| WHERE | ||
| (v_obcallid IS NULL OR t1.obcallid = v_obcallid); | ||
|
|
||
| END$$ | ||
|
|
||
| DELIMITER ; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.