Now whether the on-paper prices for medical care in this country actually have any relationship to objective reality is an entirely separate question of course. In general coming from an outside perspective, combining healthcare and for-profit motives in a single system seems particularly likely to lead to all kinds of perverse incentives, but, it's the system that exists, and it seems unlikely to change any time soon.
I probably wouldn't write a training system in Ruby (not because it's not doable, just because it's not a good use of time to rewrite stuff that is already available in python ecosystem)... but hooking up a Ruby system up to LLM's for interaction is eminently doable with very little effort.
I am assuming your situation had some specific constraints that made it harder, but it would be nice to understand what they were - right now your comment describes a more complicated solution and I am curious why you needed it.