First, let's look at a more modern translation since neither of us are in the habit of calling children "fruit."
Here's the NIV translation. "If people are fighting and hit a pregnant woman and she gives birth prematurely but there is no serious injury, the offender must be fined whatever the woman’s husband demands and the court allows. But if there is serious injury, you are to take life for life, eye for eye, tooth for tooth, hand for hand, foot for foot, burn for burn, wound for wound, bruise for bruise."
If she gives birth prematurely but there is no injury, there is a fine. I think in this context, the text refers to injury to the child. You don't "give birth" to a miscarriage. You give birth to a living baby, so it is implied through the language that the child is fine.
If there is serious injury, the penalty is "life for life," which is a phrase unique to the Bible and not found in Hammurabi's code. It's meant that we should value the life and take life for life.
The author never specifically mentioned Hammurabi's Code. It simply steals the lines "eye for an eye" and "tooth for a tooth." If the specific ordinance were meant to be the read the same, wouldn't the author have just referred us to Hammurabi and pointed us to the specific code?
Also, in Hammurabi's Code, "eye for an eye" and "tooth for a tooth" are actually not found together. They are in separate ordinances, dealing with different things. This is further evidence that it is not the specifics of the rule that the Bible is teaching, but the general principle of equal repayment for ones crimes.