@phema/cql-execution
Version:
An execution framework for the Clinical Quality Language (CQL)
705 lines (528 loc) • 21.2 kB
JavaScript
// Generated by CoffeeScript 1.12.7
(function() {
var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DomainResource, Element, ElementDefinition, Extension, HumanName, Identifier, Narrative, NutritionOrder, NutritionOrderItemComponent, NutritionOrderItemEnteralFormulaComponent, NutritionOrderItemOralDietComponent, NutritionOrderItemOralDietNutrientsComponent, NutritionOrderItemOralDietTextureComponent, NutritionOrderItemSupplementComponent, 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 NutritionOrderItemOralDietNutrientsComponent
@exports NutritionOrderItemOralDietNutrientsComponent as NutritionOrderItemOralDietNutrientsComponent
*/
NutritionOrderItemOralDietNutrientsComponent = (function(superClass) {
extend(NutritionOrderItemOralDietNutrientsComponent, superClass);
function NutritionOrderItemOralDietNutrientsComponent(json) {
this.json = json;
NutritionOrderItemOralDietNutrientsComponent.__super__.constructor.call(this, this.json);
}
/**
Identifies the type of nutrient that is being modified such as cabohydrate or sodium.
@returns {CodeableConcept}
*/
NutritionOrderItemOralDietNutrientsComponent.prototype.modifier = function() {
if (this.json['modifier']) {
return new CodeableConcept(this.json['modifier']);
}
};
/**
The quantity or range of the specified nutrient to supply.
@returns {Quantity}
*/
NutritionOrderItemOralDietNutrientsComponent.prototype.amountQuantity = function() {
if (this.json['amountQuantity']) {
return new Quantity(this.json['amountQuantity']);
}
};
/**
The quantity or range of the specified nutrient to supply.
@returns {Range}
*/
NutritionOrderItemOralDietNutrientsComponent.prototype.amountRange = function() {
if (this.json['amountRange']) {
return new Range(this.json['amountRange']);
}
};
return NutritionOrderItemOralDietNutrientsComponent;
})(BackboneElement);
/**
Embedded class
@class NutritionOrderItemOralDietTextureComponent
@exports NutritionOrderItemOralDietTextureComponent as NutritionOrderItemOralDietTextureComponent
*/
NutritionOrderItemOralDietTextureComponent = (function(superClass) {
extend(NutritionOrderItemOralDietTextureComponent, superClass);
function NutritionOrderItemOralDietTextureComponent(json) {
this.json = json;
NutritionOrderItemOralDietTextureComponent.__super__.constructor.call(this, this.json);
}
/**
Identifies any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, pureed.
@returns {CodeableConcept}
*/
NutritionOrderItemOralDietTextureComponent.prototype.modifier = function() {
if (this.json['modifier']) {
return new CodeableConcept(this.json['modifier']);
}
};
/**
Indicates what specific type of food (e.g., meats) the texture modification applies to or may apply to all foods in the diet.
@returns {CodeableConcept}
*/
NutritionOrderItemOralDietTextureComponent.prototype.foodType = function() {
if (this.json['foodType']) {
return new CodeableConcept(this.json['foodType']);
}
};
return NutritionOrderItemOralDietTextureComponent;
})(BackboneElement);
/**
Embedded class
@class NutritionOrderItemOralDietComponent
@exports NutritionOrderItemOralDietComponent as NutritionOrderItemOralDietComponent
*/
NutritionOrderItemOralDietComponent = (function(superClass) {
extend(NutritionOrderItemOralDietComponent, superClass);
function NutritionOrderItemOralDietComponent(json) {
this.json = json;
NutritionOrderItemOralDietComponent.__super__.constructor.call(this, this.json);
}
/**
A set of one or more codes representing diets that describe what can be consumed orally (i.e., take via the mouth).
@returns {Array} an array of {@link CodeableConcept} objects
*/
NutritionOrderItemOralDietComponent.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;
}
};
/**
Class that defines the details of any nutrient modifications required for the oral diet.
@returns {Array} an array of {@link NutritionOrderItemOralDietNutrientsComponent} objects
*/
NutritionOrderItemOralDietComponent.prototype.nutrients = function() {
var i, item, len, ref, results;
if (this.json['nutrients']) {
ref = this.json['nutrients'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new NutritionOrderItemOralDietNutrientsComponent(item));
}
return results;
}
};
/**
Class that describes any texture modifications required for the patient to safely consume various types of solid foods.
@returns {Array} an array of {@link NutritionOrderItemOralDietTextureComponent} objects
*/
NutritionOrderItemOralDietComponent.prototype.texture = function() {
var i, item, len, ref, results;
if (this.json['texture']) {
ref = this.json['texture'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new NutritionOrderItemOralDietTextureComponent(item));
}
return results;
}
};
/**
Identifies the required consistency (e.g., honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.
@returns {Array} an array of {@link CodeableConcept} objects
*/
NutritionOrderItemOralDietComponent.prototype.fluidConsistencyType = function() {
var i, item, len, ref, results;
if (this.json['fluidConsistencyType']) {
ref = this.json['fluidConsistencyType'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
A descriptive name of the required diets that describe what can be consumed orally (i.e., take via the mouth).
@returns {Array} an array of {@link String} objects
*/
NutritionOrderItemOralDietComponent.prototype.description = function() {
return this.json['description'];
};
return NutritionOrderItemOralDietComponent;
})(BackboneElement);
/**
Embedded class
@class NutritionOrderItemSupplementComponent
@exports NutritionOrderItemSupplementComponent as NutritionOrderItemSupplementComponent
*/
NutritionOrderItemSupplementComponent = (function(superClass) {
extend(NutritionOrderItemSupplementComponent, superClass);
function NutritionOrderItemSupplementComponent(json) {
this.json = json;
NutritionOrderItemSupplementComponent.__super__.constructor.call(this, this.json);
}
/**
Indicates the type of nutritional supplement product required such as high protein or pediatric clear liquid supplement.
@returns {Array} an array of {@link CodeableConcept} objects
*/
NutritionOrderItemSupplementComponent.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 amount of the nutritional supplement product to provide to the patient.
@returns {Quantity}
*/
NutritionOrderItemSupplementComponent.prototype.quantity = function() {
if (this.json['quantity']) {
return new Quantity(this.json['quantity']);
}
};
/**
The name of the nutritional supplement product to be provided to the patient.
@returns {Array} an array of {@link String} objects
*/
NutritionOrderItemSupplementComponent.prototype.name = function() {
return this.json['name'];
};
return NutritionOrderItemSupplementComponent;
})(BackboneElement);
/**
Embedded class
@class NutritionOrderItemEnteralFormulaComponent
@exports NutritionOrderItemEnteralFormulaComponent as NutritionOrderItemEnteralFormulaComponent
*/
NutritionOrderItemEnteralFormulaComponent = (function(superClass) {
extend(NutritionOrderItemEnteralFormulaComponent, superClass);
function NutritionOrderItemEnteralFormulaComponent(json) {
this.json = json;
NutritionOrderItemEnteralFormulaComponent.__super__.constructor.call(this, this.json);
}
/**
Indicates the type of enteral or infant formula requested such as pediatric elemental formula or.
@returns {CodeableConcept}
*/
NutritionOrderItemEnteralFormulaComponent.prototype.baseFormulaType = function() {
if (this.json['baseFormulaType']) {
return new CodeableConcept(this.json['baseFormulaType']);
}
};
/**
Indicates the type of modular component such as protein, carbohydrate or fiber to be provided in addition to or mixed with the base formula.
@returns {Array} an array of {@link CodeableConcept} objects
*/
NutritionOrderItemEnteralFormulaComponent.prototype.additiveType = function() {
var i, item, len, ref, results;
if (this.json['additiveType']) {
ref = this.json['additiveType'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
TODO ***CARD AND TYPE ARE PLACEHOLDERS TO COMPLETE BUILD. Need to discuss***.
@returns {Array} an array of {@link Quantity} objects
*/
NutritionOrderItemEnteralFormulaComponent.prototype.caloricDensity = function() {
var i, item, len, ref, results;
if (this.json['caloricDensity']) {
ref = this.json['caloricDensity'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Quantity(item));
}
return results;
}
};
/**
***CARD AND TYPE ARE PLACEHOLDERS TO COMPLETE BUILD. Need to discuss***administration details including rate (ml per hour), route of adminstration, total volume.
@returns {Array} an array of {@link CodeableConcept} objects
*/
NutritionOrderItemEnteralFormulaComponent.prototype.routeofAdministration = function() {
var i, item, len, ref, results;
if (this.json['routeofAdministration']) {
ref = this.json['routeofAdministration'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
TODO ***CARD AND TYPE ARE PLACEHOLDERS TO COMPLETE BUILD. Need to discuss***.
@returns {Array} an array of {@link Quantity} objects
*/
NutritionOrderItemEnteralFormulaComponent.prototype.rate = function() {
var i, item, len, ref, results;
if (this.json['rate']) {
ref = this.json['rate'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Quantity(item));
}
return results;
}
};
/**
TODO.
@returns {Array} an array of {@link String} objects
*/
NutritionOrderItemEnteralFormulaComponent.prototype.baseFormulaName = function() {
return this.json['baseFormulaName'];
};
return NutritionOrderItemEnteralFormulaComponent;
})(BackboneElement);
/**
Embedded class
@class NutritionOrderItemComponent
@exports NutritionOrderItemComponent as NutritionOrderItemComponent
*/
NutritionOrderItemComponent = (function(superClass) {
extend(NutritionOrderItemComponent, superClass);
function NutritionOrderItemComponent(json) {
this.json = json;
NutritionOrderItemComponent.__super__.constructor.call(this, this.json);
}
/**
The frequency at which the diet, oral supplement or enteral formula should be given.
@returns {Timing}
*/
NutritionOrderItemComponent.prototype.scheduledTiming = function() {
if (this.json['scheduledTiming']) {
return new Timing(this.json['scheduledTiming']);
}
};
/**
The frequency at which the diet, oral supplement or enteral formula should be given.
@returns {Period}
*/
NutritionOrderItemComponent.prototype.scheduledPeriod = function() {
if (this.json['scheduledPeriod']) {
return new Period(this.json['scheduledPeriod']);
}
};
/**
Indicates whether the nutrition item is currently in effect for the patient.
@returns {Array} an array of {@link boolean} objects
*/
NutritionOrderItemComponent.prototype.isInEffect = function() {
return this.json['isInEffect'];
};
/**
Class that defines the components of an oral diet order for the patient.
@returns {NutritionOrderItemOralDietComponent}
*/
NutritionOrderItemComponent.prototype.oralDiet = function() {
if (this.json['oralDiet']) {
return new NutritionOrderItemOralDietComponent(this.json['oralDiet']);
}
};
/**
Class that defines the components of a supplement order for the patient.
@returns {NutritionOrderItemSupplementComponent}
*/
NutritionOrderItemComponent.prototype.supplement = function() {
if (this.json['supplement']) {
return new NutritionOrderItemSupplementComponent(this.json['supplement']);
}
};
/**
Class that defines the components of an enteral formula order for the patient.
@returns {NutritionOrderItemEnteralFormulaComponent}
*/
NutritionOrderItemComponent.prototype.enteralFormula = function() {
if (this.json['enteralFormula']) {
return new NutritionOrderItemEnteralFormulaComponent(this.json['enteralFormula']);
}
};
return NutritionOrderItemComponent;
})(BackboneElement);
/**
A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
@class NutritionOrder
@exports NutritionOrder as NutritionOrder
*/
NutritionOrder = (function(superClass) {
extend(NutritionOrder, superClass);
function NutritionOrder(json) {
this.json = json;
NutritionOrder.__super__.constructor.call(this, this.json);
}
/**
The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.
@returns {Reference}
*/
NutritionOrder.prototype.subject = function() {
if (this.json['subject']) {
return new Reference(this.json['subject']);
}
};
/**
The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.
@returns {Reference}
*/
NutritionOrder.prototype.orderer = function() {
if (this.json['orderer']) {
return new Reference(this.json['orderer']);
}
};
/**
Identifiers assigned to this order by the order sender or by the order receiver.
@returns {Array} an array of {@link Identifier} objects
*/
NutritionOrder.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;
}
};
/**
An encounter that provides additional informaton about the healthcare context in which this request is made.
@returns {Reference}
*/
NutritionOrder.prototype.encounter = function() {
if (this.json['encounter']) {
return new Reference(this.json['encounter']);
}
};
/**
The date and time that this nutrition order was requested.
@returns {Array} an array of {@link Date} objects
*/
NutritionOrder.prototype.dateTime = function() {
if (this.json['dateTime']) {
return DT.DateTime.parse(this.json['dateTime']);
}
};
/**
The ability to list substances that may cause allergies or intolerances which should be included in the nutrition order.
@returns {Array} an array of {@link Reference} objects
*/
NutritionOrder.prototype.allergyIntolerance = function() {
var i, item, len, ref, results;
if (this.json['allergyIntolerance']) {
ref = this.json['allergyIntolerance'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new Reference(item));
}
return results;
}
};
/**
This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.
@returns {Array} an array of {@link CodeableConcept} objects
*/
NutritionOrder.prototype.foodPreferenceModifier = function() {
var i, item, len, ref, results;
if (this.json['foodPreferenceModifier']) {
ref = this.json['foodPreferenceModifier'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.
@returns {Array} an array of {@link CodeableConcept} objects
*/
NutritionOrder.prototype.excludeFoodModifier = function() {
var i, item, len, ref, results;
if (this.json['excludeFoodModifier']) {
ref = this.json['excludeFoodModifier'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new CodeableConcept(item));
}
return results;
}
};
/**
Different items that combine to make a complete description of the nutrition to be provided via oral diet, nutritional supplement and/or formula order.
@returns {Array} an array of {@link NutritionOrderItemComponent} objects
*/
NutritionOrder.prototype.item = function() {
var i, item, len, ref, results;
if (this.json['item']) {
ref = this.json['item'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
results.push(new NutritionOrderItemComponent(item));
}
return results;
}
};
/**
The workflow status of the nutrition order request, e.g., Active, Inactive, Pending, Held, Canceled, Suspended.
@returns {Array} an array of {@link String} objects
*/
NutritionOrder.prototype.status = function() {
return this.json['status'];
};
return NutritionOrder;
})(DomainResource);
module.exports.NutritionOrder = NutritionOrder;
}).call(this);
//# sourceMappingURL=nutritionorder.js.map