UNPKG

fhirbuilder

Version:
104 lines (103 loc) 2.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Address = void 0; const base_1 = require("../../../core/r4/validators/base"); const Element_1 = require("../base/Element"); class Address extends Element_1.Element { constructor(args) { super(); Object.assign(this, args); } toJson() { return JSON.parse(JSON.stringify(this)); } toPrettyString() { return `Address${JSON.stringify(this.toJson(), null, 2)}`; } toString() { return `Address${JSON.stringify(this.toJson())}`; } serialize() { return JSON.stringify(this.toJson()); } validate() { return (0, base_1.ConformanceValidator)('Address', this); } /** * @description home | work | temp | old | billing - purpose of this address */ use; /** * @description postal | physical | both */ type; /** * @description Text representation of the address */ text; /** * @description Street name, number, direction & P.O. Box etc. */ line; /** * @description Name of city, town etc. */ city; /** * @description District name (aka county) */ district; /** * @description Sub-unit of country (abbreviations ok) */ state; /** * @description Postal code for area */ postalCode; /** * @description Country (e.g. can be ISO 3166 2 or 3-letter code) */ country; /** * @description Time period when address was/is in use */ period; /** * Extensions for use */ _use; /** * Extensions for type */ _type; /** * */ _text; /** * Extensions for line */ _line; /** * Extensions for city */ _city; /** * Extensions for district */ _district; /** * Extensions for state */ _state; /** * Extensions for postalCode */ _postalCode; /** * Extensions for country */ _country; } exports.Address = Address;