UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

312 lines (219 loc) 8.21 kB
// Generated by CoffeeScript 1.9.3 (function() { var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DomainResource, Element, ElementDefinition, Extension, HumanName, Identifier, Narrative, Parameters, Period, Quantity, Range, Ratio, Reference, Resource, RiskAssessment, RiskAssessmentPredictionComponent, SampledData, Timing, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; DT = require('../cql-datatypes'); CORE = require('./core'); Element = CORE.Element; Resource = CORE.Resource; Timing = CORE.Timing; Period = CORE.Period; Parameters = CORE.Parameters; Coding = CORE.Coding; Resource = CORE.Resource; Range = CORE.Range; Quantity = CORE.Quantity; Attachment = CORE.Attachment; BackboneElement = CORE.BackboneElement; DomainResource = CORE.DomainResource; ContactPoint = CORE.ContactPoint; ElementDefinition = CORE.ElementDefinition; Extension = CORE.Extension; HumanName = CORE.HumanName; Address = CORE.Address; Ratio = CORE.Ratio; SampledData = CORE.SampledData; Reference = CORE.Reference; CodeableConcept = CORE.CodeableConcept; Identifier = CORE.Identifier; Narrative = CORE.Narrative; Element = CORE.Element; /** Embedded class @class RiskAssessmentPredictionComponent @exports RiskAssessmentPredictionComponent as RiskAssessmentPredictionComponent */ RiskAssessmentPredictionComponent = (function(superClass) { extend(RiskAssessmentPredictionComponent, superClass); function RiskAssessmentPredictionComponent(json) { this.json = json; RiskAssessmentPredictionComponent.__super__.constructor.call(this, this.json); } /** One of the potential outcomes for the patient (e.g. remission, death, a particular condition). @returns {CodeableConcept} */ RiskAssessmentPredictionComponent.prototype.outcome = function() { if (this.json['outcome']) { return new CodeableConcept(this.json['outcome']); } }; /** How likely is the outcome (in the specified timeframe). @returns {Array} an array of {@link Number} objects */ RiskAssessmentPredictionComponent.prototype.probabilityDecimal = function() { return this.json['probabilityDecimal']; }; /** How likely is the outcome (in the specified timeframe). @returns {Range} */ RiskAssessmentPredictionComponent.prototype.probabilityRange = function() { if (this.json['probabilityRange']) { return new Range(this.json['probabilityRange']); } }; /** How likely is the outcome (in the specified timeframe). @returns {CodeableConcept} */ RiskAssessmentPredictionComponent.prototype.probabilityCodeableConcept = function() { if (this.json['probabilityCodeableConcept']) { return new CodeableConcept(this.json['probabilityCodeableConcept']); } }; /** Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.). @returns {Array} an array of {@link Number} objects */ RiskAssessmentPredictionComponent.prototype.relativeRisk = function() { return this.json['relativeRisk']; }; /** Indicates the period of time or age range of the subject to which the specified probability applies. @returns {Period} */ RiskAssessmentPredictionComponent.prototype.whenPeriod = function() { if (this.json['whenPeriod']) { return new Period(this.json['whenPeriod']); } }; /** Indicates the period of time or age range of the subject to which the specified probability applies. @returns {Range} */ RiskAssessmentPredictionComponent.prototype.whenRange = function() { if (this.json['whenRange']) { return new Range(this.json['whenRange']); } }; /** Additional information explaining the basis for the prediction. @returns {Array} an array of {@link String} objects */ RiskAssessmentPredictionComponent.prototype.rationale = function() { return this.json['rationale']; }; return RiskAssessmentPredictionComponent; })(BackboneElement); /** An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. @class RiskAssessment @exports RiskAssessment as RiskAssessment */ RiskAssessment = (function(superClass) { extend(RiskAssessment, superClass); function RiskAssessment(json) { this.json = json; RiskAssessment.__super__.constructor.call(this, this.json); } /** The patient or group the risk assessment applies to. @returns {Reference} */ RiskAssessment.prototype.subject = function() { if (this.json['subject']) { return new Reference(this.json['subject']); } }; /** The date (and possibly time) the risk assessment was performed. @returns {Array} an array of {@link Date} objects */ RiskAssessment.prototype.date = function() { if (this.json['date']) { return DT.DateTime.parse(this.json['date']); } }; /** For assessments or prognosis specific to a particular condition, indicates the condition being assessed. @returns {Reference} */ RiskAssessment.prototype.condition = function() { if (this.json['condition']) { return new Reference(this.json['condition']); } }; /** The provider or software application that performed the assessment. @returns {Reference} */ RiskAssessment.prototype.performer = function() { if (this.json['performer']) { return new Reference(this.json['performer']); } }; /** Business identifier assigned to the risk assessment. @returns {Identifier} */ RiskAssessment.prototype.identifier = function() { if (this.json['identifier']) { return new Identifier(this.json['identifier']); } }; /** The algorithm, processs or mechanism used to evaluate the risk. @returns {CodeableConcept} */ RiskAssessment.prototype.method = function() { if (this.json['method']) { return new CodeableConcept(this.json['method']); } }; /** Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.). @returns {Array} an array of {@link Reference} objects */ RiskAssessment.prototype.basis = function() { var i, item, len, ref, results; if (this.json['basis']) { ref = this.json['basis']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new Reference(item)); } return results; } }; /** Describes the expected outcome for the subject. @returns {Array} an array of {@link RiskAssessmentPredictionComponent} objects */ RiskAssessment.prototype.prediction = function() { var i, item, len, ref, results; if (this.json['prediction']) { ref = this.json['prediction']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new RiskAssessmentPredictionComponent(item)); } return results; } }; /** A description of the steps that might be taken to reduce the identified risk(s). @returns {Array} an array of {@link String} objects */ RiskAssessment.prototype.mitigation = function() { return this.json['mitigation']; }; return RiskAssessment; })(DomainResource); module.exports.RiskAssessment = RiskAssessment; }).call(this); //# sourceMappingURL=riskassessment.js.map