cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
357 lines (252 loc) • 10.2 kB
JavaScript
// Generated by CoffeeScript 1.9.3
(function() {
var Address, AllergyIntolerance, AllergyIntoleranceEventComponent, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DomainResource, Element, ElementDefinition, Extension, HumanName, Identifier, Narrative, Parameters, Period, Quantity, Range, Ratio, Reference, Resource, 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 AllergyIntoleranceEventComponent
@exports AllergyIntoleranceEventComponent as AllergyIntoleranceEventComponent
*/
AllergyIntoleranceEventComponent = (function(superClass) {
extend(AllergyIntoleranceEventComponent, superClass);
function AllergyIntoleranceEventComponent(json) {
this.json = json;
AllergyIntoleranceEventComponent.__super__.constructor.call(this, this.json);
}
/**
Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance.
@returns {CodeableConcept}
*/
AllergyIntoleranceEventComponent.prototype.substance = function() {
if (this.json['substance']) {
return new CodeableConcept(this.json['substance']);
}
};
/**
Statement about the degree of clinical certainty that the Specific Substance was the cause of the Manifestation in this reaction event.
@returns {Array} an array of {@link String} objects
*/
AllergyIntoleranceEventComponent.prototype.certainty = function() {
return this.json['certainty'];
};
/**
Clinical symptoms and/or signs that are observed or associated with the Adverse Reaction Event.
@returns {Array} an array of {@link CodeableConcept} objects
*/
AllergyIntoleranceEventComponent.prototype.manifestation = function() {
var i, item, len, ref, results;
if (this.json['manifestation']) {
ref = this.json['manifestation'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
Text description about the Reaction as a whole, including details of the manifestation if required.
@returns {Array} an array of {@link String} objects
*/
AllergyIntoleranceEventComponent.prototype.description = function() {
return this.json['description'];
};
/**
Record of the date and/or time of the onset of the Reaction.
@returns {Array} an array of {@link Date} objects
*/
AllergyIntoleranceEventComponent.prototype.onset = function() {
if (this.json['onset']) {
return DT.DateTime.parse(this.json['onset']);
}
};
/**
The amount of time that the Adverse Reaction persisted.
@returns {Duration}
*/
AllergyIntoleranceEventComponent.prototype.duration = function() {
if (this.json['duration']) {
return new Duration(this.json['duration']);
}
};
/**
Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.
@returns {Array} an array of {@link String} objects
*/
AllergyIntoleranceEventComponent.prototype.severity = function() {
return this.json['severity'];
};
/**
Identification of the route by which the subject was exposed to the substance.
@returns {CodeableConcept}
*/
AllergyIntoleranceEventComponent.prototype.exposureRoute = function() {
if (this.json['exposureRoute']) {
return new CodeableConcept(this.json['exposureRoute']);
}
};
/**
Additional text about the Adverse Reaction event not captured in other fields.
@returns {Array} an array of {@link String} objects
*/
AllergyIntoleranceEventComponent.prototype.comment = function() {
return this.json['comment'];
};
return AllergyIntoleranceEventComponent;
})(BackboneElement);
/**
Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
@class AllergyIntolerance
@exports AllergyIntolerance as AllergyIntolerance
*/
AllergyIntolerance = (function(superClass) {
extend(AllergyIntolerance, superClass);
function AllergyIntolerance(json) {
this.json = json;
AllergyIntolerance.__super__.constructor.call(this, this.json);
}
/**
This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).
@returns {Array} an array of {@link Identifier} objects
*/
AllergyIntolerance.prototype.identifier = function() {
var i, item, len, ref, results;
if (this.json['identifier']) {
ref = this.json['identifier'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Identifier(item));
}
return results;
}
};
/**
Date when the sensitivity was recorded.
@returns {Array} an array of {@link Date} objects
*/
AllergyIntolerance.prototype.recordedDate = function() {
if (this.json['recordedDate']) {
return DT.DateTime.parse(this.json['recordedDate']);
}
};
/**
Indicates who has responsibility for the record.
@returns {Reference}
*/
AllergyIntolerance.prototype.recorder = function() {
if (this.json['recorder']) {
return new Reference(this.json['recorder']);
}
};
/**
The patient who has the allergy or intolerance.
@returns {Reference}
*/
AllergyIntolerance.prototype.subject = function() {
if (this.json['subject']) {
return new Reference(this.json['subject']);
}
};
/**
Identification of a substance, or a class of substances, that is considered to be responsible for the Adverse reaction risk.
@returns {CodeableConcept}
*/
AllergyIntolerance.prototype.substance = function() {
if (this.json['substance']) {
return new CodeableConcept(this.json['substance']);
}
};
/**
Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.
@returns {Array} an array of {@link String} objects
*/
AllergyIntolerance.prototype.status = function() {
return this.json['status'];
};
/**
Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.
@returns {Array} an array of {@link String} objects
*/
AllergyIntolerance.prototype.criticality = function() {
return this.json['criticality'];
};
/**
Identification of the underlying physiological mechanism for the Reaction Risk.
@returns {Array} an array of {@link String} objects
*/
AllergyIntolerance.prototype.type = function() {
return this.json['type'];
};
/**
Category of the identified Substance.
@returns {Array} an array of {@link String} objects
*/
AllergyIntolerance.prototype.category = function() {
return this.json['category'];
};
/**
Represents the date and/or time of the last known occurence of a reaction event.
@returns {Array} an array of {@link Date} objects
*/
AllergyIntolerance.prototype.lastOccurence = function() {
if (this.json['lastOccurence']) {
return DT.DateTime.parse(this.json['lastOccurence']);
}
};
/**
Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.
@returns {Array} an array of {@link String} objects
*/
AllergyIntolerance.prototype.comment = function() {
return this.json['comment'];
};
/**
Details about each Adverse Reaction Event linked to exposure to the identified Substance.
@returns {Array} an array of {@link AllergyIntoleranceEventComponent} objects
*/
AllergyIntolerance.prototype.event = function() {
var i, item, len, ref, results;
if (this.json['event']) {
ref = this.json['event'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new AllergyIntoleranceEventComponent(item));
}
return results;
}
};
return AllergyIntolerance;
})(DomainResource);
module.exports.AllergyIntolerance = AllergyIntolerance;
}).call(this);
//# sourceMappingURL=allergyintolerance.js.map