cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
387 lines (270 loc) • 10.4 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, OperationDefinition, OperationDefinitionParameterComponent, 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 OperationDefinitionParameterComponent
@exports OperationDefinitionParameterComponent as OperationDefinitionParameterComponent
*/
OperationDefinitionParameterComponent = (function(superClass) {
extend(OperationDefinitionParameterComponent, superClass);
function OperationDefinitionParameterComponent(json) {
this.json = json;
OperationDefinitionParameterComponent.__super__.constructor.call(this, this.json);
}
/**
The name of used to identify the parameter.
@returns {Array} an array of {@link String} objects
*/
OperationDefinitionParameterComponent.prototype.name = function() {
return this.json['name'];
};
/**
Whether this is an input or an output parameter.
@returns {Array} an array of {@link String} objects
*/
OperationDefinitionParameterComponent.prototype.use = function() {
return this.json['use'];
};
/**
The minimum number of times this parameter SHALL appear in the request or response.
@returns {Array} an array of {@link Number} objects
*/
OperationDefinitionParameterComponent.prototype.min = function() {
return this.json['min'];
};
/**
The maximum number of times this element is permitted to appear in the request or response.
@returns {Array} an array of {@link String} objects
*/
OperationDefinitionParameterComponent.prototype.max = function() {
return this.json['max'];
};
/**
Describes the meaning or use of this parameter.
@returns {Array} an array of {@link String} objects
*/
OperationDefinitionParameterComponent.prototype.documentation = function() {
return this.json['documentation'];
};
/**
The type for this parameter.
@returns {Coding}
*/
OperationDefinitionParameterComponent.prototype.type = function() {
if (this.json['type']) {
return new Coding(this.json['type']);
}
};
/**
A profile the specifies the rules that this parameter must conform to.
@returns {Reference}
*/
OperationDefinitionParameterComponent.prototype.profile = function() {
if (this.json['profile']) {
return new Reference(this.json['profile']);
}
};
return OperationDefinitionParameterComponent;
})(BackboneElement);
/**
A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
@class OperationDefinition
@exports OperationDefinition as OperationDefinition
*/
OperationDefinition = (function(superClass) {
extend(OperationDefinition, superClass);
function OperationDefinition(json) {
this.json = json;
OperationDefinition.__super__.constructor.call(this, this.json);
}
/**
The identifier that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI).
@returns {Array} an array of {@link String} objects
*/
OperationDefinition.prototype.identifier = function() {
return this.json['identifier'];
};
/**
The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.
@returns {Array} an array of {@link String} objects
*/
OperationDefinition.prototype.version = function() {
return this.json['version'];
};
/**
A free text natural language name identifying the Profile.
@returns {Array} an array of {@link String} objects
*/
OperationDefinition.prototype.title = function() {
return this.json['title'];
};
/**
Details of the individual or organization who accepts responsibility for publishing the profile.
@returns {Array} an array of {@link String} objects
*/
OperationDefinition.prototype.publisher = function() {
return this.json['publisher'];
};
/**
Contact details to assist a user in finding and communicating with the publisher.
@returns {Array} an array of {@link ContactPoint} objects
*/
OperationDefinition.prototype.telecom = function() {
var i, item, len, ref, results;
if (this.json['telecom']) {
ref = this.json['telecom'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ContactPoint(item));
}
return results;
}
};
/**
A free text natural language description of the profile and its use.
@returns {Array} an array of {@link String} objects
*/
OperationDefinition.prototype.description = function() {
return this.json['description'];
};
/**
A set of terms from external terminologies that may be used to assist with indexing and searching of templates.
@returns {Array} an array of {@link Coding} objects
*/
OperationDefinition.prototype.code = function() {
var i, item, len, ref, results;
if (this.json['code']) {
ref = this.json['code'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Coding(item));
}
return results;
}
};
/**
The status of the profile.
@returns {Array} an array of {@link String} objects
*/
OperationDefinition.prototype.status = function() {
return this.json['status'];
};
/**
This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
@returns {Array} an array of {@link boolean} objects
*/
OperationDefinition.prototype.experimental = function() {
return this.json['experimental'];
};
/**
The date that this version of the profile was published.
@returns {Array} an array of {@link Date} objects
*/
OperationDefinition.prototype.date = function() {
if (this.json['date']) {
return DT.DateTime.parse(this.json['date']);
}
};
/**
Whether this is operation or named query.
@returns {Array} an array of {@link String} objects
*/
OperationDefinition.prototype.kind = function() {
return this.json['kind'];
};
/**
The name used to invoke the operation.
@returns {Array} an array of {@link String} objects
*/
OperationDefinition.prototype.name = function() {
return this.json['name'];
};
/**
Additional information about how to use this operation or named query.
@returns {Array} an array of {@link String} objects
*/
OperationDefinition.prototype.notes = function() {
return this.json['notes'];
};
/**
Indicates that this operation definition is a constraining profile on the base.
@returns {Reference}
*/
OperationDefinition.prototype.base = function() {
if (this.json['base']) {
return new Reference(this.json['base']);
}
};
/**
Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).
@returns {Array} an array of {@link boolean} objects
*/
OperationDefinition.prototype.system = function() {
return this.json['system'];
};
/**
Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).
@returns {Array} an array of {@link String} objects
*/
OperationDefinition.prototype.type = function() {
return this.json['type'];
};
/**
Indicates whether this operation can be invoked on a particular instance of one of the given types.
@returns {Array} an array of {@link boolean} objects
*/
OperationDefinition.prototype.instance = function() {
return this.json['instance'];
};
/**
Parameters for the operation/query.
@returns {Array} an array of {@link OperationDefinitionParameterComponent} objects
*/
OperationDefinition.prototype.parameter = function() {
var i, item, len, ref, results;
if (this.json['parameter']) {
ref = this.json['parameter'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new OperationDefinitionParameterComponent(item));
}
return results;
}
};
return OperationDefinition;
})(DomainResource);
module.exports.OperationDefinition = OperationDefinition;
}).call(this);
//# sourceMappingURL=operationdefinition.js.map