I am trying to rank claimant's doctors in the order they received prescriptions from them. Some claims have fills from different doctors on the same day. This forces the rank to tie. Example: Patient A fills a prescription from Doctor A and B on the same day, and doctor C on the following day. My rank would give 1.5, 1.5, and 2 respectively. I would like to add an additional requirement to the rank such as how much they spent with the doctor in order to achieve 1, 2, and 3. What I need to know is what number doctor this is for them in order of dates of service, when dates of service tie, I want the higher total spend doctor going last. All of this needs to happen without affecting the other ranks. So if I have several doctors with ranks 1, 2, 3.5 3.5, 4, 5. I need this to show up as 1, 2, 3 ,4 ,5, 6 based off the billed amount on the tied doctors. Sorry for rambling, rough question to ask via a forum. Hopefully, one of you can make sense of what I'm saying.
... View more