cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
402 lines (285 loc) • 10.7 kB
JavaScript
// Generated by CoffeeScript 1.9.3
(function() {
var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ConstraintComponent, ContactPoint, DT, DomainResource, Element, ElementDefinition, Extension, HumanName, Identifier, Narrative, Parameters, Period, Profile, ProfileMappingComponent, 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 ProfileMappingComponent
@exports ProfileMappingComponent as ProfileMappingComponent
*/
ProfileMappingComponent = (function(superClass) {
extend(ProfileMappingComponent, superClass);
function ProfileMappingComponent(json) {
this.json = json;
ProfileMappingComponent.__super__.constructor.call(this, this.json);
}
/**
An Internal id that is used to identify this mapping set when specific mappings are made.
@returns {Array} an array of {@link String} objects
*/
ProfileMappingComponent.prototype.identity = function() {
return this.json['identity'];
};
/**
A URI that identifies the specification that this mapping is expressed to.
@returns {Array} an array of {@link String} objects
*/
ProfileMappingComponent.prototype.uri = function() {
return this.json['uri'];
};
/**
A name for the specification that is being mapped to.
@returns {Array} an array of {@link String} objects
*/
ProfileMappingComponent.prototype.name = function() {
return this.json['name'];
};
/**
Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.
@returns {Array} an array of {@link String} objects
*/
ProfileMappingComponent.prototype.comments = function() {
return this.json['comments'];
};
return ProfileMappingComponent;
})(BackboneElement);
/**
Embedded class
@class ConstraintComponent
@exports ConstraintComponent as ConstraintComponent
*/
ConstraintComponent = (function(superClass) {
extend(ConstraintComponent, superClass);
function ConstraintComponent(json) {
this.json = json;
ConstraintComponent.__super__.constructor.call(this, this.json);
}
/**
Captures constraints on each element within the resource.
@returns {Array} an array of {@link ElementDefinition} objects
*/
ConstraintComponent.prototype.element = function() {
var i, item, len, ref, results;
if (this.json['element']) {
ref = this.json['element'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ElementDefinition(item));
}
return results;
}
};
return ConstraintComponent;
})(BackboneElement);
/**
A Resource Profile - a statement of use of one or more FHIR Resources. It may include constraints on Resources and Data Types, Terminology Binding Statements and Extension Definitions.
@class Profile
@exports Profile as Profile
*/
Profile = (function(superClass) {
extend(Profile, superClass);
function Profile(json) {
this.json = json;
Profile.__super__.constructor.call(this, this.json);
}
/**
The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems.
@returns {Array} an array of {@link String} objects
*/
Profile.prototype.url = function() {
return this.json['url'];
};
/**
Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).
@returns {Array} an array of {@link Identifier} objects
*/
Profile.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 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.
@returns {Array} an array of {@link String} objects
*/
Profile.prototype.version = function() {
return this.json['version'];
};
/**
A free text natural language name identifying the Profile.
@returns {Array} an array of {@link String} objects
*/
Profile.prototype.name = function() {
return this.json['name'];
};
/**
Details of the individual or organization who accepts responsibility for publishing the profile.
@returns {Array} an array of {@link String} objects
*/
Profile.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
*/
Profile.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
*/
Profile.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
*/
Profile.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
*/
Profile.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
*/
Profile.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
*/
Profile.prototype.date = function() {
if (this.json['date']) {
return DT.DateTime.parse(this.json['date']);
}
};
/**
The Scope and Usage that this profile was created to meet.
@returns {Array} an array of {@link String} objects
*/
Profile.prototype.requirements = function() {
return this.json['requirements'];
};
/**
The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.3.0 for this version.
@returns {Array} an array of {@link String} objects
*/
Profile.prototype.fhirVersion = function() {
return this.json['fhirVersion'];
};
/**
An external specification that the content is mapped to.
@returns {Array} an array of {@link ProfileMappingComponent} objects
*/
Profile.prototype.mapping = function() {
var i, item, len, ref, results;
if (this.json['mapping']) {
ref = this.json['mapping'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ProfileMappingComponent(item));
}
return results;
}
};
/**
The Resource or Data type being described.
@returns {Array} an array of {@link String} objects
*/
Profile.prototype.type = function() {
return this.json['type'];
};
/**
The structure that is the base on which this set of constraints is derived from.
@returns {Array} an array of {@link String} objects
*/
Profile.prototype.base = function() {
return this.json['base'];
};
/**
A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile.
@returns {ConstraintComponent}
*/
Profile.prototype.snapshot = function() {
if (this.json['snapshot']) {
return new ConstraintComponent(this.json['snapshot']);
}
};
/**
A differential view is expressed relative to the base profile - a statement of differences that it applies.
@returns {ConstraintComponent}
*/
Profile.prototype.differential = function() {
if (this.json['differential']) {
return new ConstraintComponent(this.json['differential']);
}
};
return Profile;
})(DomainResource);
module.exports.Profile = Profile;
}).call(this);
//# sourceMappingURL=profile.js.map