cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
192 lines (129 loc) • 4.65 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, Slot, 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;
/**
(informative) A slot of time on a schedule that may be available for booking appointments.
@class Slot
@exports Slot as Slot
*/
Slot = (function(superClass) {
extend(Slot, superClass);
function Slot(json) {
this.json = json;
Slot.__super__.constructor.call(this, this.json);
}
/**
External Ids for this item.
@returns {Array} an array of {@link Identifier} objects
*/
Slot.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 type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.
@returns {CodeableConcept}
*/
Slot.prototype.type = function() {
if (this.json['type']) {
return new CodeableConcept(this.json['type']);
}
};
/**
The availability resource that this slot defines an interval of status information.
@returns {Reference}
*/
Slot.prototype.availability = function() {
if (this.json['availability']) {
return new Reference(this.json['availability']);
}
};
/**
BUSY | FREE | BUSY-UNAVAILABLE | BUSY-TENTATIVE.
@returns {Array} an array of {@link String} objects
*/
Slot.prototype.freeBusyType = function() {
return this.json['freeBusyType'];
};
/**
Date/Time that the slot is to begin.
@returns {Array} an array of {@link Date} objects
*/
Slot.prototype.start = function() {
if (this.json['start']) {
return DT.DateTime.parse(this.json['start']);
}
};
/**
Date/Time that the slot is to conclude.
@returns {Array} an array of {@link Date} objects
*/
Slot.prototype.end = function() {
if (this.json['end']) {
return DT.DateTime.parse(this.json['end']);
}
};
/**
This slot has already been overbooked, appointments are unlikely to be accepted for this time.
@returns {Array} an array of {@link boolean} objects
*/
Slot.prototype.overbooked = function() {
return this.json['overbooked'];
};
/**
Comments on the slot to describe any extended information. Such as custom constraints on the slot.
@returns {Array} an array of {@link String} objects
*/
Slot.prototype.comment = function() {
return this.json['comment'];
};
/**
When this slot was created, or last revised.
@returns {Array} an array of {@link Date} objects
*/
Slot.prototype.lastModified = function() {
if (this.json['lastModified']) {
return DT.DateTime.parse(this.json['lastModified']);
}
};
return Slot;
})(DomainResource);
module.exports.Slot = Slot;
}).call(this);
//# sourceMappingURL=slot.js.map