"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReferenceRange = void 0;
const CodeStub_1 = require("./CodeStub");
const Annotation_1 = require("./Annotation");
const Range_1 = require("./Range");
/**
 * Reference range for the measure
 *
 * @export
 * @class ReferenceRange
 *
 * @property {number} low lower bound of the reference range (inclusive)
 * @property {number} high upper bound of the reference range (inclusive)
 * @property {CodeStub[]} tags tags giving additional information about the reference range (e.g. applies to children/adults, male/female, etc.)
 * @property {CodeStub[]} codes codes qualifying the reference range using a codification system (e.g. LOINC)
 * @property {Annotation[]} notes notes giving additional information about the reference range
 * @property {Range} age age range to which the reference range applies
 */
class ReferenceRange {
    constructor(json) {
        var _a, _b, _c;
        this.low = json === null || json === void 0 ? void 0 : json.low;
        this.high = json === null || json === void 0 ? void 0 : json.high;
        this.tags = (_a = json === null || json === void 0 ? void 0 : json.tags) === null || _a === void 0 ? void 0 : _a.map((tag) => new CodeStub_1.CodeStub(tag));
        this.codes = (_b = json === null || json === void 0 ? void 0 : json.codes) === null || _b === void 0 ? void 0 : _b.map((code) => new CodeStub_1.CodeStub(code));
        this.notes = (_c = json === null || json === void 0 ? void 0 : json.notes) === null || _c === void 0 ? void 0 : _c.map((note) => new Annotation_1.Annotation(note));
        this.age = new Range_1.Range(json === null || json === void 0 ? void 0 : json.age);
        this.stringValue = json === null || json === void 0 ? void 0 : json.stringValue;
    }
}
exports.ReferenceRange = ReferenceRange;
//# sourceMappingURL=ReferenceRange.js.map