cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
241 lines (166 loc) • 6.55 kB
JavaScript
// Generated by CoffeeScript 1.9.3
(function() {
var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, Device, 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;
/**
This resource identifies an instance of a manufactured thing that is used in the provision of healthcare without being substantially changed through that activity. The device may be a machine, an insert, a computer, an application, etc. This includes durable (reusable) medical equipment as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.
@class Device
@exports Device as Device
*/
Device = (function(superClass) {
extend(Device, superClass);
function Device(json) {
this.json = json;
Device.__super__.constructor.call(this, this.json);
}
/**
Identifiers assigned to this device by various organizations. The most likely organizations to assign identifiers are the manufacturer and the owner, though regulatory agencies may also assign an identifier. The identifiers identify the particular device, not the kind of device.
@returns {Array} an array of {@link Identifier} objects
*/
Device.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;
}
};
/**
A kind of this device.
@returns {CodeableConcept}
*/
Device.prototype.type = function() {
if (this.json['type']) {
return new CodeableConcept(this.json['type']);
}
};
/**
A name of the manufacturer.
@returns {Array} an array of {@link String} objects
*/
Device.prototype.manufacturer = function() {
return this.json['manufacturer'];
};
/**
The "model" - an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.
@returns {Array} an array of {@link String} objects
*/
Device.prototype.model = function() {
return this.json['model'];
};
/**
The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.
@returns {Array} an array of {@link String} objects
*/
Device.prototype.version = function() {
return this.json['version'];
};
/**
Date of expiry of this device (if applicable).
@returns {Array} an array of {@link Date} objects
*/
Device.prototype.expiry = function() {
if (this.json['expiry']) {
return DT.DateTime.parse(this.json['expiry']);
}
};
/**
FDA Mandated Unique Device Identifier. Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.
@returns {Array} an array of {@link String} objects
*/
Device.prototype.udi = function() {
return this.json['udi'];
};
/**
Lot number assigned by the manufacturer.
@returns {Array} an array of {@link String} objects
*/
Device.prototype.lotNumber = function() {
return this.json['lotNumber'];
};
/**
An organization that is responsible for the provision and ongoing maintenance of the device.
@returns {Reference}
*/
Device.prototype.owner = function() {
if (this.json['owner']) {
return new Reference(this.json['owner']);
}
};
/**
The resource may be found in a literal location (i.e. GPS coordinates), a logical place (i.e. "in/with the patient"), or a coded location.
@returns {Reference}
*/
Device.prototype.location = function() {
if (this.json['location']) {
return new Reference(this.json['location']);
}
};
/**
Patient information, if the resource is affixed to a person.
@returns {Reference}
*/
Device.prototype.patient = function() {
if (this.json['patient']) {
return new Reference(this.json['patient']);
}
};
/**
Contact details for an organization or a particular human that is responsible for the device.
@returns {Array} an array of {@link ContactPoint} objects
*/
Device.prototype.contact = function() {
var i, item, len, ref, results;
if (this.json['contact']) {
ref = this.json['contact'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ContactPoint(item));
}
return results;
}
};
/**
A network address on which the device may be contacted directly.
@returns {Array} an array of {@link String} objects
*/
Device.prototype.url = function() {
return this.json['url'];
};
return Device;
})(DomainResource);
module.exports.Device = Device;
}).call(this);
//# sourceMappingURL=device.js.map