UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

536 lines (392 loc) 14 kB
// 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, Quantity, Range, Ratio, Reference, Resource, SampledData, Specimen, SpecimenCollectionComponent, SpecimenContainerComponent, SpecimenSourceComponent, SpecimenTreatmentComponent, 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 SpecimenSourceComponent @exports SpecimenSourceComponent as SpecimenSourceComponent */ SpecimenSourceComponent = (function(superClass) { extend(SpecimenSourceComponent, superClass); function SpecimenSourceComponent(json) { this.json = json; SpecimenSourceComponent.__super__.constructor.call(this, this.json); } /** Whether this relationship is to a parent or to a child. @returns {Array} an array of {@link String} objects */ SpecimenSourceComponent.prototype.relationship = function() { return this.json['relationship']; }; /** The specimen resource that is the target of this relationship. @returns {Array} an array of {@link Reference} objects */ SpecimenSourceComponent.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; } }; return SpecimenSourceComponent; })(BackboneElement); /** Embedded class @class SpecimenCollectionComponent @exports SpecimenCollectionComponent as SpecimenCollectionComponent */ SpecimenCollectionComponent = (function(superClass) { extend(SpecimenCollectionComponent, superClass); function SpecimenCollectionComponent(json) { this.json = json; SpecimenCollectionComponent.__super__.constructor.call(this, this.json); } /** Person who collected the specimen. @returns {Reference} */ SpecimenCollectionComponent.prototype.collector = function() { if (this.json['collector']) { return new Reference(this.json['collector']); } }; /** To communicate any details or issues encountered during the specimen collection procedure. @returns {Array} an array of {@link String} objects */ SpecimenCollectionComponent.prototype.comment = function() { return this.json['comment']; }; /** Time when specimen was collected from subject - the physiologically relevant time. @returns {Array} an array of {@link Date} objects */ SpecimenCollectionComponent.prototype.collectedDateTime = function() { if (this.json['collectedDateTime']) { return DT.DateTime.parse(this.json['collectedDateTime']); } }; /** Time when specimen was collected from subject - the physiologically relevant time. @returns {Period} */ SpecimenCollectionComponent.prototype.collectedPeriod = function() { if (this.json['collectedPeriod']) { return new Period(this.json['collectedPeriod']); } }; /** The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample. @returns {Quantity} */ SpecimenCollectionComponent.prototype.quantity = function() { if (this.json['quantity']) { return new Quantity(this.json['quantity']); } }; /** A coded value specifying the technique that is used to perform the procedure. @returns {CodeableConcept} */ SpecimenCollectionComponent.prototype.method = function() { if (this.json['method']) { return new CodeableConcept(this.json['method']); } }; /** Anatomical location from which the specimen should be collected (if subject is a patient). This element is not used for environmental specimens. @returns {CodeableConcept} */ SpecimenCollectionComponent.prototype.sourceSite = function() { if (this.json['sourceSite']) { return new CodeableConcept(this.json['sourceSite']); } }; return SpecimenCollectionComponent; })(BackboneElement); /** Embedded class @class SpecimenTreatmentComponent @exports SpecimenTreatmentComponent as SpecimenTreatmentComponent */ SpecimenTreatmentComponent = (function(superClass) { extend(SpecimenTreatmentComponent, superClass); function SpecimenTreatmentComponent(json) { this.json = json; SpecimenTreatmentComponent.__super__.constructor.call(this, this.json); } /** Textual description of procedure. @returns {Array} an array of {@link String} objects */ SpecimenTreatmentComponent.prototype.description = function() { return this.json['description']; }; /** A coded value specifying the procedure used to process the specimen. @returns {CodeableConcept} */ SpecimenTreatmentComponent.prototype.procedure = function() { if (this.json['procedure']) { return new CodeableConcept(this.json['procedure']); } }; /** Material used in the processing step. @returns {Array} an array of {@link Reference} objects */ SpecimenTreatmentComponent.prototype.additive = function() { var i, item, len, ref, results; if (this.json['additive']) { ref = this.json['additive']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new Reference(item)); } return results; } }; return SpecimenTreatmentComponent; })(BackboneElement); /** Embedded class @class SpecimenContainerComponent @exports SpecimenContainerComponent as SpecimenContainerComponent */ SpecimenContainerComponent = (function(superClass) { extend(SpecimenContainerComponent, superClass); function SpecimenContainerComponent(json) { this.json = json; SpecimenContainerComponent.__super__.constructor.call(this, this.json); } /** Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances. @returns {Array} an array of {@link Identifier} objects */ SpecimenContainerComponent.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; } }; /** Textual description of the container. @returns {Array} an array of {@link String} objects */ SpecimenContainerComponent.prototype.description = function() { return this.json['description']; }; /** The type of container associated with the specimen (e.g. slide, aliquot, etc). @returns {CodeableConcept} */ SpecimenContainerComponent.prototype.type = function() { if (this.json['type']) { return new CodeableConcept(this.json['type']); } }; /** The capacity (volume or other measure) the container may contain. @returns {Quantity} */ SpecimenContainerComponent.prototype.capacity = function() { if (this.json['capacity']) { return new Quantity(this.json['capacity']); } }; /** The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type. @returns {Quantity} */ SpecimenContainerComponent.prototype.specimenQuantity = function() { if (this.json['specimenQuantity']) { return new Quantity(this.json['specimenQuantity']); } }; /** Introduced substance to preserve, maintain or enhance the specimen. examples: Formalin, Citrate, EDTA. @returns {CodeableConcept} */ SpecimenContainerComponent.prototype.additiveCodeableConcept = function() { if (this.json['additiveCodeableConcept']) { return new CodeableConcept(this.json['additiveCodeableConcept']); } }; /** Introduced substance to preserve, maintain or enhance the specimen. examples: Formalin, Citrate, EDTA. @returns {Reference} */ SpecimenContainerComponent.prototype.additiveReference = function() { if (this.json['additiveReference']) { return new Reference(this.json['additiveReference']); } }; return SpecimenContainerComponent; })(BackboneElement); /** Sample for analysis. @class Specimen @exports Specimen as Specimen */ Specimen = (function(superClass) { extend(Specimen, superClass); function Specimen(json) { this.json = json; Specimen.__super__.constructor.call(this, this.json); } /** Id for specimen. @returns {Array} an array of {@link Identifier} objects */ Specimen.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; } }; /** Kind of material that forms the specimen. @returns {CodeableConcept} */ Specimen.prototype.type = function() { if (this.json['type']) { return new CodeableConcept(this.json['type']); } }; /** Parent specimen from which the focal specimen was a component. @returns {Array} an array of {@link SpecimenSourceComponent} objects */ Specimen.prototype.source = function() { var i, item, len, ref, results; if (this.json['source']) { ref = this.json['source']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new SpecimenSourceComponent(item)); } return results; } }; /** Where the specimen came from. This may be the patient(s) or from the environment or a device. @returns {Reference} */ Specimen.prototype.subject = function() { if (this.json['subject']) { return new Reference(this.json['subject']); } }; /** The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures. @returns {Identifier} */ Specimen.prototype.accessionIdentifier = function() { if (this.json['accessionIdentifier']) { return new Identifier(this.json['accessionIdentifier']); } }; /** Time when specimen was received for processing or testing. @returns {Array} an array of {@link Date} objects */ Specimen.prototype.receivedTime = function() { if (this.json['receivedTime']) { return DT.DateTime.parse(this.json['receivedTime']); } }; /** Details concerning the specimen collection. @returns {SpecimenCollectionComponent} */ Specimen.prototype.collection = function() { if (this.json['collection']) { return new SpecimenCollectionComponent(this.json['collection']); } }; /** Details concerning treatment and processing steps for the specimen. @returns {Array} an array of {@link SpecimenTreatmentComponent} objects */ Specimen.prototype.treatment = function() { var i, item, len, ref, results; if (this.json['treatment']) { ref = this.json['treatment']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new SpecimenTreatmentComponent(item)); } return results; } }; /** The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here. @returns {Array} an array of {@link SpecimenContainerComponent} objects */ Specimen.prototype.container = function() { var i, item, len, ref, results; if (this.json['container']) { ref = this.json['container']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new SpecimenContainerComponent(item)); } return results; } }; return Specimen; })(DomainResource); module.exports.Specimen = Specimen; }).call(this); //# sourceMappingURL=specimen.js.map