UNPKG

@phema/cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

889 lines (643 loc) 24.7 kB
// Generated by CoffeeScript 1.12.7 (function() { var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ConceptDefinitionComponent, ConceptDefinitionDesignationComponent, ConceptReferenceComponent, ConceptSetComponent, ConceptSetFilterComponent, ContactPoint, DT, DomainResource, Element, ElementDefinition, Extension, HumanName, Identifier, Narrative, Parameters, Period, Quantity, Range, Ratio, Reference, Resource, SampledData, Timing, ValueSet, ValueSetComposeComponent, ValueSetDefineComponent, ValueSetExpansionComponent, ValueSetExpansionContainsComponent, 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 ConceptDefinitionDesignationComponent @exports ConceptDefinitionDesignationComponent as ConceptDefinitionDesignationComponent */ ConceptDefinitionDesignationComponent = (function(superClass) { extend(ConceptDefinitionDesignationComponent, superClass); function ConceptDefinitionDesignationComponent(json) { this.json = json; ConceptDefinitionDesignationComponent.__super__.constructor.call(this, this.json); } /** The language this designation is defined for. @returns {Array} an array of {@link String} objects */ ConceptDefinitionDesignationComponent.prototype.language = function() { return this.json['language']; }; /** A code that details how this designation would be used. @returns {Coding} */ ConceptDefinitionDesignationComponent.prototype.use = function() { if (this.json['use']) { return new Coding(this.json['use']); } }; /** The text value for this designation. @returns {Array} an array of {@link String} objects */ ConceptDefinitionDesignationComponent.prototype.value = function() { return this.json['value']; }; return ConceptDefinitionDesignationComponent; })(BackboneElement); /** Embedded class @class ConceptDefinitionComponent @exports ConceptDefinitionComponent as ConceptDefinitionComponent */ ConceptDefinitionComponent = (function(superClass) { extend(ConceptDefinitionComponent, superClass); function ConceptDefinitionComponent(json) { this.json = json; ConceptDefinitionComponent.__super__.constructor.call(this, this.json); } /** Code that identifies concept. @returns {Array} an array of {@link String} objects */ ConceptDefinitionComponent.prototype.code = function() { return this.json['code']; }; /** If this code is not for use as a real concept. @returns {Array} an array of {@link boolean} objects */ ConceptDefinitionComponent.prototype.abstract = function() { return this.json['abstract']; }; /** Text to Display to the user. @returns {Array} an array of {@link String} objects */ ConceptDefinitionComponent.prototype.display = function() { return this.json['display']; }; /** The formal definition of the concept. Formal definitions are not required, because of the prevalence of legacy systems without them, but they are highly recommended, as without them there is no formal meaning associated with the concept. @returns {Array} an array of {@link String} objects */ ConceptDefinitionComponent.prototype.definition = function() { return this.json['definition']; }; /** Additional representations for the concept - other languages, aliases, specialised purposes, used for particular purposes, etc. @returns {Array} an array of {@link ConceptDefinitionDesignationComponent} objects */ ConceptDefinitionComponent.prototype.designation = function() { var i, item, len, ref, results; if (this.json['designation']) { ref = this.json['designation']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ConceptDefinitionDesignationComponent(item)); } return results; } }; /** Child Concepts (is-a / contains). @returns {Array} an array of {@link ConceptDefinitionComponent} objects */ ConceptDefinitionComponent.prototype.concept = function() { var i, item, len, ref, results; if (this.json['concept']) { ref = this.json['concept']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ConceptDefinitionComponent(item)); } return results; } }; return ConceptDefinitionComponent; })(BackboneElement); /** Embedded class @class ValueSetDefineComponent @exports ValueSetDefineComponent as ValueSetDefineComponent */ ValueSetDefineComponent = (function(superClass) { extend(ValueSetDefineComponent, superClass); function ValueSetDefineComponent(json) { this.json = json; ValueSetDefineComponent.__super__.constructor.call(this, this.json); } /** URI to identify the code system. @returns {Array} an array of {@link String} objects */ ValueSetDefineComponent.prototype.system = function() { return this.json['system']; }; /** The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked. @returns {Array} an array of {@link String} objects */ ValueSetDefineComponent.prototype.version = function() { return this.json['version']; }; /** If code comparison is case sensitive when codes within this system are compared to each other. @returns {Array} an array of {@link boolean} objects */ ValueSetDefineComponent.prototype.caseSensitive = function() { return this.json['caseSensitive']; }; /** Concepts in the code system. @returns {Array} an array of {@link ConceptDefinitionComponent} objects */ ValueSetDefineComponent.prototype.concept = function() { var i, item, len, ref, results; if (this.json['concept']) { ref = this.json['concept']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ConceptDefinitionComponent(item)); } return results; } }; return ValueSetDefineComponent; })(BackboneElement); /** Embedded class @class ConceptReferenceComponent @exports ConceptReferenceComponent as ConceptReferenceComponent */ ConceptReferenceComponent = (function(superClass) { extend(ConceptReferenceComponent, superClass); function ConceptReferenceComponent(json) { this.json = json; ConceptReferenceComponent.__super__.constructor.call(this, this.json); } /** Specifies a code for the concept to be included or excluded. @returns {Array} an array of {@link String} objects */ ConceptReferenceComponent.prototype.code = function() { return this.json['code']; }; /** The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system. @returns {Array} an array of {@link String} objects */ ConceptReferenceComponent.prototype.display = function() { return this.json['display']; }; /** Additional representations for this concept when used in this value set - other languages, aliases, specialised purposes, used for particular purposes, etc. @returns {Array} an array of {@link ConceptDefinitionDesignationComponent} objects */ ConceptReferenceComponent.prototype.designation = function() { var i, item, len, ref, results; if (this.json['designation']) { ref = this.json['designation']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ConceptDefinitionDesignationComponent(item)); } return results; } }; return ConceptReferenceComponent; })(BackboneElement); /** Embedded class @class ConceptSetFilterComponent @exports ConceptSetFilterComponent as ConceptSetFilterComponent */ ConceptSetFilterComponent = (function(superClass) { extend(ConceptSetFilterComponent, superClass); function ConceptSetFilterComponent(json) { this.json = json; ConceptSetFilterComponent.__super__.constructor.call(this, this.json); } /** A code that identifies a property defined in the code system. @returns {Array} an array of {@link String} objects */ ConceptSetFilterComponent.prototype.property = function() { return this.json['property']; }; /** The kind of operation to perform as a part of the filter criteria. @returns {Array} an array of {@link String} objects */ ConceptSetFilterComponent.prototype.op = function() { return this.json['op']; }; /** The match value may be either a code defined by the system, or a string value which is used a regex match on the literal string of the property value. @returns {Array} an array of {@link String} objects */ ConceptSetFilterComponent.prototype.value = function() { return this.json['value']; }; return ConceptSetFilterComponent; })(BackboneElement); /** Embedded class @class ConceptSetComponent @exports ConceptSetComponent as ConceptSetComponent */ ConceptSetComponent = (function(superClass) { extend(ConceptSetComponent, superClass); function ConceptSetComponent(json) { this.json = json; ConceptSetComponent.__super__.constructor.call(this, this.json); } /** The code system from which the selected codes come from. @returns {Array} an array of {@link String} objects */ ConceptSetComponent.prototype.system = function() { return this.json['system']; }; /** The version of the code system that the codes are selected from. @returns {Array} an array of {@link String} objects */ ConceptSetComponent.prototype.version = function() { return this.json['version']; }; /** Specifies a concept to be included or excluded. @returns {Array} an array of {@link ConceptReferenceComponent} objects */ ConceptSetComponent.prototype.concept = function() { var i, item, len, ref, results; if (this.json['concept']) { ref = this.json['concept']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ConceptReferenceComponent(item)); } return results; } }; /** Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true. @returns {Array} an array of {@link ConceptSetFilterComponent} objects */ ConceptSetComponent.prototype.filter = function() { var i, item, len, ref, results; if (this.json['filter']) { ref = this.json['filter']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ConceptSetFilterComponent(item)); } return results; } }; return ConceptSetComponent; })(BackboneElement); /** Embedded class @class ValueSetComposeComponent @exports ValueSetComposeComponent as ValueSetComposeComponent */ ValueSetComposeComponent = (function(superClass) { extend(ValueSetComposeComponent, superClass); function ValueSetComposeComponent(json) { this.json = json; ValueSetComposeComponent.__super__.constructor.call(this, this.json); } /** Includes the contents of the referenced value set as a part of the contents of this value set. @returns {Array} an array of {@link String} objects */ ValueSetComposeComponent.prototype["import"] = function() { return this.json['import']; }; /** Include one or more codes from a code system. @returns {Array} an array of {@link ConceptSetComponent} objects */ ValueSetComposeComponent.prototype.include = function() { var i, item, len, ref, results; if (this.json['include']) { ref = this.json['include']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ConceptSetComponent(item)); } return results; } }; /** Exclude one or more codes from the value set. @returns {Array} an array of {@link ConceptSetComponent} objects */ ValueSetComposeComponent.prototype.exclude = function() { var i, item, len, ref, results; if (this.json['exclude']) { ref = this.json['exclude']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ConceptSetComponent(item)); } return results; } }; return ValueSetComposeComponent; })(BackboneElement); /** Embedded class @class ValueSetExpansionContainsComponent @exports ValueSetExpansionContainsComponent as ValueSetExpansionContainsComponent */ ValueSetExpansionContainsComponent = (function(superClass) { extend(ValueSetExpansionContainsComponent, superClass); function ValueSetExpansionContainsComponent(json) { this.json = json; ValueSetExpansionContainsComponent.__super__.constructor.call(this, this.json); } /** The system in which the code for this item in the expansion is defined. @returns {Array} an array of {@link String} objects */ ValueSetExpansionContainsComponent.prototype.system = function() { return this.json['system']; }; /** If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value. @returns {Array} an array of {@link boolean} objects */ ValueSetExpansionContainsComponent.prototype.abstract = function() { return this.json['abstract']; }; /** The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence. @returns {Array} an array of {@link String} objects */ ValueSetExpansionContainsComponent.prototype.version = function() { return this.json['version']; }; /** Code - if blank, this is not a choosable code. @returns {Array} an array of {@link String} objects */ ValueSetExpansionContainsComponent.prototype.code = function() { return this.json['code']; }; /** User display for the concept. @returns {Array} an array of {@link String} objects */ ValueSetExpansionContainsComponent.prototype.display = function() { return this.json['display']; }; /** Codes contained in this concept. @returns {Array} an array of {@link ValueSetExpansionContainsComponent} objects */ ValueSetExpansionContainsComponent.prototype.contains = function() { var i, item, len, ref, results; if (this.json['contains']) { ref = this.json['contains']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ValueSetExpansionContainsComponent(item)); } return results; } }; return ValueSetExpansionContainsComponent; })(BackboneElement); /** Embedded class @class ValueSetExpansionComponent @exports ValueSetExpansionComponent as ValueSetExpansionComponent */ ValueSetExpansionComponent = (function(superClass) { extend(ValueSetExpansionComponent, superClass); function ValueSetExpansionComponent(json) { this.json = json; ValueSetExpansionComponent.__super__.constructor.call(this, this.json); } /** An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so. @returns {Identifier} */ ValueSetExpansionComponent.prototype.identifier = function() { if (this.json['identifier']) { return new Identifier(this.json['identifier']); } }; /** The time at which the expansion was produced by the expanding system. @returns {Array} an array of {@link Date} objects */ ValueSetExpansionComponent.prototype.timestamp = function() { if (this.json['timestamp']) { return DT.DateTime.parse(this.json['timestamp']); } }; /** The codes that are contained in the value set expansion. @returns {Array} an array of {@link ValueSetExpansionContainsComponent} objects */ ValueSetExpansionComponent.prototype.contains = function() { var i, item, len, ref, results; if (this.json['contains']) { ref = this.json['contains']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ValueSetExpansionContainsComponent(item)); } return results; } }; return ValueSetExpansionComponent; })(BackboneElement); /** A value set specifies a set of codes drawn from one or more code systems. @class ValueSet @exports ValueSet as ValueSet */ ValueSet = (function(superClass) { extend(ValueSet, superClass); function ValueSet(json) { this.json = json; ValueSet.__super__.constructor.call(this, this.json); } /** The identifier that is used to identify this value set when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). @returns {Array} an array of {@link String} objects */ ValueSet.prototype.identifier = function() { return this.json['identifier']; }; /** The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. @returns {Array} an array of {@link String} objects */ ValueSet.prototype.version = function() { return this.json['version']; }; /** A free text natural language name describing the value set. @returns {Array} an array of {@link String} objects */ ValueSet.prototype.name = function() { return this.json['name']; }; /** This should describe "the semantic space" to be included in the value set. This can also describe the approach taken to build the value set. @returns {Array} an array of {@link String} objects */ ValueSet.prototype.purpose = function() { return this.json['purpose']; }; /** If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change. @returns {Array} an array of {@link boolean} objects */ ValueSet.prototype.immutable = function() { return this.json['immutable']; }; /** The name of the individual or organization that published the value set. @returns {Array} an array of {@link String} objects */ ValueSet.prototype.publisher = function() { return this.json['publisher']; }; /** Contacts of the publisher to assist a user in finding and communicating with the publisher. @returns {Array} an array of {@link ContactPoint} objects */ ValueSet.prototype.telecom = function() { var i, item, len, ref, results; if (this.json['telecom']) { ref = this.json['telecom']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ContactPoint(item)); } return results; } }; /** A free text natural language description of the use of the value set - reason for definition, conditions of use, etc. The description may include a list of expected usages for the value set. @returns {Array} an array of {@link String} objects */ ValueSet.prototype.description = function() { return this.json['description']; }; /** A copyright statement relating to the value set and/or its contents. These are generally legal restrictions on the use and publishing of the value set. @returns {Array} an array of {@link String} objects */ ValueSet.prototype.copyright = function() { return this.json['copyright']; }; /** The status of the value set. @returns {Array} an array of {@link String} objects */ ValueSet.prototype.status = function() { return this.json['status']; }; /** This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. @returns {Array} an array of {@link boolean} objects */ ValueSet.prototype.experimental = function() { return this.json['experimental']; }; /** Whether this is intended to be used with an extensible binding or not. @returns {Array} an array of {@link boolean} objects */ ValueSet.prototype.extensible = function() { return this.json['extensible']; }; /** The date that the value set status was last changed. @returns {Array} an array of {@link Date} objects */ ValueSet.prototype.date = function() { if (this.json['date']) { return DT.DateTime.parse(this.json['date']); } }; /** If a Stability Date is expanded by evaluating the Content Logical Definition using the current version of all referenced code system(s) and value sets as of the Stability Date. @returns {Array} an array of {@link Date} objects */ ValueSet.prototype.stableDate = function() { if (this.json['stableDate']) { return DT.DateTime.parse(this.json['stableDate']); } }; /** When value set defines its own codes. @returns {ValueSetDefineComponent} */ ValueSet.prototype.define = function() { if (this.json['define']) { return new ValueSetDefineComponent(this.json['define']); } }; /** When value set includes codes from elsewhere. @returns {ValueSetComposeComponent} */ ValueSet.prototype.compose = function() { if (this.json['compose']) { return new ValueSetComposeComponent(this.json['compose']); } }; /** A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed. @returns {ValueSetExpansionComponent} */ ValueSet.prototype.expansion = function() { if (this.json['expansion']) { return new ValueSetExpansionComponent(this.json['expansion']); } }; return ValueSet; })(DomainResource); module.exports.ValueSet = ValueSet; }).call(this); //# sourceMappingURL=valueset.js.map