UNPKG

fhirbuilder

Version:
43 lines (42 loc) 1.94 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Money = void 0; const Element_1 = require("../base/Element"); const base_1 = require("../../../core/r4/validators/base"); class Money extends Element_1.Element { /** * @description Numerical value (with implicit precision). */ value; /** * @description ISO 4217 Currency Code. * @descrption 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'FOK' | 'GBP' | 'GEL' | 'GGP' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'IMP' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JEP' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KID' | 'KMF' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' |... * @see <a href="https://hl7.org/fhir/R4/valueset-currencies.html">CurrencyCode</a> */ currency; /** * @description Extensions for value */ _value; toJson() { return JSON.parse(JSON.stringify(this)); } toPrettyString() { return `Money${JSON.stringify(this.toJson(), null, 2)}`; } toString() { return `Money${JSON.stringify(this.toJson())}`; } validate() { return (0, base_1.ConformanceValidator)('Money', this); } serialize() { return JSON.stringify(this.toJson()); } constructor(args) { super(); if (args) Object.assign(this, args); } } exports.Money = Money;