Here is how the matching works now:
Match Claim by Claim number
(Claim Found)
i. Match service by Claim & Date & Tariff
ii. Match service by Claim & $ value
iii. (Pending only) guess (Take first from the claim that doesn't already have a pending record)
(Claim NOT Found)
Match service with by Patient & Date & Tariff
Claim = associated claim
(Still No Match)
Match service by Patient & $ value
Claim = associated claim
(Still No Match Again)
Throw an error.
**Could still be some improvement here
Logged In: YES
user_id=1958893
Originator: YES
Added a feature to the search:
If a sociological record is not matched, an error is no longer thrown. Instead the patient is set to null and the search continues as above. If the claim is not found an error is thrown, since patient information cannot be used to match!