cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
234 lines (159 loc) • 6.07 kB
JavaScript
// Generated by CoffeeScript 1.9.3
(function() {
var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DomainResource, Element, ElementDefinition, Extension, HumanName, Identifier, Media, 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 photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
@class Media
@exports Media as Media
*/
Media = (function(superClass) {
extend(Media, superClass);
function Media(json) {
this.json = json;
Media.__super__.constructor.call(this, this.json);
}
/**
Whether the media is a photo (still image), an audio recording, or a video recording.
@returns {Array} an array of {@link String} objects
*/
Media.prototype.type = function() {
return this.json['type'];
};
/**
Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.
@returns {CodeableConcept}
*/
Media.prototype.subtype = function() {
if (this.json['subtype']) {
return new CodeableConcept(this.json['subtype']);
}
};
/**
Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.
@returns {Array} an array of {@link Identifier} objects
*/
Media.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;
}
};
/**
The date/time when the media was originally recorded. For video and audio, if the length of the recording is not insignificant, this is the start of the recording.
@returns {Array} an array of {@link Date} objects
*/
Media.prototype.created = function() {
if (this.json['created']) {
return DT.DateTime.parse(this.json['created']);
}
};
/**
Who/What this Media is a record of.
@returns {Reference}
*/
Media.prototype.subject = function() {
if (this.json['subject']) {
return new Reference(this.json['subject']);
}
};
/**
The person who administered the collection of the image.
@returns {Reference}
*/
Media.prototype.operator = function() {
if (this.json['operator']) {
return new Reference(this.json['operator']);
}
};
/**
The name of the imaging view e.g Lateral or Antero-posterior (AP).
@returns {CodeableConcept}
*/
Media.prototype.view = function() {
if (this.json['view']) {
return new CodeableConcept(this.json['view']);
}
};
/**
The name of the device / manufacturer of the device that was used to make the recording.
@returns {Array} an array of {@link String} objects
*/
Media.prototype.deviceName = function() {
return this.json['deviceName'];
};
/**
Height of the image in pixels(photo/video).
@returns {Array} an array of {@link Number} objects
*/
Media.prototype.height = function() {
return this.json['height'];
};
/**
Width of the image in pixels (photo/video).
@returns {Array} an array of {@link Number} objects
*/
Media.prototype.width = function() {
return this.json['width'];
};
/**
The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.
@returns {Array} an array of {@link Number} objects
*/
Media.prototype.frames = function() {
return this.json['frames'];
};
/**
The duration of the recording in seconds - for audio and video.
@returns {Array} an array of {@link Number} objects
*/
Media.prototype.duration = function() {
return this.json['duration'];
};
/**
The actual content of the media - inline or by direct reference to the media source file.
@returns {Attachment}
*/
Media.prototype.content = function() {
if (this.json['content']) {
return new Attachment(this.json['content']);
}
};
return Media;
})(DomainResource);
module.exports.Media = Media;
}).call(this);
//# sourceMappingURL=media.js.map