The suffix -is indicates genitive in the third declension.
That is, doloris means "of pain".
The word ratio is complicated.
The dictionary by Lewis and Short lists the following translations under ratio:
reckoning, account, calculation, computation, list, roll, register, sum, number, business matter, transaction, business, matter, affair, interest, advantage, relation, reference, respect, regard, concern, consideration, care, course, conduct, procedure, mode, manner, method, fashion, plan, condition, nature, kind, sort, way, judgment, understanding, reason, ground, motive, showing cause, argument, reasonableness, propriety, law, rule, order, conformity, theory, doctrine, system, science, knowledge, philosophy, view, opinion, proof, argumentation, reasoning.
I may have missed something, but the point should be clear: ratio can mean an enormous number of different things, depending on context.
(There are also other online dictionaries; see this list.)
The word dolor is clearer, and "pain" is a good overall translation.
Some translations picked from L&S:
pain, ache, distress, grief, affliction, sorrow, anguish, trouble, vexation, mortification, wrath, animosity, anger, resentment, pathos.
The phrase ratio doloris means "ratio of dolor", but it can also be interpreted as "ratio towards dolor" or "ratio caused by dolor".
Now if you replace ratio and dolor with the possible translations offered above, you get a huge number of different readings, and without context any one of them is possible.
Without context, my first guesses at the meaning would be "reason for pain" or "nature/manner of pain".
If you want to know what Et ratio in dolore est means and whether that is a good translation for "There is purpose in pain", I recommend asking a separate question.
It would be a good question, but it's cleaner to keep different questions separate, whether or not related.