cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
599 lines (437 loc) • 16.4 kB
JavaScript
// Generated by CoffeeScript 1.9.3
(function() {
var Address, Attachment, BackboneElement, CORE, CarePlan, CarePlanActivityComponent, CarePlanActivitySimpleComponent, CarePlanGoalComponent, CarePlanParticipantComponent, CodeableConcept, Coding, 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 CarePlanParticipantComponent
@exports CarePlanParticipantComponent as CarePlanParticipantComponent
*/
CarePlanParticipantComponent = (function(superClass) {
extend(CarePlanParticipantComponent, superClass);
function CarePlanParticipantComponent(json) {
this.json = json;
CarePlanParticipantComponent.__super__.constructor.call(this, this.json);
}
/**
Indicates specific responsibility of an individual within the care plan. E.g. "Primary physician", "Team coordinator", "Caregiver", etc.
@returns {CodeableConcept}
*/
CarePlanParticipantComponent.prototype.role = function() {
if (this.json['role']) {
return new CodeableConcept(this.json['role']);
}
};
/**
The specific person or organization who is participating/expected to participate in the care plan.
@returns {Reference}
*/
CarePlanParticipantComponent.prototype.member = function() {
if (this.json['member']) {
return new Reference(this.json['member']);
}
};
return CarePlanParticipantComponent;
})(BackboneElement);
/**
Embedded class
@class CarePlanGoalComponent
@exports CarePlanGoalComponent as CarePlanGoalComponent
*/
CarePlanGoalComponent = (function(superClass) {
extend(CarePlanGoalComponent, superClass);
function CarePlanGoalComponent(json) {
this.json = json;
CarePlanGoalComponent.__super__.constructor.call(this, this.json);
}
/**
Human-readable description of a specific desired objective of the care plan.
@returns {Array} an array of {@link String} objects
*/
CarePlanGoalComponent.prototype.description = function() {
return this.json['description'];
};
/**
Indicates whether the goal has been reached and is still considered relevant.
@returns {Array} an array of {@link String} objects
*/
CarePlanGoalComponent.prototype.status = function() {
return this.json['status'];
};
/**
Any comments related to the goal.
@returns {Array} an array of {@link String} objects
*/
CarePlanGoalComponent.prototype.notes = function() {
return this.json['notes'];
};
/**
The identified conditions that this goal relates to - the condition that caused it to be created, or that it is intended to address.
@returns {Array} an array of {@link Reference} objects
*/
CarePlanGoalComponent.prototype.concern = function() {
var i, item, len, ref, results;
if (this.json['concern']) {
ref = this.json['concern'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
return CarePlanGoalComponent;
})(BackboneElement);
/**
Embedded class
@class CarePlanActivitySimpleComponent
@exports CarePlanActivitySimpleComponent as CarePlanActivitySimpleComponent
*/
CarePlanActivitySimpleComponent = (function(superClass) {
extend(CarePlanActivitySimpleComponent, superClass);
function CarePlanActivitySimpleComponent(json) {
this.json = json;
CarePlanActivitySimpleComponent.__super__.constructor.call(this, this.json);
}
/**
High-level categorization of the type of activity in a care plan.
@returns {Array} an array of {@link String} objects
*/
CarePlanActivitySimpleComponent.prototype.category = function() {
return this.json['category'];
};
/**
Detailed description of the type of activity. E.g. What lab test, what procedure, what kind of encounter.
@returns {CodeableConcept}
*/
CarePlanActivitySimpleComponent.prototype.code = function() {
if (this.json['code']) {
return new CodeableConcept(this.json['code']);
}
};
/**
The period, timing or frequency upon which the described activity is to occur.
@returns {Timing}
*/
CarePlanActivitySimpleComponent.prototype.scheduledTiming = function() {
if (this.json['scheduledTiming']) {
return new Timing(this.json['scheduledTiming']);
}
};
/**
The period, timing or frequency upon which the described activity is to occur.
@returns {Period}
*/
CarePlanActivitySimpleComponent.prototype.scheduledPeriod = function() {
if (this.json['scheduledPeriod']) {
return new Period(this.json['scheduledPeriod']);
}
};
/**
The period, timing or frequency upon which the described activity is to occur.
@returns {Array} an array of {@link String} objects
*/
CarePlanActivitySimpleComponent.prototype.scheduledString = function() {
return this.json['scheduledString'];
};
/**
Identifies the facility where the activity will occur. E.g. home, hospital, specific clinic, etc.
@returns {Reference}
*/
CarePlanActivitySimpleComponent.prototype.location = function() {
if (this.json['location']) {
return new Reference(this.json['location']);
}
};
/**
Identifies who's expected to be involved in the activity.
@returns {Array} an array of {@link Reference} objects
*/
CarePlanActivitySimpleComponent.prototype.performer = function() {
var i, item, len, ref, results;
if (this.json['performer']) {
ref = this.json['performer'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
/**
Identifies the food, drug or other product being consumed or supplied in the activity.
@returns {Reference}
*/
CarePlanActivitySimpleComponent.prototype.product = function() {
if (this.json['product']) {
return new Reference(this.json['product']);
}
};
/**
Identifies the quantity expected to be consumed in a given day.
@returns {Quantity}
*/
CarePlanActivitySimpleComponent.prototype.dailyAmount = function() {
if (this.json['dailyAmount']) {
return new Quantity(this.json['dailyAmount']);
}
};
/**
Identifies the quantity expected to be supplied.
@returns {Quantity}
*/
CarePlanActivitySimpleComponent.prototype.quantity = function() {
if (this.json['quantity']) {
return new Quantity(this.json['quantity']);
}
};
/**
This provides a textual description of constraints on the activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.
@returns {Array} an array of {@link String} objects
*/
CarePlanActivitySimpleComponent.prototype.details = function() {
return this.json['details'];
};
return CarePlanActivitySimpleComponent;
})(BackboneElement);
/**
Embedded class
@class CarePlanActivityComponent
@exports CarePlanActivityComponent as CarePlanActivityComponent
*/
CarePlanActivityComponent = (function(superClass) {
extend(CarePlanActivityComponent, superClass);
function CarePlanActivityComponent(json) {
this.json = json;
CarePlanActivityComponent.__super__.constructor.call(this, this.json);
}
/**
Internal reference that identifies the goals that this activity is intended to contribute towards meeting.
@returns {Array} an array of {@link String} objects
*/
CarePlanActivityComponent.prototype.goal = function() {
return this.json['goal'];
};
/**
Identifies what progress is being made for the specific activity.
@returns {Array} an array of {@link String} objects
*/
CarePlanActivityComponent.prototype.status = function() {
return this.json['status'];
};
/**
If true, indicates that the described activity is one that must NOT be engaged in when following the plan.
@returns {Array} an array of {@link boolean} objects
*/
CarePlanActivityComponent.prototype.prohibited = function() {
return this.json['prohibited'];
};
/**
Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc.
@returns {Array} an array of {@link Reference} objects
*/
CarePlanActivityComponent.prototype.actionResulting = function() {
var i, item, len, ref, results;
if (this.json['actionResulting']) {
ref = this.json['actionResulting'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
/**
Notes about the execution of the activity.
@returns {Array} an array of {@link String} objects
*/
CarePlanActivityComponent.prototype.notes = function() {
return this.json['notes'];
};
/**
The details of the proposed activity represented in a specific resource.
@returns {Reference}
*/
CarePlanActivityComponent.prototype.detail = function() {
if (this.json['detail']) {
return new Reference(this.json['detail']);
}
};
/**
A simple summary of details suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.
@returns {CarePlanActivitySimpleComponent}
*/
CarePlanActivityComponent.prototype.simple = function() {
if (this.json['simple']) {
return new CarePlanActivitySimpleComponent(this.json['simple']);
}
};
return CarePlanActivityComponent;
})(BackboneElement);
/**
Describes the intention of how one or more practitioners intend to deliver care for a particular patient for a period of time, possibly limited to care for a specific condition or set of conditions.
@class CarePlan
@exports CarePlan as CarePlan
*/
CarePlan = (function(superClass) {
extend(CarePlan, superClass);
function CarePlan(json) {
this.json = json;
CarePlan.__super__.constructor.call(this, this.json);
}
/**
This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).
@returns {Array} an array of {@link Identifier} objects
*/
CarePlan.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;
}
};
/**
Identifies the patient/subject whose intended care is described by the plan.
@returns {Reference}
*/
CarePlan.prototype.patient = function() {
if (this.json['patient']) {
return new Reference(this.json['patient']);
}
};
/**
Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record.
@returns {Array} an array of {@link String} objects
*/
CarePlan.prototype.status = function() {
return this.json['status'];
};
/**
Indicates when the plan did (or is intended to) come into effect and end.
@returns {Period}
*/
CarePlan.prototype.period = function() {
if (this.json['period']) {
return new Period(this.json['period']);
}
};
/**
Identifies the most recent date on which the plan has been revised.
@returns {Array} an array of {@link Date} objects
*/
CarePlan.prototype.modified = function() {
if (this.json['modified']) {
return DT.DateTime.parse(this.json['modified']);
}
};
/**
Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.
@returns {Array} an array of {@link Reference} objects
*/
CarePlan.prototype.concern = function() {
var i, item, len, ref, results;
if (this.json['concern']) {
ref = this.json['concern'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
/**
Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.
@returns {Array} an array of {@link CarePlanParticipantComponent} objects
*/
CarePlan.prototype.participant = function() {
var i, item, len, ref, results;
if (this.json['participant']) {
ref = this.json['participant'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CarePlanParticipantComponent(item));
}
return results;
}
};
/**
Describes the intended objective(s) of carrying out the Care Plan.
@returns {Array} an array of {@link CarePlanGoalComponent} objects
*/
CarePlan.prototype.goal = function() {
var i, item, len, ref, results;
if (this.json['goal']) {
ref = this.json['goal'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CarePlanGoalComponent(item));
}
return results;
}
};
/**
Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.
@returns {Array} an array of {@link CarePlanActivityComponent} objects
*/
CarePlan.prototype.activity = function() {
var i, item, len, ref, results;
if (this.json['activity']) {
ref = this.json['activity'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CarePlanActivityComponent(item));
}
return results;
}
};
/**
General notes about the care plan not covered elsewhere.
@returns {Array} an array of {@link String} objects
*/
CarePlan.prototype.notes = function() {
return this.json['notes'];
};
return CarePlan;
})(DomainResource);
module.exports.CarePlan = CarePlan;
}).call(this);
//# sourceMappingURL=careplan.js.map