UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

412 lines (289 loc) 11.1 kB
// Generated by CoffeeScript 1.9.3 (function() { var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DomainResource, Element, ElementDefinition, Extension, HumanName, Identifier, MessageDestinationComponent, MessageHeader, MessageHeaderResponseComponent, MessageSourceComponent, 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 MessageHeaderResponseComponent @exports MessageHeaderResponseComponent as MessageHeaderResponseComponent */ MessageHeaderResponseComponent = (function(superClass) { extend(MessageHeaderResponseComponent, superClass); function MessageHeaderResponseComponent(json) { this.json = json; MessageHeaderResponseComponent.__super__.constructor.call(this, this.json); } /** The id of the message that this message is a response to. @returns {Array} an array of {@link String} objects */ MessageHeaderResponseComponent.prototype.identifier = function() { return this.json['identifier']; }; /** Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not. @returns {Array} an array of {@link String} objects */ MessageHeaderResponseComponent.prototype.code = function() { return this.json['code']; }; /** Full details of any issues found in the message. @returns {Reference} */ MessageHeaderResponseComponent.prototype.details = function() { if (this.json['details']) { return new Reference(this.json['details']); } }; return MessageHeaderResponseComponent; })(BackboneElement); /** Embedded class @class MessageSourceComponent @exports MessageSourceComponent as MessageSourceComponent */ MessageSourceComponent = (function(superClass) { extend(MessageSourceComponent, superClass); function MessageSourceComponent(json) { this.json = json; MessageSourceComponent.__super__.constructor.call(this, this.json); } /** Human-readable name for the source system. @returns {Array} an array of {@link String} objects */ MessageSourceComponent.prototype.name = function() { return this.json['name']; }; /** May include configuration or other information useful in debugging. @returns {Array} an array of {@link String} objects */ MessageSourceComponent.prototype.software = function() { return this.json['software']; }; /** Can convey versions of multiple systems in situations where a message passes through multiple hands. @returns {Array} an array of {@link String} objects */ MessageSourceComponent.prototype.version = function() { return this.json['version']; }; /** An e-mail, phone, website or other contact point to use to resolve issues with message communications. @returns {ContactPoint} */ MessageSourceComponent.prototype.contact = function() { if (this.json['contact']) { return new ContactPoint(this.json['contact']); } }; /** Identifies the routing target to send acknowledgements to. @returns {Array} an array of {@link String} objects */ MessageSourceComponent.prototype.endpoint = function() { return this.json['endpoint']; }; return MessageSourceComponent; })(BackboneElement); /** Embedded class @class MessageDestinationComponent @exports MessageDestinationComponent as MessageDestinationComponent */ MessageDestinationComponent = (function(superClass) { extend(MessageDestinationComponent, superClass); function MessageDestinationComponent(json) { this.json = json; MessageDestinationComponent.__super__.constructor.call(this, this.json); } /** Human-readable name for the target system. @returns {Array} an array of {@link String} objects */ MessageDestinationComponent.prototype.name = function() { return this.json['name']; }; /** Identifies the target end system in situations where the initial message transmission is to an intermediary system. @returns {Reference} */ MessageDestinationComponent.prototype.target = function() { if (this.json['target']) { return new Reference(this.json['target']); } }; /** Indicates where the message should be routed to. @returns {Array} an array of {@link String} objects */ MessageDestinationComponent.prototype.endpoint = function() { return this.json['endpoint']; }; return MessageDestinationComponent; })(BackboneElement); /** The header for a message exchange that is either requesting or responding to an action. The Reference(s) that are the subject of the action as well as other Information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle. @class MessageHeader @exports MessageHeader as MessageHeader */ MessageHeader = (function(superClass) { extend(MessageHeader, superClass); function MessageHeader(json) { this.json = json; MessageHeader.__super__.constructor.call(this, this.json); } /** The identifier of this message. @returns {Array} an array of {@link String} objects */ MessageHeader.prototype.identifier = function() { return this.json['identifier']; }; /** The time that the message was sent. @returns {Array} an array of {@link Date} objects */ MessageHeader.prototype.timestamp = function() { if (this.json['timestamp']) { return DT.DateTime.parse(this.json['timestamp']); } }; /** Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://hl7.org/fhir/message-type". @returns {Coding} */ MessageHeader.prototype.event = function() { if (this.json['event']) { return new Coding(this.json['event']); } }; /** Information about the message that this message is a response to. Only present if this message is a response. @returns {MessageHeaderResponseComponent} */ MessageHeader.prototype.response = function() { if (this.json['response']) { return new MessageHeaderResponseComponent(this.json['response']); } }; /** The source application from which this message originated. @returns {MessageSourceComponent} */ MessageHeader.prototype.source = function() { if (this.json['source']) { return new MessageSourceComponent(this.json['source']); } }; /** The destination application which the message is intended for. @returns {Array} an array of {@link MessageDestinationComponent} objects */ MessageHeader.prototype.destination = function() { var i, item, len, ref, results; if (this.json['destination']) { ref = this.json['destination']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new MessageDestinationComponent(item)); } return results; } }; /** The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions. @returns {Reference} */ MessageHeader.prototype.enterer = function() { if (this.json['enterer']) { return new Reference(this.json['enterer']); } }; /** The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions. @returns {Reference} */ MessageHeader.prototype.author = function() { if (this.json['author']) { return new Reference(this.json['author']); } }; /** Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient. @returns {Reference} */ MessageHeader.prototype.receiver = function() { if (this.json['receiver']) { return new Reference(this.json['receiver']); } }; /** The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party. @returns {Reference} */ MessageHeader.prototype.responsible = function() { if (this.json['responsible']) { return new Reference(this.json['responsible']); } }; /** Coded indication of the cause for the event - indicates a reason for the occurance of the event that is a focus of this message. @returns {CodeableConcept} */ MessageHeader.prototype.reason = function() { if (this.json['reason']) { return new CodeableConcept(this.json['reason']); } }; /** The actual data of the message - a reference to the root/focus class of the event. @returns {Array} an array of {@link Reference} objects */ MessageHeader.prototype.data = function() { var i, item, len, ref, results; if (this.json['data']) { ref = this.json['data']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new Reference(item)); } return results; } }; return MessageHeader; })(DomainResource); module.exports.MessageHeader = MessageHeader; }).call(this); //# sourceMappingURL=messageheader.js.map