UNPKG

fhirbuilder

Version:
71 lines (70 loc) 2.41 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LocationPositionBuilder = void 0; const models_1 = require("../../models"); const base_1 = require("../base"); /** * @version R4 (v4.0.1) * @summary FHIR® Specification by HL7® * @description Class for building a LocationPosition * @class LocationPositionBuilder * @extends {BackboneBuilder} * @implements {ILocationPositionBuilder} * @author Roberto Araneda Espinoza */ class LocationPositionBuilder extends base_1.BackboneBuilder { locationPosition; constructor() { super(); this.locationPosition = new models_1.LocationPosition(); } /** * @description Adds a primitive extension to the element * @param param - the field to add the extension to * @param extension - the extension to add * @returns {this} * @example addPrimitiveExtension('_value', { value: 'test' }) */ addPrimitiveExtension(param, extension) { this.locationPosition[param] = extension; return this; } /** * @description Builds the model * @returns {LocationPosition} */ build() { return Object.assign(this.locationPosition, super.build()); } /** * @description Sets the longitude value * @description Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). * @param value - the value to set * @returns {this} */ setLongitude(value) { this.locationPosition.longitude = value; return this; } /** * @description Sets the latitude value * @description Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). * @param value - the value to set * @returns {this} */ setLatitude(value) { this.locationPosition.latitude = value; return this; } /** * @description Sets the altitude value * @description Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). * @param value - the value to set * @returns {this} */ setAltitude(value) { this.locationPosition.altitude = value; return this; } } exports.LocationPositionBuilder = LocationPositionBuilder;