001package org.hl7.fhir.dstu3.model; 002 003/*- 004 * #%L 005 * org.hl7.fhir.dstu3 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024import java.math.BigDecimal; 025 026/* 027 Copyright (c) 2011+, HL7, Inc. 028 All rights reserved. 029 030 Redistribution and use in source and binary forms, with or without modification, 031 are permitted provided that the following conditions are met: 032 033 * Redistributions of source code must retain the above copyright notice, this 034 list of conditions and the following disclaimer. 035 * Redistributions in binary form must reproduce the above copyright notice, 036 this list of conditions and the following disclaimer in the documentation 037 and/or other materials provided with the distribution. 038 * Neither the name of HL7 nor the names of its contributors may be used to 039 endorse or promote products derived from this software without specific 040 prior written permission. 041 042 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 043 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 044 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 045 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 046 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 047 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 048 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 049 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 050 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 051 POSSIBILITY OF SUCH DAMAGE. 052 053*/ 054 055// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x 056import java.util.ArrayList; 057import java.util.List; 058 059import org.hl7.fhir.exceptions.FHIRException; 060import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 061import org.hl7.fhir.utilities.Utilities; 062 063import ca.uhn.fhir.model.api.annotation.Block; 064import ca.uhn.fhir.model.api.annotation.Child; 065import ca.uhn.fhir.model.api.annotation.Description; 066import ca.uhn.fhir.model.api.annotation.ResourceDef; 067import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 068/** 069 * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated. 070 */ 071@ResourceDef(name="Location", profile="http://hl7.org/fhir/Profile/Location") 072public class Location extends DomainResource { 073 074 public enum LocationStatus { 075 /** 076 * The location is operational. 077 */ 078 ACTIVE, 079 /** 080 * The location is temporarily closed. 081 */ 082 SUSPENDED, 083 /** 084 * The location is no longer used. 085 */ 086 INACTIVE, 087 /** 088 * added to help the parsers with the generic types 089 */ 090 NULL; 091 public static LocationStatus fromCode(String codeString) throws FHIRException { 092 if (codeString == null || "".equals(codeString)) 093 return null; 094 if ("active".equals(codeString)) 095 return ACTIVE; 096 if ("suspended".equals(codeString)) 097 return SUSPENDED; 098 if ("inactive".equals(codeString)) 099 return INACTIVE; 100 if (Configuration.isAcceptInvalidEnums()) 101 return null; 102 else 103 throw new FHIRException("Unknown LocationStatus code '"+codeString+"'"); 104 } 105 public String toCode() { 106 switch (this) { 107 case ACTIVE: return "active"; 108 case SUSPENDED: return "suspended"; 109 case INACTIVE: return "inactive"; 110 default: return "?"; 111 } 112 } 113 public String getSystem() { 114 switch (this) { 115 case ACTIVE: return "http://hl7.org/fhir/location-status"; 116 case SUSPENDED: return "http://hl7.org/fhir/location-status"; 117 case INACTIVE: return "http://hl7.org/fhir/location-status"; 118 default: return "?"; 119 } 120 } 121 public String getDefinition() { 122 switch (this) { 123 case ACTIVE: return "The location is operational."; 124 case SUSPENDED: return "The location is temporarily closed."; 125 case INACTIVE: return "The location is no longer used."; 126 default: return "?"; 127 } 128 } 129 public String getDisplay() { 130 switch (this) { 131 case ACTIVE: return "Active"; 132 case SUSPENDED: return "Suspended"; 133 case INACTIVE: return "Inactive"; 134 default: return "?"; 135 } 136 } 137 } 138 139 public static class LocationStatusEnumFactory implements EnumFactory<LocationStatus> { 140 public LocationStatus fromCode(String codeString) throws IllegalArgumentException { 141 if (codeString == null || "".equals(codeString)) 142 if (codeString == null || "".equals(codeString)) 143 return null; 144 if ("active".equals(codeString)) 145 return LocationStatus.ACTIVE; 146 if ("suspended".equals(codeString)) 147 return LocationStatus.SUSPENDED; 148 if ("inactive".equals(codeString)) 149 return LocationStatus.INACTIVE; 150 throw new IllegalArgumentException("Unknown LocationStatus code '"+codeString+"'"); 151 } 152 public Enumeration<LocationStatus> fromType(Base code) throws FHIRException { 153 if (code == null) 154 return null; 155 if (code.isEmpty()) 156 return new Enumeration<LocationStatus>(this); 157 String codeString = ((PrimitiveType) code).asStringValue(); 158 if (codeString == null || "".equals(codeString)) 159 return null; 160 if ("active".equals(codeString)) 161 return new Enumeration<LocationStatus>(this, LocationStatus.ACTIVE); 162 if ("suspended".equals(codeString)) 163 return new Enumeration<LocationStatus>(this, LocationStatus.SUSPENDED); 164 if ("inactive".equals(codeString)) 165 return new Enumeration<LocationStatus>(this, LocationStatus.INACTIVE); 166 throw new FHIRException("Unknown LocationStatus code '"+codeString+"'"); 167 } 168 public String toCode(LocationStatus code) { 169 if (code == LocationStatus.ACTIVE) 170 return "active"; 171 if (code == LocationStatus.SUSPENDED) 172 return "suspended"; 173 if (code == LocationStatus.INACTIVE) 174 return "inactive"; 175 return "?"; 176 } 177 public String toSystem(LocationStatus code) { 178 return code.getSystem(); 179 } 180 } 181 182 public enum LocationMode { 183 /** 184 * The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A). 185 */ 186 INSTANCE, 187 /** 188 * The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.). 189 */ 190 KIND, 191 /** 192 * added to help the parsers with the generic types 193 */ 194 NULL; 195 public static LocationMode fromCode(String codeString) throws FHIRException { 196 if (codeString == null || "".equals(codeString)) 197 return null; 198 if ("instance".equals(codeString)) 199 return INSTANCE; 200 if ("kind".equals(codeString)) 201 return KIND; 202 if (Configuration.isAcceptInvalidEnums()) 203 return null; 204 else 205 throw new FHIRException("Unknown LocationMode code '"+codeString+"'"); 206 } 207 public String toCode() { 208 switch (this) { 209 case INSTANCE: return "instance"; 210 case KIND: return "kind"; 211 default: return "?"; 212 } 213 } 214 public String getSystem() { 215 switch (this) { 216 case INSTANCE: return "http://hl7.org/fhir/location-mode"; 217 case KIND: return "http://hl7.org/fhir/location-mode"; 218 default: return "?"; 219 } 220 } 221 public String getDefinition() { 222 switch (this) { 223 case INSTANCE: return "The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A)."; 224 case KIND: return "The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.)."; 225 default: return "?"; 226 } 227 } 228 public String getDisplay() { 229 switch (this) { 230 case INSTANCE: return "Instance"; 231 case KIND: return "Kind"; 232 default: return "?"; 233 } 234 } 235 } 236 237 public static class LocationModeEnumFactory implements EnumFactory<LocationMode> { 238 public LocationMode fromCode(String codeString) throws IllegalArgumentException { 239 if (codeString == null || "".equals(codeString)) 240 if (codeString == null || "".equals(codeString)) 241 return null; 242 if ("instance".equals(codeString)) 243 return LocationMode.INSTANCE; 244 if ("kind".equals(codeString)) 245 return LocationMode.KIND; 246 throw new IllegalArgumentException("Unknown LocationMode code '"+codeString+"'"); 247 } 248 public Enumeration<LocationMode> fromType(Base code) throws FHIRException { 249 if (code == null) 250 return null; 251 if (code.isEmpty()) 252 return new Enumeration<LocationMode>(this); 253 String codeString = ((PrimitiveType) code).asStringValue(); 254 if (codeString == null || "".equals(codeString)) 255 return null; 256 if ("instance".equals(codeString)) 257 return new Enumeration<LocationMode>(this, LocationMode.INSTANCE); 258 if ("kind".equals(codeString)) 259 return new Enumeration<LocationMode>(this, LocationMode.KIND); 260 throw new FHIRException("Unknown LocationMode code '"+codeString+"'"); 261 } 262 public String toCode(LocationMode code) { 263 if (code == LocationMode.INSTANCE) 264 return "instance"; 265 if (code == LocationMode.KIND) 266 return "kind"; 267 return "?"; 268 } 269 public String toSystem(LocationMode code) { 270 return code.getSystem(); 271 } 272 } 273 274 @Block() 275 public static class LocationPositionComponent extends BackboneElement implements IBaseBackboneElement { 276 /** 277 * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). 278 */ 279 @Child(name = "longitude", type = {DecimalType.class}, order=1, min=1, max=1, modifier=false, summary=false) 280 @Description(shortDefinition="Longitude with WGS84 datum", formalDefinition="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)." ) 281 protected DecimalType longitude; 282 283 /** 284 * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). 285 */ 286 @Child(name = "latitude", type = {DecimalType.class}, order=2, min=1, max=1, modifier=false, summary=false) 287 @Description(shortDefinition="Latitude with WGS84 datum", formalDefinition="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)." ) 288 protected DecimalType latitude; 289 290 /** 291 * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). 292 */ 293 @Child(name = "altitude", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false) 294 @Description(shortDefinition="Altitude with WGS84 datum", formalDefinition="Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)." ) 295 protected DecimalType altitude; 296 297 private static final long serialVersionUID = -74276134L; 298 299 /** 300 * Constructor 301 */ 302 public LocationPositionComponent() { 303 super(); 304 } 305 306 /** 307 * Constructor 308 */ 309 public LocationPositionComponent(DecimalType longitude, DecimalType latitude) { 310 super(); 311 this.longitude = longitude; 312 this.latitude = latitude; 313 } 314 315 /** 316 * @return {@link #longitude} (Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getLongitude" gives direct access to the value 317 */ 318 public DecimalType getLongitudeElement() { 319 if (this.longitude == null) 320 if (Configuration.errorOnAutoCreate()) 321 throw new Error("Attempt to auto-create LocationPositionComponent.longitude"); 322 else if (Configuration.doAutoCreate()) 323 this.longitude = new DecimalType(); // bb 324 return this.longitude; 325 } 326 327 public boolean hasLongitudeElement() { 328 return this.longitude != null && !this.longitude.isEmpty(); 329 } 330 331 public boolean hasLongitude() { 332 return this.longitude != null && !this.longitude.isEmpty(); 333 } 334 335 /** 336 * @param value {@link #longitude} (Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getLongitude" gives direct access to the value 337 */ 338 public LocationPositionComponent setLongitudeElement(DecimalType value) { 339 this.longitude = value; 340 return this; 341 } 342 343 /** 344 * @return Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). 345 */ 346 public BigDecimal getLongitude() { 347 return this.longitude == null ? null : this.longitude.getValue(); 348 } 349 350 /** 351 * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). 352 */ 353 public LocationPositionComponent setLongitude(BigDecimal value) { 354 if (this.longitude == null) 355 this.longitude = new DecimalType(); 356 this.longitude.setValue(value); 357 return this; 358 } 359 360 /** 361 * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). 362 */ 363 public LocationPositionComponent setLongitude(long value) { 364 this.longitude = new DecimalType(); 365 this.longitude.setValue(value); 366 return this; 367 } 368 369 /** 370 * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). 371 */ 372 public LocationPositionComponent setLongitude(double value) { 373 this.longitude = new DecimalType(); 374 this.longitude.setValue(value); 375 return this; 376 } 377 378 /** 379 * @return {@link #latitude} (Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getLatitude" gives direct access to the value 380 */ 381 public DecimalType getLatitudeElement() { 382 if (this.latitude == null) 383 if (Configuration.errorOnAutoCreate()) 384 throw new Error("Attempt to auto-create LocationPositionComponent.latitude"); 385 else if (Configuration.doAutoCreate()) 386 this.latitude = new DecimalType(); // bb 387 return this.latitude; 388 } 389 390 public boolean hasLatitudeElement() { 391 return this.latitude != null && !this.latitude.isEmpty(); 392 } 393 394 public boolean hasLatitude() { 395 return this.latitude != null && !this.latitude.isEmpty(); 396 } 397 398 /** 399 * @param value {@link #latitude} (Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getLatitude" gives direct access to the value 400 */ 401 public LocationPositionComponent setLatitudeElement(DecimalType value) { 402 this.latitude = value; 403 return this; 404 } 405 406 /** 407 * @return Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). 408 */ 409 public BigDecimal getLatitude() { 410 return this.latitude == null ? null : this.latitude.getValue(); 411 } 412 413 /** 414 * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). 415 */ 416 public LocationPositionComponent setLatitude(BigDecimal value) { 417 if (this.latitude == null) 418 this.latitude = new DecimalType(); 419 this.latitude.setValue(value); 420 return this; 421 } 422 423 /** 424 * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). 425 */ 426 public LocationPositionComponent setLatitude(long value) { 427 this.latitude = new DecimalType(); 428 this.latitude.setValue(value); 429 return this; 430 } 431 432 /** 433 * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). 434 */ 435 public LocationPositionComponent setLatitude(double value) { 436 this.latitude = new DecimalType(); 437 this.latitude.setValue(value); 438 return this; 439 } 440 441 /** 442 * @return {@link #altitude} (Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getAltitude" gives direct access to the value 443 */ 444 public DecimalType getAltitudeElement() { 445 if (this.altitude == null) 446 if (Configuration.errorOnAutoCreate()) 447 throw new Error("Attempt to auto-create LocationPositionComponent.altitude"); 448 else if (Configuration.doAutoCreate()) 449 this.altitude = new DecimalType(); // bb 450 return this.altitude; 451 } 452 453 public boolean hasAltitudeElement() { 454 return this.altitude != null && !this.altitude.isEmpty(); 455 } 456 457 public boolean hasAltitude() { 458 return this.altitude != null && !this.altitude.isEmpty(); 459 } 460 461 /** 462 * @param value {@link #altitude} (Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getAltitude" gives direct access to the value 463 */ 464 public LocationPositionComponent setAltitudeElement(DecimalType value) { 465 this.altitude = value; 466 return this; 467 } 468 469 /** 470 * @return Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). 471 */ 472 public BigDecimal getAltitude() { 473 return this.altitude == null ? null : this.altitude.getValue(); 474 } 475 476 /** 477 * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). 478 */ 479 public LocationPositionComponent setAltitude(BigDecimal value) { 480 if (value == null) 481 this.altitude = null; 482 else { 483 if (this.altitude == null) 484 this.altitude = new DecimalType(); 485 this.altitude.setValue(value); 486 } 487 return this; 488 } 489 490 /** 491 * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). 492 */ 493 public LocationPositionComponent setAltitude(long value) { 494 this.altitude = new DecimalType(); 495 this.altitude.setValue(value); 496 return this; 497 } 498 499 /** 500 * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). 501 */ 502 public LocationPositionComponent setAltitude(double value) { 503 this.altitude = new DecimalType(); 504 this.altitude.setValue(value); 505 return this; 506 } 507 508 protected void listChildren(List<Property> children) { 509 super.listChildren(children); 510 children.add(new Property("longitude", "decimal", "Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).", 0, 1, longitude)); 511 children.add(new Property("latitude", "decimal", "Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).", 0, 1, latitude)); 512 children.add(new Property("altitude", "decimal", "Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).", 0, 1, altitude)); 513 } 514 515 @Override 516 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 517 switch (_hash) { 518 case 137365935: /*longitude*/ return new Property("longitude", "decimal", "Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).", 0, 1, longitude); 519 case -1439978388: /*latitude*/ return new Property("latitude", "decimal", "Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).", 0, 1, latitude); 520 case 2036550306: /*altitude*/ return new Property("altitude", "decimal", "Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).", 0, 1, altitude); 521 default: return super.getNamedProperty(_hash, _name, _checkValid); 522 } 523 524 } 525 526 @Override 527 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 528 switch (hash) { 529 case 137365935: /*longitude*/ return this.longitude == null ? new Base[0] : new Base[] {this.longitude}; // DecimalType 530 case -1439978388: /*latitude*/ return this.latitude == null ? new Base[0] : new Base[] {this.latitude}; // DecimalType 531 case 2036550306: /*altitude*/ return this.altitude == null ? new Base[0] : new Base[] {this.altitude}; // DecimalType 532 default: return super.getProperty(hash, name, checkValid); 533 } 534 535 } 536 537 @Override 538 public Base setProperty(int hash, String name, Base value) throws FHIRException { 539 switch (hash) { 540 case 137365935: // longitude 541 this.longitude = castToDecimal(value); // DecimalType 542 return value; 543 case -1439978388: // latitude 544 this.latitude = castToDecimal(value); // DecimalType 545 return value; 546 case 2036550306: // altitude 547 this.altitude = castToDecimal(value); // DecimalType 548 return value; 549 default: return super.setProperty(hash, name, value); 550 } 551 552 } 553 554 @Override 555 public Base setProperty(String name, Base value) throws FHIRException { 556 if (name.equals("longitude")) { 557 this.longitude = castToDecimal(value); // DecimalType 558 } else if (name.equals("latitude")) { 559 this.latitude = castToDecimal(value); // DecimalType 560 } else if (name.equals("altitude")) { 561 this.altitude = castToDecimal(value); // DecimalType 562 } else 563 return super.setProperty(name, value); 564 return value; 565 } 566 567 @Override 568 public Base makeProperty(int hash, String name) throws FHIRException { 569 switch (hash) { 570 case 137365935: return getLongitudeElement(); 571 case -1439978388: return getLatitudeElement(); 572 case 2036550306: return getAltitudeElement(); 573 default: return super.makeProperty(hash, name); 574 } 575 576 } 577 578 @Override 579 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 580 switch (hash) { 581 case 137365935: /*longitude*/ return new String[] {"decimal"}; 582 case -1439978388: /*latitude*/ return new String[] {"decimal"}; 583 case 2036550306: /*altitude*/ return new String[] {"decimal"}; 584 default: return super.getTypesForProperty(hash, name); 585 } 586 587 } 588 589 @Override 590 public Base addChild(String name) throws FHIRException { 591 if (name.equals("longitude")) { 592 throw new FHIRException("Cannot call addChild on a primitive type Location.longitude"); 593 } 594 else if (name.equals("latitude")) { 595 throw new FHIRException("Cannot call addChild on a primitive type Location.latitude"); 596 } 597 else if (name.equals("altitude")) { 598 throw new FHIRException("Cannot call addChild on a primitive type Location.altitude"); 599 } 600 else 601 return super.addChild(name); 602 } 603 604 public LocationPositionComponent copy() { 605 LocationPositionComponent dst = new LocationPositionComponent(); 606 copyValues(dst); 607 dst.longitude = longitude == null ? null : longitude.copy(); 608 dst.latitude = latitude == null ? null : latitude.copy(); 609 dst.altitude = altitude == null ? null : altitude.copy(); 610 return dst; 611 } 612 613 @Override 614 public boolean equalsDeep(Base other_) { 615 if (!super.equalsDeep(other_)) 616 return false; 617 if (!(other_ instanceof LocationPositionComponent)) 618 return false; 619 LocationPositionComponent o = (LocationPositionComponent) other_; 620 return compareDeep(longitude, o.longitude, true) && compareDeep(latitude, o.latitude, true) && compareDeep(altitude, o.altitude, true) 621 ; 622 } 623 624 @Override 625 public boolean equalsShallow(Base other_) { 626 if (!super.equalsShallow(other_)) 627 return false; 628 if (!(other_ instanceof LocationPositionComponent)) 629 return false; 630 LocationPositionComponent o = (LocationPositionComponent) other_; 631 return compareValues(longitude, o.longitude, true) && compareValues(latitude, o.latitude, true) && compareValues(altitude, o.altitude, true) 632 ; 633 } 634 635 public boolean isEmpty() { 636 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(longitude, latitude, altitude 637 ); 638 } 639 640 public String fhirType() { 641 return "Location.position"; 642 643 } 644 645 } 646 647 /** 648 * Unique code or number identifying the location to its users. 649 */ 650 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 651 @Description(shortDefinition="Unique code or number identifying the location to its users", formalDefinition="Unique code or number identifying the location to its users." ) 652 protected List<Identifier> identifier; 653 654 /** 655 * The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location. 656 */ 657 @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) 658 @Description(shortDefinition="active | suspended | inactive", formalDefinition="The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location." ) 659 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-status") 660 protected Enumeration<LocationStatus> status; 661 662 /** 663 * The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance. 664 */ 665 @Child(name = "operationalStatus", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) 666 @Description(shortDefinition="The Operational status of the location (typically only for a bed/room)", formalDefinition="The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance." ) 667 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v2-0116") 668 protected Coding operationalStatus; 669 670 /** 671 * Name of the location as used by humans. Does not need to be unique. 672 */ 673 @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 674 @Description(shortDefinition="Name of the location as used by humans", formalDefinition="Name of the location as used by humans. Does not need to be unique." ) 675 protected StringType name; 676 677 /** 678 * A list of alternate names that the location is known as, or was known as in the past. 679 */ 680 @Child(name = "alias", type = {StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 681 @Description(shortDefinition="A list of alternate names that the location is known as, or was known as in the past", formalDefinition="A list of alternate names that the location is known as, or was known as in the past." ) 682 protected List<StringType> alias; 683 684 /** 685 * Description of the Location, which helps in finding or referencing the place. 686 */ 687 @Child(name = "description", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 688 @Description(shortDefinition="Additional details about the location that could be displayed as further information to identify the location beyond its name", formalDefinition="Description of the Location, which helps in finding or referencing the place." ) 689 protected StringType description; 690 691 /** 692 * Indicates whether a resource instance represents a specific location or a class of locations. 693 */ 694 @Child(name = "mode", type = {CodeType.class}, order=6, min=0, max=1, modifier=true, summary=true) 695 @Description(shortDefinition="instance | kind", formalDefinition="Indicates whether a resource instance represents a specific location or a class of locations." ) 696 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-mode") 697 protected Enumeration<LocationMode> mode; 698 699 /** 700 * Indicates the type of function performed at the location. 701 */ 702 @Child(name = "type", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true) 703 @Description(shortDefinition="Type of function performed", formalDefinition="Indicates the type of function performed at the location." ) 704 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-ServiceDeliveryLocationRoleType") 705 protected CodeableConcept type; 706 707 /** 708 * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites. 709 */ 710 @Child(name = "telecom", type = {ContactPoint.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 711 @Description(shortDefinition="Contact details of the location", formalDefinition="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites." ) 712 protected List<ContactPoint> telecom; 713 714 /** 715 * Physical location. 716 */ 717 @Child(name = "address", type = {Address.class}, order=9, min=0, max=1, modifier=false, summary=false) 718 @Description(shortDefinition="Physical location", formalDefinition="Physical location." ) 719 protected Address address; 720 721 /** 722 * Physical form of the location, e.g. building, room, vehicle, road. 723 */ 724 @Child(name = "physicalType", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true) 725 @Description(shortDefinition="Physical form of the location", formalDefinition="Physical form of the location, e.g. building, room, vehicle, road." ) 726 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-physical-type") 727 protected CodeableConcept physicalType; 728 729 /** 730 * The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML). 731 */ 732 @Child(name = "position", type = {}, order=11, min=0, max=1, modifier=false, summary=false) 733 @Description(shortDefinition="The absolute geographic location", formalDefinition="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)." ) 734 protected LocationPositionComponent position; 735 736 /** 737 * The organization responsible for the provisioning and upkeep of the location. 738 */ 739 @Child(name = "managingOrganization", type = {Organization.class}, order=12, min=0, max=1, modifier=false, summary=true) 740 @Description(shortDefinition="Organization responsible for provisioning and upkeep", formalDefinition="The organization responsible for the provisioning and upkeep of the location." ) 741 protected Reference managingOrganization; 742 743 /** 744 * The actual object that is the target of the reference (The organization responsible for the provisioning and upkeep of the location.) 745 */ 746 protected Organization managingOrganizationTarget; 747 748 /** 749 * Another Location which this Location is physically part of. 750 */ 751 @Child(name = "partOf", type = {Location.class}, order=13, min=0, max=1, modifier=false, summary=false) 752 @Description(shortDefinition="Another Location this one is physically part of", formalDefinition="Another Location which this Location is physically part of." ) 753 protected Reference partOf; 754 755 /** 756 * The actual object that is the target of the reference (Another Location which this Location is physically part of.) 757 */ 758 protected Location partOfTarget; 759 760 /** 761 * Technical endpoints providing access to services operated for the location. 762 */ 763 @Child(name = "endpoint", type = {Endpoint.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 764 @Description(shortDefinition="Technical endpoints providing access to services operated for the location", formalDefinition="Technical endpoints providing access to services operated for the location." ) 765 protected List<Reference> endpoint; 766 /** 767 * The actual objects that are the target of the reference (Technical endpoints providing access to services operated for the location.) 768 */ 769 protected List<Endpoint> endpointTarget; 770 771 772 private static final long serialVersionUID = -1603579027L; 773 774 /** 775 * Constructor 776 */ 777 public Location() { 778 super(); 779 } 780 781 /** 782 * @return {@link #identifier} (Unique code or number identifying the location to its users.) 783 */ 784 public List<Identifier> getIdentifier() { 785 if (this.identifier == null) 786 this.identifier = new ArrayList<Identifier>(); 787 return this.identifier; 788 } 789 790 /** 791 * @return Returns a reference to <code>this</code> for easy method chaining 792 */ 793 public Location setIdentifier(List<Identifier> theIdentifier) { 794 this.identifier = theIdentifier; 795 return this; 796 } 797 798 public boolean hasIdentifier() { 799 if (this.identifier == null) 800 return false; 801 for (Identifier item : this.identifier) 802 if (!item.isEmpty()) 803 return true; 804 return false; 805 } 806 807 public Identifier addIdentifier() { //3 808 Identifier t = new Identifier(); 809 if (this.identifier == null) 810 this.identifier = new ArrayList<Identifier>(); 811 this.identifier.add(t); 812 return t; 813 } 814 815 public Location addIdentifier(Identifier t) { //3 816 if (t == null) 817 return this; 818 if (this.identifier == null) 819 this.identifier = new ArrayList<Identifier>(); 820 this.identifier.add(t); 821 return this; 822 } 823 824 /** 825 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 826 */ 827 public Identifier getIdentifierFirstRep() { 828 if (getIdentifier().isEmpty()) { 829 addIdentifier(); 830 } 831 return getIdentifier().get(0); 832 } 833 834 /** 835 * @return {@link #status} (The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 836 */ 837 public Enumeration<LocationStatus> getStatusElement() { 838 if (this.status == null) 839 if (Configuration.errorOnAutoCreate()) 840 throw new Error("Attempt to auto-create Location.status"); 841 else if (Configuration.doAutoCreate()) 842 this.status = new Enumeration<LocationStatus>(new LocationStatusEnumFactory()); // bb 843 return this.status; 844 } 845 846 public boolean hasStatusElement() { 847 return this.status != null && !this.status.isEmpty(); 848 } 849 850 public boolean hasStatus() { 851 return this.status != null && !this.status.isEmpty(); 852 } 853 854 /** 855 * @param value {@link #status} (The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 856 */ 857 public Location setStatusElement(Enumeration<LocationStatus> value) { 858 this.status = value; 859 return this; 860 } 861 862 /** 863 * @return The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location. 864 */ 865 public LocationStatus getStatus() { 866 return this.status == null ? null : this.status.getValue(); 867 } 868 869 /** 870 * @param value The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location. 871 */ 872 public Location setStatus(LocationStatus value) { 873 if (value == null) 874 this.status = null; 875 else { 876 if (this.status == null) 877 this.status = new Enumeration<LocationStatus>(new LocationStatusEnumFactory()); 878 this.status.setValue(value); 879 } 880 return this; 881 } 882 883 /** 884 * @return {@link #operationalStatus} (The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.) 885 */ 886 public Coding getOperationalStatus() { 887 if (this.operationalStatus == null) 888 if (Configuration.errorOnAutoCreate()) 889 throw new Error("Attempt to auto-create Location.operationalStatus"); 890 else if (Configuration.doAutoCreate()) 891 this.operationalStatus = new Coding(); // cc 892 return this.operationalStatus; 893 } 894 895 public boolean hasOperationalStatus() { 896 return this.operationalStatus != null && !this.operationalStatus.isEmpty(); 897 } 898 899 /** 900 * @param value {@link #operationalStatus} (The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.) 901 */ 902 public Location setOperationalStatus(Coding value) { 903 this.operationalStatus = value; 904 return this; 905 } 906 907 /** 908 * @return {@link #name} (Name of the location as used by humans. Does not need to be unique.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 909 */ 910 public StringType getNameElement() { 911 if (this.name == null) 912 if (Configuration.errorOnAutoCreate()) 913 throw new Error("Attempt to auto-create Location.name"); 914 else if (Configuration.doAutoCreate()) 915 this.name = new StringType(); // bb 916 return this.name; 917 } 918 919 public boolean hasNameElement() { 920 return this.name != null && !this.name.isEmpty(); 921 } 922 923 public boolean hasName() { 924 return this.name != null && !this.name.isEmpty(); 925 } 926 927 /** 928 * @param value {@link #name} (Name of the location as used by humans. Does not need to be unique.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 929 */ 930 public Location setNameElement(StringType value) { 931 this.name = value; 932 return this; 933 } 934 935 /** 936 * @return Name of the location as used by humans. Does not need to be unique. 937 */ 938 public String getName() { 939 return this.name == null ? null : this.name.getValue(); 940 } 941 942 /** 943 * @param value Name of the location as used by humans. Does not need to be unique. 944 */ 945 public Location setName(String value) { 946 if (Utilities.noString(value)) 947 this.name = null; 948 else { 949 if (this.name == null) 950 this.name = new StringType(); 951 this.name.setValue(value); 952 } 953 return this; 954 } 955 956 /** 957 * @return {@link #alias} (A list of alternate names that the location is known as, or was known as in the past.) 958 */ 959 public List<StringType> getAlias() { 960 if (this.alias == null) 961 this.alias = new ArrayList<StringType>(); 962 return this.alias; 963 } 964 965 /** 966 * @return Returns a reference to <code>this</code> for easy method chaining 967 */ 968 public Location setAlias(List<StringType> theAlias) { 969 this.alias = theAlias; 970 return this; 971 } 972 973 public boolean hasAlias() { 974 if (this.alias == null) 975 return false; 976 for (StringType item : this.alias) 977 if (!item.isEmpty()) 978 return true; 979 return false; 980 } 981 982 /** 983 * @return {@link #alias} (A list of alternate names that the location is known as, or was known as in the past.) 984 */ 985 public StringType addAliasElement() {//2 986 StringType t = new StringType(); 987 if (this.alias == null) 988 this.alias = new ArrayList<StringType>(); 989 this.alias.add(t); 990 return t; 991 } 992 993 /** 994 * @param value {@link #alias} (A list of alternate names that the location is known as, or was known as in the past.) 995 */ 996 public Location addAlias(String value) { //1 997 StringType t = new StringType(); 998 t.setValue(value); 999 if (this.alias == null) 1000 this.alias = new ArrayList<StringType>(); 1001 this.alias.add(t); 1002 return this; 1003 } 1004 1005 /** 1006 * @param value {@link #alias} (A list of alternate names that the location is known as, or was known as in the past.) 1007 */ 1008 public boolean hasAlias(String value) { 1009 if (this.alias == null) 1010 return false; 1011 for (StringType v : this.alias) 1012 if (v.getValue().equals(value)) // string 1013 return true; 1014 return false; 1015 } 1016 1017 /** 1018 * @return {@link #description} (Description of the Location, which helps in finding or referencing the place.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1019 */ 1020 public StringType getDescriptionElement() { 1021 if (this.description == null) 1022 if (Configuration.errorOnAutoCreate()) 1023 throw new Error("Attempt to auto-create Location.description"); 1024 else if (Configuration.doAutoCreate()) 1025 this.description = new StringType(); // bb 1026 return this.description; 1027 } 1028 1029 public boolean hasDescriptionElement() { 1030 return this.description != null && !this.description.isEmpty(); 1031 } 1032 1033 public boolean hasDescription() { 1034 return this.description != null && !this.description.isEmpty(); 1035 } 1036 1037 /** 1038 * @param value {@link #description} (Description of the Location, which helps in finding or referencing the place.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1039 */ 1040 public Location setDescriptionElement(StringType value) { 1041 this.description = value; 1042 return this; 1043 } 1044 1045 /** 1046 * @return Description of the Location, which helps in finding or referencing the place. 1047 */ 1048 public String getDescription() { 1049 return this.description == null ? null : this.description.getValue(); 1050 } 1051 1052 /** 1053 * @param value Description of the Location, which helps in finding or referencing the place. 1054 */ 1055 public Location setDescription(String value) { 1056 if (Utilities.noString(value)) 1057 this.description = null; 1058 else { 1059 if (this.description == null) 1060 this.description = new StringType(); 1061 this.description.setValue(value); 1062 } 1063 return this; 1064 } 1065 1066 /** 1067 * @return {@link #mode} (Indicates whether a resource instance represents a specific location or a class of locations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 1068 */ 1069 public Enumeration<LocationMode> getModeElement() { 1070 if (this.mode == null) 1071 if (Configuration.errorOnAutoCreate()) 1072 throw new Error("Attempt to auto-create Location.mode"); 1073 else if (Configuration.doAutoCreate()) 1074 this.mode = new Enumeration<LocationMode>(new LocationModeEnumFactory()); // bb 1075 return this.mode; 1076 } 1077 1078 public boolean hasModeElement() { 1079 return this.mode != null && !this.mode.isEmpty(); 1080 } 1081 1082 public boolean hasMode() { 1083 return this.mode != null && !this.mode.isEmpty(); 1084 } 1085 1086 /** 1087 * @param value {@link #mode} (Indicates whether a resource instance represents a specific location or a class of locations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 1088 */ 1089 public Location setModeElement(Enumeration<LocationMode> value) { 1090 this.mode = value; 1091 return this; 1092 } 1093 1094 /** 1095 * @return Indicates whether a resource instance represents a specific location or a class of locations. 1096 */ 1097 public LocationMode getMode() { 1098 return this.mode == null ? null : this.mode.getValue(); 1099 } 1100 1101 /** 1102 * @param value Indicates whether a resource instance represents a specific location or a class of locations. 1103 */ 1104 public Location setMode(LocationMode value) { 1105 if (value == null) 1106 this.mode = null; 1107 else { 1108 if (this.mode == null) 1109 this.mode = new Enumeration<LocationMode>(new LocationModeEnumFactory()); 1110 this.mode.setValue(value); 1111 } 1112 return this; 1113 } 1114 1115 /** 1116 * @return {@link #type} (Indicates the type of function performed at the location.) 1117 */ 1118 public CodeableConcept getType() { 1119 if (this.type == null) 1120 if (Configuration.errorOnAutoCreate()) 1121 throw new Error("Attempt to auto-create Location.type"); 1122 else if (Configuration.doAutoCreate()) 1123 this.type = new CodeableConcept(); // cc 1124 return this.type; 1125 } 1126 1127 public boolean hasType() { 1128 return this.type != null && !this.type.isEmpty(); 1129 } 1130 1131 /** 1132 * @param value {@link #type} (Indicates the type of function performed at the location.) 1133 */ 1134 public Location setType(CodeableConcept value) { 1135 this.type = value; 1136 return this; 1137 } 1138 1139 /** 1140 * @return {@link #telecom} (The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.) 1141 */ 1142 public List<ContactPoint> getTelecom() { 1143 if (this.telecom == null) 1144 this.telecom = new ArrayList<ContactPoint>(); 1145 return this.telecom; 1146 } 1147 1148 /** 1149 * @return Returns a reference to <code>this</code> for easy method chaining 1150 */ 1151 public Location setTelecom(List<ContactPoint> theTelecom) { 1152 this.telecom = theTelecom; 1153 return this; 1154 } 1155 1156 public boolean hasTelecom() { 1157 if (this.telecom == null) 1158 return false; 1159 for (ContactPoint item : this.telecom) 1160 if (!item.isEmpty()) 1161 return true; 1162 return false; 1163 } 1164 1165 public ContactPoint addTelecom() { //3 1166 ContactPoint t = new ContactPoint(); 1167 if (this.telecom == null) 1168 this.telecom = new ArrayList<ContactPoint>(); 1169 this.telecom.add(t); 1170 return t; 1171 } 1172 1173 public Location addTelecom(ContactPoint t) { //3 1174 if (t == null) 1175 return this; 1176 if (this.telecom == null) 1177 this.telecom = new ArrayList<ContactPoint>(); 1178 this.telecom.add(t); 1179 return this; 1180 } 1181 1182 /** 1183 * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist 1184 */ 1185 public ContactPoint getTelecomFirstRep() { 1186 if (getTelecom().isEmpty()) { 1187 addTelecom(); 1188 } 1189 return getTelecom().get(0); 1190 } 1191 1192 /** 1193 * @return {@link #address} (Physical location.) 1194 */ 1195 public Address getAddress() { 1196 if (this.address == null) 1197 if (Configuration.errorOnAutoCreate()) 1198 throw new Error("Attempt to auto-create Location.address"); 1199 else if (Configuration.doAutoCreate()) 1200 this.address = new Address(); // cc 1201 return this.address; 1202 } 1203 1204 public boolean hasAddress() { 1205 return this.address != null && !this.address.isEmpty(); 1206 } 1207 1208 /** 1209 * @param value {@link #address} (Physical location.) 1210 */ 1211 public Location setAddress(Address value) { 1212 this.address = value; 1213 return this; 1214 } 1215 1216 /** 1217 * @return {@link #physicalType} (Physical form of the location, e.g. building, room, vehicle, road.) 1218 */ 1219 public CodeableConcept getPhysicalType() { 1220 if (this.physicalType == null) 1221 if (Configuration.errorOnAutoCreate()) 1222 throw new Error("Attempt to auto-create Location.physicalType"); 1223 else if (Configuration.doAutoCreate()) 1224 this.physicalType = new CodeableConcept(); // cc 1225 return this.physicalType; 1226 } 1227 1228 public boolean hasPhysicalType() { 1229 return this.physicalType != null && !this.physicalType.isEmpty(); 1230 } 1231 1232 /** 1233 * @param value {@link #physicalType} (Physical form of the location, e.g. building, room, vehicle, road.) 1234 */ 1235 public Location setPhysicalType(CodeableConcept value) { 1236 this.physicalType = value; 1237 return this; 1238 } 1239 1240 /** 1241 * @return {@link #position} (The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).) 1242 */ 1243 public LocationPositionComponent getPosition() { 1244 if (this.position == null) 1245 if (Configuration.errorOnAutoCreate()) 1246 throw new Error("Attempt to auto-create Location.position"); 1247 else if (Configuration.doAutoCreate()) 1248 this.position = new LocationPositionComponent(); // cc 1249 return this.position; 1250 } 1251 1252 public boolean hasPosition() { 1253 return this.position != null && !this.position.isEmpty(); 1254 } 1255 1256 /** 1257 * @param value {@link #position} (The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).) 1258 */ 1259 public Location setPosition(LocationPositionComponent value) { 1260 this.position = value; 1261 return this; 1262 } 1263 1264 /** 1265 * @return {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.) 1266 */ 1267 public Reference getManagingOrganization() { 1268 if (this.managingOrganization == null) 1269 if (Configuration.errorOnAutoCreate()) 1270 throw new Error("Attempt to auto-create Location.managingOrganization"); 1271 else if (Configuration.doAutoCreate()) 1272 this.managingOrganization = new Reference(); // cc 1273 return this.managingOrganization; 1274 } 1275 1276 public boolean hasManagingOrganization() { 1277 return this.managingOrganization != null && !this.managingOrganization.isEmpty(); 1278 } 1279 1280 /** 1281 * @param value {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.) 1282 */ 1283 public Location setManagingOrganization(Reference value) { 1284 this.managingOrganization = value; 1285 return this; 1286 } 1287 1288 /** 1289 * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization responsible for the provisioning and upkeep of the location.) 1290 */ 1291 public Organization getManagingOrganizationTarget() { 1292 if (this.managingOrganizationTarget == null) 1293 if (Configuration.errorOnAutoCreate()) 1294 throw new Error("Attempt to auto-create Location.managingOrganization"); 1295 else if (Configuration.doAutoCreate()) 1296 this.managingOrganizationTarget = new Organization(); // aa 1297 return this.managingOrganizationTarget; 1298 } 1299 1300 /** 1301 * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization responsible for the provisioning and upkeep of the location.) 1302 */ 1303 public Location setManagingOrganizationTarget(Organization value) { 1304 this.managingOrganizationTarget = value; 1305 return this; 1306 } 1307 1308 /** 1309 * @return {@link #partOf} (Another Location which this Location is physically part of.) 1310 */ 1311 public Reference getPartOf() { 1312 if (this.partOf == null) 1313 if (Configuration.errorOnAutoCreate()) 1314 throw new Error("Attempt to auto-create Location.partOf"); 1315 else if (Configuration.doAutoCreate()) 1316 this.partOf = new Reference(); // cc 1317 return this.partOf; 1318 } 1319 1320 public boolean hasPartOf() { 1321 return this.partOf != null && !this.partOf.isEmpty(); 1322 } 1323 1324 /** 1325 * @param value {@link #partOf} (Another Location which this Location is physically part of.) 1326 */ 1327 public Location setPartOf(Reference value) { 1328 this.partOf = value; 1329 return this; 1330 } 1331 1332 /** 1333 * @return {@link #partOf} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Another Location which this Location is physically part of.) 1334 */ 1335 public Location getPartOfTarget() { 1336 if (this.partOfTarget == null) 1337 if (Configuration.errorOnAutoCreate()) 1338 throw new Error("Attempt to auto-create Location.partOf"); 1339 else if (Configuration.doAutoCreate()) 1340 this.partOfTarget = new Location(); // aa 1341 return this.partOfTarget; 1342 } 1343 1344 /** 1345 * @param value {@link #partOf} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Another Location which this Location is physically part of.) 1346 */ 1347 public Location setPartOfTarget(Location value) { 1348 this.partOfTarget = value; 1349 return this; 1350 } 1351 1352 /** 1353 * @return {@link #endpoint} (Technical endpoints providing access to services operated for the location.) 1354 */ 1355 public List<Reference> getEndpoint() { 1356 if (this.endpoint == null) 1357 this.endpoint = new ArrayList<Reference>(); 1358 return this.endpoint; 1359 } 1360 1361 /** 1362 * @return Returns a reference to <code>this</code> for easy method chaining 1363 */ 1364 public Location setEndpoint(List<Reference> theEndpoint) { 1365 this.endpoint = theEndpoint; 1366 return this; 1367 } 1368 1369 public boolean hasEndpoint() { 1370 if (this.endpoint == null) 1371 return false; 1372 for (Reference item : this.endpoint) 1373 if (!item.isEmpty()) 1374 return true; 1375 return false; 1376 } 1377 1378 public Reference addEndpoint() { //3 1379 Reference t = new Reference(); 1380 if (this.endpoint == null) 1381 this.endpoint = new ArrayList<Reference>(); 1382 this.endpoint.add(t); 1383 return t; 1384 } 1385 1386 public Location addEndpoint(Reference t) { //3 1387 if (t == null) 1388 return this; 1389 if (this.endpoint == null) 1390 this.endpoint = new ArrayList<Reference>(); 1391 this.endpoint.add(t); 1392 return this; 1393 } 1394 1395 /** 1396 * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist 1397 */ 1398 public Reference getEndpointFirstRep() { 1399 if (getEndpoint().isEmpty()) { 1400 addEndpoint(); 1401 } 1402 return getEndpoint().get(0); 1403 } 1404 1405 /** 1406 * @deprecated Use Reference#setResource(IBaseResource) instead 1407 */ 1408 @Deprecated 1409 public List<Endpoint> getEndpointTarget() { 1410 if (this.endpointTarget == null) 1411 this.endpointTarget = new ArrayList<Endpoint>(); 1412 return this.endpointTarget; 1413 } 1414 1415 /** 1416 * @deprecated Use Reference#setResource(IBaseResource) instead 1417 */ 1418 @Deprecated 1419 public Endpoint addEndpointTarget() { 1420 Endpoint r = new Endpoint(); 1421 if (this.endpointTarget == null) 1422 this.endpointTarget = new ArrayList<Endpoint>(); 1423 this.endpointTarget.add(r); 1424 return r; 1425 } 1426 1427 protected void listChildren(List<Property> children) { 1428 super.listChildren(children); 1429 children.add(new Property("identifier", "Identifier", "Unique code or number identifying the location to its users.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1430 children.add(new Property("status", "code", "The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.", 0, 1, status)); 1431 children.add(new Property("operationalStatus", "Coding", "The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.", 0, 1, operationalStatus)); 1432 children.add(new Property("name", "string", "Name of the location as used by humans. Does not need to be unique.", 0, 1, name)); 1433 children.add(new Property("alias", "string", "A list of alternate names that the location is known as, or was known as in the past.", 0, java.lang.Integer.MAX_VALUE, alias)); 1434 children.add(new Property("description", "string", "Description of the Location, which helps in finding or referencing the place.", 0, 1, description)); 1435 children.add(new Property("mode", "code", "Indicates whether a resource instance represents a specific location or a class of locations.", 0, 1, mode)); 1436 children.add(new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, 1, type)); 1437 children.add(new Property("telecom", "ContactPoint", "The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, telecom)); 1438 children.add(new Property("address", "Address", "Physical location.", 0, 1, address)); 1439 children.add(new Property("physicalType", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road.", 0, 1, physicalType)); 1440 children.add(new Property("position", "", "The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).", 0, 1, position)); 1441 children.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, 1, managingOrganization)); 1442 children.add(new Property("partOf", "Reference(Location)", "Another Location which this Location is physically part of.", 0, 1, partOf)); 1443 children.add(new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the location.", 0, java.lang.Integer.MAX_VALUE, endpoint)); 1444 } 1445 1446 @Override 1447 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1448 switch (_hash) { 1449 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique code or number identifying the location to its users.", 0, java.lang.Integer.MAX_VALUE, identifier); 1450 case -892481550: /*status*/ return new Property("status", "code", "The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.", 0, 1, status); 1451 case -2103166364: /*operationalStatus*/ return new Property("operationalStatus", "Coding", "The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.", 0, 1, operationalStatus); 1452 case 3373707: /*name*/ return new Property("name", "string", "Name of the location as used by humans. Does not need to be unique.", 0, 1, name); 1453 case 92902992: /*alias*/ return new Property("alias", "string", "A list of alternate names that the location is known as, or was known as in the past.", 0, java.lang.Integer.MAX_VALUE, alias); 1454 case -1724546052: /*description*/ return new Property("description", "string", "Description of the Location, which helps in finding or referencing the place.", 0, 1, description); 1455 case 3357091: /*mode*/ return new Property("mode", "code", "Indicates whether a resource instance represents a specific location or a class of locations.", 0, 1, mode); 1456 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, 1, type); 1457 case -1429363305: /*telecom*/ return new Property("telecom", "ContactPoint", "The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, telecom); 1458 case -1147692044: /*address*/ return new Property("address", "Address", "Physical location.", 0, 1, address); 1459 case -1474715471: /*physicalType*/ return new Property("physicalType", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road.", 0, 1, physicalType); 1460 case 747804969: /*position*/ return new Property("position", "", "The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).", 0, 1, position); 1461 case -2058947787: /*managingOrganization*/ return new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, 1, managingOrganization); 1462 case -995410646: /*partOf*/ return new Property("partOf", "Reference(Location)", "Another Location which this Location is physically part of.", 0, 1, partOf); 1463 case 1741102485: /*endpoint*/ return new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the location.", 0, java.lang.Integer.MAX_VALUE, endpoint); 1464 default: return super.getNamedProperty(_hash, _name, _checkValid); 1465 } 1466 1467 } 1468 1469 @Override 1470 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1471 switch (hash) { 1472 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1473 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<LocationStatus> 1474 case -2103166364: /*operationalStatus*/ return this.operationalStatus == null ? new Base[0] : new Base[] {this.operationalStatus}; // Coding 1475 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1476 case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType 1477 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1478 case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<LocationMode> 1479 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1480 case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint 1481 case -1147692044: /*address*/ return this.address == null ? new Base[0] : new Base[] {this.address}; // Address 1482 case -1474715471: /*physicalType*/ return this.physicalType == null ? new Base[0] : new Base[] {this.physicalType}; // CodeableConcept 1483 case 747804969: /*position*/ return this.position == null ? new Base[0] : new Base[] {this.position}; // LocationPositionComponent 1484 case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : new Base[] {this.managingOrganization}; // Reference 1485 case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : new Base[] {this.partOf}; // Reference 1486 case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference 1487 default: return super.getProperty(hash, name, checkValid); 1488 } 1489 1490 } 1491 1492 @Override 1493 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1494 switch (hash) { 1495 case -1618432855: // identifier 1496 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1497 return value; 1498 case -892481550: // status 1499 value = new LocationStatusEnumFactory().fromType(castToCode(value)); 1500 this.status = (Enumeration) value; // Enumeration<LocationStatus> 1501 return value; 1502 case -2103166364: // operationalStatus 1503 this.operationalStatus = castToCoding(value); // Coding 1504 return value; 1505 case 3373707: // name 1506 this.name = castToString(value); // StringType 1507 return value; 1508 case 92902992: // alias 1509 this.getAlias().add(castToString(value)); // StringType 1510 return value; 1511 case -1724546052: // description 1512 this.description = castToString(value); // StringType 1513 return value; 1514 case 3357091: // mode 1515 value = new LocationModeEnumFactory().fromType(castToCode(value)); 1516 this.mode = (Enumeration) value; // Enumeration<LocationMode> 1517 return value; 1518 case 3575610: // type 1519 this.type = castToCodeableConcept(value); // CodeableConcept 1520 return value; 1521 case -1429363305: // telecom 1522 this.getTelecom().add(castToContactPoint(value)); // ContactPoint 1523 return value; 1524 case -1147692044: // address 1525 this.address = castToAddress(value); // Address 1526 return value; 1527 case -1474715471: // physicalType 1528 this.physicalType = castToCodeableConcept(value); // CodeableConcept 1529 return value; 1530 case 747804969: // position 1531 this.position = (LocationPositionComponent) value; // LocationPositionComponent 1532 return value; 1533 case -2058947787: // managingOrganization 1534 this.managingOrganization = castToReference(value); // Reference 1535 return value; 1536 case -995410646: // partOf 1537 this.partOf = castToReference(value); // Reference 1538 return value; 1539 case 1741102485: // endpoint 1540 this.getEndpoint().add(castToReference(value)); // Reference 1541 return value; 1542 default: return super.setProperty(hash, name, value); 1543 } 1544 1545 } 1546 1547 @Override 1548 public Base setProperty(String name, Base value) throws FHIRException { 1549 if (name.equals("identifier")) { 1550 this.getIdentifier().add(castToIdentifier(value)); 1551 } else if (name.equals("status")) { 1552 value = new LocationStatusEnumFactory().fromType(castToCode(value)); 1553 this.status = (Enumeration) value; // Enumeration<LocationStatus> 1554 } else if (name.equals("operationalStatus")) { 1555 this.operationalStatus = castToCoding(value); // Coding 1556 } else if (name.equals("name")) { 1557 this.name = castToString(value); // StringType 1558 } else if (name.equals("alias")) { 1559 this.getAlias().add(castToString(value)); 1560 } else if (name.equals("description")) { 1561 this.description = castToString(value); // StringType 1562 } else if (name.equals("mode")) { 1563 value = new LocationModeEnumFactory().fromType(castToCode(value)); 1564 this.mode = (Enumeration) value; // Enumeration<LocationMode> 1565 } else if (name.equals("type")) { 1566 this.type = castToCodeableConcept(value); // CodeableConcept 1567 } else if (name.equals("telecom")) { 1568 this.getTelecom().add(castToContactPoint(value)); 1569 } else if (name.equals("address")) { 1570 this.address = castToAddress(value); // Address 1571 } else if (name.equals("physicalType")) { 1572 this.physicalType = castToCodeableConcept(value); // CodeableConcept 1573 } else if (name.equals("position")) { 1574 this.position = (LocationPositionComponent) value; // LocationPositionComponent 1575 } else if (name.equals("managingOrganization")) { 1576 this.managingOrganization = castToReference(value); // Reference 1577 } else if (name.equals("partOf")) { 1578 this.partOf = castToReference(value); // Reference 1579 } else if (name.equals("endpoint")) { 1580 this.getEndpoint().add(castToReference(value)); 1581 } else 1582 return super.setProperty(name, value); 1583 return value; 1584 } 1585 1586 @Override 1587 public Base makeProperty(int hash, String name) throws FHIRException { 1588 switch (hash) { 1589 case -1618432855: return addIdentifier(); 1590 case -892481550: return getStatusElement(); 1591 case -2103166364: return getOperationalStatus(); 1592 case 3373707: return getNameElement(); 1593 case 92902992: return addAliasElement(); 1594 case -1724546052: return getDescriptionElement(); 1595 case 3357091: return getModeElement(); 1596 case 3575610: return getType(); 1597 case -1429363305: return addTelecom(); 1598 case -1147692044: return getAddress(); 1599 case -1474715471: return getPhysicalType(); 1600 case 747804969: return getPosition(); 1601 case -2058947787: return getManagingOrganization(); 1602 case -995410646: return getPartOf(); 1603 case 1741102485: return addEndpoint(); 1604 default: return super.makeProperty(hash, name); 1605 } 1606 1607 } 1608 1609 @Override 1610 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1611 switch (hash) { 1612 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1613 case -892481550: /*status*/ return new String[] {"code"}; 1614 case -2103166364: /*operationalStatus*/ return new String[] {"Coding"}; 1615 case 3373707: /*name*/ return new String[] {"string"}; 1616 case 92902992: /*alias*/ return new String[] {"string"}; 1617 case -1724546052: /*description*/ return new String[] {"string"}; 1618 case 3357091: /*mode*/ return new String[] {"code"}; 1619 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1620 case -1429363305: /*telecom*/ return new String[] {"ContactPoint"}; 1621 case -1147692044: /*address*/ return new String[] {"Address"}; 1622 case -1474715471: /*physicalType*/ return new String[] {"CodeableConcept"}; 1623 case 747804969: /*position*/ return new String[] {}; 1624 case -2058947787: /*managingOrganization*/ return new String[] {"Reference"}; 1625 case -995410646: /*partOf*/ return new String[] {"Reference"}; 1626 case 1741102485: /*endpoint*/ return new String[] {"Reference"}; 1627 default: return super.getTypesForProperty(hash, name); 1628 } 1629 1630 } 1631 1632 @Override 1633 public Base addChild(String name) throws FHIRException { 1634 if (name.equals("identifier")) { 1635 return addIdentifier(); 1636 } 1637 else if (name.equals("status")) { 1638 throw new FHIRException("Cannot call addChild on a primitive type Location.status"); 1639 } 1640 else if (name.equals("operationalStatus")) { 1641 this.operationalStatus = new Coding(); 1642 return this.operationalStatus; 1643 } 1644 else if (name.equals("name")) { 1645 throw new FHIRException("Cannot call addChild on a primitive type Location.name"); 1646 } 1647 else if (name.equals("alias")) { 1648 throw new FHIRException("Cannot call addChild on a primitive type Location.alias"); 1649 } 1650 else if (name.equals("description")) { 1651 throw new FHIRException("Cannot call addChild on a primitive type Location.description"); 1652 } 1653 else if (name.equals("mode")) { 1654 throw new FHIRException("Cannot call addChild on a primitive type Location.mode"); 1655 } 1656 else if (name.equals("type")) { 1657 this.type = new CodeableConcept(); 1658 return this.type; 1659 } 1660 else if (name.equals("telecom")) { 1661 return addTelecom(); 1662 } 1663 else if (name.equals("address")) { 1664 this.address = new Address(); 1665 return this.address; 1666 } 1667 else if (name.equals("physicalType")) { 1668 this.physicalType = new CodeableConcept(); 1669 return this.physicalType; 1670 } 1671 else if (name.equals("position")) { 1672 this.position = new LocationPositionComponent(); 1673 return this.position; 1674 } 1675 else if (name.equals("managingOrganization")) { 1676 this.managingOrganization = new Reference(); 1677 return this.managingOrganization; 1678 } 1679 else if (name.equals("partOf")) { 1680 this.partOf = new Reference(); 1681 return this.partOf; 1682 } 1683 else if (name.equals("endpoint")) { 1684 return addEndpoint(); 1685 } 1686 else 1687 return super.addChild(name); 1688 } 1689 1690 public String fhirType() { 1691 return "Location"; 1692 1693 } 1694 1695 public Location copy() { 1696 Location dst = new Location(); 1697 copyValues(dst); 1698 if (identifier != null) { 1699 dst.identifier = new ArrayList<Identifier>(); 1700 for (Identifier i : identifier) 1701 dst.identifier.add(i.copy()); 1702 }; 1703 dst.status = status == null ? null : status.copy(); 1704 dst.operationalStatus = operationalStatus == null ? null : operationalStatus.copy(); 1705 dst.name = name == null ? null : name.copy(); 1706 if (alias != null) { 1707 dst.alias = new ArrayList<StringType>(); 1708 for (StringType i : alias) 1709 dst.alias.add(i.copy()); 1710 }; 1711 dst.description = description == null ? null : description.copy(); 1712 dst.mode = mode == null ? null : mode.copy(); 1713 dst.type = type == null ? null : type.copy(); 1714 if (telecom != null) { 1715 dst.telecom = new ArrayList<ContactPoint>(); 1716 for (ContactPoint i : telecom) 1717 dst.telecom.add(i.copy()); 1718 }; 1719 dst.address = address == null ? null : address.copy(); 1720 dst.physicalType = physicalType == null ? null : physicalType.copy(); 1721 dst.position = position == null ? null : position.copy(); 1722 dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); 1723 dst.partOf = partOf == null ? null : partOf.copy(); 1724 if (endpoint != null) { 1725 dst.endpoint = new ArrayList<Reference>(); 1726 for (Reference i : endpoint) 1727 dst.endpoint.add(i.copy()); 1728 }; 1729 return dst; 1730 } 1731 1732 protected Location typedCopy() { 1733 return copy(); 1734 } 1735 1736 @Override 1737 public boolean equalsDeep(Base other_) { 1738 if (!super.equalsDeep(other_)) 1739 return false; 1740 if (!(other_ instanceof Location)) 1741 return false; 1742 Location o = (Location) other_; 1743 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(operationalStatus, o.operationalStatus, true) 1744 && compareDeep(name, o.name, true) && compareDeep(alias, o.alias, true) && compareDeep(description, o.description, true) 1745 && compareDeep(mode, o.mode, true) && compareDeep(type, o.type, true) && compareDeep(telecom, o.telecom, true) 1746 && compareDeep(address, o.address, true) && compareDeep(physicalType, o.physicalType, true) && compareDeep(position, o.position, true) 1747 && compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(partOf, o.partOf, true) 1748 && compareDeep(endpoint, o.endpoint, true); 1749 } 1750 1751 @Override 1752 public boolean equalsShallow(Base other_) { 1753 if (!super.equalsShallow(other_)) 1754 return false; 1755 if (!(other_ instanceof Location)) 1756 return false; 1757 Location o = (Location) other_; 1758 return compareValues(status, o.status, true) && compareValues(name, o.name, true) && compareValues(alias, o.alias, true) 1759 && compareValues(description, o.description, true) && compareValues(mode, o.mode, true); 1760 } 1761 1762 public boolean isEmpty() { 1763 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, operationalStatus 1764 , name, alias, description, mode, type, telecom, address, physicalType, position 1765 , managingOrganization, partOf, endpoint); 1766 } 1767 1768 @Override 1769 public ResourceType getResourceType() { 1770 return ResourceType.Location; 1771 } 1772 1773 /** 1774 * Search parameter: <b>identifier</b> 1775 * <p> 1776 * Description: <b>An identifier for the location</b><br> 1777 * Type: <b>token</b><br> 1778 * Path: <b>Location.identifier</b><br> 1779 * </p> 1780 */ 1781 @SearchParamDefinition(name="identifier", path="Location.identifier", description="An identifier for the location", type="token" ) 1782 public static final String SP_IDENTIFIER = "identifier"; 1783 /** 1784 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1785 * <p> 1786 * Description: <b>An identifier for the location</b><br> 1787 * Type: <b>token</b><br> 1788 * Path: <b>Location.identifier</b><br> 1789 * </p> 1790 */ 1791 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1792 1793 /** 1794 * Search parameter: <b>partof</b> 1795 * <p> 1796 * Description: <b>A location of which this location is a part</b><br> 1797 * Type: <b>reference</b><br> 1798 * Path: <b>Location.partOf</b><br> 1799 * </p> 1800 */ 1801 @SearchParamDefinition(name="partof", path="Location.partOf", description="A location of which this location is a part", type="reference", target={Location.class } ) 1802 public static final String SP_PARTOF = "partof"; 1803 /** 1804 * <b>Fluent Client</b> search parameter constant for <b>partof</b> 1805 * <p> 1806 * Description: <b>A location of which this location is a part</b><br> 1807 * Type: <b>reference</b><br> 1808 * Path: <b>Location.partOf</b><br> 1809 * </p> 1810 */ 1811 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTOF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTOF); 1812 1813/** 1814 * Constant for fluent queries to be used to add include statements. Specifies 1815 * the path value of "<b>Location:partof</b>". 1816 */ 1817 public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTOF = new ca.uhn.fhir.model.api.Include("Location:partof").toLocked(); 1818 1819 /** 1820 * Search parameter: <b>near-distance</b> 1821 * <p> 1822 * Description: <b>A distance quantity to limit the near search to locations within a specific distance 1823 1824Requires the near parameter to also be included</b><br> 1825 * Type: <b>quantity</b><br> 1826 * Path: <b>Location.position</b><br> 1827 * </p> 1828 */ 1829 @SearchParamDefinition(name="near-distance", path="Location.position", description="A distance quantity to limit the near search to locations within a specific distance\n\nRequires the near parameter to also be included", type="quantity" ) 1830 public static final String SP_NEAR_DISTANCE = "near-distance"; 1831 /** 1832 * <b>Fluent Client</b> search parameter constant for <b>near-distance</b> 1833 * <p> 1834 * Description: <b>A distance quantity to limit the near search to locations within a specific distance 1835 1836Requires the near parameter to also be included</b><br> 1837 * Type: <b>quantity</b><br> 1838 * Path: <b>Location.position</b><br> 1839 * </p> 1840 */ 1841 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam NEAR_DISTANCE = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_NEAR_DISTANCE); 1842 1843 /** 1844 * Search parameter: <b>address</b> 1845 * <p> 1846 * Description: <b>A (part of the) address of the location</b><br> 1847 * Type: <b>string</b><br> 1848 * Path: <b>Location.address</b><br> 1849 * </p> 1850 */ 1851 @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location", type="string" ) 1852 public static final String SP_ADDRESS = "address"; 1853 /** 1854 * <b>Fluent Client</b> search parameter constant for <b>address</b> 1855 * <p> 1856 * Description: <b>A (part of the) address of the location</b><br> 1857 * Type: <b>string</b><br> 1858 * Path: <b>Location.address</b><br> 1859 * </p> 1860 */ 1861 public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS); 1862 1863 /** 1864 * Search parameter: <b>address-state</b> 1865 * <p> 1866 * Description: <b>A state specified in an address</b><br> 1867 * Type: <b>string</b><br> 1868 * Path: <b>Location.address.state</b><br> 1869 * </p> 1870 */ 1871 @SearchParamDefinition(name="address-state", path="Location.address.state", description="A state specified in an address", type="string" ) 1872 public static final String SP_ADDRESS_STATE = "address-state"; 1873 /** 1874 * <b>Fluent Client</b> search parameter constant for <b>address-state</b> 1875 * <p> 1876 * Description: <b>A state specified in an address</b><br> 1877 * Type: <b>string</b><br> 1878 * Path: <b>Location.address.state</b><br> 1879 * </p> 1880 */ 1881 public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_STATE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_STATE); 1882 1883 /** 1884 * Search parameter: <b>operational-status</b> 1885 * <p> 1886 * Description: <b>Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)</b><br> 1887 * Type: <b>token</b><br> 1888 * Path: <b>Location.operationalStatus</b><br> 1889 * </p> 1890 */ 1891 @SearchParamDefinition(name="operational-status", path="Location.operationalStatus", description="Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)", type="token" ) 1892 public static final String SP_OPERATIONAL_STATUS = "operational-status"; 1893 /** 1894 * <b>Fluent Client</b> search parameter constant for <b>operational-status</b> 1895 * <p> 1896 * Description: <b>Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)</b><br> 1897 * Type: <b>token</b><br> 1898 * Path: <b>Location.operationalStatus</b><br> 1899 * </p> 1900 */ 1901 public static final ca.uhn.fhir.rest.gclient.TokenClientParam OPERATIONAL_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OPERATIONAL_STATUS); 1902 1903 /** 1904 * Search parameter: <b>type</b> 1905 * <p> 1906 * Description: <b>A code for the type of location</b><br> 1907 * Type: <b>token</b><br> 1908 * Path: <b>Location.type</b><br> 1909 * </p> 1910 */ 1911 @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location", type="token" ) 1912 public static final String SP_TYPE = "type"; 1913 /** 1914 * <b>Fluent Client</b> search parameter constant for <b>type</b> 1915 * <p> 1916 * Description: <b>A code for the type of location</b><br> 1917 * Type: <b>token</b><br> 1918 * Path: <b>Location.type</b><br> 1919 * </p> 1920 */ 1921 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 1922 1923 /** 1924 * Search parameter: <b>address-postalcode</b> 1925 * <p> 1926 * Description: <b>A postal code specified in an address</b><br> 1927 * Type: <b>string</b><br> 1928 * Path: <b>Location.address.postalCode</b><br> 1929 * </p> 1930 */ 1931 @SearchParamDefinition(name="address-postalcode", path="Location.address.postalCode", description="A postal code specified in an address", type="string" ) 1932 public static final String SP_ADDRESS_POSTALCODE = "address-postalcode"; 1933 /** 1934 * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b> 1935 * <p> 1936 * Description: <b>A postal code specified in an address</b><br> 1937 * Type: <b>string</b><br> 1938 * Path: <b>Location.address.postalCode</b><br> 1939 * </p> 1940 */ 1941 public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_POSTALCODE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_POSTALCODE); 1942 1943 /** 1944 * Search parameter: <b>address-country</b> 1945 * <p> 1946 * Description: <b>A country specified in an address</b><br> 1947 * Type: <b>string</b><br> 1948 * Path: <b>Location.address.country</b><br> 1949 * </p> 1950 */ 1951 @SearchParamDefinition(name="address-country", path="Location.address.country", description="A country specified in an address", type="string" ) 1952 public static final String SP_ADDRESS_COUNTRY = "address-country"; 1953 /** 1954 * <b>Fluent Client</b> search parameter constant for <b>address-country</b> 1955 * <p> 1956 * Description: <b>A country specified in an address</b><br> 1957 * Type: <b>string</b><br> 1958 * Path: <b>Location.address.country</b><br> 1959 * </p> 1960 */ 1961 public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_COUNTRY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_COUNTRY); 1962 1963 /** 1964 * Search parameter: <b>endpoint</b> 1965 * <p> 1966 * Description: <b>Technical endpoints providing access to services operated for the location</b><br> 1967 * Type: <b>reference</b><br> 1968 * Path: <b>Location.endpoint</b><br> 1969 * </p> 1970 */ 1971 @SearchParamDefinition(name="endpoint", path="Location.endpoint", description="Technical endpoints providing access to services operated for the location", type="reference", target={Endpoint.class } ) 1972 public static final String SP_ENDPOINT = "endpoint"; 1973 /** 1974 * <b>Fluent Client</b> search parameter constant for <b>endpoint</b> 1975 * <p> 1976 * Description: <b>Technical endpoints providing access to services operated for the location</b><br> 1977 * Type: <b>reference</b><br> 1978 * Path: <b>Location.endpoint</b><br> 1979 * </p> 1980 */ 1981 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT); 1982 1983/** 1984 * Constant for fluent queries to be used to add include statements. Specifies 1985 * the path value of "<b>Location:endpoint</b>". 1986 */ 1987 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("Location:endpoint").toLocked(); 1988 1989 /** 1990 * Search parameter: <b>organization</b> 1991 * <p> 1992 * Description: <b>Searches for locations that are managed by the provided organization</b><br> 1993 * Type: <b>reference</b><br> 1994 * Path: <b>Location.managingOrganization</b><br> 1995 * </p> 1996 */ 1997 @SearchParamDefinition(name="organization", path="Location.managingOrganization", description="Searches for locations that are managed by the provided organization", type="reference", target={Organization.class } ) 1998 public static final String SP_ORGANIZATION = "organization"; 1999 /** 2000 * <b>Fluent Client</b> search parameter constant for <b>organization</b> 2001 * <p> 2002 * Description: <b>Searches for locations that are managed by the provided organization</b><br> 2003 * Type: <b>reference</b><br> 2004 * Path: <b>Location.managingOrganization</b><br> 2005 * </p> 2006 */ 2007 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); 2008 2009/** 2010 * Constant for fluent queries to be used to add include statements. Specifies 2011 * the path value of "<b>Location:organization</b>". 2012 */ 2013 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Location:organization").toLocked(); 2014 2015 /** 2016 * Search parameter: <b>name</b> 2017 * <p> 2018 * Description: <b>A portion of the location's name or alias</b><br> 2019 * Type: <b>string</b><br> 2020 * Path: <b>Location.name, Location.alias</b><br> 2021 * </p> 2022 */ 2023 @SearchParamDefinition(name="name", path="Location.name | Location.alias", description="A portion of the location's name or alias", type="string" ) 2024 public static final String SP_NAME = "name"; 2025 /** 2026 * <b>Fluent Client</b> search parameter constant for <b>name</b> 2027 * <p> 2028 * Description: <b>A portion of the location's name or alias</b><br> 2029 * Type: <b>string</b><br> 2030 * Path: <b>Location.name, Location.alias</b><br> 2031 * </p> 2032 */ 2033 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 2034 2035 /** 2036 * Search parameter: <b>address-use</b> 2037 * <p> 2038 * Description: <b>A use code specified in an address</b><br> 2039 * Type: <b>token</b><br> 2040 * Path: <b>Location.address.use</b><br> 2041 * </p> 2042 */ 2043 @SearchParamDefinition(name="address-use", path="Location.address.use", description="A use code specified in an address", type="token" ) 2044 public static final String SP_ADDRESS_USE = "address-use"; 2045 /** 2046 * <b>Fluent Client</b> search parameter constant for <b>address-use</b> 2047 * <p> 2048 * Description: <b>A use code specified in an address</b><br> 2049 * Type: <b>token</b><br> 2050 * Path: <b>Location.address.use</b><br> 2051 * </p> 2052 */ 2053 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ADDRESS_USE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ADDRESS_USE); 2054 2055 /** 2056 * Search parameter: <b>near</b> 2057 * <p> 2058 * Description: <b>The coordinates expressed as [latitude]:[longitude] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency) 2059 2060Requires the near-distance parameter to be provided also</b><br> 2061 * Type: <b>token</b><br> 2062 * Path: <b>Location.position</b><br> 2063 * </p> 2064 */ 2065 @SearchParamDefinition(name="near", path="Location.position", description="The coordinates expressed as [latitude]:[longitude] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)\n\nRequires the near-distance parameter to be provided also", type="token" ) 2066 public static final String SP_NEAR = "near"; 2067 /** 2068 * <b>Fluent Client</b> search parameter constant for <b>near</b> 2069 * <p> 2070 * Description: <b>The coordinates expressed as [latitude]:[longitude] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency) 2071 2072Requires the near-distance parameter to be provided also</b><br> 2073 * Type: <b>token</b><br> 2074 * Path: <b>Location.position</b><br> 2075 * </p> 2076 */ 2077 public static final ca.uhn.fhir.rest.gclient.TokenClientParam NEAR = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_NEAR); 2078 2079 /** 2080 * Search parameter: <b>address-city</b> 2081 * <p> 2082 * Description: <b>A city specified in an address</b><br> 2083 * Type: <b>string</b><br> 2084 * Path: <b>Location.address.city</b><br> 2085 * </p> 2086 */ 2087 @SearchParamDefinition(name="address-city", path="Location.address.city", description="A city specified in an address", type="string" ) 2088 public static final String SP_ADDRESS_CITY = "address-city"; 2089 /** 2090 * <b>Fluent Client</b> search parameter constant for <b>address-city</b> 2091 * <p> 2092 * Description: <b>A city specified in an address</b><br> 2093 * Type: <b>string</b><br> 2094 * Path: <b>Location.address.city</b><br> 2095 * </p> 2096 */ 2097 public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_CITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_CITY); 2098 2099 /** 2100 * Search parameter: <b>status</b> 2101 * <p> 2102 * Description: <b>Searches for locations with a specific kind of status</b><br> 2103 * Type: <b>token</b><br> 2104 * Path: <b>Location.status</b><br> 2105 * </p> 2106 */ 2107 @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status", type="token" ) 2108 public static final String SP_STATUS = "status"; 2109 /** 2110 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2111 * <p> 2112 * Description: <b>Searches for locations with a specific kind of status</b><br> 2113 * Type: <b>token</b><br> 2114 * Path: <b>Location.status</b><br> 2115 * </p> 2116 */ 2117 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2118 2119 2120} 2121