UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

400 lines (292 loc) 10.8 kB
// Generated by CoffeeScript 1.9.3 (function() { var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DiagnosticOrder, DiagnosticOrderEventComponent, DiagnosticOrderItemComponent, 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 DiagnosticOrderEventComponent @exports DiagnosticOrderEventComponent as DiagnosticOrderEventComponent */ DiagnosticOrderEventComponent = (function(superClass) { extend(DiagnosticOrderEventComponent, superClass); function DiagnosticOrderEventComponent(json) { this.json = json; DiagnosticOrderEventComponent.__super__.constructor.call(this, this.json); } /** The status for the event. @returns {Array} an array of {@link String} objects */ DiagnosticOrderEventComponent.prototype.status = function() { return this.json['status']; }; /** Additional information about the event that occurred - e.g. if the status remained unchanged. @returns {CodeableConcept} */ DiagnosticOrderEventComponent.prototype.description = function() { if (this.json['description']) { return new CodeableConcept(this.json['description']); } }; /** The date/time at which the event occurred. @returns {Array} an array of {@link Date} objects */ DiagnosticOrderEventComponent.prototype.dateTime = function() { if (this.json['dateTime']) { return DT.DateTime.parse(this.json['dateTime']); } }; /** The person who was responsible for performing or recording the action. @returns {Reference} */ DiagnosticOrderEventComponent.prototype.actor = function() { if (this.json['actor']) { return new Reference(this.json['actor']); } }; return DiagnosticOrderEventComponent; })(BackboneElement); /** Embedded class @class DiagnosticOrderItemComponent @exports DiagnosticOrderItemComponent as DiagnosticOrderItemComponent */ DiagnosticOrderItemComponent = (function(superClass) { extend(DiagnosticOrderItemComponent, superClass); function DiagnosticOrderItemComponent(json) { this.json = json; DiagnosticOrderItemComponent.__super__.constructor.call(this, this.json); } /** A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested. @returns {CodeableConcept} */ DiagnosticOrderItemComponent.prototype.code = function() { if (this.json['code']) { return new CodeableConcept(this.json['code']); } }; /** If the item is related to a specific speciment. @returns {Array} an array of {@link Reference} objects */ DiagnosticOrderItemComponent.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; } }; /** Anatomical location where the request test should be performed. @returns {CodeableConcept} */ DiagnosticOrderItemComponent.prototype.bodySite = function() { if (this.json['bodySite']) { return new CodeableConcept(this.json['bodySite']); } }; /** The status of this individual item within the order. @returns {Array} an array of {@link String} objects */ DiagnosticOrderItemComponent.prototype.status = function() { return this.json['status']; }; /** A summary of the events of interest that have occurred as this item of the request is processed. @returns {Array} an array of {@link DiagnosticOrderEventComponent} objects */ DiagnosticOrderItemComponent.prototype.event = function() { var i, item, len, ref, results; if (this.json['event']) { ref = this.json['event']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new DiagnosticOrderEventComponent(item)); } return results; } }; return DiagnosticOrderItemComponent; })(BackboneElement); /** A request for a diagnostic investigation service to be performed. @class DiagnosticOrder @exports DiagnosticOrder as DiagnosticOrder */ DiagnosticOrder = (function(superClass) { extend(DiagnosticOrder, superClass); function DiagnosticOrder(json) { this.json = json; DiagnosticOrder.__super__.constructor.call(this, this.json); } /** Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans). @returns {Reference} */ DiagnosticOrder.prototype.subject = function() { if (this.json['subject']) { return new Reference(this.json['subject']); } }; /** The practitioner that holds legal responsibility for ordering the investigation. @returns {Reference} */ DiagnosticOrder.prototype.orderer = function() { if (this.json['orderer']) { return new Reference(this.json['orderer']); } }; /** Identifiers assigned to this order by the order or by the receiver. @returns {Array} an array of {@link Identifier} objects */ DiagnosticOrder.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; } }; /** An encounter that provides additional information about the healthcare context in which this request is made. @returns {Reference} */ DiagnosticOrder.prototype.encounter = function() { if (this.json['encounter']) { return new Reference(this.json['encounter']); } }; /** An explanation or justification for why this diagnostic investigation is being requested. @returns {Array} an array of {@link String} objects */ DiagnosticOrder.prototype.clinicalNotes = function() { return this.json['clinicalNotes']; }; /** Additional clinical information about the patient or specimen that may influence test interpretations. @returns {Array} an array of {@link Reference} objects */ DiagnosticOrder.prototype.supportingInformation = function() { var i, item, len, ref, results; if (this.json['supportingInformation']) { ref = this.json['supportingInformation']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new Reference(item)); } return results; } }; /** One or more specimens that the diagnostic investigation is about. @returns {Array} an array of {@link Reference} objects */ DiagnosticOrder.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; } }; /** The status of the order. @returns {Array} an array of {@link String} objects */ DiagnosticOrder.prototype.status = function() { return this.json['status']; }; /** The clinical priority associated with this order. @returns {Array} an array of {@link String} objects */ DiagnosticOrder.prototype.priority = function() { return this.json['priority']; }; /** A summary of the events of interest that have occurred as the request is processed. E.g. when the order was made, various processing steps (specimens received), when it was completed. @returns {Array} an array of {@link DiagnosticOrderEventComponent} objects */ DiagnosticOrder.prototype.event = function() { var i, item, len, ref, results; if (this.json['event']) { ref = this.json['event']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new DiagnosticOrderEventComponent(item)); } return results; } }; /** The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested. @returns {Array} an array of {@link DiagnosticOrderItemComponent} objects */ DiagnosticOrder.prototype.item = function() { var i, item, len, ref, results; if (this.json['item']) { ref = this.json['item']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new DiagnosticOrderItemComponent(item)); } return results; } }; return DiagnosticOrder; })(DomainResource); module.exports.DiagnosticOrder = DiagnosticOrder; }).call(this); //# sourceMappingURL=diagnosticorder.js.map