UNPKG

@phema/cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

1,146 lines (843 loc) 28.1 kB
// Generated by CoffeeScript 1.12.7 (function() { var AddedItemAdjudicationComponent, AddedItemComponent, AddedItemDetailAdjudicationComponent, AddedItemsDetailComponent, Address, Attachment, BackboneElement, CORE, ClaimResponse, CodeableConcept, Coding, ContactPoint, DT, DetailAdjudicationComponent, DomainResource, Element, ElementDefinition, ErrorsComponent, Extension, HumanName, Identifier, ItemAdjudicationComponent, ItemDetailComponent, ItemSubdetailComponent, ItemsComponent, Narrative, NotesComponent, Parameters, Period, Quantity, Range, Ratio, Reference, Resource, SampledData, SubdetailAdjudicationComponent, 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 ItemAdjudicationComponent @exports ItemAdjudicationComponent as ItemAdjudicationComponent */ ItemAdjudicationComponent = (function(superClass) { extend(ItemAdjudicationComponent, superClass); function ItemAdjudicationComponent(json) { this.json = json; ItemAdjudicationComponent.__super__.constructor.call(this, this.json); } /** Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc. @returns {Coding} */ ItemAdjudicationComponent.prototype.code = function() { if (this.json['code']) { return new Coding(this.json['code']); } }; /** Monitory amount associated with the code. @returns {Money} */ ItemAdjudicationComponent.prototype.amount = function() { if (this.json['amount']) { return new Money(this.json['amount']); } }; /** A non-monitary value for example a percentage. Mutually exclusive to the amount element above. @returns {Array} an array of {@link Number} objects */ ItemAdjudicationComponent.prototype.value = function() { return this.json['value']; }; return ItemAdjudicationComponent; })(BackboneElement); /** Embedded class @class DetailAdjudicationComponent @exports DetailAdjudicationComponent as DetailAdjudicationComponent */ DetailAdjudicationComponent = (function(superClass) { extend(DetailAdjudicationComponent, superClass); function DetailAdjudicationComponent(json) { this.json = json; DetailAdjudicationComponent.__super__.constructor.call(this, this.json); } /** Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc. @returns {Coding} */ DetailAdjudicationComponent.prototype.code = function() { if (this.json['code']) { return new Coding(this.json['code']); } }; /** Monitory amount associated with the code. @returns {Money} */ DetailAdjudicationComponent.prototype.amount = function() { if (this.json['amount']) { return new Money(this.json['amount']); } }; /** A non-monitary value for example a percentage. Mutually exclusive to the amount element above. @returns {Array} an array of {@link Number} objects */ DetailAdjudicationComponent.prototype.value = function() { return this.json['value']; }; return DetailAdjudicationComponent; })(BackboneElement); /** Embedded class @class SubdetailAdjudicationComponent @exports SubdetailAdjudicationComponent as SubdetailAdjudicationComponent */ SubdetailAdjudicationComponent = (function(superClass) { extend(SubdetailAdjudicationComponent, superClass); function SubdetailAdjudicationComponent(json) { this.json = json; SubdetailAdjudicationComponent.__super__.constructor.call(this, this.json); } /** Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc. @returns {Coding} */ SubdetailAdjudicationComponent.prototype.code = function() { if (this.json['code']) { return new Coding(this.json['code']); } }; /** Monitory amount associated with the code. @returns {Money} */ SubdetailAdjudicationComponent.prototype.amount = function() { if (this.json['amount']) { return new Money(this.json['amount']); } }; /** A non-monitary value for example a percentage. Mutually exclusive to the amount element above. @returns {Array} an array of {@link Number} objects */ SubdetailAdjudicationComponent.prototype.value = function() { return this.json['value']; }; return SubdetailAdjudicationComponent; })(BackboneElement); /** Embedded class @class ItemSubdetailComponent @exports ItemSubdetailComponent as ItemSubdetailComponent */ ItemSubdetailComponent = (function(superClass) { extend(ItemSubdetailComponent, superClass); function ItemSubdetailComponent(json) { this.json = json; ItemSubdetailComponent.__super__.constructor.call(this, this.json); } /** A service line number. @returns {Array} an array of {@link Number} objects */ ItemSubdetailComponent.prototype.sequenceLinkId = function() { return this.json['sequenceLinkId']; }; /** The adjudications results. @returns {Array} an array of {@link SubdetailAdjudicationComponent} objects */ ItemSubdetailComponent.prototype.adjudication = function() { var i, item, len, ref, results; if (this.json['adjudication']) { ref = this.json['adjudication']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new SubdetailAdjudicationComponent(item)); } return results; } }; return ItemSubdetailComponent; })(BackboneElement); /** Embedded class @class ItemDetailComponent @exports ItemDetailComponent as ItemDetailComponent */ ItemDetailComponent = (function(superClass) { extend(ItemDetailComponent, superClass); function ItemDetailComponent(json) { this.json = json; ItemDetailComponent.__super__.constructor.call(this, this.json); } /** A service line number. @returns {Array} an array of {@link Number} objects */ ItemDetailComponent.prototype.sequenceLinkId = function() { return this.json['sequenceLinkId']; }; /** The adjudications results. @returns {Array} an array of {@link DetailAdjudicationComponent} objects */ ItemDetailComponent.prototype.adjudication = function() { var i, item, len, ref, results; if (this.json['adjudication']) { ref = this.json['adjudication']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new DetailAdjudicationComponent(item)); } return results; } }; /** The third tier service adjudications for submitted services. @returns {Array} an array of {@link ItemSubdetailComponent} objects */ ItemDetailComponent.prototype.subdetail = function() { var i, item, len, ref, results; if (this.json['subdetail']) { ref = this.json['subdetail']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ItemSubdetailComponent(item)); } return results; } }; return ItemDetailComponent; })(BackboneElement); /** Embedded class @class ItemsComponent @exports ItemsComponent as ItemsComponent */ ItemsComponent = (function(superClass) { extend(ItemsComponent, superClass); function ItemsComponent(json) { this.json = json; ItemsComponent.__super__.constructor.call(this, this.json); } /** A service line number. @returns {Array} an array of {@link Number} objects */ ItemsComponent.prototype.sequenceLinkId = function() { return this.json['sequenceLinkId']; }; /** A list of note references to the notes provided below. @returns {Array} an array of {@link Number} objects */ ItemsComponent.prototype.noteNumber = function() { return this.json['noteNumber']; }; /** The adjudications results. @returns {Array} an array of {@link ItemAdjudicationComponent} objects */ ItemsComponent.prototype.adjudication = function() { var i, item, len, ref, results; if (this.json['adjudication']) { ref = this.json['adjudication']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ItemAdjudicationComponent(item)); } return results; } }; /** The second tier service adjudications for submitted services. @returns {Array} an array of {@link ItemDetailComponent} objects */ ItemsComponent.prototype.detail = function() { var i, item, len, ref, results; if (this.json['detail']) { ref = this.json['detail']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ItemDetailComponent(item)); } return results; } }; return ItemsComponent; })(BackboneElement); /** Embedded class @class AddedItemAdjudicationComponent @exports AddedItemAdjudicationComponent as AddedItemAdjudicationComponent */ AddedItemAdjudicationComponent = (function(superClass) { extend(AddedItemAdjudicationComponent, superClass); function AddedItemAdjudicationComponent(json) { this.json = json; AddedItemAdjudicationComponent.__super__.constructor.call(this, this.json); } /** Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc. @returns {Coding} */ AddedItemAdjudicationComponent.prototype.code = function() { if (this.json['code']) { return new Coding(this.json['code']); } }; /** Monitory amount associated with the code. @returns {Money} */ AddedItemAdjudicationComponent.prototype.amount = function() { if (this.json['amount']) { return new Money(this.json['amount']); } }; /** A non-monitary value for example a percentage. Mutually exclusive to the amount element above. @returns {Array} an array of {@link Number} objects */ AddedItemAdjudicationComponent.prototype.value = function() { return this.json['value']; }; return AddedItemAdjudicationComponent; })(BackboneElement); /** Embedded class @class AddedItemDetailAdjudicationComponent @exports AddedItemDetailAdjudicationComponent as AddedItemDetailAdjudicationComponent */ AddedItemDetailAdjudicationComponent = (function(superClass) { extend(AddedItemDetailAdjudicationComponent, superClass); function AddedItemDetailAdjudicationComponent(json) { this.json = json; AddedItemDetailAdjudicationComponent.__super__.constructor.call(this, this.json); } /** Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc. @returns {Coding} */ AddedItemDetailAdjudicationComponent.prototype.code = function() { if (this.json['code']) { return new Coding(this.json['code']); } }; /** Monitory amount associated with the code. @returns {Money} */ AddedItemDetailAdjudicationComponent.prototype.amount = function() { if (this.json['amount']) { return new Money(this.json['amount']); } }; /** A non-monitary value for example a percentage. Mutually exclusive to the amount element above. @returns {Array} an array of {@link Number} objects */ AddedItemDetailAdjudicationComponent.prototype.value = function() { return this.json['value']; }; return AddedItemDetailAdjudicationComponent; })(BackboneElement); /** Embedded class @class AddedItemsDetailComponent @exports AddedItemsDetailComponent as AddedItemsDetailComponent */ AddedItemsDetailComponent = (function(superClass) { extend(AddedItemsDetailComponent, superClass); function AddedItemsDetailComponent(json) { this.json = json; AddedItemsDetailComponent.__super__.constructor.call(this, this.json); } /** A code to indicate the Professional Service or Product supplied. @returns {Coding} */ AddedItemsDetailComponent.prototype.service = function() { if (this.json['service']) { return new Coding(this.json['service']); } }; /** The fee charged for the professional service or product.. @returns {Money} */ AddedItemsDetailComponent.prototype.fee = function() { if (this.json['fee']) { return new Money(this.json['fee']); } }; /** The adjudications results. @returns {Array} an array of {@link AddedItemDetailAdjudicationComponent} objects */ AddedItemsDetailComponent.prototype.adjudication = function() { var i, item, len, ref, results; if (this.json['adjudication']) { ref = this.json['adjudication']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new AddedItemDetailAdjudicationComponent(item)); } return results; } }; return AddedItemsDetailComponent; })(BackboneElement); /** Embedded class @class AddedItemComponent @exports AddedItemComponent as AddedItemComponent */ AddedItemComponent = (function(superClass) { extend(AddedItemComponent, superClass); function AddedItemComponent(json) { this.json = json; AddedItemComponent.__super__.constructor.call(this, this.json); } /** List of input service items which this service line is intended to replace. @returns {Array} an array of {@link Number} objects */ AddedItemComponent.prototype.sequenceLinkId = function() { return this.json['sequenceLinkId']; }; /** A code to indicate the Professional Service or Product supplied. @returns {Coding} */ AddedItemComponent.prototype.service = function() { if (this.json['service']) { return new Coding(this.json['service']); } }; /** The fee charged for the professional service or product.. @returns {Money} */ AddedItemComponent.prototype.fee = function() { if (this.json['fee']) { return new Money(this.json['fee']); } }; /** A list of note references to the notes provided below. @returns {Array} an array of {@link Number} objects */ AddedItemComponent.prototype.noteNumberLinkId = function() { return this.json['noteNumberLinkId']; }; /** The adjudications results. @returns {Array} an array of {@link AddedItemAdjudicationComponent} objects */ AddedItemComponent.prototype.adjudication = function() { var i, item, len, ref, results; if (this.json['adjudication']) { ref = this.json['adjudication']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new AddedItemAdjudicationComponent(item)); } return results; } }; /** The second tier service adjudications for payor added services. @returns {Array} an array of {@link AddedItemsDetailComponent} objects */ AddedItemComponent.prototype.detail = function() { var i, item, len, ref, results; if (this.json['detail']) { ref = this.json['detail']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new AddedItemsDetailComponent(item)); } return results; } }; return AddedItemComponent; })(BackboneElement); /** Embedded class @class ErrorsComponent @exports ErrorsComponent as ErrorsComponent */ ErrorsComponent = (function(superClass) { extend(ErrorsComponent, superClass); function ErrorsComponent(json) { this.json = json; ErrorsComponent.__super__.constructor.call(this, this.json); } /** The sequence number of the line item submitted which contains the error. This value is ommitted when the error is elsewhere. @returns {Array} an array of {@link Number} objects */ ErrorsComponent.prototype.sequenceLinkId = function() { return this.json['sequenceLinkId']; }; /** The sequence number of the addition within the line item submitted which contains the error. This value is ommitted when the error is not related to an Addition. @returns {Array} an array of {@link Number} objects */ ErrorsComponent.prototype.detailSequenceLinkId = function() { return this.json['detailSequenceLinkId']; }; /** The sequence number of the addition within the line item submitted which contains the error. This value is ommitted when the error is not related to an Addition. @returns {Array} an array of {@link Number} objects */ ErrorsComponent.prototype.subdetailSequenceLinkId = function() { return this.json['subdetailSequenceLinkId']; }; /** An error code,froma specified code system, which details why the claim could not be adjudicated. @returns {Coding} */ ErrorsComponent.prototype.code = function() { if (this.json['code']) { return new Coding(this.json['code']); } }; return ErrorsComponent; })(BackboneElement); /** Embedded class @class NotesComponent @exports NotesComponent as NotesComponent */ NotesComponent = (function(superClass) { extend(NotesComponent, superClass); function NotesComponent(json) { this.json = json; NotesComponent.__super__.constructor.call(this, this.json); } /** An integer associated with each note which may be referred to from each service line item. @returns {Array} an array of {@link Number} objects */ NotesComponent.prototype.number = function() { return this.json['number']; }; /** The note purpose: Print/Display. @returns {Coding} */ NotesComponent.prototype.type = function() { if (this.json['type']) { return new Coding(this.json['type']); } }; /** The note text. @returns {Array} an array of {@link String} objects */ NotesComponent.prototype.text = function() { return this.json['text']; }; return NotesComponent; })(BackboneElement); /** This resource provides the adjudication details from the processing of a Claim resource. @class ClaimResponse @exports ClaimResponse as ClaimResponse */ ClaimResponse = (function(superClass) { extend(ClaimResponse, superClass); function ClaimResponse(json) { this.json = json; ClaimResponse.__super__.constructor.call(this, this.json); } /** The Response Business Identifier. @returns {Array} an array of {@link Identifier} objects */ ClaimResponse.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; } }; /** Original request resource referrence. @returns {Reference} */ ClaimResponse.prototype.request = function() { if (this.json['request']) { return new Reference(this.json['request']); } }; /** The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. @returns {Coding} */ ClaimResponse.prototype.ruleset = function() { if (this.json['ruleset']) { return new Coding(this.json['ruleset']); } }; /** The style (standard) and version of the original material which was converted into this resource. @returns {Coding} */ ClaimResponse.prototype.originalRuleset = function() { if (this.json['originalRuleset']) { return new Coding(this.json['originalRuleset']); } }; /** The date when the enclosed suite of services were performed or completed. @returns {Array} an array of {@link Date} objects */ ClaimResponse.prototype.date = function() { if (this.json['date']) { return DT.DateTime.parse(this.json['date']); } }; /** The Insurer who produced this adjudicated response. @returns {Reference} */ ClaimResponse.prototype.organization = function() { if (this.json['organization']) { return new Reference(this.json['organization']); } }; /** The practitioner who is responsible for the services rendered to the patient. @returns {Reference} */ ClaimResponse.prototype.requestProvider = function() { if (this.json['requestProvider']) { return new Reference(this.json['requestProvider']); } }; /** The organization which is responsible for the services rendered to the patient. @returns {Reference} */ ClaimResponse.prototype.requestOrganization = function() { if (this.json['requestOrganization']) { return new Reference(this.json['requestOrganization']); } }; /** Transaction status: error, complete. @returns {Array} an array of {@link String} objects */ ClaimResponse.prototype.outcome = function() { return this.json['outcome']; }; /** A description of the status of the adjudication. @returns {Array} an array of {@link String} objects */ ClaimResponse.prototype.disposition = function() { return this.json['disposition']; }; /** Party to be reimbursed: Subscriber, provider, other. @returns {Coding} */ ClaimResponse.prototype.payeeType = function() { if (this.json['payeeType']) { return new Coding(this.json['payeeType']); } }; /** The first tier service adjudications for submitted services. @returns {Array} an array of {@link ItemsComponent} objects */ ClaimResponse.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 ItemsComponent(item)); } return results; } }; /** The first tier service adjudications for payor added services. @returns {Array} an array of {@link AddedItemComponent} objects */ ClaimResponse.prototype.additem = function() { var i, item, len, ref, results; if (this.json['additem']) { ref = this.json['additem']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new AddedItemComponent(item)); } return results; } }; /** Mutually exclusive with Services Provided (Item). @returns {Array} an array of {@link ErrorsComponent} objects */ ClaimResponse.prototype.error = function() { var i, item, len, ref, results; if (this.json['error']) { ref = this.json['error']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new ErrorsComponent(item)); } return results; } }; /** The total cost of the services reported. @returns {Money} */ ClaimResponse.prototype.totalCost = function() { if (this.json['totalCost']) { return new Money(this.json['totalCost']); } }; /** The amount of deductable applied which was not allocated to any particular service line. @returns {Money} */ ClaimResponse.prototype.unallocDeductable = function() { if (this.json['unallocDeductable']) { return new Money(this.json['unallocDeductable']); } }; /** Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable). @returns {Money} */ ClaimResponse.prototype.totalBenefit = function() { if (this.json['totalBenefit']) { return new Money(this.json['totalBenefit']); } }; /** Adjustment to the payment of this transaction which is not related to adjudication of this transaction. @returns {Money} */ ClaimResponse.prototype.paymentAdjustment = function() { if (this.json['paymentAdjustment']) { return new Money(this.json['paymentAdjustment']); } }; /** Reason for the payment adjustment. @returns {Coding} */ ClaimResponse.prototype.paymentAdjustmentReason = function() { if (this.json['paymentAdjustmentReason']) { return new Coding(this.json['paymentAdjustmentReason']); } }; /** Estimated payment data. @returns {Array} an array of {@link Date} objects */ ClaimResponse.prototype.paymentDate = function() { if (this.json['paymentDate']) { return DT.DateTime.parse(this.json['paymentDate']); } }; /** Payable less any payment adjustment. @returns {Money} */ ClaimResponse.prototype.paymentAmount = function() { if (this.json['paymentAmount']) { return new Money(this.json['paymentAmount']); } }; /** Payment identifer. @returns {Identifier} */ ClaimResponse.prototype.paymentRef = function() { if (this.json['paymentRef']) { return new Identifier(this.json['paymentRef']); } }; /** Status of funds reservation (For provider, for Patient, None). @returns {Coding} */ ClaimResponse.prototype.reserved = function() { if (this.json['reserved']) { return new Coding(this.json['reserved']); } }; /** The form to be used for printing the content. @returns {Coding} */ ClaimResponse.prototype.form = function() { if (this.json['form']) { return new Coding(this.json['form']); } }; /** Note text. @returns {Array} an array of {@link NotesComponent} objects */ ClaimResponse.prototype.note = function() { var i, item, len, ref, results; if (this.json['note']) { ref = this.json['note']; results = []; for (i = 0, len = ref.length; i < len; i++) { item = ref[i]; results.push(new NotesComponent(item)); } return results; } }; return ClaimResponse; })(DomainResource); module.exports.ClaimResponse = ClaimResponse; }).call(this); //# sourceMappingURL=claimresponse.js.map