@phema/cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
1,820 lines (1,289 loc) • 60.8 kB
JavaScript
// Generated by CoffeeScript 1.12.7
(function() {
var Address, Attachment, BackboneElement, Base, CodeableConcept, Coding, ContactPoint, DT, DomainResource, Element, ElementDefinition, ElementDefinitionBindingComponent, ElementDefinitionConstraintComponent, ElementDefinitionMappingComponent, ElementDefinitionSlicingComponent, Extension, HumanName, Identifier, Narrative, Parameters, ParametersParameterComponent, Period, Quantity, Range, Ratio, Reference, Resource, ResourceMetaComponent, SampledData, Timing, TimingRepeatComponent, TypeRefComponent,
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;
Base = (function() {
function Base(json) {
this.json = json;
}
return Base;
})();
module.exports.Base = Base;
DT = require('../cql-datatypes');
/**
Base definition for all elements in a resource.
@class Element
@exports Element as Element
*/
Element = (function(superClass) {
extend(Element, superClass);
function Element(json) {
this.json = json;
Element.__super__.constructor.call(this, this.json);
}
/**
unique id for the element within a resource (for internal references).
@returns {Array} an array of {@link String} objects
*/
Element.prototype.id = function() {
return this.json['id'];
};
/**
May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
@returns {Array} an array of {@link Extension} objects
*/
Element.prototype.extension = function() {
var i, item, len, ref, results;
if (this.json['extension']) {
ref = this.json['extension'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Extension(item));
}
return results;
}
};
return Element;
})(Base);
module.exports.Element = Element;
/**
Base definition for all elements that are defined inside a resource - but not those in a data type.
@class BackboneElement
@exports BackboneElement as BackboneElement
*/
BackboneElement = (function(superClass) {
extend(BackboneElement, superClass);
function BackboneElement(json) {
this.json = json;
BackboneElement.__super__.constructor.call(this, this.json);
}
/**
May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.
@returns {Array} an array of {@link Extension} objects
*/
BackboneElement.prototype.modifierExtension = function() {
var i, item, len, ref, results;
if (this.json['modifierExtension']) {
ref = this.json['modifierExtension'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Extension(item));
}
return results;
}
};
return BackboneElement;
})(Element);
module.exports.BackboneElement = BackboneElement;
/**
Optional Extensions Element - found in all resources.
@class Extension
@exports Extension as Extension
*/
Extension = (function(superClass) {
extend(Extension, superClass);
function Extension(json) {
this.json = json;
Extension.__super__.constructor.call(this, this.json);
}
/**
Source of the definition for the extension code - a logical name or a URL.
@returns {Array} an array of {@link String} objects
*/
Extension.prototype.url = function() {
return this.json['url'];
};
/**
Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).
@returns {Array} an array of {@link } objects
*/
Extension.prototype.value = function() {
return this.json['value'];
};
return Extension;
})(Element);
module.exports.Extension = Extension;
/**
A human-readable formatted text, including images.
@class Narrative
@exports Narrative as Narrative
*/
Narrative = (function(superClass) {
extend(Narrative, superClass);
function Narrative(json) {
this.json = json;
Narrative.__super__.constructor.call(this, this.json);
}
/**
The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.
@returns {Array} an array of {@link String} objects
*/
Narrative.prototype.status = function() {
return this.json['status'];
};
/**
The actual narrative content, a stripped down version of XHTML.
@returns {xhtml}
*/
Narrative.prototype.div = function() {
if (this.json['div']) {
return new xhtml(this.json['div']);
}
};
return Narrative;
})(Element);
module.exports.Narrative = Narrative;
/**
A time period defined by a start and end date and optionally time.
@class Period
@exports Period as Period
*/
Period = (function(superClass) {
extend(Period, superClass);
function Period(json) {
this.json = json;
Period.__super__.constructor.call(this, this.json);
}
/**
The start of the period. The boundary is inclusive.
@returns {Array} an array of {@link Date} objects
*/
Period.prototype.start = function() {
if (this.json['start']) {
return DT.DateTime.parse(this.json['start']);
}
};
/**
The end of the period. If the end of the period is missing, it means that the period is ongoing.
@returns {Array} an array of {@link Date} objects
*/
Period.prototype.end = function() {
if (this.json['end']) {
return DT.DateTime.parse(this.json['end']);
}
};
return Period;
})(Element);
module.exports.Period = Period;
/**
A reference to a code defined by a terminology system.
@class Coding
@exports Coding as Coding
*/
Coding = (function(superClass) {
extend(Coding, superClass);
function Coding(json) {
this.json = json;
Coding.__super__.constructor.call(this, this.json);
}
/**
The identification of the code system that defines the meaning of the symbol in the code.
@returns {Array} an array of {@link String} objects
*/
Coding.prototype.system = function() {
return this.json['system'];
};
/**
The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.
@returns {Array} an array of {@link String} objects
*/
Coding.prototype.version = function() {
return this.json['version'];
};
/**
A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).
@returns {Array} an array of {@link String} objects
*/
Coding.prototype.code = function() {
return this.json['code'];
};
/**
A representation of the meaning of the code in the system, following the rules of the system.
@returns {Array} an array of {@link String} objects
*/
Coding.prototype.display = function() {
return this.json['display'];
};
/**
Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays).
@returns {Array} an array of {@link boolean} objects
*/
Coding.prototype.primary = function() {
return this.json['primary'];
};
/**
The set of possible coded values this coding was chosen from or constrained by.
@returns {Reference}
*/
Coding.prototype.valueSet = function() {
if (this.json['valueSet']) {
return new Reference(this.json['valueSet']);
}
};
return Coding;
})(Element);
module.exports.Coding = Coding;
/**
A set of ordered Quantities defined by a low and high limit.
@class Range
@exports Range as Range
*/
Range = (function(superClass) {
extend(Range, superClass);
function Range(json) {
this.json = json;
Range.__super__.constructor.call(this, this.json);
}
/**
The low limit. The boundary is inclusive.
@returns {Quantity}
*/
Range.prototype.low = function() {
if (this.json['low']) {
return new Quantity(this.json['low']);
}
};
/**
The high limit. The boundary is inclusive.
@returns {Quantity}
*/
Range.prototype.high = function() {
if (this.json['high']) {
return new Quantity(this.json['high']);
}
};
return Range;
})(Element);
module.exports.Range = Range;
/**
A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.
@class Quantity
@exports Quantity as Quantity
*/
Quantity = (function(superClass) {
extend(Quantity, superClass);
function Quantity(json) {
this.json = json;
Quantity.__super__.constructor.call(this, this.json);
}
/**
The value of the measured amount. The value includes an implicit precision in the presentation of the value.
@returns {Array} an array of {@link Number} objects
*/
Quantity.prototype.value = function() {
return this.json['value'];
};
/**
How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is "<" , then the real value is < stated value.
@returns {Array} an array of {@link String} objects
*/
Quantity.prototype.comparator = function() {
return this.json['comparator'];
};
/**
A human-readable form of the units.
@returns {Array} an array of {@link String} objects
*/
Quantity.prototype.units = function() {
return this.json['units'];
};
/**
The identification of the system that provides the coded form of the unit.
@returns {Array} an array of {@link String} objects
*/
Quantity.prototype.system = function() {
return this.json['system'];
};
/**
A computer processable form of the units in some unit representation system.
@returns {Array} an array of {@link String} objects
*/
Quantity.prototype.code = function() {
return this.json['code'];
};
return Quantity;
})(Element);
module.exports.Quantity = Quantity;
/**
For referring to data content defined in other formats.
@class Attachment
@exports Attachment as Attachment
*/
Attachment = (function(superClass) {
extend(Attachment, superClass);
function Attachment(json) {
this.json = json;
Attachment.__super__.constructor.call(this, this.json);
}
/**
Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.
@returns {Array} an array of {@link String} objects
*/
Attachment.prototype.contentType = function() {
return this.json['contentType'];
};
/**
The human language of the content. The value can be any valid value according to BCP 47.
@returns {Array} an array of {@link String} objects
*/
Attachment.prototype.language = function() {
return this.json['language'];
};
/**
The actual data of the attachment - a sequence of bytes. In XML, represented using base64.
@returns {Array} an array of {@link } objects
*/
Attachment.prototype.data = function() {
return this.json['data'];
};
/**
An alternative location where the data can be accessed.
@returns {Array} an array of {@link String} objects
*/
Attachment.prototype.url = function() {
return this.json['url'];
};
/**
The number of bytes of data that make up this attachment.
@returns {Array} an array of {@link Number} objects
*/
Attachment.prototype.size = function() {
return this.json['size'];
};
/**
The calculated hash of the data using SHA-1. Represented using base64.
@returns {Array} an array of {@link } objects
*/
Attachment.prototype.hash = function() {
return this.json['hash'];
};
/**
A label or set of text to display in place of the data.
@returns {Array} an array of {@link String} objects
*/
Attachment.prototype.title = function() {
return this.json['title'];
};
return Attachment;
})(Element);
module.exports.Attachment = Attachment;
/**
A relationship of two Quantity values - expressed as a numerator and a denominator.
@class Ratio
@exports Ratio as Ratio
*/
Ratio = (function(superClass) {
extend(Ratio, superClass);
function Ratio(json) {
this.json = json;
Ratio.__super__.constructor.call(this, this.json);
}
/**
The value of the numerator.
@returns {Quantity}
*/
Ratio.prototype.numerator = function() {
if (this.json['numerator']) {
return new Quantity(this.json['numerator']);
}
};
/**
The value of the denominator.
@returns {Quantity}
*/
Ratio.prototype.denominator = function() {
if (this.json['denominator']) {
return new Quantity(this.json['denominator']);
}
};
return Ratio;
})(Element);
module.exports.Ratio = Ratio;
/**
A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
@class SampledData
@exports SampledData as SampledData
*/
SampledData = (function(superClass) {
extend(SampledData, superClass);
function SampledData(json) {
this.json = json;
SampledData.__super__.constructor.call(this, this.json);
}
/**
The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.
@returns {Quantity}
*/
SampledData.prototype.origin = function() {
if (this.json['origin']) {
return new Quantity(this.json['origin']);
}
};
/**
The length of time between sampling times, measured in milliseconds.
@returns {Array} an array of {@link Number} objects
*/
SampledData.prototype.period = function() {
return this.json['period'];
};
/**
A correction factor that is applied to the sampled data points before they are added to the origin.
@returns {Array} an array of {@link Number} objects
*/
SampledData.prototype.factor = function() {
return this.json['factor'];
};
/**
The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit).
@returns {Array} an array of {@link Number} objects
*/
SampledData.prototype.lowerLimit = function() {
return this.json['lowerLimit'];
};
/**
The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit).
@returns {Array} an array of {@link Number} objects
*/
SampledData.prototype.upperLimit = function() {
return this.json['upperLimit'];
};
/**
The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.
@returns {Array} an array of {@link Number} objects
*/
SampledData.prototype.dimensions = function() {
return this.json['dimensions'];
};
/**
A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value.
@returns {Array} an array of {@link String} objects
*/
SampledData.prototype.data = function() {
return this.json['data'];
};
return SampledData;
})(Element);
module.exports.SampledData = SampledData;
/**
A reference from one resource to another.
@class Reference
@exports Reference as Reference
*/
Reference = (function(superClass) {
extend(Reference, superClass);
function Reference(json) {
this.json = json;
Reference.__super__.constructor.call(this, this.json);
}
/**
A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
@returns {Array} an array of {@link String} objects
*/
Reference.prototype.reference = function() {
return this.json['reference'];
};
/**
Plain text narrative that identifies the resource in addition to the resource reference.
@returns {Array} an array of {@link String} objects
*/
Reference.prototype.display = function() {
return this.json['display'];
};
return Reference;
})(Element);
module.exports.Reference = Reference;
/**
A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
@class CodeableConcept
@exports CodeableConcept as CodeableConcept
*/
CodeableConcept = (function(superClass) {
extend(CodeableConcept, superClass);
function CodeableConcept(json) {
this.json = json;
CodeableConcept.__super__.constructor.call(this, this.json);
}
/**
A reference to a code defined by a terminology system.
@returns {Array} an array of {@link Coding} objects
*/
CodeableConcept.prototype.coding = function() {
var i, item, len, ref, results;
if (this.json['coding']) {
ref = this.json['coding'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Coding(item));
}
return results;
}
};
/**
A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.
@returns {Array} an array of {@link String} objects
*/
CodeableConcept.prototype.text = function() {
return this.json['text'];
};
return CodeableConcept;
})(Element);
module.exports.CodeableConcept = CodeableConcept;
/**
A technical identifier - identifies some entity uniquely and unambiguously.
@class Identifier
@exports Identifier as Identifier
*/
Identifier = (function(superClass) {
extend(Identifier, superClass);
function Identifier(json) {
this.json = json;
Identifier.__super__.constructor.call(this, this.json);
}
/**
The purpose of this identifier.
@returns {Array} an array of {@link String} objects
*/
Identifier.prototype.use = function() {
return this.json['use'];
};
/**
A text string for the identifier that can be displayed to a human so they can recognize the identifier.
@returns {Array} an array of {@link String} objects
*/
Identifier.prototype.label = function() {
return this.json['label'];
};
/**
Establishes the namespace in which set of possible id values is unique.
@returns {Array} an array of {@link String} objects
*/
Identifier.prototype.system = function() {
return this.json['system'];
};
/**
The portion of the identifier typically displayed to the user and which is unique within the context of the system.
@returns {Array} an array of {@link String} objects
*/
Identifier.prototype.value = function() {
return this.json['value'];
};
/**
Time period during which identifier is/was valid for use.
@returns {Period}
*/
Identifier.prototype.period = function() {
if (this.json['period']) {
return new Period(this.json['period']);
}
};
/**
Organization that issued/manages the identifier.
@returns {Reference}
*/
Identifier.prototype.assigner = function() {
if (this.json['assigner']) {
return new Reference(this.json['assigner']);
}
};
return Identifier;
})(Element);
module.exports.Identifier = Identifier;
/**
Embedded class
@class ElementDefinitionSlicingComponent
@exports ElementDefinitionSlicingComponent as ElementDefinitionSlicingComponent
*/
ElementDefinitionSlicingComponent = (function(superClass) {
extend(ElementDefinitionSlicingComponent, superClass);
function ElementDefinitionSlicingComponent(json) {
this.json = json;
ElementDefinitionSlicingComponent.__super__.constructor.call(this, this.json);
}
/**
Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionSlicingComponent.prototype.discriminator = function() {
return this.json['discriminator'];
};
/**
A humane readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionSlicingComponent.prototype.description = function() {
return this.json['description'];
};
/**
If the matching elements have to occur in the same order as defined in the profile.
@returns {Array} an array of {@link boolean} objects
*/
ElementDefinitionSlicingComponent.prototype.ordered = function() {
return this.json['ordered'];
};
/**
Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionSlicingComponent.prototype.rules = function() {
return this.json['rules'];
};
return ElementDefinitionSlicingComponent;
})(Element);
/**
Embedded class
@class TypeRefComponent
@exports TypeRefComponent as TypeRefComponent
*/
TypeRefComponent = (function(superClass) {
extend(TypeRefComponent, superClass);
function TypeRefComponent(json) {
this.json = json;
TypeRefComponent.__super__.constructor.call(this, this.json);
}
/**
Name of Data type or Resource that is a(or the) type used for this element.
@returns {Array} an array of {@link String} objects
*/
TypeRefComponent.prototype.code = function() {
return this.json['code'];
};
/**
Identifies a profile structure that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile.
@returns {Array} an array of {@link String} objects
*/
TypeRefComponent.prototype.profile = function() {
return this.json['profile'];
};
/**
If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.
@returns {Array} an array of {@link String} objects
*/
TypeRefComponent.prototype.aggregation = function() {
return this.json['aggregation'];
};
return TypeRefComponent;
})(Element);
/**
Embedded class
@class ElementDefinitionConstraintComponent
@exports ElementDefinitionConstraintComponent as ElementDefinitionConstraintComponent
*/
ElementDefinitionConstraintComponent = (function(superClass) {
extend(ElementDefinitionConstraintComponent, superClass);
function ElementDefinitionConstraintComponent(json) {
this.json = json;
ElementDefinitionConstraintComponent.__super__.constructor.call(this, this.json);
}
/**
Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionConstraintComponent.prototype.key = function() {
return this.json['key'];
};
/**
Used to label the constraint in OCL or in short displays incapable of displaying the full human description.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionConstraintComponent.prototype.name = function() {
return this.json['name'];
};
/**
Identifies the impact constraint violation has on the conformance of the instance.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionConstraintComponent.prototype.severity = function() {
return this.json['severity'];
};
/**
Text that can be used to describe the constraint in messages identifying that the constraint has been violated.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionConstraintComponent.prototype.human = function() {
return this.json['human'];
};
/**
An XPath expression of constraint that can be executed to see if this constraint is met.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionConstraintComponent.prototype.xpath = function() {
return this.json['xpath'];
};
return ElementDefinitionConstraintComponent;
})(Element);
/**
Embedded class
@class ElementDefinitionBindingComponent
@exports ElementDefinitionBindingComponent as ElementDefinitionBindingComponent
*/
ElementDefinitionBindingComponent = (function(superClass) {
extend(ElementDefinitionBindingComponent, superClass);
function ElementDefinitionBindingComponent(json) {
this.json = json;
ElementDefinitionBindingComponent.__super__.constructor.call(this, this.json);
}
/**
A descriptive name for this - can be useful for generating implementation artifacts.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionBindingComponent.prototype.name = function() {
return this.json['name'];
};
/**
If true, then conformant systems may use additional codes or (where the data type permits) text alone to convey concepts not covered by the set of codes identified in the binding. If false, then conformant systems are constrained to the provided codes alone.
@returns {Array} an array of {@link boolean} objects
*/
ElementDefinitionBindingComponent.prototype.isExtensible = function() {
return this.json['isExtensible'];
};
/**
Indicates the degree of conformance expectations associated with this binding.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionBindingComponent.prototype.conformance = function() {
return this.json['conformance'];
};
/**
Describes the intended use of this particular set of codes.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionBindingComponent.prototype.description = function() {
return this.json['description'];
};
/**
Points to the value set or external definition that identifies the set of codes to be used.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionBindingComponent.prototype.referenceUri = function() {
return this.json['referenceUri'];
};
/**
Points to the value set or external definition that identifies the set of codes to be used.
@returns {Reference}
*/
ElementDefinitionBindingComponent.prototype.referenceReference = function() {
if (this.json['referenceReference']) {
return new Reference(this.json['referenceReference']);
}
};
return ElementDefinitionBindingComponent;
})(Element);
/**
Embedded class
@class ElementDefinitionMappingComponent
@exports ElementDefinitionMappingComponent as ElementDefinitionMappingComponent
*/
ElementDefinitionMappingComponent = (function(superClass) {
extend(ElementDefinitionMappingComponent, superClass);
function ElementDefinitionMappingComponent(json) {
this.json = json;
ElementDefinitionMappingComponent.__super__.constructor.call(this, this.json);
}
/**
An internal reference to the definition of a mapping.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionMappingComponent.prototype.identity = function() {
return this.json['identity'];
};
/**
Expresses what part of the target specification corresponds to this element.
@returns {Array} an array of {@link String} objects
*/
ElementDefinitionMappingComponent.prototype.map = function() {
return this.json['map'];
};
return ElementDefinitionMappingComponent;
})(Element);
/**
Captures constraints on each element within the resource, profile, or extension.
@class ElementDefinition
@exports ElementDefinition as ElementDefinition
*/
ElementDefinition = (function(superClass) {
extend(ElementDefinition, superClass);
function ElementDefinition(json) {
this.json = json;
ElementDefinition.__super__.constructor.call(this, this.json);
}
/**
The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.
@returns {Array} an array of {@link String} objects
*/
ElementDefinition.prototype.path = function() {
return this.json['path'];
};
/**
Codes that define how this element is represented in instances, when the deviation varies from the normal case.
@returns {Array} an array of {@link String} objects
*/
ElementDefinition.prototype.representation = function() {
return this.json['representation'];
};
/**
The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.
@returns {Array} an array of {@link String} objects
*/
ElementDefinition.prototype.name = function() {
return this.json['name'];
};
/**
Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).
@returns {ElementDefinitionSlicingComponent}
*/
ElementDefinition.prototype.slicing = function() {
if (this.json['slicing']) {
return new ElementDefinitionSlicingComponent(this.json['slicing']);
}
};
/**
A concise definition that is shown in the generated XML format that summarizes profiles (used throughout the specification).
@returns {Array} an array of {@link String} objects
*/
ElementDefinition.prototype.short = function() {
return this.json['short'];
};
/**
The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.
@returns {Array} an array of {@link String} objects
*/
ElementDefinition.prototype.formal = function() {
return this.json['formal'];
};
/**
Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc.
@returns {Array} an array of {@link String} objects
*/
ElementDefinition.prototype.comments = function() {
return this.json['comments'];
};
/**
Explains why this element is needed and why it's been constrained as it has.
@returns {Array} an array of {@link String} objects
*/
ElementDefinition.prototype.requirements = function() {
return this.json['requirements'];
};
/**
Identifies additional names by which this element might also be known.
@returns {Array} an array of {@link String} objects
*/
ElementDefinition.prototype.synonym = function() {
return this.json['synonym'];
};
/**
The minimum number of times this element SHALL appear in the instance.
@returns {Array} an array of {@link Number} objects
*/
ElementDefinition.prototype.min = function() {
return this.json['min'];
};
/**
The maximum number of times this element is permitted to appear in the instance.
@returns {Array} an array of {@link String} objects
*/
ElementDefinition.prototype.max = function() {
return this.json['max'];
};
/**
The data type or resource that the value of this element is permitted to be.
@returns {Array} an array of {@link TypeRefComponent} objects
*/
ElementDefinition.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 TypeRefComponent(item));
}
return results;
}
};
/**
Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.
@returns {Array} an array of {@link String} objects
*/
ElementDefinition.prototype.nameReference = function() {
return this.json['nameReference'];
};
/**
The value that should be used if there is no value stated in the instance.
@returns {Array} an array of {@link } objects
*/
ElementDefinition.prototype.defaultValue = function() {
return this.json['defaultValue'];
};
/**
The Implicit meaning that is to be understood when this element is missing.
@returns {Array} an array of {@link String} objects
*/
ElementDefinition.prototype.meaningWhenMissing = function() {
return this.json['meaningWhenMissing'];
};
/**
Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-signficant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.
@returns {Array} an array of {@link } objects
*/
ElementDefinition.prototype.fixed = function() {
return this.json['fixed'];
};
/**
Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-senstive, accent-sensitive, etc.).
@returns {Array} an array of {@link } objects
*/
ElementDefinition.prototype.pattern = function() {
return this.json['pattern'];
};
/**
An example value for this element.
@returns {Array} an array of {@link } objects
*/
ElementDefinition.prototype.example = function() {
return this.json['example'];
};
/**
Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.
@returns {Array} an array of {@link Number} objects
*/
ElementDefinition.prototype.maxLength = function() {
return this.json['maxLength'];
};
/**
A reference to an invariant that may make additional statements about the cardinality or value in the instance.
@returns {Array} an array of {@link String} objects
*/
ElementDefinition.prototype.condition = function() {
return this.json['condition'];
};
/**
Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.
@returns {Array} an array of {@link ElementDefinitionConstraintComponent} objects
*/
ElementDefinition.prototype.constraint = function() {
var i, item, len, ref, results;
if (this.json['constraint']) {
ref = this.json['constraint'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ElementDefinitionConstraintComponent(item));
}
return results;
}
};
/**
If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported.
@returns {Array} an array of {@link boolean} objects
*/
ElementDefinition.prototype.mustSupport = function() {
return this.json['mustSupport'];
};
/**
If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.
@returns {Array} an array of {@link boolean} objects
*/
ElementDefinition.prototype.isModifier = function() {
return this.json['isModifier'];
};
/**
Whether the element should be included if a client requests a search with the parameter _summary=true.
@returns {Array} an array of {@link boolean} objects
*/
ElementDefinition.prototype.isSummary = function() {
return this.json['isSummary'];
};
/**
Binds to a value set if this element is coded (code, Coding, CodeableConcept).
@returns {ElementDefinitionBindingComponent}
*/
ElementDefinition.prototype.binding = function() {
if (this.json['binding']) {
return new ElementDefinitionBindingComponent(this.json['binding']);
}
};
/**
Identifies a concept from an external specification that roughly corresponds to this element.
@returns {Array} an array of {@link ElementDefinitionMappingComponent} objects
*/
ElementDefinition.prototype.mapping = function() {
var i, item, len, ref, results;
if (this.json['mapping']) {
ref = this.json['mapping'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new ElementDefinitionMappingComponent(item));
}
return results;
}
};
return ElementDefinition;
})(Element);
module.exports.ElementDefinition = ElementDefinition;
/**
Embedded class
@class TimingRepeatComponent
@exports TimingRepeatComponent as TimingRepeatComponent
*/
TimingRepeatComponent = (function(superClass) {
extend(TimingRepeatComponent, superClass);
function TimingRepeatComponent(json) {
this.json = json;
TimingRepeatComponent.__super__.constructor.call(this, this.json);
}
/**
Indicates how often the event should occur.
@returns {Array} an array of {@link Number} objects
*/
TimingRepeatComponent.prototype.frequency = function() {
return this.json['frequency'];
};
/**
Identifies the occurrence of daily life that determines timing.
@returns {Array} an array of {@link String} objects
*/
TimingRepeatComponent.prototype.when = function() {
return this.json['when'];
};
/**
How long each repetition should last.
@returns {Array} an array of {@link Number} objects
*/
TimingRepeatComponent.prototype.duration = function() {
return this.json['duration'];
};
/**
The units of time for the duration.
@returns {Array} an array of {@link String} objects
*/
TimingRepeatComponent.prototype.units = function() {
return this.json['units'];
};
/**
A total count of the desired number of repetitions.
@returns {Array} an array of {@link Number} objects
*/
TimingRepeatComponent.prototype.count = function() {
return this.json['count'];
};
/**
When to stop repeating the timing schedule.
@returns {Array} an array of {@link Date} objects
*/
TimingRepeatComponent.prototype.end = function() {
if (this.json['end']) {
return DT.DateTime.parse(this.json['end']);
}
};
return TimingRepeatComponent;
})(Element);
/**
Specifies an event that may occur multiple times. Timing schedules are used for to record when things are expected or requested to occur.
@class Timing
@exports Timing as Timing
*/
Timing = (function(superClass) {
extend(Timing, superClass);
function Timing(json) {
this.json = json;
Timing.__super__.constructor.call(this, this.json);
}
/**
Identifies specific time periods when the event should occur.
@returns {Array} an array of {@link Period} objects
*/
Timing.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 Period(item));
}
return results;
}
};
/**
Identifies a repeating pattern to the intended time periods.
@returns {TimingRepeatComponent}
*/
Timing.prototype.repeat = function() {
if (this.json['repeat']) {
return new TimingRepeatComponent(this.json['repeat']);
}
};
return Timing;
})(Element);
module.exports.Timing = Timing;
/**
There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world.
@class Address
@exports Address as Address
*/
Address = (function(superClass) {
extend(Address, superClass);
function Address(json) {
this.json = json;
Address.__super__.constructor.call(this, this.json);
}
/**
The purpose of this address.
@returns {Array} an array of {@link String} objects
*/
Address.prototype.use = function() {
return this.json['use'];
};
/**
A full text representation of the address.
@returns {Array} an array of {@link String} objects
*/
Address.prototype.text = function() {
return this.json['text'];
};
/**
This component contains the house number, apartment number, street name, street direction,
P.O. Box number, delivery hints, and similar address information.
@returns {Array} an array of {@link String} objects
*/
Address.prototype.line = function() {
return this.json['line'];
};
/**
The name of the city, town, village or other community or delivery center.
@returns {Array} an array of {@link String} objects
*/
Address.prototype.city = function() {
return this.json['city'];
};
/**
Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).
@returns {Array} an array of {@link String} objects
*/
Address.prototype.state = function() {
return this.json['state'];
};
/**
A postal code designating a region defined by the postal service.
@returns {Array} an array of {@link String} objects
*/
Address.prototype.postalCode = function() {
return this.json['postalCode'];
};
/**
Country - a nation as commonly understood or generally accepted.
@returns {Array} an array of {@link String} objects
*/
Address.prototype.country = function() {
return this.json['country'];
};
/**
Time period when address was/is in use.
@returns {Period}
*/
Address.prototype.period = function() {
if (this.json['period']) {
return new Period(this.json['period']);
}
};
return Address;
})(Element);
module.exports.Address = Address;
/**
A human's name with the ability to identify parts and usage.
@class HumanName
@exports HumanName as HumanName
*/
HumanName = (function(superClass) {
extend(HumanName, superClass);
function HumanName(json) {
this.json = json;
HumanName.__super__.constructor.call(this, this.json);
}
/**
Identifies the purpose for this name.
@returns {Array} an array of {@link String} objects
*/
HumanName.prototype.use = function() {
return this.json['use'];
};
/**
A full text representation of the name.
@returns {Array} an array of {@link String} objects
*/
HumanName.prototype.text = function() {
return this.json['text'];
};
/**
The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
@returns {Array} an array of {@link String} objects
*/
HumanName.prototype.family = function() {
return this.json['family'];
};
/**
Given name.
@returns {Array} an array of {@link String} objects
*/
HumanName.prototype.given = function() {
return this.json['given'];
};
/**
Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.
@returns {Array} an array of {@link String} objects
*/
HumanName.prototype.prefix = function() {
return this.json['prefix'];
};
/**
Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.
@returns {Array} an array of {@link String} objects
*/
HumanName.prototype.suffix = function() {
return this.json['suffix'];
};
/**
Indicates the period of time when this name was valid for the named person.
@returns {Period}
*/
HumanName.prototype.period = function() {
if (this.json['period']) {
return new Period(this.json['period']);
}
};
return HumanName;
})(Element);
module.exports.HumanName = HumanName;
/**
Details for All kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
@class ContactPoint
@exports ContactPoint as ContactPoint
*/
ContactPoint = (function(superClass) {
extend(ContactPoint, superClass);
function ContactPoint(json) {
this.json = json;
ContactPoint.__super__.constructor.call(this, this.json);
}
/**
Telecommunications form for contact point - what communications system is required to make use of the contact.
@returns {Array} an array of {@link String} objects
*/
ContactPoint.prototype.system = function() {
return this.json['system'];
};
/**
The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
@returns {Array} an array of {@link String} objects
*/
ContactPoint.prototype.value = function() {
return this.json['value'];
};
/**
Identifies the purpose for the contact point.