Using First-Order Logic to Represent Clinical Practice Guidelines and to Mitigate Adverse Interactions