UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

617 lines (455 loc) 15.7 kB
// Generated by CoffeeScript 1.9.3 (function() { var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DomainResource, Element, ElementDefinition, Encounter, EncounterHospitalizationAccomodationComponent, EncounterHospitalizationComponent, EncounterLocationComponent, EncounterParticipantComponent, 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 EncounterParticipantComponent @exports EncounterParticipantComponent as EncounterParticipantComponent */ EncounterParticipantComponent = (function(superClass) { extend(EncounterParticipantComponent, superClass); function EncounterParticipantComponent(json) { this.json = json; EncounterParticipantComponent.__super__.constructor.call(this, this.json); } /** Role of participant in encounter. @returns {Array} an array of {@link CodeableConcept} objects */ EncounterParticipantComponent.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; } }; /** Persons involved in the encounter other than the patient. @returns {Reference} */ EncounterParticipantComponent.prototype.individual = function() { if (this.json['individual']) { return new Reference(this.json['individual']); } }; return EncounterParticipantComponent; })(BackboneElement); /** Embedded class @class EncounterHospitalizationAccomodationComponent @exports EncounterHospitalizationAccomodationComponent as EncounterHospitalizationAccomodationComponent */ EncounterHospitalizationAccomodationComponent = (function(superClass) { extend(EncounterHospitalizationAccomodationComponent, superClass); function EncounterHospitalizationAccomodationComponent(json) { this.json = json; EncounterHospitalizationAccomodationComponent.__super__.constructor.call(this, this.json); } /** The bed that is assigned to the patient. @returns {Reference} */ EncounterHospitalizationAccomodationComponent.prototype.bed = function() { if (this.json['bed']) { return new Reference(this.json['bed']); } }; /** Period during which the patient was assigned the bed. @returns {Period} */ EncounterHospitalizationAccomodationComponent.prototype.period = function() { if (this.json['period']) { return new Period(this.json['period']); } }; return EncounterHospitalizationAccomodationComponent; })(BackboneElement); /** Embedded class @class EncounterHospitalizationComponent @exports EncounterHospitalizationComponent as EncounterHospitalizationComponent */ EncounterHospitalizationComponent = (function(superClass) { extend(EncounterHospitalizationComponent, superClass); function EncounterHospitalizationComponent(json) { this.json = json; EncounterHospitalizationComponent.__super__.constructor.call(this, this.json); } /** Pre-admission identifier. @returns {Identifier} */ EncounterHospitalizationComponent.prototype.preAdmissionIdentifier = function() { if (this.json['preAdmissionIdentifier']) { return new Identifier(this.json['preAdmissionIdentifier']); } }; /** The location from which the patient came before admission. @returns {Reference} */ EncounterHospitalizationComponent.prototype.origin = function() { if (this.json['origin']) { return new Reference(this.json['origin']); } }; /** From where patient was admitted (physician referral, transfer). @returns {CodeableConcept} */ EncounterHospitalizationComponent.prototype.admitSource = function() { if (this.json['admitSource']) { return new CodeableConcept(this.json['admitSource']); } }; /** Period during which the patient was admitted. @returns {Period} */ EncounterHospitalizationComponent.prototype.period = function() { if (this.json['period']) { return new Period(this.json['period']); } }; /** Where the patient stays during this encounter. @returns {Array} an array of {@link EncounterHospitalizationAccomodationComponent} objects */ EncounterHospitalizationComponent.prototype.accomodation = function() { var i, item, len, ref, results; if (this.json['accomodation']) { ref = this.json['accomodation']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new EncounterHospitalizationAccomodationComponent(item)); } return results; } }; /** Dietary restrictions for the patient. @returns {CodeableConcept} */ EncounterHospitalizationComponent.prototype.diet = function() { if (this.json['diet']) { return new CodeableConcept(this.json['diet']); } }; /** Special courtesies (VIP, board member). @returns {Array} an array of {@link CodeableConcept} objects */ EncounterHospitalizationComponent.prototype.specialCourtesy = function() { var i, item, len, ref, results; if (this.json['specialCourtesy']) { ref = this.json['specialCourtesy']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new CodeableConcept(item)); } return results; } }; /** Wheelchair, translator, stretcher, etc. @returns {Array} an array of {@link CodeableConcept} objects */ EncounterHospitalizationComponent.prototype.specialArrangement = function() { var i, item, len, ref, results; if (this.json['specialArrangement']) { ref = this.json['specialArrangement']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new CodeableConcept(item)); } return results; } }; /** Location to which the patient is discharged. @returns {Reference} */ EncounterHospitalizationComponent.prototype.destination = function() { if (this.json['destination']) { return new Reference(this.json['destination']); } }; /** Category or kind of location after discharge. @returns {CodeableConcept} */ EncounterHospitalizationComponent.prototype.dischargeDisposition = function() { if (this.json['dischargeDisposition']) { return new CodeableConcept(this.json['dischargeDisposition']); } }; /** The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete. @returns {Reference} */ EncounterHospitalizationComponent.prototype.dischargeDiagnosis = function() { if (this.json['dischargeDiagnosis']) { return new Reference(this.json['dischargeDiagnosis']); } }; /** Whether this hospitalization is a readmission. @returns {Array} an array of {@link boolean} objects */ EncounterHospitalizationComponent.prototype.reAdmission = function() { return this.json['reAdmission']; }; return EncounterHospitalizationComponent; })(BackboneElement); /** Embedded class @class EncounterLocationComponent @exports EncounterLocationComponent as EncounterLocationComponent */ EncounterLocationComponent = (function(superClass) { extend(EncounterLocationComponent, superClass); function EncounterLocationComponent(json) { this.json = json; EncounterLocationComponent.__super__.constructor.call(this, this.json); } /** The location where the encounter takes place. @returns {Reference} */ EncounterLocationComponent.prototype.location = function() { if (this.json['location']) { return new Reference(this.json['location']); } }; /** Time period during which the patient was present at the location. @returns {Period} */ EncounterLocationComponent.prototype.period = function() { if (this.json['period']) { return new Period(this.json['period']); } }; return EncounterLocationComponent; })(BackboneElement); /** An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. @class Encounter @exports Encounter as Encounter */ Encounter = (function(superClass) { extend(Encounter, superClass); function Encounter(json) { this.json = json; Encounter.__super__.constructor.call(this, this.json); } /** Identifier(s) by which this encounter is known. @returns {Array} an array of {@link Identifier} objects */ Encounter.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; } }; /** planned | in progress | onleave | finished | cancelled. @returns {Array} an array of {@link String} objects */ Encounter.prototype.status = function() { return this.json['status']; }; /** inpatient | outpatient | ambulatory | emergency +. @returns {Array} an array of {@link String} objects */ Encounter.prototype["class"] = function() { return this.json['class']; }; /** Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation). @returns {Array} an array of {@link CodeableConcept} objects */ Encounter.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; } }; /** The patient present at the encounter. @returns {Reference} */ Encounter.prototype.subject = function() { if (this.json['subject']) { return new Reference(this.json['subject']); } }; /** The main practitioner responsible for providing the service. @returns {Array} an array of {@link EncounterParticipantComponent} objects */ Encounter.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 EncounterParticipantComponent(item)); } return results; } }; /** The appointment that scheduled this encounter. @returns {Reference} */ Encounter.prototype.fulfills = function() { if (this.json['fulfills']) { return new Reference(this.json['fulfills']); } }; /** The start and end time of the encounter. @returns {Period} */ Encounter.prototype.period = function() { if (this.json['period']) { return new Period(this.json['period']); } }; /** Quantity of time the encounter lasted. This excludes the time during leaves of absence. @returns {Duration} */ Encounter.prototype.length = function() { if (this.json['length']) { return new Duration(this.json['length']); } }; /** Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis. @returns {CodeableConcept} */ Encounter.prototype.reason = function() { if (this.json['reason']) { return new CodeableConcept(this.json['reason']); } }; /** Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. @returns {Reference} */ Encounter.prototype.indication = function() { if (this.json['indication']) { return new Reference(this.json['indication']); } }; /** Indicates the urgency of the encounter. @returns {CodeableConcept} */ Encounter.prototype.priority = function() { if (this.json['priority']) { return new CodeableConcept(this.json['priority']); } }; /** Details about an admission to a clinic. @returns {EncounterHospitalizationComponent} */ Encounter.prototype.hospitalization = function() { if (this.json['hospitalization']) { return new EncounterHospitalizationComponent(this.json['hospitalization']); } }; /** List of locations at which the patient has been. @returns {Array} an array of {@link EncounterLocationComponent} objects */ Encounter.prototype.location = function() { var i, item, len, ref, results; if (this.json['location']) { ref = this.json['location']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new EncounterLocationComponent(item)); } return results; } }; /** Department or team providing care. @returns {Reference} */ Encounter.prototype.serviceProvider = function() { if (this.json['serviceProvider']) { return new Reference(this.json['serviceProvider']); } }; /** Another Encounter of which this encounter is a part of (administratively or in time). @returns {Reference} */ Encounter.prototype.partOf = function() { if (this.json['partOf']) { return new Reference(this.json['partOf']); } }; return Encounter; })(DomainResource); module.exports.Encounter = Encounter; }).call(this); //# sourceMappingURL=encounter.js.map