@phema/cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
347 lines (251 loc) • 9.57 kB
JavaScript
// Generated by CoffeeScript 1.12.7
(function() {
var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, CommunicationRequest, CommunicationRequestMessagePartComponent, ContactPoint, DT, 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;
/**
Embedded class
@class CommunicationRequestMessagePartComponent
@exports CommunicationRequestMessagePartComponent as CommunicationRequestMessagePartComponent
*/
CommunicationRequestMessagePartComponent = (function(superClass) {
extend(CommunicationRequestMessagePartComponent, superClass);
function CommunicationRequestMessagePartComponent(json) {
this.json = json;
CommunicationRequestMessagePartComponent.__super__.constructor.call(this, this.json);
}
/**
An individual message part for multi-part messages.
@returns {Array} an array of {@link String} objects
*/
CommunicationRequestMessagePartComponent.prototype.contentString = function() {
return this.json['contentString'];
};
/**
An individual message part for multi-part messages.
@returns {Attachment}
*/
CommunicationRequestMessagePartComponent.prototype.contentAttachment = function() {
if (this.json['contentAttachment']) {
return new Attachment(this.json['contentAttachment']);
}
};
/**
An individual message part for multi-part messages.
@returns {Reference}
*/
CommunicationRequestMessagePartComponent.prototype.contentReference = function() {
if (this.json['contentReference']) {
return new Reference(this.json['contentReference']);
}
};
return CommunicationRequestMessagePartComponent;
})(BackboneElement);
/**
A request to convey information. E.g., the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.
@class CommunicationRequest
@exports CommunicationRequest as CommunicationRequest
*/
CommunicationRequest = (function(superClass) {
extend(CommunicationRequest, superClass);
function CommunicationRequest(json) {
this.json = json;
CommunicationRequest.__super__.constructor.call(this, this.json);
}
/**
A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be auto-generated, if needed, by CDS system. Does not need to be the actual ID of the source system.
@returns {Array} an array of {@link Identifier} objects
*/
CommunicationRequest.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 message such as alert, notification, reminder, instruction, etc.
@returns {CodeableConcept}
*/
CommunicationRequest.prototype.category = function() {
if (this.json['category']) {
return new CodeableConcept(this.json['category']);
}
};
/**
The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication.
@returns {Reference}
*/
CommunicationRequest.prototype.sender = function() {
if (this.json['sender']) {
return new Reference(this.json['sender']);
}
};
/**
The entity (e.g., person, organization, clinical information system, or device) which is the intended target of the communication.
@returns {Array} an array of {@link Reference} objects
*/
CommunicationRequest.prototype.recipient = function() {
var i, item, len, ref, results;
if (this.json['recipient']) {
ref = this.json['recipient'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
/**
Text, attachment(s), or resource(s) to be communicated to the recipient.
@returns {Array} an array of {@link CommunicationRequestMessagePartComponent} objects
*/
CommunicationRequest.prototype.messagePart = function() {
var i, item, len, ref, results;
if (this.json['messagePart']) {
ref = this.json['messagePart'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CommunicationRequestMessagePartComponent(item));
}
return results;
}
};
/**
The communication medium, e.g., email, fax.
@returns {Array} an array of {@link CodeableConcept} objects
*/
CommunicationRequest.prototype.medium = function() {
var i, item, len, ref, results;
if (this.json['medium']) {
ref = this.json['medium'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
The responsible person who authorizes this order, e.g., physician. This may be different than the author of the order statement, e.g., clerk, who may have entered the statement into the order entry application.
@returns {Reference}
*/
CommunicationRequest.prototype.requester = function() {
if (this.json['requester']) {
return new Reference(this.json['requester']);
}
};
/**
The status of the proposal or order.
@returns {Array} an array of {@link String} objects
*/
CommunicationRequest.prototype.status = function() {
return this.json['status'];
};
/**
Whether the communication is proposed, ordered, or planned.
@returns {Array} an array of {@link String} objects
*/
CommunicationRequest.prototype.mode = function() {
return this.json['mode'];
};
/**
The encounter within which the communication request was created.
@returns {Reference}
*/
CommunicationRequest.prototype.encounter = function() {
if (this.json['encounter']) {
return new Reference(this.json['encounter']);
}
};
/**
The time when this communication is to occur.
@returns {Array} an array of {@link Date} objects
*/
CommunicationRequest.prototype.scheduledTime = function() {
if (this.json['scheduledTime']) {
return DT.DateTime.parse(this.json['scheduledTime']);
}
};
/**
The reason or justification for the communication request.
@returns {Array} an array of {@link CodeableConcept} objects
*/
CommunicationRequest.prototype.indication = function() {
var i, item, len, ref, results;
if (this.json['indication']) {
ref = this.json['indication'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
The time when the request was made.
@returns {Array} an array of {@link Date} objects
*/
CommunicationRequest.prototype.orderedOn = function() {
if (this.json['orderedOn']) {
return DT.DateTime.parse(this.json['orderedOn']);
}
};
/**
The patient who is the focus of this communication request.
@returns {Reference}
*/
CommunicationRequest.prototype.subject = function() {
if (this.json['subject']) {
return new Reference(this.json['subject']);
}
};
/**
Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.
@returns {CodeableConcept}
*/
CommunicationRequest.prototype.priority = function() {
if (this.json['priority']) {
return new CodeableConcept(this.json['priority']);
}
};
return CommunicationRequest;
})(DomainResource);
module.exports.CommunicationRequest = CommunicationRequest;
}).call(this);
//# sourceMappingURL=communicationrequest.js.map