UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

332 lines (238 loc) 10.3 kB
// Generated by CoffeeScript 1.9.3 (function() { var Address, Attachment, BackboneElement, CORE, CodeableConcept, Coding, ContactPoint, DT, DomainResource, Element, ElementDefinition, Extension, HumanName, Identifier, MedicationStatement, MedicationStatementDosageComponent, 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 MedicationStatementDosageComponent @exports MedicationStatementDosageComponent as MedicationStatementDosageComponent */ MedicationStatementDosageComponent = (function(superClass) { extend(MedicationStatementDosageComponent, superClass); function MedicationStatementDosageComponent(json) { this.json = json; MedicationStatementDosageComponent.__super__.constructor.call(this, this.json); } /** The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013". @returns {Timing} */ MedicationStatementDosageComponent.prototype.schedule = function() { if (this.json['schedule']) { return new Timing(this.json['schedule']); } }; /** If set to true or if specified as a CodeableConcept, indicates that the medication is only taken when needed within the specified schedule rather than at every scheduled dose. If a CodeableConcept is present, it indicates the pre-condition for taking the Medication. @returns {Array} an array of {@link boolean} objects */ MedicationStatementDosageComponent.prototype.asNeededBoolean = function() { return this.json['asNeededBoolean']; }; /** If set to true or if specified as a CodeableConcept, indicates that the medication is only taken when needed within the specified schedule rather than at every scheduled dose. If a CodeableConcept is present, it indicates the pre-condition for taking the Medication. @returns {CodeableConcept} */ MedicationStatementDosageComponent.prototype.asNeededCodeableConcept = function() { if (this.json['asNeededCodeableConcept']) { return new CodeableConcept(this.json['asNeededCodeableConcept']); } }; /** A coded specification of the anatomic site where the medication first enters the body. @returns {CodeableConcept} */ MedicationStatementDosageComponent.prototype.site = function() { if (this.json['site']) { return new CodeableConcept(this.json['site']); } }; /** A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject. @returns {CodeableConcept} */ MedicationStatementDosageComponent.prototype.route = function() { if (this.json['route']) { return new CodeableConcept(this.json['route']); } }; /** A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. Examples: Slow Push; Deep IV. Terminologies used often pre-coordinate this term with the route and or form of administration. @returns {CodeableConcept} */ MedicationStatementDosageComponent.prototype.method = function() { if (this.json['method']) { return new CodeableConcept(this.json['method']); } }; /** The amount of therapeutic or other substance given at one administration event. @returns {Quantity} */ MedicationStatementDosageComponent.prototype.quantity = function() { if (this.json['quantity']) { return new Quantity(this.json['quantity']); } }; /** Identifies the speed with which the substance is introduced into the subject. Typically the rate for an infusion. 200ml in 2 hours. @returns {Ratio} */ MedicationStatementDosageComponent.prototype.rate = function() { if (this.json['rate']) { return new Ratio(this.json['rate']); } }; /** The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. E.g. 1000mg in 24 hours. @returns {Ratio} */ MedicationStatementDosageComponent.prototype.maxDosePerPeriod = function() { if (this.json['maxDosePerPeriod']) { return new Ratio(this.json['maxDosePerPeriod']); } }; return MedicationStatementDosageComponent; })(BackboneElement); /** A record of medication being taken by a patient, or that the medication has been given to a patient where the record is the result of a report from the patient or another clinician. @class MedicationStatement @exports MedicationStatement as MedicationStatement */ MedicationStatement = (function(superClass) { extend(MedicationStatement, superClass); function MedicationStatement(json) { this.json = json; MedicationStatement.__super__.constructor.call(this, this.json); } /** External identifier - FHIR will generate its own internal IDs (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. @returns {Array} an array of {@link Identifier} objects */ MedicationStatement.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; } }; /** The person or animal who is /was taking the medication. @returns {Reference} */ MedicationStatement.prototype.patient = function() { if (this.json['patient']) { return new Reference(this.json['patient']); } }; /** Set this to true if the record is saying that the medication was NOT taken. @returns {Array} an array of {@link boolean} objects */ MedicationStatement.prototype.wasNotGiven = function() { return this.json['wasNotGiven']; }; /** A code indicating why the medication was not taken. @returns {Array} an array of {@link CodeableConcept} objects */ MedicationStatement.prototype.reasonNotGiven = function() { var i, item, len, ref, results; if (this.json['reasonNotGiven']) { ref = this.json['reasonNotGiven']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new CodeableConcept(item)); } return results; } }; /** The interval of time during which it is being asserted that the patient was taking the medication. @returns {Period} */ MedicationStatement.prototype.whenGiven = function() { if (this.json['whenGiven']) { return new Period(this.json['whenGiven']); } }; /** Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. @returns {Reference} */ MedicationStatement.prototype.medication = function() { if (this.json['medication']) { return new Reference(this.json['medication']); } }; /** An identifier or a link to a resource that identifies a device used in administering the medication to the patient. @returns {Array} an array of {@link Reference} objects */ MedicationStatement.prototype.device = function() { var i, item, len, ref, results; if (this.json['device']) { ref = this.json['device']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new Reference(item)); } return results; } }; /** Indicates how the medication is/was used by the patient. @returns {Array} an array of {@link MedicationStatementDosageComponent} objects */ MedicationStatement.prototype.dosage = function() { var i, item, len, ref, results; if (this.json['dosage']) { ref = this.json['dosage']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new MedicationStatementDosageComponent(item)); } return results; } }; return MedicationStatement; })(DomainResource); module.exports.MedicationStatement = MedicationStatement; }).call(this); //# sourceMappingURL=medicationstatement.js.map