UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

268 lines (193 loc) 7.63 kB
// Generated by CoffeeScript 1.9.3 (function() { var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DocumentManifest, 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; /** A manifest that defines a set of documents. @class DocumentManifest @exports DocumentManifest as DocumentManifest */ DocumentManifest = (function(superClass) { extend(DocumentManifest, superClass); function DocumentManifest(json) { this.json = json; DocumentManifest.__super__.constructor.call(this, this.json); } /** A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts. @returns {Identifier} */ DocumentManifest.prototype.masterIdentifier = function() { if (this.json['masterIdentifier']) { return new Identifier(this.json['masterIdentifier']); } }; /** Other identifiers associated with the document, including version independent, source record and workflow related identifiers. @returns {Array} an array of {@link Identifier} objects */ DocumentManifest.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; } }; /** Who or what the set of documents is about. The documents 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 farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case). @returns {Array} an array of {@link Reference} objects */ DocumentManifest.prototype.subject = function() { var i, item, len, ref, results; if (this.json['subject']) { ref = this.json['subject']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new Reference(item)); } return results; } }; /** A patient, practitioner, or organization for which this set of documents is intended. @returns {Array} an array of {@link Reference} objects */ DocumentManifest.prototype.recipient = function() { var i, item, len, ref, results; if (this.json['recipient']) { ref = this.json['recipient']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new Reference(item)); } return results; } }; /** Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider. @returns {CodeableConcept} */ DocumentManifest.prototype.type = function() { if (this.json['type']) { return new CodeableConcept(this.json['type']); } }; /** Identifies who is responsible for adding the information to the document. @returns {Array} an array of {@link Reference} objects */ DocumentManifest.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; } }; /** When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated etc). @returns {Array} an array of {@link Date} objects */ DocumentManifest.prototype.created = function() { if (this.json['created']) { return DT.DateTime.parse(this.json['created']); } }; /** Identifies the source system, application, or software that produced the document manifest. @returns {Array} an array of {@link String} objects */ DocumentManifest.prototype.source = function() { return this.json['source']; }; /** The status of this document manifest. @returns {Array} an array of {@link String} objects */ DocumentManifest.prototype.status = function() { return this.json['status']; }; /** Whether this document manifest replaces another. @returns {Reference} */ DocumentManifest.prototype.supercedes = function() { if (this.json['supercedes']) { return new Reference(this.json['supercedes']); } }; /** Human-readable description of the source document. This is sometimes known as the "title". @returns {Array} an array of {@link String} objects */ DocumentManifest.prototype.description = function() { return this.json['description']; }; /** A code specifying the level of confidentiality of this set of Documents. @returns {CodeableConcept} */ DocumentManifest.prototype.confidentiality = function() { if (this.json['confidentiality']) { return new CodeableConcept(this.json['confidentiality']); } }; /** The list of resources that describe the parts of this document reference. Usually, these would be document references, but direct references to binary attachments and images are also allowed. @returns {Array} an array of {@link Reference} objects */ DocumentManifest.prototype.content = function() { var i, item, len, ref, results; if (this.json['content']) { ref = this.json['content']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new Reference(item)); } return results; } }; return DocumentManifest; })(DomainResource); module.exports.DocumentManifest = DocumentManifest; }).call(this); //# sourceMappingURL=documentmanifest.js.map