cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
304 lines (214 loc) • 7.51 kB
JavaScript
// Generated by CoffeeScript 1.9.3
(function() {
var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DomainResource, Element, ElementDefinition, Extension, HumanName, Identifier, Narrative, Parameters, Period, Quantity, Range, Ratio, Reference, Resource, SampledData, Supply, SupplyDispenseComponent, 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 SupplyDispenseComponent
@exports SupplyDispenseComponent as SupplyDispenseComponent
*/
SupplyDispenseComponent = (function(superClass) {
extend(SupplyDispenseComponent, superClass);
function SupplyDispenseComponent(json) {
this.json = json;
SupplyDispenseComponent.__super__.constructor.call(this, this.json);
}
/**
Identifier assigned by the dispensing facility when the dispense occurs.
@returns {Identifier}
*/
SupplyDispenseComponent.prototype.identifier = function() {
if (this.json['identifier']) {
return new Identifier(this.json['identifier']);
}
};
/**
A code specifying the state of the dispense event.
@returns {Array} an array of {@link String} objects
*/
SupplyDispenseComponent.prototype.status = function() {
return this.json['status'];
};
/**
Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.
@returns {CodeableConcept}
*/
SupplyDispenseComponent.prototype.type = function() {
if (this.json['type']) {
return new CodeableConcept(this.json['type']);
}
};
/**
The amount of supply that has been dispensed. Includes unit of measure.
@returns {Quantity}
*/
SupplyDispenseComponent.prototype.quantity = function() {
if (this.json['quantity']) {
return new Quantity(this.json['quantity']);
}
};
/**
Identifies the medication or substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list.
@returns {Reference}
*/
SupplyDispenseComponent.prototype.suppliedItem = function() {
if (this.json['suppliedItem']) {
return new Reference(this.json['suppliedItem']);
}
};
/**
The individual responsible for dispensing the medication, supplier or device.
@returns {Reference}
*/
SupplyDispenseComponent.prototype.supplier = function() {
if (this.json['supplier']) {
return new Reference(this.json['supplier']);
}
};
/**
The time the dispense event occurred.
@returns {Period}
*/
SupplyDispenseComponent.prototype.whenPrepared = function() {
if (this.json['whenPrepared']) {
return new Period(this.json['whenPrepared']);
}
};
/**
The time the dispensed item was sent or handed to the patient (or agent).
@returns {Period}
*/
SupplyDispenseComponent.prototype.whenHandedOver = function() {
if (this.json['whenHandedOver']) {
return new Period(this.json['whenHandedOver']);
}
};
/**
Identification of the facility/location where the Supply was shipped to, as part of the dispense event.
@returns {Reference}
*/
SupplyDispenseComponent.prototype.destination = function() {
if (this.json['destination']) {
return new Reference(this.json['destination']);
}
};
/**
Identifies the person who picked up the Supply.
@returns {Array} an array of {@link Reference} objects
*/
SupplyDispenseComponent.prototype.receiver = function() {
var i, item, len, ref, results;
if (this.json['receiver']) {
ref = this.json['receiver'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
return SupplyDispenseComponent;
})(BackboneElement);
/**
A supply - a request for something, and provision of what is supplied.
@class Supply
@exports Supply as Supply
*/
Supply = (function(superClass) {
extend(Supply, superClass);
function Supply(json) {
this.json = json;
Supply.__super__.constructor.call(this, this.json);
}
/**
Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.
@returns {CodeableConcept}
*/
Supply.prototype.kind = function() {
if (this.json['kind']) {
return new CodeableConcept(this.json['kind']);
}
};
/**
Unique identifier for this supply request.
@returns {Identifier}
*/
Supply.prototype.identifier = function() {
if (this.json['identifier']) {
return new Identifier(this.json['identifier']);
}
};
/**
Status of the supply request.
@returns {Array} an array of {@link String} objects
*/
Supply.prototype.status = function() {
return this.json['status'];
};
/**
The item that is requested to be supplied.
@returns {Reference}
*/
Supply.prototype.orderedItem = function() {
if (this.json['orderedItem']) {
return new Reference(this.json['orderedItem']);
}
};
/**
A link to a resource representing the person whom the ordered item is for.
@returns {Reference}
*/
Supply.prototype.patient = function() {
if (this.json['patient']) {
return new Reference(this.json['patient']);
}
};
/**
Indicates the details of the dispense event such as the days supply and quantity of a supply dispensed.
@returns {Array} an array of {@link SupplyDispenseComponent} objects
*/
Supply.prototype.dispense = function() {
var i, item, len, ref, results;
if (this.json['dispense']) {
ref = this.json['dispense'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new SupplyDispenseComponent(item));
}
return results;
}
};
return Supply;
})(DomainResource);
module.exports.Supply = Supply;
}).call(this);
//# sourceMappingURL=supply.js.map