UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

310 lines (220 loc) 8.31 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, ProcedureRequest, 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; /** A request for a procedure to be performed. May be a proposal or an order. @class ProcedureRequest @exports ProcedureRequest as ProcedureRequest */ ProcedureRequest = (function(superClass) { extend(ProcedureRequest, superClass); function ProcedureRequest(json) { this.json = json; ProcedureRequest.__super__.constructor.call(this, this.json); } /** Identifiers assigned to this order by the order or by the receiver. @returns {Array} an array of {@link Identifier} objects */ ProcedureRequest.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; } }; /** The patient who will receive the procedure. @returns {Reference} */ ProcedureRequest.prototype.subject = function() { if (this.json['subject']) { return new Reference(this.json['subject']); } }; /** The specific procedure that is ordered. Use text if the exact nature of the procedure can't be coded. @returns {CodeableConcept} */ ProcedureRequest.prototype.type = function() { if (this.json['type']) { return new CodeableConcept(this.json['type']); } }; /** The site where the procedure is to be performed. @returns {Array} an array of {@link CodeableConcept} objects */ ProcedureRequest.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 reason why the procedure is proposed or ordered. This procedure request may be motivated by a Condition for instance. @returns {Array} an array of {@link CodeableConcept} objects */ ProcedureRequest.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; } }; /** The timing schedule for the proposed or ordered procedure. 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 */ ProcedureRequest.prototype.timingDateTime = function() { if (this.json['timingDateTime']) { return DT.DateTime.parse(this.json['timingDateTime']); } }; /** The timing schedule for the proposed or ordered procedure. 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} */ ProcedureRequest.prototype.timingPeriod = function() { if (this.json['timingPeriod']) { return new Period(this.json['timingPeriod']); } }; /** The timing schedule for the proposed or ordered procedure. 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} */ ProcedureRequest.prototype.timingTiming = function() { if (this.json['timingTiming']) { return new Timing(this.json['timingTiming']); } }; /** The encounter within which the procedure proposal or request was created. @returns {Reference} */ ProcedureRequest.prototype.encounter = function() { if (this.json['encounter']) { return new Reference(this.json['encounter']); } }; /** E.g. surgeon, anaethetist, endoscopist. @returns {Reference} */ ProcedureRequest.prototype.performer = function() { if (this.json['performer']) { return new Reference(this.json['performer']); } }; /** The status of the order. @returns {Array} an array of {@link String} objects */ ProcedureRequest.prototype.status = function() { return this.json['status']; }; /** The status of the order. @returns {Array} an array of {@link String} objects */ ProcedureRequest.prototype.mode = function() { return this.json['mode']; }; /** Any other notes associated with this proposal or order - e.g., provider instructions. @returns {Array} an array of {@link String} objects */ ProcedureRequest.prototype.notes = function() { return this.json['notes']; }; /** If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. @returns {Array} an array of {@link boolean} objects */ ProcedureRequest.prototype.asNeededBoolean = function() { return this.json['asNeededBoolean']; }; /** If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. @returns {CodeableConcept} */ ProcedureRequest.prototype.asNeededCodeableConcept = function() { if (this.json['asNeededCodeableConcept']) { return new CodeableConcept(this.json['asNeededCodeableConcept']); } }; /** The time when the request was made. @returns {Array} an array of {@link Date} objects */ ProcedureRequest.prototype.orderedOn = function() { if (this.json['orderedOn']) { return DT.DateTime.parse(this.json['orderedOn']); } }; /** The healthcare professional responsible for proposing or ordering the procedure. @returns {Reference} */ ProcedureRequest.prototype.orderer = function() { if (this.json['orderer']) { return new Reference(this.json['orderer']); } }; /** The clinical priority associated with this order. @returns {Array} an array of {@link String} objects */ ProcedureRequest.prototype.priority = function() { return this.json['priority']; }; return ProcedureRequest; })(DomainResource); module.exports.ProcedureRequest = ProcedureRequest; }).call(this); //# sourceMappingURL=procedurerequest.js.map