It turns out that prior to 1980, penicillins and cephaloporins were often produced using the same fungus and the chance for contamination during the manufacturing process was high. The belief was that the beta-lactam ring similarities must be the cause. How wrong we were.
More recent studies have determined that the actual risk of cross-reactivity relates more to a side chain similarity and probably not the beta-lactam ring at all. Therefore it makes sense that if a penicillin and a cephalosporin share that particular (R-1) side-chain similarity, the risk of cross-reactivity is increased. Such is the case with amoxicillin or ampicillin with:
Other key findings to note:
You can feel comfortable clicking past the flashing allergy alert as you enter that ceftriaxone order in your patient with a documented penicillin allergy. If the patient has an allergic reaction, it's more likely a unique allergy to that cephalosporin than any cross-reactivity with a penicillin.
Campagna JD, Bond MC, Schabelman E, Hayes BD. The use of cephalosporins in penicillin-allergic patients: A literature review. J Emerg Med. 2012;42(5):612-20. Pubmed