You want someone to write it for you, or do you want recommendations as to what software to buy? I can tell you right now that nobody here will write code for you, at least not without suitable monetary compensation. So, that leaves the question asking what packages are available. I googled "law firm client management software", and got almost 450,000 results back, among them, this one:
http://www.capterra.com/law-practice-management-software[
^]
If that one isn't suitable, feel free to google the same phrase (or something similar).