UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

295 lines (211 loc) 7.99 kB
// Generated by CoffeeScript 1.9.3 (function() { var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DeviceUseRequest, 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; /** Represents a request for the use of a device. @class DeviceUseRequest @exports DeviceUseRequest as DeviceUseRequest */ DeviceUseRequest = (function(superClass) { extend(DeviceUseRequest, superClass); function DeviceUseRequest(json) { this.json = json; DeviceUseRequest.__super__.constructor.call(this, this.json); } /** Body site where the device is to be used. @returns {Array} an array of {@link CodeableConcept} objects */ DeviceUseRequest.prototype.bodySite = function() { var i, item, len, ref, results; if (this.json['bodySite']) { ref = this.json['bodySite']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new CodeableConcept(item)); } return results; } }; /** The status of the request. @returns {Array} an array of {@link String} objects */ DeviceUseRequest.prototype.status = function() { return this.json['status']; }; /** The mode of the request. @returns {Array} an array of {@link String} objects */ DeviceUseRequest.prototype.mode = function() { return this.json['mode']; }; /** The details of the device to be used. @returns {Reference} */ DeviceUseRequest.prototype.device = function() { if (this.json['device']) { return new Reference(this.json['device']); } }; /** An encounter that provides additional context in which this request is made. @returns {Reference} */ DeviceUseRequest.prototype.encounter = function() { if (this.json['encounter']) { return new Reference(this.json['encounter']); } }; /** Identifiers assigned to this order by the orderer or by the receiver. @returns {Array} an array of {@link Identifier} objects */ DeviceUseRequest.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; } }; /** Reason or justification for the use of this device. @returns {Array} an array of {@link CodeableConcept} objects */ DeviceUseRequest.prototype.indication = function() { var i, item, len, ref, results; if (this.json['indication']) { ref = this.json['indication']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new CodeableConcept(item)); } return results; } }; /** Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement. @returns {Array} an array of {@link String} objects */ DeviceUseRequest.prototype.notes = function() { return this.json['notes']; }; /** The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%. @returns {Array} an array of {@link CodeableConcept} objects */ DeviceUseRequest.prototype.prnReason = function() { var i, item, len, ref, results; if (this.json['prnReason']) { ref = this.json['prnReason']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new CodeableConcept(item)); } return results; } }; /** The time when the request was made. @returns {Array} an array of {@link Date} objects */ DeviceUseRequest.prototype.orderedOn = function() { if (this.json['orderedOn']) { return DT.DateTime.parse(this.json['orderedOn']); } }; /** The time at which the request was made/recorded. @returns {Array} an array of {@link Date} objects */ DeviceUseRequest.prototype.recordedOn = function() { if (this.json['recordedOn']) { return DT.DateTime.parse(this.json['recordedOn']); } }; /** The patient who will use the device. @returns {Reference} */ DeviceUseRequest.prototype.subject = function() { if (this.json['subject']) { return new Reference(this.json['subject']); } }; /** The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". @returns {Timing} */ DeviceUseRequest.prototype.timingTiming = function() { if (this.json['timingTiming']) { return new Timing(this.json['timingTiming']); } }; /** The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". @returns {Period} */ DeviceUseRequest.prototype.timingPeriod = function() { if (this.json['timingPeriod']) { return new Period(this.json['timingPeriod']); } }; /** The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". @returns {Array} an array of {@link Date} objects */ DeviceUseRequest.prototype.timingDateTime = function() { if (this.json['timingDateTime']) { return DT.DateTime.parse(this.json['timingDateTime']); } }; /** Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine. @returns {Array} an array of {@link String} objects */ DeviceUseRequest.prototype.priority = function() { return this.json['priority']; }; return DeviceUseRequest; })(DomainResource); module.exports.DeviceUseRequest = DeviceUseRequest; }).call(this); //# sourceMappingURL=deviceuserequest.js.map