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