UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

346 lines (247 loc) 9.43 kB
// Generated by CoffeeScript 1.9.3 (function() { var Address, Appointment, AppointmentParticipantComponent, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, 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 AppointmentParticipantComponent @exports AppointmentParticipantComponent as AppointmentParticipantComponent */ AppointmentParticipantComponent = (function(superClass) { extend(AppointmentParticipantComponent, superClass); function AppointmentParticipantComponent(json) { this.json = json; AppointmentParticipantComponent.__super__.constructor.call(this, this.json); } /** Role of participant in the appointment. @returns {Array} an array of {@link CodeableConcept} objects */ AppointmentParticipantComponent.prototype.type = function() { var i, item, len, ref, results; if (this.json['type']) { ref = this.json['type']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new CodeableConcept(item)); } return results; } }; /** A Person of device that is participating in the appointment, usually Practitioner, Patient, RelatedPerson or Device. @returns {Reference} */ AppointmentParticipantComponent.prototype.actor = function() { if (this.json['actor']) { return new Reference(this.json['actor']); } }; /** Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present. @returns {Array} an array of {@link String} objects */ AppointmentParticipantComponent.prototype.required = function() { return this.json['required']; }; /** Participation status of the Patient. @returns {Array} an array of {@link String} objects */ AppointmentParticipantComponent.prototype.status = function() { return this.json['status']; }; return AppointmentParticipantComponent; })(BackboneElement); /** A scheduled healthcare event for a patient and/or practitioner(s) where a service may take place at a specific date/time. @class Appointment @exports Appointment as Appointment */ Appointment = (function(superClass) { extend(Appointment, superClass); function Appointment(json) { this.json = json; Appointment.__super__.constructor.call(this, this.json); } /** This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). @returns {Array} an array of {@link Identifier} objects */ Appointment.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 priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority) (Need to change back to CodeableConcept). @returns {Array} an array of {@link Number} objects */ Appointment.prototype.priority = function() { return this.json['priority']; }; /** Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status. @returns {Array} an array of {@link String} objects */ Appointment.prototype.status = function() { return this.json['status']; }; /** The type of appointments that is being booked (ideally this would be an identifiable service - which is at a location, rather than the location itself). @returns {CodeableConcept} */ Appointment.prototype.type = function() { if (this.json['type']) { return new CodeableConcept(this.json['type']); } }; /** The reason that this appointment is being scheduled, this is more clinical than administrative. @returns {CodeableConcept} */ Appointment.prototype.reason = function() { if (this.json['reason']) { return new CodeableConcept(this.json['reason']); } }; /** The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field. @returns {Array} an array of {@link String} objects */ Appointment.prototype.description = function() { return this.json['description']; }; /** Date/Time that the appointment is to take place. @returns {Array} an array of {@link Date} objects */ Appointment.prototype.start = function() { if (this.json['start']) { return DT.DateTime.parse(this.json['start']); } }; /** Date/Time that the appointment is to conclude. @returns {Array} an array of {@link Date} objects */ Appointment.prototype.end = function() { if (this.json['end']) { return DT.DateTime.parse(this.json['end']); } }; /** The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot. @returns {Array} an array of {@link Reference} objects */ Appointment.prototype.slot = function() { var i, item, len, ref, results; if (this.json['slot']) { ref = this.json['slot']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new Reference(item)); } return results; } }; /** The primary location that this appointment is to take place. @returns {Reference} */ Appointment.prototype.location = function() { if (this.json['location']) { return new Reference(this.json['location']); } }; /** Additional comments about the appointment. @returns {Array} an array of {@link String} objects */ Appointment.prototype.comment = function() { return this.json['comment']; }; /** An Order that lead to the creation of this appointment. @returns {Reference} */ Appointment.prototype.order = function() { if (this.json['order']) { return new Reference(this.json['order']); } }; /** List of participants involved in the appointment. @returns {Array} an array of {@link AppointmentParticipantComponent} objects */ Appointment.prototype.participant = function() { var i, item, len, ref, results; if (this.json['participant']) { ref = this.json['participant']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new AppointmentParticipantComponent(item)); } return results; } }; /** Who recorded the appointment. @returns {Reference} */ Appointment.prototype.lastModifiedBy = function() { if (this.json['lastModifiedBy']) { return new Reference(this.json['lastModifiedBy']); } }; /** Date when the appointment was recorded. @returns {Array} an array of {@link Date} objects */ Appointment.prototype.lastModified = function() { if (this.json['lastModified']) { return DT.DateTime.parse(this.json['lastModified']); } }; return Appointment; })(DomainResource); module.exports.Appointment = Appointment; }).call(this); //# sourceMappingURL=appointment.js.map