cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
273 lines (192 loc) • 6.59 kB
JavaScript
// Generated by CoffeeScript 1.9.3
(function() {
var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DomainResource, Element, ElementDefinition, Extension, HumanName, Identifier, List, ListEntryComponent, 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 ListEntryComponent
@exports ListEntryComponent as ListEntryComponent
*/
ListEntryComponent = (function(superClass) {
extend(ListEntryComponent, superClass);
function ListEntryComponent(json) {
this.json = json;
ListEntryComponent.__super__.constructor.call(this, this.json);
}
/**
The flag allows the system constructing the list to make one or more statements about the role and significance of the item in the list.
@returns {Array} an array of {@link CodeableConcept} objects
*/
ListEntryComponent.prototype.flag = function() {
var i, item, len, ref, results;
if (this.json['flag']) {
ref = this.json['flag'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
True if this item is marked as deleted in the list.
@returns {Array} an array of {@link boolean} objects
*/
ListEntryComponent.prototype.deleted = function() {
return this.json['deleted'];
};
/**
When this item was added to the list.
@returns {Array} an array of {@link Date} objects
*/
ListEntryComponent.prototype.date = function() {
if (this.json['date']) {
return DT.DateTime.parse(this.json['date']);
}
};
/**
A reference to the actual resource from which data was derived.
@returns {Reference}
*/
ListEntryComponent.prototype.item = function() {
if (this.json['item']) {
return new Reference(this.json['item']);
}
};
return ListEntryComponent;
})(BackboneElement);
/**
A set of information summarized from a list of other resources.
@class List
@exports List as List
*/
List = (function(superClass) {
extend(List, superClass);
function List(json) {
this.json = json;
List.__super__.constructor.call(this, this.json);
}
/**
Identifier for the List assigned for business purposes outside the context of FHIR.
@returns {Array} an array of {@link Identifier} objects
*/
List.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;
}
};
/**
This code defines the purpose of the list - why it was created.
@returns {CodeableConcept}
*/
List.prototype.code = function() {
if (this.json['code']) {
return new CodeableConcept(this.json['code']);
}
};
/**
The common subject (or patient) of the resources that are in the list, if there is one.
@returns {Reference}
*/
List.prototype.subject = function() {
if (this.json['subject']) {
return new Reference(this.json['subject']);
}
};
/**
The entity responsible for deciding what the contents of the list were.
@returns {Reference}
*/
List.prototype.source = function() {
if (this.json['source']) {
return new Reference(this.json['source']);
}
};
/**
The date that the list was prepared.
@returns {Array} an array of {@link Date} objects
*/
List.prototype.date = function() {
if (this.json['date']) {
return DT.DateTime.parse(this.json['date']);
}
};
/**
Whether items in the list have a meaningful order.
@returns {Array} an array of {@link boolean} objects
*/
List.prototype.ordered = function() {
return this.json['ordered'];
};
/**
How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.
@returns {Array} an array of {@link String} objects
*/
List.prototype.mode = function() {
return this.json['mode'];
};
/**
Entries in this list.
@returns {Array} an array of {@link ListEntryComponent} objects
*/
List.prototype.entry = function() {
var i, item, len, ref, results;
if (this.json['entry']) {
ref = this.json['entry'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ListEntryComponent(item));
}
return results;
}
};
/**
If the list is empty, why the list is empty.
@returns {CodeableConcept}
*/
List.prototype.emptyReason = function() {
if (this.json['emptyReason']) {
return new CodeableConcept(this.json['emptyReason']);
}
};
return List;
})(DomainResource);
module.exports.List = List;
}).call(this);
//# sourceMappingURL=list.js.map