Error
Use Case:
As a reviewer of merge requests I would like to see a quick summary of what fields match and the confidence score for each pair of records on the person merge screen
Background: When an admin goes to process a merge requests they need to determine if the merge is actually valid. The Person merge screen intentionally avoids showing fields that match to simplify the review process. I think this is a valid approach but it makes it more difficult to determine if the merge is valid.I think something like this could be usefulA stop gap solution is to add this lava to the Person Merge Page:
{% sql %}--The PersonDuplicate table uses PersonAlias so we need to grab those as wellWITH mergeIDsAS ( SELECT A.Id AS AliasId ,P.FirstName ,P.LastName ,P.Id FROM EntitySetItem E JOIN Person P ON P.Id = E.EntityId JOIN PersonAlias A ON A.PersonId = P.Id WHERE EntitySetId = {{ PageParameter.Set }} ) ,idCombinationsAS ( SELECT m1.AliasId AS AliasId1 ,m2.AliasId AS AliasId2 ,m1.FirstName AS FirstName1 ,m2.LastName AS LastName1 ,m2.FirstName AS FirstName2 ,m2.LastName AS LastName2 ,m1.Id AS Id1 ,m2.Id AS Id2 FROM mergeIDs m1 JOIN mergeIDs m2 ON m1.AliasId <> m2.AliasId )SELECT Id1 ,FirstName1 ,LastName1 ,Id2 ,FirstName2 ,LastName2 ,ScoreDetail ,FORMAT(ConfidenceScore / 100, 'P') AS ConfidenceScoreFROM idCombinations IJOIN PersonDuplicate P ON P.PersonAliasId = I.AliasId1 AND P.DuplicatePersonAliasId = I.AliasId2{% endsql %}<div class='card'> <ul style='margin-top:10px'> {% for item in results %} <li> <a href="/PersonDuplicate/{{ item.Id1 }}">{{ item.FirstName1 }} {{ item.LastName1 }} </a> matches <a href="/PersonDuplicate/{{ item.Id2 }}">{{ item.FirstName2 }} {{ item.LastName2 }} </a> on <strong>{{ item.ScoreDetail | RemoveFirst:'|' | Replace:'|',', ' }} </strong> with a confidence Score of {{ item.ConfidenceScore }} </li> {% endfor %} </ul></div><br>
Cultivate your ideas for maximum impact with these helpful submission tips that will increase the chances of your brilliant concepts becoming reality.