Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public class Reconciliation {
  2.  
  3. public Map<CPTCode, Integer> reconcile(List<CPTCode> manualCodes, List<CPTCode> targetCodes) {
  4.  
  5. List<CPTCode> perfectMatches = getPerfectMatches(manualCodes, targetCodes);
  6.  
  7. Map<CPTCode, Integer> result = buildPerfectMatchResult(manualCodes, perfectMatches);
  8.  
  9. return result;
  10. }
  11.  
  12. private List<CPTCode> getPerfectMatches(List<CPTCode> manualCodes, List<CPTCode> targetCodes) {
  13. List<CPTCode> perfectMatches = new ArrayList<>();
  14.  
  15. for (CPTCode targetCode : targetCodes) {
  16.  
  17. for (CPTCode sourceCode : manualCodes) {
  18.  
  19. if (sourceCode.equals(targetCode)) {
  20. perfectMatches.add(targetCode);
  21. }
  22. }
  23. }
  24.  
  25. return perfectMatches;
  26. }
  27.  
  28. ….
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement