UNPKG

fhirbuilder

Version:
80 lines (79 loc) 2.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CoverageClass = void 0; const base_1 = require("../base"); const base_2 = require("../../../core/r4/validators/base"); /** * @version R4 (v4.0.1) * @summary FHIR® Specification by HL7® * @description Class for CoverageClass BackboneElement * @property {ICodeableConcept} type * @property {string} value * @property {IElement} _value * @property {string} name * @property {IElement} _name * @author Roberto Araneda Espinoza */ class CoverageClass extends base_1.BackboneElement { /** * @description The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan. */ type; /** * @description The alphanumeric string value associated with the insurer issued label. */ value; /** * @description Extensions for value */ _value; /** * @description A short description for the class. */ name; /** * @description Extensions for name */ _name; /** * @description Returns a JSON representation of the model * @returns {Record<string, any>} */ toJson() { return JSON.parse(JSON.stringify(this)); } /** * @description Returns a string representation of the model * @returns {string} */ toString() { return `CoverageClass${JSON.stringify(this.toJson())}`; } /** * @description Returns a pretty string representation of the model * @returns {string} */ toPrettyString() { return `CoverageClass${JSON.stringify(this.toJson(), null, 2)}`; } /** * @description Returns a serialized string representation of the model * @returns {string} */ serialize() { return JSON.stringify(this.toJson()); } /** * @description Validates the model * @returns {isValid: boolean, operationOutcome: IOperationOutcome} */ validate() { return (0, base_2.ConformanceValidator)('CoverageClass', this); } constructor(args) { super(); if (args) Object.assign(this, args); } } exports.CoverageClass = CoverageClass;