cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
344 lines (242 loc) • 9.39 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, Provenance, ProvenanceAgentComponent, ProvenanceEntityComponent, 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 ProvenanceAgentComponent
@exports ProvenanceAgentComponent as ProvenanceAgentComponent
*/
ProvenanceAgentComponent = (function(superClass) {
extend(ProvenanceAgentComponent, superClass);
function ProvenanceAgentComponent(json) {
this.json = json;
ProvenanceAgentComponent.__super__.constructor.call(this, this.json);
}
/**
The role that the participant played.
@returns {Coding}
*/
ProvenanceAgentComponent.prototype.role = function() {
if (this.json['role']) {
return new Coding(this.json['role']);
}
};
/**
The type of the participant.
@returns {Coding}
*/
ProvenanceAgentComponent.prototype.type = function() {
if (this.json['type']) {
return new Coding(this.json['type']);
}
};
/**
Identity of participant. May be a logical or physical uri and maybe absolute or relative.
@returns {Array} an array of {@link String} objects
*/
ProvenanceAgentComponent.prototype.reference = function() {
return this.json['reference'];
};
/**
Human-readable description of the participant.
@returns {Array} an array of {@link String} objects
*/
ProvenanceAgentComponent.prototype.display = function() {
return this.json['display'];
};
return ProvenanceAgentComponent;
})(BackboneElement);
/**
Embedded class
@class ProvenanceEntityComponent
@exports ProvenanceEntityComponent as ProvenanceEntityComponent
*/
ProvenanceEntityComponent = (function(superClass) {
extend(ProvenanceEntityComponent, superClass);
function ProvenanceEntityComponent(json) {
this.json = json;
ProvenanceEntityComponent.__super__.constructor.call(this, this.json);
}
/**
How the entity was used during the activity.
@returns {Array} an array of {@link String} objects
*/
ProvenanceEntityComponent.prototype.role = function() {
return this.json['role'];
};
/**
The type of the entity. If the entity is a resource, then this is a resource type.
@returns {Coding}
*/
ProvenanceEntityComponent.prototype.type = function() {
if (this.json['type']) {
return new Coding(this.json['type']);
}
};
/**
Identity of participant. May be a logical or physical uri and maybe absolute or relative.
@returns {Array} an array of {@link String} objects
*/
ProvenanceEntityComponent.prototype.reference = function() {
return this.json['reference'];
};
/**
Human-readable description of the entity.
@returns {Array} an array of {@link String} objects
*/
ProvenanceEntityComponent.prototype.display = function() {
return this.json['display'];
};
/**
The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity.
@returns {ProvenanceAgentComponent}
*/
ProvenanceEntityComponent.prototype.agent = function() {
if (this.json['agent']) {
return new ProvenanceAgentComponent(this.json['agent']);
}
};
return ProvenanceEntityComponent;
})(BackboneElement);
/**
Provenance information that describes the activity that led to the creation of a set of resources. This information can be used to help determine their reliability or trace where the information in them came from. The focus of the provenance resource is record keeping, audit and traceability, and not explicit statements of clinical significance.
@class Provenance
@exports Provenance as Provenance
*/
Provenance = (function(superClass) {
extend(Provenance, superClass);
function Provenance(json) {
this.json = json;
Provenance.__super__.constructor.call(this, this.json);
}
/**
The Reference(s) that were generated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.
@returns {Array} an array of {@link Reference} objects
*/
Provenance.prototype.target = function() {
var i, item, len, ref, results;
if (this.json['target']) {
ref = this.json['target'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
/**
The period during which the activity occurred.
@returns {Period}
*/
Provenance.prototype.period = function() {
if (this.json['period']) {
return new Period(this.json['period']);
}
};
/**
The instant of time at which the activity was recorded.
@returns {Array} an array of {@link Date} objects
*/
Provenance.prototype.recorded = function() {
if (this.json['recorded']) {
return DT.DateTime.parse(this.json['recorded']);
}
};
/**
The reason that the activity was taking place.
@returns {CodeableConcept}
*/
Provenance.prototype.reason = function() {
if (this.json['reason']) {
return new CodeableConcept(this.json['reason']);
}
};
/**
Where the activity occurred, if relevant.
@returns {Reference}
*/
Provenance.prototype.location = function() {
if (this.json['location']) {
return new Reference(this.json['location']);
}
};
/**
Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.
@returns {Array} an array of {@link String} objects
*/
Provenance.prototype.policy = function() {
return this.json['policy'];
};
/**
An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, a piece of software, an inanimate object, an organization, or other entities that may be ascribed responsibility.
@returns {Array} an array of {@link ProvenanceAgentComponent} objects
*/
Provenance.prototype.agent = function() {
var i, item, len, ref, results;
if (this.json['agent']) {
ref = this.json['agent'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ProvenanceAgentComponent(item));
}
return results;
}
};
/**
An entity used in this activity.
@returns {Array} an array of {@link ProvenanceEntityComponent} objects
*/
Provenance.prototype.entity = function() {
var i, item, len, ref, results;
if (this.json['entity']) {
ref = this.json['entity'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ProvenanceEntityComponent(item));
}
return results;
}
};
/**
A digital signature on the target Reference(s). The signature should match a Provenance.agent.reference in the provenance resource. The signature is only added to support checking cryptographic integrity of the resource, and not to represent workflow and clinical aspects of the signing process, or to support non-repudiation.
@returns {Array} an array of {@link String} objects
*/
Provenance.prototype.integritySignature = function() {
return this.json['integritySignature'];
};
return Provenance;
})(DomainResource);
module.exports.Provenance = Provenance;
}).call(this);
//# sourceMappingURL=provenance.js.map