severity to severity_code and status to status_code