cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
531 lines (384 loc) • 13.3 kB
JavaScript
// Generated by CoffeeScript 1.9.3
(function() {
var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DomainResource, Element, ElementDefinition, Extension, HumanName, Identifier, Immunization, ImmunizationExplanationComponent, ImmunizationReactionComponent, ImmunizationVaccinationProtocolComponent, 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 ImmunizationExplanationComponent
@exports ImmunizationExplanationComponent as ImmunizationExplanationComponent
*/
ImmunizationExplanationComponent = (function(superClass) {
extend(ImmunizationExplanationComponent, superClass);
function ImmunizationExplanationComponent(json) {
this.json = json;
ImmunizationExplanationComponent.__super__.constructor.call(this, this.json);
}
/**
Reasons why a vaccine was administered.
@returns {Array} an array of {@link CodeableConcept} objects
*/
ImmunizationExplanationComponent.prototype.reason = function() {
var i, item, len, ref, results;
if (this.json['reason']) {
ref = this.json['reason'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
Refusal or exemption reasons.
@returns {Array} an array of {@link CodeableConcept} objects
*/
ImmunizationExplanationComponent.prototype.refusalReason = function() {
var i, item, len, ref, results;
if (this.json['refusalReason']) {
ref = this.json['refusalReason'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
return ImmunizationExplanationComponent;
})(BackboneElement);
/**
Embedded class
@class ImmunizationReactionComponent
@exports ImmunizationReactionComponent as ImmunizationReactionComponent
*/
ImmunizationReactionComponent = (function(superClass) {
extend(ImmunizationReactionComponent, superClass);
function ImmunizationReactionComponent(json) {
this.json = json;
ImmunizationReactionComponent.__super__.constructor.call(this, this.json);
}
/**
Date of reaction to the immunization.
@returns {Array} an array of {@link Date} objects
*/
ImmunizationReactionComponent.prototype.date = function() {
if (this.json['date']) {
return DT.DateTime.parse(this.json['date']);
}
};
/**
Details of the reaction.
@returns {Reference}
*/
ImmunizationReactionComponent.prototype.detail = function() {
if (this.json['detail']) {
return new Reference(this.json['detail']);
}
};
/**
Self-reported indicator.
@returns {Array} an array of {@link boolean} objects
*/
ImmunizationReactionComponent.prototype.reported = function() {
return this.json['reported'];
};
return ImmunizationReactionComponent;
})(BackboneElement);
/**
Embedded class
@class ImmunizationVaccinationProtocolComponent
@exports ImmunizationVaccinationProtocolComponent as ImmunizationVaccinationProtocolComponent
*/
ImmunizationVaccinationProtocolComponent = (function(superClass) {
extend(ImmunizationVaccinationProtocolComponent, superClass);
function ImmunizationVaccinationProtocolComponent(json) {
this.json = json;
ImmunizationVaccinationProtocolComponent.__super__.constructor.call(this, this.json);
}
/**
Nominal position in a series.
@returns {Array} an array of {@link Number} objects
*/
ImmunizationVaccinationProtocolComponent.prototype.doseSequence = function() {
return this.json['doseSequence'];
};
/**
Contains the description about the protocol under which the vaccine was administered.
@returns {Array} an array of {@link String} objects
*/
ImmunizationVaccinationProtocolComponent.prototype.description = function() {
return this.json['description'];
};
/**
Indicates the authority who published the protocol? E.g. ACIP.
@returns {Reference}
*/
ImmunizationVaccinationProtocolComponent.prototype.authority = function() {
if (this.json['authority']) {
return new Reference(this.json['authority']);
}
};
/**
One possible path to achieve presumed immunity against a disease - within the context of an authority.
@returns {Array} an array of {@link String} objects
*/
ImmunizationVaccinationProtocolComponent.prototype.series = function() {
return this.json['series'];
};
/**
The recommended number of doses to achieve immunity.
@returns {Array} an array of {@link Number} objects
*/
ImmunizationVaccinationProtocolComponent.prototype.seriesDoses = function() {
return this.json['seriesDoses'];
};
/**
The targeted disease.
@returns {CodeableConcept}
*/
ImmunizationVaccinationProtocolComponent.prototype.doseTarget = function() {
if (this.json['doseTarget']) {
return new CodeableConcept(this.json['doseTarget']);
}
};
/**
Indicates if the immunization event should "count" against the protocol.
@returns {CodeableConcept}
*/
ImmunizationVaccinationProtocolComponent.prototype.doseStatus = function() {
if (this.json['doseStatus']) {
return new CodeableConcept(this.json['doseStatus']);
}
};
/**
Provides an explanation as to why a immunization event should or should not count against the protocol.
@returns {CodeableConcept}
*/
ImmunizationVaccinationProtocolComponent.prototype.doseStatusReason = function() {
if (this.json['doseStatusReason']) {
return new CodeableConcept(this.json['doseStatusReason']);
}
};
return ImmunizationVaccinationProtocolComponent;
})(BackboneElement);
/**
Immunization event information.
@class Immunization
@exports Immunization as Immunization
*/
Immunization = (function(superClass) {
extend(Immunization, superClass);
function Immunization(json) {
this.json = json;
Immunization.__super__.constructor.call(this, this.json);
}
/**
A unique identifier assigned to this adverse reaction record.
@returns {Array} an array of {@link Identifier} objects
*/
Immunization.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 vaccine administered or was to be administered.
@returns {Array} an array of {@link Date} objects
*/
Immunization.prototype.date = function() {
if (this.json['date']) {
return DT.DateTime.parse(this.json['date']);
}
};
/**
Vaccine that was administered or was to be administered.
@returns {CodeableConcept}
*/
Immunization.prototype.vaccineType = function() {
if (this.json['vaccineType']) {
return new CodeableConcept(this.json['vaccineType']);
}
};
/**
The patient to whom the vaccine was to be administered.
@returns {Reference}
*/
Immunization.prototype.subject = function() {
if (this.json['subject']) {
return new Reference(this.json['subject']);
}
};
/**
Indicates if the vaccination was refused.
@returns {Array} an array of {@link boolean} objects
*/
Immunization.prototype.refusedIndicator = function() {
return this.json['refusedIndicator'];
};
/**
True if this administration was reported rather than directly administered.
@returns {Array} an array of {@link boolean} objects
*/
Immunization.prototype.reported = function() {
return this.json['reported'];
};
/**
Clinician who administered the vaccine.
@returns {Reference}
*/
Immunization.prototype.performer = function() {
if (this.json['performer']) {
return new Reference(this.json['performer']);
}
};
/**
Clinician who ordered the vaccination.
@returns {Reference}
*/
Immunization.prototype.requester = function() {
if (this.json['requester']) {
return new Reference(this.json['requester']);
}
};
/**
Name of vaccine manufacturer.
@returns {Reference}
*/
Immunization.prototype.manufacturer = function() {
if (this.json['manufacturer']) {
return new Reference(this.json['manufacturer']);
}
};
/**
The service delivery location where the vaccine administration occurred.
@returns {Reference}
*/
Immunization.prototype.location = function() {
if (this.json['location']) {
return new Reference(this.json['location']);
}
};
/**
Lot number of the vaccine product.
@returns {Array} an array of {@link String} objects
*/
Immunization.prototype.lotNumber = function() {
return this.json['lotNumber'];
};
/**
Date vaccine batch expires.
@returns {Array} an array of {@link Date} objects
*/
Immunization.prototype.expirationDate = function() {
if (this.json['expirationDate']) {
return DT.DateTime.parse(this.json['expirationDate']);
}
};
/**
Body site where vaccine was administered.
@returns {CodeableConcept}
*/
Immunization.prototype.site = function() {
if (this.json['site']) {
return new CodeableConcept(this.json['site']);
}
};
/**
The path by which the vaccine product is taken into the body.
@returns {CodeableConcept}
*/
Immunization.prototype.route = function() {
if (this.json['route']) {
return new CodeableConcept(this.json['route']);
}
};
/**
The quantity of vaccine product that was administered.
@returns {Quantity}
*/
Immunization.prototype.doseQuantity = function() {
if (this.json['doseQuantity']) {
return new Quantity(this.json['doseQuantity']);
}
};
/**
Reasons why a vaccine was administered or refused.
@returns {ImmunizationExplanationComponent}
*/
Immunization.prototype.explanation = function() {
if (this.json['explanation']) {
return new ImmunizationExplanationComponent(this.json['explanation']);
}
};
/**
Categorical data indicating that an adverse event is associated in time to an immunization.
@returns {Array} an array of {@link ImmunizationReactionComponent} objects
*/
Immunization.prototype.reaction = function() {
var i, item, len, ref, results;
if (this.json['reaction']) {
ref = this.json['reaction'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ImmunizationReactionComponent(item));
}
return results;
}
};
/**
Contains information about the protocol(s) under which the vaccine was administered.
@returns {Array} an array of {@link ImmunizationVaccinationProtocolComponent} objects
*/
Immunization.prototype.vaccinationProtocol = function() {
var i, item, len, ref, results;
if (this.json['vaccinationProtocol']) {
ref = this.json['vaccinationProtocol'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ImmunizationVaccinationProtocolComponent(item));
}
return results;
}
};
return Immunization;
})(DomainResource);
module.exports.Immunization = Immunization;
}).call(this);
//# sourceMappingURL=immunization.js.map