cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
583 lines (421 loc) • 15.9 kB
JavaScript
// Generated by CoffeeScript 1.9.3
(function() {
var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DocumentReference, DocumentReferenceContextComponent, DocumentReferenceRelatesToComponent, DocumentReferenceServiceComponent, DocumentReferenceServiceParameterComponent, 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 DocumentReferenceRelatesToComponent
@exports DocumentReferenceRelatesToComponent as DocumentReferenceRelatesToComponent
*/
DocumentReferenceRelatesToComponent = (function(superClass) {
extend(DocumentReferenceRelatesToComponent, superClass);
function DocumentReferenceRelatesToComponent(json) {
this.json = json;
DocumentReferenceRelatesToComponent.__super__.constructor.call(this, this.json);
}
/**
The type of relationship that this document has with anther document.
@returns {Array} an array of {@link String} objects
*/
DocumentReferenceRelatesToComponent.prototype.code = function() {
return this.json['code'];
};
/**
The target document of this relationship.
@returns {Reference}
*/
DocumentReferenceRelatesToComponent.prototype.target = function() {
if (this.json['target']) {
return new Reference(this.json['target']);
}
};
return DocumentReferenceRelatesToComponent;
})(BackboneElement);
/**
Embedded class
@class DocumentReferenceServiceParameterComponent
@exports DocumentReferenceServiceParameterComponent as DocumentReferenceServiceParameterComponent
*/
DocumentReferenceServiceParameterComponent = (function(superClass) {
extend(DocumentReferenceServiceParameterComponent, superClass);
function DocumentReferenceServiceParameterComponent(json) {
this.json = json;
DocumentReferenceServiceParameterComponent.__super__.constructor.call(this, this.json);
}
/**
The name of a parameter.
@returns {Array} an array of {@link String} objects
*/
DocumentReferenceServiceParameterComponent.prototype.name = function() {
return this.json['name'];
};
/**
The value of the named parameter.
@returns {Array} an array of {@link String} objects
*/
DocumentReferenceServiceParameterComponent.prototype.value = function() {
return this.json['value'];
};
return DocumentReferenceServiceParameterComponent;
})(BackboneElement);
/**
Embedded class
@class DocumentReferenceServiceComponent
@exports DocumentReferenceServiceComponent as DocumentReferenceServiceComponent
*/
DocumentReferenceServiceComponent = (function(superClass) {
extend(DocumentReferenceServiceComponent, superClass);
function DocumentReferenceServiceComponent(json) {
this.json = json;
DocumentReferenceServiceComponent.__super__.constructor.call(this, this.json);
}
/**
The type of the service that can be used to access the documents.
@returns {CodeableConcept}
*/
DocumentReferenceServiceComponent.prototype.type = function() {
if (this.json['type']) {
return new CodeableConcept(this.json['type']);
}
};
/**
Where the service end-point is located.
@returns {Array} an array of {@link String} objects
*/
DocumentReferenceServiceComponent.prototype.address = function() {
return this.json['address'];
};
/**
A list of named parameters that is used in the service call.
@returns {Array} an array of {@link DocumentReferenceServiceParameterComponent} objects
*/
DocumentReferenceServiceComponent.prototype.parameter = function() {
var i, item, len, ref, results;
if (this.json['parameter']) {
ref = this.json['parameter'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new DocumentReferenceServiceParameterComponent(item));
}
return results;
}
};
return DocumentReferenceServiceComponent;
})(BackboneElement);
/**
Embedded class
@class DocumentReferenceContextComponent
@exports DocumentReferenceContextComponent as DocumentReferenceContextComponent
*/
DocumentReferenceContextComponent = (function(superClass) {
extend(DocumentReferenceContextComponent, superClass);
function DocumentReferenceContextComponent(json) {
this.json = json;
DocumentReferenceContextComponent.__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
*/
DocumentReferenceContextComponent.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 CodeableConcept(item));
}
return results;
}
};
/**
The time period over which the service that is described by the document was provided.
@returns {Period}
*/
DocumentReferenceContextComponent.prototype.period = function() {
if (this.json['period']) {
return new Period(this.json['period']);
}
};
/**
The kind of facility where the patient was seen.
@returns {CodeableConcept}
*/
DocumentReferenceContextComponent.prototype.facilityType = function() {
if (this.json['facilityType']) {
return new CodeableConcept(this.json['facilityType']);
}
};
return DocumentReferenceContextComponent;
})(BackboneElement);
/**
A reference to a document.
@class DocumentReference
@exports DocumentReference as DocumentReference
*/
DocumentReference = (function(superClass) {
extend(DocumentReference, superClass);
function DocumentReference(json) {
this.json = json;
DocumentReference.__super__.constructor.call(this, this.json);
}
/**
Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.
@returns {Identifier}
*/
DocumentReference.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
*/
DocumentReference.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 document is about. The document 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).
@returns {Reference}
*/
DocumentReference.prototype.subject = function() {
if (this.json['subject']) {
return new Reference(this.json['subject']);
}
};
/**
Specifies the particular kind of document (e.g. Patient Summary, Discharge Summary, Prescription, etc.).
@returns {CodeableConcept}
*/
DocumentReference.prototype.type = function() {
if (this.json['type']) {
return new CodeableConcept(this.json['type']);
}
};
/**
A categorization for the type of the document. This may be implied by or derived from the code specified in the Document Type.
@returns {CodeableConcept}
*/
DocumentReference.prototype["class"] = function() {
if (this.json['class']) {
return new CodeableConcept(this.json['class']);
}
};
/**
Identifies who is responsible for adding the information to the document.
@returns {Array} an array of {@link Reference} objects
*/
DocumentReference.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;
}
};
/**
Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.
@returns {Reference}
*/
DocumentReference.prototype.custodian = function() {
if (this.json['custodian']) {
return new Reference(this.json['custodian']);
}
};
/**
A reference to a domain or server that manages policies under which the document is accessed and/or made available.
@returns {Array} an array of {@link String} objects
*/
DocumentReference.prototype.policyManager = function() {
return this.json['policyManager'];
};
/**
Which person or organization authenticates that this document is valid.
@returns {Reference}
*/
DocumentReference.prototype.authenticator = function() {
if (this.json['authenticator']) {
return new Reference(this.json['authenticator']);
}
};
/**
When the document was created.
@returns {Array} an array of {@link Date} objects
*/
DocumentReference.prototype.created = function() {
if (this.json['created']) {
return DT.DateTime.parse(this.json['created']);
}
};
/**
When the document reference was created.
@returns {Array} an array of {@link Date} objects
*/
DocumentReference.prototype.indexed = function() {
if (this.json['indexed']) {
return DT.DateTime.parse(this.json['indexed']);
}
};
/**
The status of this document reference.
@returns {Array} an array of {@link String} objects
*/
DocumentReference.prototype.status = function() {
return this.json['status'];
};
/**
The status of the underlying document.
@returns {CodeableConcept}
*/
DocumentReference.prototype.docStatus = function() {
if (this.json['docStatus']) {
return new CodeableConcept(this.json['docStatus']);
}
};
/**
Relationships that this document has with other document references that already exist.
@returns {Array} an array of {@link DocumentReferenceRelatesToComponent} objects
*/
DocumentReference.prototype.relatesTo = function() {
var i, item, len, ref, results;
if (this.json['relatesTo']) {
ref = this.json['relatesTo'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new DocumentReferenceRelatesToComponent(item));
}
return results;
}
};
/**
Human-readable description of the source document. This is sometimes known as the "title".
@returns {Array} an array of {@link String} objects
*/
DocumentReference.prototype.description = function() {
return this.json['description'];
};
/**
A code specifying the level of confidentiality of the XDS Document.
@returns {Array} an array of {@link CodeableConcept} objects
*/
DocumentReference.prototype.confidentiality = function() {
var i, item, len, ref, results;
if (this.json['confidentiality']) {
ref = this.json['confidentiality'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
The primary language in which the source document is written.
@returns {Array} an array of {@link String} objects
*/
DocumentReference.prototype.primaryLanguage = function() {
return this.json['primaryLanguage'];
};
/**
The mime type of the source document.
@returns {Array} an array of {@link String} objects
*/
DocumentReference.prototype.mimeType = function() {
return this.json['mimeType'];
};
/**
An identifier that identifies that the format and content of the document conforms to additional rules beyond the base format indicated in the mimeType.
@returns {Array} an array of {@link String} objects
*/
DocumentReference.prototype.format = function() {
return this.json['format'];
};
/**
The size of the source document this reference refers to in bytes.
@returns {Array} an array of {@link Number} objects
*/
DocumentReference.prototype.size = function() {
return this.json['size'];
};
/**
A hash of the source document to ensure that changes have not occurred.
@returns {Array} an array of {@link } objects
*/
DocumentReference.prototype.hash = function() {
return this.json['hash'];
};
/**
A url at which the document can be accessed.
@returns {Array} an array of {@link String} objects
*/
DocumentReference.prototype.location = function() {
return this.json['location'];
};
/**
A description of a service call that can be used to retrieve the document.
@returns {DocumentReferenceServiceComponent}
*/
DocumentReference.prototype.service = function() {
if (this.json['service']) {
return new DocumentReferenceServiceComponent(this.json['service']);
}
};
/**
The clinical context in which the document was prepared.
@returns {DocumentReferenceContextComponent}
*/
DocumentReference.prototype.context = function() {
if (this.json['context']) {
return new DocumentReferenceContextComponent(this.json['context']);
}
};
return DocumentReference;
})(DomainResource);
module.exports.DocumentReference = DocumentReference;
}).call(this);
//# sourceMappingURL=documentreference.js.map