cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
234 lines (165 loc) • 5.83 kB
JavaScript
// Generated by CoffeeScript 1.9.3
(function() {
var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DeviceUseStatement, 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;
/**
A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.
@class DeviceUseStatement
@exports DeviceUseStatement as DeviceUseStatement
*/
DeviceUseStatement = (function(superClass) {
extend(DeviceUseStatement, superClass);
function DeviceUseStatement(json) {
this.json = json;
DeviceUseStatement.__super__.constructor.call(this, this.json);
}
/**
Body site where the device was used.
@returns {Array} an array of {@link CodeableConcept} objects
*/
DeviceUseStatement.prototype.bodySite = function() {
var i, item, len, ref, results;
if (this.json['bodySite']) {
ref = this.json['bodySite'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
The time period over which the device was used.
@returns {Period}
*/
DeviceUseStatement.prototype.whenUsed = function() {
if (this.json['whenUsed']) {
return new Period(this.json['whenUsed']);
}
};
/**
The details of the device used.
@returns {Reference}
*/
DeviceUseStatement.prototype.device = function() {
if (this.json['device']) {
return new Reference(this.json['device']);
}
};
/**
An external identifier for this statement such as an IRI.
@returns {Array} an array of {@link Identifier} objects
*/
DeviceUseStatement.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;
}
};
/**
Reason or justification for the use of the device.
@returns {Array} an array of {@link CodeableConcept} objects
*/
DeviceUseStatement.prototype.indication = function() {
var i, item, len, ref, results;
if (this.json['indication']) {
ref = this.json['indication'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.
@returns {Array} an array of {@link String} objects
*/
DeviceUseStatement.prototype.notes = function() {
return this.json['notes'];
};
/**
The time at which the statement was made/recorded.
@returns {Array} an array of {@link Date} objects
*/
DeviceUseStatement.prototype.recordedOn = function() {
if (this.json['recordedOn']) {
return DT.DateTime.parse(this.json['recordedOn']);
}
};
/**
The patient who used the device.
@returns {Reference}
*/
DeviceUseStatement.prototype.subject = function() {
if (this.json['subject']) {
return new Reference(this.json['subject']);
}
};
/**
How often the device was used.
@returns {Timing}
*/
DeviceUseStatement.prototype.timingTiming = function() {
if (this.json['timingTiming']) {
return new Timing(this.json['timingTiming']);
}
};
/**
How often the device was used.
@returns {Period}
*/
DeviceUseStatement.prototype.timingPeriod = function() {
if (this.json['timingPeriod']) {
return new Period(this.json['timingPeriod']);
}
};
/**
How often the device was used.
@returns {Array} an array of {@link Date} objects
*/
DeviceUseStatement.prototype.timingDateTime = function() {
if (this.json['timingDateTime']) {
return DT.DateTime.parse(this.json['timingDateTime']);
}
};
return DeviceUseStatement;
})(DomainResource);
module.exports.DeviceUseStatement = DeviceUseStatement;
}).call(this);
//# sourceMappingURL=deviceusestatement.js.map