Skip to content

OP-324: Delete member of family in uspConsumeEnrollment#66

Merged
delcroip merged 2 commits intodevelopfrom
feature/OP-324
Apr 21, 2021
Merged

OP-324: Delete member of family in uspConsumeEnrollment#66
delcroip merged 2 commits intodevelopfrom
feature/OP-324

Conversation

@sniedzielski
Copy link
Copy Markdown
Contributor

@sniedzielski sniedzielski commented Apr 21, 2021

TICKET: https://openimis.atlassian.net/browse/OP-324

In that PR I want to add missing part (deleting insuree from family based on received XML payload) in uspConsumeEnrollment. When we have no insuree in payload - then we can delete this one using SP 'uspAPIDeleteMemberFamily' and updateTblInsureePolicy with setting validityTo.

Earlier such case wasn't implemented and that is why this TestCase doesn't pass scenario after synch in policy mobile app.

@sniedzielski sniedzielski changed the title OP-324: OP-324: Delete member of family in uspConsumeEnrollment Apr 21, 2021
Comment thread Empty databases/openIMIS_ONLINE.sql Outdated
SELECT CHFID FROM @tblInsuree TI
) tbl
GROUP BY CHFID
HAVING count(*) = 1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will get also the new insuree

Why not doing a left join

SELECT CHFID FROM @insureeToProcess IP
LEFT JOIN @tblInsuree I ON I.CHFID=IP.CHFID
WHERE I.CHFID is NULL

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok @delcroip . I will try to do this and check if it works.
Thx for clue.

@sniedzielski sniedzielski requested a review from delcroip April 21, 2021 13:32
@sniedzielski
Copy link
Copy Markdown
Contributor Author

@delcroip You can re-check this PR. I added approach with LEFT JOIN

@delcroip delcroip merged commit 102746d into develop Apr 21, 2021
@delcroip delcroip deleted the feature/OP-324 branch April 21, 2021 13:36
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