UNPKG

fhirbuilder

Version:
84 lines (83 loc) 2.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Identifier = void 0; const builders_1 = require("../../builders"); const base_1 = require("../../../core/r4/validators/base"); const Element_1 = require("../base/Element"); /** * @description An identifier intended for computation * @property {string} id - Unique id for inter-element referencing * @property {IExtension[]} extension - Additional content defined by implementations * @property {IdentifierUseEnum | IdentifierUseType} use - usual | official | temp | secondary | old (If known). Binding: IdentifierUse (Required) * @property {ICodeableConcept} type - Description of identifier * @property {string} system - The namespace for the identifier value * @property {string} value - The value that is unique * @property {IPeriod} period - Time period when id is/was valid for use * @property {IReference} assigner - Organization that issued id (maybe just text) * @property {IElement} _use - Extension of use * @property {IElement} _system - Extension of system * @property {IElement} _value - Extension of value * @see {@link https://www.hl7.org/fhir/datatypes.html#Identifier Identifier} * @author Roberto Araneda */ class Identifier extends Element_1.Element { /** * @description usual | official | temp | secondary | old (If known) */ use; /** * @description Description of identifier */ type; /** * @description The namespace for the identifier value */ system; /** * @description The value that is unique */ value; /** * @description Time period when id is/was valid for use */ period; /** * @description Organization that issued id (may-be just text) */ assigner; /** * @description Extension of use */ _use; /** * @description Extension of system */ _system; /** * @description Extension of value */ _value; toJson() { return JSON.parse(JSON.stringify(this)); } toPrettyString() { return `Identifier${JSON.stringify(this.toJson(), null, 2)}`; } toString() { return `Identifier${JSON.stringify(this.toJson())}`; } validate() { return (0, base_1.ConformanceValidator)('Identifier', this); } constructor(args) { super(); Object.assign(this, args); } builderInstance() { return new builders_1.IdentifierBuilder(); } serialize() { return JSON.stringify(this.toJson()); } } exports.Identifier = Identifier;