@phema/cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
575 lines (420 loc) • 15.6 kB
JavaScript
// Generated by CoffeeScript 1.12.7
(function() {
var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, Condition, ConditionDueToComponent, ConditionEvidenceComponent, ConditionLocationComponent, ConditionOccurredFollowingComponent, ConditionStageComponent, 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 ConditionStageComponent
@exports ConditionStageComponent as ConditionStageComponent
*/
ConditionStageComponent = (function(superClass) {
extend(ConditionStageComponent, superClass);
function ConditionStageComponent(json) {
this.json = json;
ConditionStageComponent.__super__.constructor.call(this, this.json);
}
/**
A simple summary of the stage such as "Stage 3". The determination of the stage is disease-specific.
@returns {CodeableConcept}
*/
ConditionStageComponent.prototype.summary = function() {
if (this.json['summary']) {
return new CodeableConcept(this.json['summary']);
}
};
/**
Reference to a formal record of the evidence on which the staging assessment is based.
@returns {Array} an array of {@link Reference} objects
*/
ConditionStageComponent.prototype.assessment = function() {
var i, item, len, ref, results;
if (this.json['assessment']) {
ref = this.json['assessment'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
return ConditionStageComponent;
})(BackboneElement);
/**
Embedded class
@class ConditionEvidenceComponent
@exports ConditionEvidenceComponent as ConditionEvidenceComponent
*/
ConditionEvidenceComponent = (function(superClass) {
extend(ConditionEvidenceComponent, superClass);
function ConditionEvidenceComponent(json) {
this.json = json;
ConditionEvidenceComponent.__super__.constructor.call(this, this.json);
}
/**
A manifestation or symptom that led to the recording of this condition.
@returns {CodeableConcept}
*/
ConditionEvidenceComponent.prototype.code = function() {
if (this.json['code']) {
return new CodeableConcept(this.json['code']);
}
};
/**
Links to other relevant information, including pathology reports.
@returns {Array} an array of {@link Reference} objects
*/
ConditionEvidenceComponent.prototype.detail = function() {
var i, item, len, ref, results;
if (this.json['detail']) {
ref = this.json['detail'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
return ConditionEvidenceComponent;
})(BackboneElement);
/**
Embedded class
@class ConditionLocationComponent
@exports ConditionLocationComponent as ConditionLocationComponent
*/
ConditionLocationComponent = (function(superClass) {
extend(ConditionLocationComponent, superClass);
function ConditionLocationComponent(json) {
this.json = json;
ConditionLocationComponent.__super__.constructor.call(this, this.json);
}
/**
Code that identifies the structural location.
@returns {CodeableConcept}
*/
ConditionLocationComponent.prototype.code = function() {
if (this.json['code']) {
return new CodeableConcept(this.json['code']);
}
};
/**
Detailed anatomical location information.
@returns {Array} an array of {@link String} objects
*/
ConditionLocationComponent.prototype.detail = function() {
return this.json['detail'];
};
return ConditionLocationComponent;
})(BackboneElement);
/**
Embedded class
@class ConditionDueToComponent
@exports ConditionDueToComponent as ConditionDueToComponent
*/
ConditionDueToComponent = (function(superClass) {
extend(ConditionDueToComponent, superClass);
function ConditionDueToComponent(json) {
this.json = json;
ConditionDueToComponent.__super__.constructor.call(this, this.json);
}
/**
Code that identifies the target of this relationship. The code takes the place of a detailed instance target.
@returns {CodeableConcept}
*/
ConditionDueToComponent.prototype.codeableConcept = function() {
if (this.json['codeableConcept']) {
return new CodeableConcept(this.json['codeableConcept']);
}
};
/**
Target of the relationship.
@returns {Reference}
*/
ConditionDueToComponent.prototype.target = function() {
if (this.json['target']) {
return new Reference(this.json['target']);
}
};
return ConditionDueToComponent;
})(BackboneElement);
/**
Embedded class
@class ConditionOccurredFollowingComponent
@exports ConditionOccurredFollowingComponent as ConditionOccurredFollowingComponent
*/
ConditionOccurredFollowingComponent = (function(superClass) {
extend(ConditionOccurredFollowingComponent, superClass);
function ConditionOccurredFollowingComponent(json) {
this.json = json;
ConditionOccurredFollowingComponent.__super__.constructor.call(this, this.json);
}
/**
Code that identifies the target of this relationship. The code takes the place of a detailed instance target.
@returns {CodeableConcept}
*/
ConditionOccurredFollowingComponent.prototype.codeableConcept = function() {
if (this.json['codeableConcept']) {
return new CodeableConcept(this.json['codeableConcept']);
}
};
/**
Target of the relationship.
@returns {Reference}
*/
ConditionOccurredFollowingComponent.prototype.target = function() {
if (this.json['target']) {
return new Reference(this.json['target']);
}
};
return ConditionOccurredFollowingComponent;
})(BackboneElement);
/**
Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a Diagnosis during an Encounter; populating a problem List or a Summary Statement, such as a Discharge Summary.
@class Condition
@exports Condition as Condition
*/
Condition = (function(superClass) {
extend(Condition, superClass);
function Condition(json) {
this.json = json;
Condition.__super__.constructor.call(this, this.json);
}
/**
This records identifiers associated with this condition 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
*/
Condition.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;
}
};
/**
Indicates the patient who the condition record is associated with.
@returns {Reference}
*/
Condition.prototype.subject = function() {
if (this.json['subject']) {
return new Reference(this.json['subject']);
}
};
/**
Encounter during which the condition was first asserted.
@returns {Reference}
*/
Condition.prototype.encounter = function() {
if (this.json['encounter']) {
return new Reference(this.json['encounter']);
}
};
/**
Person who takes responsibility for asserting the existence of the condition as part of the electronic record.
@returns {Reference}
*/
Condition.prototype.asserter = function() {
if (this.json['asserter']) {
return new Reference(this.json['asserter']);
}
};
/**
Estimated or actual date the condition/problem/diagnosis was first detected/suspected.
@returns {Array} an array of {@link Date} objects
*/
Condition.prototype.dateAsserted = function() {
if (this.json['dateAsserted']) {
return DT.DateTime.parse(this.json['dateAsserted']);
}
};
/**
Identification of the condition, problem or diagnosis.
@returns {CodeableConcept}
*/
Condition.prototype.code = function() {
if (this.json['code']) {
return new CodeableConcept(this.json['code']);
}
};
/**
A category assigned to the condition. E.g. complaint | symptom | finding | diagnosis.
@returns {CodeableConcept}
*/
Condition.prototype.category = function() {
if (this.json['category']) {
return new CodeableConcept(this.json['category']);
}
};
/**
The clinical status of the condition.
@returns {Array} an array of {@link String} objects
*/
Condition.prototype.status = function() {
return this.json['status'];
};
/**
The degree of confidence that this condition is correct.
@returns {CodeableConcept}
*/
Condition.prototype.certainty = function() {
if (this.json['certainty']) {
return new CodeableConcept(this.json['certainty']);
}
};
/**
A subjective assessment of the severity of the condition as evaluated by the clinician.
@returns {CodeableConcept}
*/
Condition.prototype.severity = function() {
if (this.json['severity']) {
return new CodeableConcept(this.json['severity']);
}
};
/**
Estimated or actual date or date-time the condition began, in the opinion of the clinician.
@returns {Array} an array of {@link Date} objects
*/
Condition.prototype.onsetDateTime = function() {
if (this.json['onsetDateTime']) {
return DT.DateTime.parse(this.json['onsetDateTime']);
}
};
Condition.prototype.onsetAge = function() {
return new Quantity(this.json['onsetAge']);
};
/**
The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.
@returns {Array} an array of {@link Date} objects
*/
Condition.prototype.abatementDate = function() {
if (this.json['abatementDate']) {
return DT.DateTime.parse(this.json['abatementDate']);
}
};
Condition.prototype.abatementAge = function() {
return new Quantity(this.json['abatementAge']);
};
/**
The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.
@returns {Array} an array of {@link boolean} objects
*/
Condition.prototype.abatementBoolean = function() {
return this.json['abatementBoolean'];
};
/**
Clinical stage or grade of a condition. May include formal severity assessments.
@returns {ConditionStageComponent}
*/
Condition.prototype.stage = function() {
if (this.json['stage']) {
return new ConditionStageComponent(this.json['stage']);
}
};
/**
Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.
@returns {Array} an array of {@link ConditionEvidenceComponent} objects
*/
Condition.prototype.evidence = function() {
var i, item, len, ref, results;
if (this.json['evidence']) {
ref = this.json['evidence'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ConditionEvidenceComponent(item));
}
return results;
}
};
/**
The anatomical location where this condition manifests itself.
@returns {Array} an array of {@link ConditionLocationComponent} objects
*/
Condition.prototype.location = function() {
var i, item, len, ref, results;
if (this.json['location']) {
ref = this.json['location'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ConditionLocationComponent(item));
}
return results;
}
};
/**
Further conditions, problems, diagnoses, procedures or events or the substance that caused/triggered this Condition.
@returns {Array} an array of {@link ConditionDueToComponent} objects
*/
Condition.prototype.dueTo = function() {
var i, item, len, ref, results;
if (this.json['dueTo']) {
ref = this.json['dueTo'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ConditionDueToComponent(item));
}
return results;
}
};
/**
Further conditions, problems, diagnoses, procedures or events or the substance that preceded this Condition.
@returns {Array} an array of {@link ConditionOccurredFollowingComponent} objects
*/
Condition.prototype.occurredFollowing = function() {
var i, item, len, ref, results;
if (this.json['occurredFollowing']) {
ref = this.json['occurredFollowing'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ConditionOccurredFollowingComponent(item));
}
return results;
}
};
/**
Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.
@returns {Array} an array of {@link String} objects
*/
Condition.prototype.notes = function() {
return this.json['notes'];
};
return Condition;
})(DomainResource);
module.exports.Condition = Condition;
}).call(this);
//# sourceMappingURL=condition.js.map