Alternatives to potentially inappropriate medications for use in e-prescribing software: triggers and treatment algorithms