cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
373 lines (274 loc) • 11 kB
JavaScript
// Generated by CoffeeScript 1.9.3
(function() {
var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DiagnosticReport, DiagnosticReportImageComponent, 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 DiagnosticReportImageComponent
@exports DiagnosticReportImageComponent as DiagnosticReportImageComponent
*/
DiagnosticReportImageComponent = (function(superClass) {
extend(DiagnosticReportImageComponent, superClass);
function DiagnosticReportImageComponent(json) {
this.json = json;
DiagnosticReportImageComponent.__super__.constructor.call(this, this.json);
}
/**
A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.
@returns {Array} an array of {@link String} objects
*/
DiagnosticReportImageComponent.prototype.comment = function() {
return this.json['comment'];
};
/**
Reference to the image source.
@returns {Reference}
*/
DiagnosticReportImageComponent.prototype.link = function() {
if (this.json['link']) {
return new Reference(this.json['link']);
}
};
return DiagnosticReportImageComponent;
})(BackboneElement);
/**
The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretation, and formatted representation of diagnostic reports.
@class DiagnosticReport
@exports DiagnosticReport as DiagnosticReport
*/
DiagnosticReport = (function(superClass) {
extend(DiagnosticReport, superClass);
function DiagnosticReport(json) {
this.json = json;
DiagnosticReport.__super__.constructor.call(this, this.json);
}
/**
A code or name that describes this diagnostic report.
@returns {CodeableConcept}
*/
DiagnosticReport.prototype.name = function() {
if (this.json['name']) {
return new CodeableConcept(this.json['name']);
}
};
/**
The status of the diagnostic report as a whole.
@returns {Array} an array of {@link String} objects
*/
DiagnosticReport.prototype.status = function() {
return this.json['status'];
};
/**
The date and/or time that this version of the report was released from the source diagnostic service.
@returns {Array} an array of {@link Date} objects
*/
DiagnosticReport.prototype.issued = function() {
if (this.json['issued']) {
return DT.DateTime.parse(this.json['issued']);
}
};
/**
The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.
@returns {Reference}
*/
DiagnosticReport.prototype.subject = function() {
if (this.json['subject']) {
return new Reference(this.json['subject']);
}
};
/**
The diagnostic service that is responsible for issuing the report.
@returns {Reference}
*/
DiagnosticReport.prototype.performer = function() {
if (this.json['performer']) {
return new Reference(this.json['performer']);
}
};
/**
The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.
@returns {Identifier}
*/
DiagnosticReport.prototype.identifier = function() {
if (this.json['identifier']) {
return new Identifier(this.json['identifier']);
}
};
/**
Details concerning a test requested.
@returns {Array} an array of {@link Reference} objects
*/
DiagnosticReport.prototype.requestDetail = function() {
var i, item, len, ref, results;
if (this.json['requestDetail']) {
ref = this.json['requestDetail'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
/**
The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI.
@returns {CodeableConcept}
*/
DiagnosticReport.prototype.serviceCategory = function() {
if (this.json['serviceCategory']) {
return new CodeableConcept(this.json['serviceCategory']);
}
};
/**
The time or time-period the observed values are related to. This is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.
@returns {Array} an array of {@link Date} objects
*/
DiagnosticReport.prototype.diagnosticDateTime = function() {
if (this.json['diagnosticDateTime']) {
return DT.DateTime.parse(this.json['diagnosticDateTime']);
}
};
/**
The time or time-period the observed values are related to. This is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.
@returns {Period}
*/
DiagnosticReport.prototype.diagnosticPeriod = function() {
if (this.json['diagnosticPeriod']) {
return new Period(this.json['diagnosticPeriod']);
}
};
/**
Details about the specimens on which this Disagnostic report is based.
@returns {Array} an array of {@link Reference} objects
*/
DiagnosticReport.prototype.specimen = function() {
var i, item, len, ref, results;
if (this.json['specimen']) {
ref = this.json['specimen'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
/**
Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. "atomic" results), or they can be grouping observations that include references to other members of the group (e.g. "panels").
@returns {Array} an array of {@link Reference} objects
*/
DiagnosticReport.prototype.result = function() {
var i, item, len, ref, results;
if (this.json['result']) {
ref = this.json['result'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
/**
One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.
@returns {Array} an array of {@link Reference} objects
*/
DiagnosticReport.prototype.imagingStudy = function() {
var i, item, len, ref, results;
if (this.json['imagingStudy']) {
ref = this.json['imagingStudy'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
/**
A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).
@returns {Array} an array of {@link DiagnosticReportImageComponent} objects
*/
DiagnosticReport.prototype.image = function() {
var i, item, len, ref, results;
if (this.json['image']) {
ref = this.json['image'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new DiagnosticReportImageComponent(item));
}
return results;
}
};
/**
Concise and clinically contextualized narrative interpretation of the diagnostic report.
@returns {Array} an array of {@link String} objects
*/
DiagnosticReport.prototype.conclusion = function() {
return this.json['conclusion'];
};
/**
Codes for the conclusion.
@returns {Array} an array of {@link CodeableConcept} objects
*/
DiagnosticReport.prototype.codedDiagnosis = function() {
var i, item, len, ref, results;
if (this.json['codedDiagnosis']) {
ref = this.json['codedDiagnosis'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
@returns {Array} an array of {@link Attachment} objects
*/
DiagnosticReport.prototype.presentedForm = function() {
var i, item, len, ref, results;
if (this.json['presentedForm']) {
ref = this.json['presentedForm'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Attachment(item));
}
return results;
}
};
return DiagnosticReport;
})(DomainResource);
module.exports.DiagnosticReport = DiagnosticReport;
}).call(this);
//# sourceMappingURL=diagnosticreport.js.map