Thanks in advance.
The only thing I could fathom, would be to have an NPC or terminal linked to a container type thing, that the player would put in the two identical items (or give to, in the case of NPC), and you would use a script to spit out the repaired item and scrap. A function like AddItemHealthPercent would probably be a step in the right direction. Of course you'd have to calculate how the repair system works, I don't know if the item being repaired increases by a flat percent depending on your skill level or if it takes into account the obsolete items health as well.
Just a thought, I know it's not really what you need, but is the only thing I can think of similar.