UNPKG

@phema/cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

469 lines (343 loc) 12.8 kB
// Generated by CoffeeScript 1.12.7 (function() { var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, Composition, CompositionAttesterComponent, CompositionEventComponent, ContactPoint, DT, DomainResource, Element, ElementDefinition, Extension, HumanName, Identifier, Narrative, Parameters, Period, Quantity, Range, Ratio, Reference, Resource, SampledData, SectionComponent, 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 CompositionAttesterComponent @exports CompositionAttesterComponent as CompositionAttesterComponent */ CompositionAttesterComponent = (function(superClass) { extend(CompositionAttesterComponent, superClass); function CompositionAttesterComponent(json) { this.json = json; CompositionAttesterComponent.__super__.constructor.call(this, this.json); } /** The type of attestation the authenticator offers. @returns {Array} an array of {@link String} objects */ CompositionAttesterComponent.prototype.mode = function() { return this.json['mode']; }; /** When composition was attested by the party. @returns {Array} an array of {@link Date} objects */ CompositionAttesterComponent.prototype.time = function() { if (this.json['time']) { return DT.DateTime.parse(this.json['time']); } }; /** Who attested the composition in the specified way. @returns {Reference} */ CompositionAttesterComponent.prototype.party = function() { if (this.json['party']) { return new Reference(this.json['party']); } }; return CompositionAttesterComponent; })(BackboneElement); /** Embedded class @class CompositionEventComponent @exports CompositionEventComponent as CompositionEventComponent */ CompositionEventComponent = (function(superClass) { extend(CompositionEventComponent, superClass); function CompositionEventComponent(json) { this.json = json; CompositionEventComponent.__super__.constructor.call(this, this.json); } /** This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act. @returns {Array} an array of {@link CodeableConcept} objects */ CompositionEventComponent.prototype.code = function() { var i, item, len, ref, results; if (this.json['code']) { ref = this.json['code']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new CodeableConcept(item)); } return results; } }; /** The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time. @returns {Period} */ CompositionEventComponent.prototype.period = function() { if (this.json['period']) { return new Period(this.json['period']); } }; /** Full details for the event(s) the composition/documentation consents. @returns {Array} an array of {@link Reference} objects */ CompositionEventComponent.prototype.detail = function() { var i, item, len, ref, results; if (this.json['detail']) { ref = this.json['detail']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new Reference(item)); } return results; } }; return CompositionEventComponent; })(BackboneElement); /** Embedded class @class SectionComponent @exports SectionComponent as SectionComponent */ SectionComponent = (function(superClass) { extend(SectionComponent, superClass); function SectionComponent(json) { this.json = json; SectionComponent.__super__.constructor.call(this, this.json); } /** The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents. @returns {Array} an array of {@link String} objects */ SectionComponent.prototype.title = function() { return this.json['title']; }; /** A code identifying the kind of content contained within the section. This must be consistent with the section title. @returns {CodeableConcept} */ SectionComponent.prototype.code = function() { if (this.json['code']) { return new CodeableConcept(this.json['code']); } }; /** A nested sub-section within this section. @returns {Array} an array of {@link SectionComponent} objects */ SectionComponent.prototype.section = function() { var i, item, len, ref, results; if (this.json['section']) { ref = this.json['section']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new SectionComponent(item)); } return results; } }; /** The content (narrative and data) associated with the section. @returns {Reference} */ SectionComponent.prototype.content = function() { if (this.json['content']) { return new Reference(this.json['content']); } }; return SectionComponent; })(BackboneElement); /** A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. @class Composition @exports Composition as Composition */ Composition = (function(superClass) { extend(Composition, superClass); function Composition(json) { this.json = json; Composition.__super__.constructor.call(this, this.json); } /** Logical Identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time. @returns {Identifier} */ Composition.prototype.identifier = function() { if (this.json['identifier']) { return new Identifier(this.json['identifier']); } }; /** The composition editing time, when the composition was last logically changed by the author. @returns {Array} an array of {@link Date} objects */ Composition.prototype.date = function() { if (this.json['date']) { return DT.DateTime.parse(this.json['date']); } }; /** Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition. @returns {CodeableConcept} */ Composition.prototype.type = function() { if (this.json['type']) { return new CodeableConcept(this.json['type']); } }; /** A categorization for the type of the composition. This may be implied by or derived from the code specified in the Composition Type. @returns {CodeableConcept} */ Composition.prototype["class"] = function() { if (this.json['class']) { return new CodeableConcept(this.json['class']); } }; /** Official human-readable label for the composition. @returns {Array} an array of {@link String} objects */ Composition.prototype.title = function() { return this.json['title']; }; /** The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document. @returns {Array} an array of {@link String} objects */ Composition.prototype.status = function() { return this.json['status']; }; /** The code specifying the level of confidentiality of the Composition. @returns {Coding} */ Composition.prototype.confidentiality = function() { if (this.json['confidentiality']) { return new Coding(this.json['confidentiality']); } }; /** Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure). @returns {Reference} */ Composition.prototype.subject = function() { if (this.json['subject']) { return new Reference(this.json['subject']); } }; /** Identifies who is responsible for the information in the composition. (Not necessarily who typed it in.). @returns {Array} an array of {@link Reference} objects */ Composition.prototype.author = function() { var i, item, len, ref, results; if (this.json['author']) { ref = this.json['author']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new Reference(item)); } return results; } }; /** A participant who has attested to the accuracy of the composition/document. @returns {Array} an array of {@link CompositionAttesterComponent} objects */ Composition.prototype.attester = function() { var i, item, len, ref, results; if (this.json['attester']) { ref = this.json['attester']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new CompositionAttesterComponent(item)); } return results; } }; /** Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information. @returns {Reference} */ Composition.prototype.custodian = function() { if (this.json['custodian']) { return new Reference(this.json['custodian']); } }; /** The clinical service, such as a colonoscopy or an appendectomy, being documented. @returns {Array} an array of {@link CompositionEventComponent} objects */ Composition.prototype.event = function() { var i, item, len, ref, results; if (this.json['event']) { ref = this.json['event']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new CompositionEventComponent(item)); } return results; } }; /** Describes the clinical encounter or type of care this documentation is associated with. @returns {Reference} */ Composition.prototype.encounter = function() { if (this.json['encounter']) { return new Reference(this.json['encounter']); } }; /** The root of the sections that make up the composition. @returns {Array} an array of {@link SectionComponent} objects */ Composition.prototype.section = function() { var i, item, len, ref, results; if (this.json['section']) { ref = this.json['section']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new SectionComponent(item)); } return results; } }; return Composition; })(DomainResource); module.exports.Composition = Composition; }).call(this); //# sourceMappingURL=composition.js.map