     }
     
     public func severity(measurement: QTcMeasurement) -> Severity {
+        if isUndefined(qtcMeasurement: measurement) {
+            return .undefined
+        }
         let result = failingTest(measurement: measurement)
         if let result = result {
             return result.severity

                qtcTests: [
                QTcTest(value: 450, units: .msec, valueComparison: .greaterThanOrEqual, sex: .male),
                QTcTest(value: 460, units: .msec, valueComparison: .greaterThanOrEqual, sex: .female),
                // We include test below if sex not specified, since by above 2 tests this must be true.  This
                // test is redundant with the one above, but we leave them both in for clarity's sake.
                QTcTest(value: 460, units: .msec, valueComparison: .greaterThanOrEqual, sex: .unspecified),
                QTcTest(value: 390, units: .msec, valueComparison: .lessThanOrEqual)],
                reference: "AHA/ACCF/HRS Recommendations for the Standardization and Interpretation of the Electrocardiogram: Part IV: The ST Segment, T and U Waves, and the QT Interval A Scientific Statement From the American Heart Association Electrocardiography and Arrhythmias Committee, Council on Clinical Cardiology; the American College of Cardiology Foundation; and the Heart Rhythm Society Endorsed by the International Society for Computerized Electrocardiology. Journal of the American College of Cardiology. 2009;53(11):982-991. doi:10.1016/j.jacc.2008.12.014",
                description: "QTc ≥ 450 msec men\nQTc ≥ 460 msec women\nQTc ≤ 390 msec men and women",
                notes: "Includes both long and short QTc criteria."),
         .esc2005:
            QTcTestSuite(
                name: "ESC 2005",

public struct QTcTestSuite {
    public let name: String
    let qtcTests: QTcTests
    public let requiresSex: Bool
    public let requiresAge: Bool
    public let reference: String
    public let description: String // the test described in prose
    let notes: String?  // optional notes about this test suite
    
    public init(name: String, qtcTests: QTcTests, reference: String, description: String, notes: String? = nil,
                requiresSex: Bool = false, requiresAge: Bool = false) {
        self.name = name
        self.qtcTests = qtcTests
        self.reference = reference
        self.description = description
        self.notes = notes
        self.requiresSex = requiresSex
        self.requiresAge = requiresAge
    }
    
    public func isUndefined(qtcMeasurement: QTcMeasurement) -> Bool {
        let missingSex = requiresSex && qtcMeasurement.sex == .unspecified
        let missingAge = requiresAge && qtcMeasurement.age == nil
        return missingAge || missingSex
    }
    
    // returns abnormal tests
