001package org.hl7.fhir.r4b.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 Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1 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.r4b.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 physical 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(Base code) throws FHIRException { 128 if (code == null) 129 return null; 130 if (code.isEmpty()) 131 return new Enumeration<LocationMode>(this); 132 String codeString = ((PrimitiveType) code).asStringValue(); 133 if (codeString == null || "".equals(codeString)) 134 return null; 135 if ("instance".equals(codeString)) 136 return new Enumeration<LocationMode>(this, LocationMode.INSTANCE); 137 if ("kind".equals(codeString)) 138 return new Enumeration<LocationMode>(this, LocationMode.KIND); 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(Base code) throws FHIRException { 236 if (code == null) 237 return null; 238 if (code.isEmpty()) 239 return new Enumeration<LocationStatus>(this); 240 String codeString = ((PrimitiveType) code).asStringValue(); 241 if (codeString == null || "".equals(codeString)) 242 return null; 243 if ("active".equals(codeString)) 244 return new Enumeration<LocationStatus>(this, LocationStatus.ACTIVE); 245 if ("suspended".equals(codeString)) 246 return new Enumeration<LocationStatus>(this, LocationStatus.SUSPENDED); 247 if ("inactive".equals(codeString)) 248 return new Enumeration<LocationStatus>(this, LocationStatus.INACTIVE); 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 below). 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 below)." ) 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 below). 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 below)." ) 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 below). 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 below)." ) 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 below).). 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 below).). 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 below). 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 below). 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 below). 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 below). 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 below).). 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 below).). 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 below). 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 below). 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 below). 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 below). 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 below).). 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 below).). 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 below). 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 below). 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 below). 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 below). 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 below).", 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 below).", 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 below).", 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 below).", 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 below).", 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 below).", 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 Base makeProperty(int hash, String name) throws FHIRException { 560 switch (hash) { 561 case 137365935: return getLongitudeElement(); 562 case -1439978388: return getLatitudeElement(); 563 case 2036550306: return getAltitudeElement(); 564 default: return super.makeProperty(hash, name); 565 } 566 567 } 568 569 @Override 570 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 571 switch (hash) { 572 case 137365935: /*longitude*/ return new String[] {"decimal"}; 573 case -1439978388: /*latitude*/ return new String[] {"decimal"}; 574 case 2036550306: /*altitude*/ return new String[] {"decimal"}; 575 default: return super.getTypesForProperty(hash, name); 576 } 577 578 } 579 580 @Override 581 public Base addChild(String name) throws FHIRException { 582 if (name.equals("longitude")) { 583 throw new FHIRException("Cannot call addChild on a primitive type Location.position.longitude"); 584 } 585 else if (name.equals("latitude")) { 586 throw new FHIRException("Cannot call addChild on a primitive type Location.position.latitude"); 587 } 588 else if (name.equals("altitude")) { 589 throw new FHIRException("Cannot call addChild on a primitive type Location.position.altitude"); 590 } 591 else 592 return super.addChild(name); 593 } 594 595 public LocationPositionComponent copy() { 596 LocationPositionComponent dst = new LocationPositionComponent(); 597 copyValues(dst); 598 return dst; 599 } 600 601 public void copyValues(LocationPositionComponent dst) { 602 super.copyValues(dst); 603 dst.longitude = longitude == null ? null : longitude.copy(); 604 dst.latitude = latitude == null ? null : latitude.copy(); 605 dst.altitude = altitude == null ? null : altitude.copy(); 606 } 607 608 @Override 609 public boolean equalsDeep(Base other_) { 610 if (!super.equalsDeep(other_)) 611 return false; 612 if (!(other_ instanceof LocationPositionComponent)) 613 return false; 614 LocationPositionComponent o = (LocationPositionComponent) other_; 615 return compareDeep(longitude, o.longitude, true) && compareDeep(latitude, o.latitude, true) && compareDeep(altitude, o.altitude, true) 616 ; 617 } 618 619 @Override 620 public boolean equalsShallow(Base other_) { 621 if (!super.equalsShallow(other_)) 622 return false; 623 if (!(other_ instanceof LocationPositionComponent)) 624 return false; 625 LocationPositionComponent o = (LocationPositionComponent) other_; 626 return compareValues(longitude, o.longitude, true) && compareValues(latitude, o.latitude, true) && compareValues(altitude, o.altitude, true) 627 ; 628 } 629 630 public boolean isEmpty() { 631 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(longitude, latitude, altitude 632 ); 633 } 634 635 public String fhirType() { 636 return "Location.position"; 637 638 } 639 640 } 641 642 @Block() 643 public static class LocationHoursOfOperationComponent extends BackboneElement implements IBaseBackboneElement { 644 /** 645 * Indicates which days of the week are available between the start and end Times. 646 */ 647 @Child(name = "daysOfWeek", type = {CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 648 @Description(shortDefinition="mon | tue | wed | thu | fri | sat | sun", formalDefinition="Indicates which days of the week are available between the start and end Times." ) 649 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/days-of-week") 650 protected List<Enumeration<DaysOfWeek>> daysOfWeek; 651 652 /** 653 * The Location is open all day. 654 */ 655 @Child(name = "allDay", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 656 @Description(shortDefinition="The Location is open all day", formalDefinition="The Location is open all day." ) 657 protected BooleanType allDay; 658 659 /** 660 * Time that the Location opens. 661 */ 662 @Child(name = "openingTime", type = {TimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 663 @Description(shortDefinition="Time that the Location opens", formalDefinition="Time that the Location opens." ) 664 protected TimeType openingTime; 665 666 /** 667 * Time that the Location closes. 668 */ 669 @Child(name = "closingTime", type = {TimeType.class}, order=4, min=0, max=1, modifier=false, summary=false) 670 @Description(shortDefinition="Time that the Location closes", formalDefinition="Time that the Location closes." ) 671 protected TimeType closingTime; 672 673 private static final long serialVersionUID = -932551849L; 674 675 /** 676 * Constructor 677 */ 678 public LocationHoursOfOperationComponent() { 679 super(); 680 } 681 682 /** 683 * @return {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) 684 */ 685 public List<Enumeration<DaysOfWeek>> getDaysOfWeek() { 686 if (this.daysOfWeek == null) 687 this.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>(); 688 return this.daysOfWeek; 689 } 690 691 /** 692 * @return Returns a reference to <code>this</code> for easy method chaining 693 */ 694 public LocationHoursOfOperationComponent setDaysOfWeek(List<Enumeration<DaysOfWeek>> theDaysOfWeek) { 695 this.daysOfWeek = theDaysOfWeek; 696 return this; 697 } 698 699 public boolean hasDaysOfWeek() { 700 if (this.daysOfWeek == null) 701 return false; 702 for (Enumeration<DaysOfWeek> item : this.daysOfWeek) 703 if (!item.isEmpty()) 704 return true; 705 return false; 706 } 707 708 /** 709 * @return {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) 710 */ 711 public Enumeration<DaysOfWeek> addDaysOfWeekElement() {//2 712 Enumeration<DaysOfWeek> t = new Enumeration<DaysOfWeek>(new DaysOfWeekEnumFactory()); 713 if (this.daysOfWeek == null) 714 this.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>(); 715 this.daysOfWeek.add(t); 716 return t; 717 } 718 719 /** 720 * @param value {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) 721 */ 722 public LocationHoursOfOperationComponent addDaysOfWeek(DaysOfWeek value) { //1 723 Enumeration<DaysOfWeek> t = new Enumeration<DaysOfWeek>(new DaysOfWeekEnumFactory()); 724 t.setValue(value); 725 if (this.daysOfWeek == null) 726 this.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>(); 727 this.daysOfWeek.add(t); 728 return this; 729 } 730 731 /** 732 * @param value {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) 733 */ 734 public boolean hasDaysOfWeek(DaysOfWeek value) { 735 if (this.daysOfWeek == null) 736 return false; 737 for (Enumeration<DaysOfWeek> v : this.daysOfWeek) 738 if (v.getValue().equals(value)) // code 739 return true; 740 return false; 741 } 742 743 /** 744 * @return {@link #allDay} (The Location is open all day.). This is the underlying object with id, value and extensions. The accessor "getAllDay" gives direct access to the value 745 */ 746 public BooleanType getAllDayElement() { 747 if (this.allDay == null) 748 if (Configuration.errorOnAutoCreate()) 749 throw new Error("Attempt to auto-create LocationHoursOfOperationComponent.allDay"); 750 else if (Configuration.doAutoCreate()) 751 this.allDay = new BooleanType(); // bb 752 return this.allDay; 753 } 754 755 public boolean hasAllDayElement() { 756 return this.allDay != null && !this.allDay.isEmpty(); 757 } 758 759 public boolean hasAllDay() { 760 return this.allDay != null && !this.allDay.isEmpty(); 761 } 762 763 /** 764 * @param value {@link #allDay} (The Location is open all day.). This is the underlying object with id, value and extensions. The accessor "getAllDay" gives direct access to the value 765 */ 766 public LocationHoursOfOperationComponent setAllDayElement(BooleanType value) { 767 this.allDay = value; 768 return this; 769 } 770 771 /** 772 * @return The Location is open all day. 773 */ 774 public boolean getAllDay() { 775 return this.allDay == null || this.allDay.isEmpty() ? false : this.allDay.getValue(); 776 } 777 778 /** 779 * @param value The Location is open all day. 780 */ 781 public LocationHoursOfOperationComponent setAllDay(boolean value) { 782 if (this.allDay == null) 783 this.allDay = new BooleanType(); 784 this.allDay.setValue(value); 785 return this; 786 } 787 788 /** 789 * @return {@link #openingTime} (Time that the Location opens.). This is the underlying object with id, value and extensions. The accessor "getOpeningTime" gives direct access to the value 790 */ 791 public TimeType getOpeningTimeElement() { 792 if (this.openingTime == null) 793 if (Configuration.errorOnAutoCreate()) 794 throw new Error("Attempt to auto-create LocationHoursOfOperationComponent.openingTime"); 795 else if (Configuration.doAutoCreate()) 796 this.openingTime = new TimeType(); // bb 797 return this.openingTime; 798 } 799 800 public boolean hasOpeningTimeElement() { 801 return this.openingTime != null && !this.openingTime.isEmpty(); 802 } 803 804 public boolean hasOpeningTime() { 805 return this.openingTime != null && !this.openingTime.isEmpty(); 806 } 807 808 /** 809 * @param value {@link #openingTime} (Time that the Location opens.). This is the underlying object with id, value and extensions. The accessor "getOpeningTime" gives direct access to the value 810 */ 811 public LocationHoursOfOperationComponent setOpeningTimeElement(TimeType value) { 812 this.openingTime = value; 813 return this; 814 } 815 816 /** 817 * @return Time that the Location opens. 818 */ 819 public String getOpeningTime() { 820 return this.openingTime == null ? null : this.openingTime.getValue(); 821 } 822 823 /** 824 * @param value Time that the Location opens. 825 */ 826 public LocationHoursOfOperationComponent setOpeningTime(String value) { 827 if (value == null) 828 this.openingTime = null; 829 else { 830 if (this.openingTime == null) 831 this.openingTime = new TimeType(); 832 this.openingTime.setValue(value); 833 } 834 return this; 835 } 836 837 /** 838 * @return {@link #closingTime} (Time that the Location closes.). This is the underlying object with id, value and extensions. The accessor "getClosingTime" gives direct access to the value 839 */ 840 public TimeType getClosingTimeElement() { 841 if (this.closingTime == null) 842 if (Configuration.errorOnAutoCreate()) 843 throw new Error("Attempt to auto-create LocationHoursOfOperationComponent.closingTime"); 844 else if (Configuration.doAutoCreate()) 845 this.closingTime = new TimeType(); // bb 846 return this.closingTime; 847 } 848 849 public boolean hasClosingTimeElement() { 850 return this.closingTime != null && !this.closingTime.isEmpty(); 851 } 852 853 public boolean hasClosingTime() { 854 return this.closingTime != null && !this.closingTime.isEmpty(); 855 } 856 857 /** 858 * @param value {@link #closingTime} (Time that the Location closes.). This is the underlying object with id, value and extensions. The accessor "getClosingTime" gives direct access to the value 859 */ 860 public LocationHoursOfOperationComponent setClosingTimeElement(TimeType value) { 861 this.closingTime = value; 862 return this; 863 } 864 865 /** 866 * @return Time that the Location closes. 867 */ 868 public String getClosingTime() { 869 return this.closingTime == null ? null : this.closingTime.getValue(); 870 } 871 872 /** 873 * @param value Time that the Location closes. 874 */ 875 public LocationHoursOfOperationComponent setClosingTime(String value) { 876 if (value == null) 877 this.closingTime = null; 878 else { 879 if (this.closingTime == null) 880 this.closingTime = new TimeType(); 881 this.closingTime.setValue(value); 882 } 883 return this; 884 } 885 886 protected void listChildren(List<Property> children) { 887 super.listChildren(children); 888 children.add(new Property("daysOfWeek", "code", "Indicates which days of the week are available between the start and end Times.", 0, java.lang.Integer.MAX_VALUE, daysOfWeek)); 889 children.add(new Property("allDay", "boolean", "The Location is open all day.", 0, 1, allDay)); 890 children.add(new Property("openingTime", "time", "Time that the Location opens.", 0, 1, openingTime)); 891 children.add(new Property("closingTime", "time", "Time that the Location closes.", 0, 1, closingTime)); 892 } 893 894 @Override 895 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 896 switch (_hash) { 897 case 68050338: /*daysOfWeek*/ return new Property("daysOfWeek", "code", "Indicates which days of the week are available between the start and end Times.", 0, java.lang.Integer.MAX_VALUE, daysOfWeek); 898 case -1414913477: /*allDay*/ return new Property("allDay", "boolean", "The Location is open all day.", 0, 1, allDay); 899 case 84062277: /*openingTime*/ return new Property("openingTime", "time", "Time that the Location opens.", 0, 1, openingTime); 900 case 188137762: /*closingTime*/ return new Property("closingTime", "time", "Time that the Location closes.", 0, 1, closingTime); 901 default: return super.getNamedProperty(_hash, _name, _checkValid); 902 } 903 904 } 905 906 @Override 907 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 908 switch (hash) { 909 case 68050338: /*daysOfWeek*/ return this.daysOfWeek == null ? new Base[0] : this.daysOfWeek.toArray(new Base[this.daysOfWeek.size()]); // Enumeration<DaysOfWeek> 910 case -1414913477: /*allDay*/ return this.allDay == null ? new Base[0] : new Base[] {this.allDay}; // BooleanType 911 case 84062277: /*openingTime*/ return this.openingTime == null ? new Base[0] : new Base[] {this.openingTime}; // TimeType 912 case 188137762: /*closingTime*/ return this.closingTime == null ? new Base[0] : new Base[] {this.closingTime}; // TimeType 913 default: return super.getProperty(hash, name, checkValid); 914 } 915 916 } 917 918 @Override 919 public Base setProperty(int hash, String name, Base value) throws FHIRException { 920 switch (hash) { 921 case 68050338: // daysOfWeek 922 value = new DaysOfWeekEnumFactory().fromType(TypeConvertor.castToCode(value)); 923 this.getDaysOfWeek().add((Enumeration) value); // Enumeration<DaysOfWeek> 924 return value; 925 case -1414913477: // allDay 926 this.allDay = TypeConvertor.castToBoolean(value); // BooleanType 927 return value; 928 case 84062277: // openingTime 929 this.openingTime = TypeConvertor.castToTime(value); // TimeType 930 return value; 931 case 188137762: // closingTime 932 this.closingTime = TypeConvertor.castToTime(value); // TimeType 933 return value; 934 default: return super.setProperty(hash, name, value); 935 } 936 937 } 938 939 @Override 940 public Base setProperty(String name, Base value) throws FHIRException { 941 if (name.equals("daysOfWeek")) { 942 value = new DaysOfWeekEnumFactory().fromType(TypeConvertor.castToCode(value)); 943 this.getDaysOfWeek().add((Enumeration) value); 944 } else if (name.equals("allDay")) { 945 this.allDay = TypeConvertor.castToBoolean(value); // BooleanType 946 } else if (name.equals("openingTime")) { 947 this.openingTime = TypeConvertor.castToTime(value); // TimeType 948 } else if (name.equals("closingTime")) { 949 this.closingTime = TypeConvertor.castToTime(value); // TimeType 950 } else 951 return super.setProperty(name, value); 952 return value; 953 } 954 955 @Override 956 public Base makeProperty(int hash, String name) throws FHIRException { 957 switch (hash) { 958 case 68050338: return addDaysOfWeekElement(); 959 case -1414913477: return getAllDayElement(); 960 case 84062277: return getOpeningTimeElement(); 961 case 188137762: return getClosingTimeElement(); 962 default: return super.makeProperty(hash, name); 963 } 964 965 } 966 967 @Override 968 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 969 switch (hash) { 970 case 68050338: /*daysOfWeek*/ return new String[] {"code"}; 971 case -1414913477: /*allDay*/ return new String[] {"boolean"}; 972 case 84062277: /*openingTime*/ return new String[] {"time"}; 973 case 188137762: /*closingTime*/ return new String[] {"time"}; 974 default: return super.getTypesForProperty(hash, name); 975 } 976 977 } 978 979 @Override 980 public Base addChild(String name) throws FHIRException { 981 if (name.equals("daysOfWeek")) { 982 throw new FHIRException("Cannot call addChild on a primitive type Location.hoursOfOperation.daysOfWeek"); 983 } 984 else if (name.equals("allDay")) { 985 throw new FHIRException("Cannot call addChild on a primitive type Location.hoursOfOperation.allDay"); 986 } 987 else if (name.equals("openingTime")) { 988 throw new FHIRException("Cannot call addChild on a primitive type Location.hoursOfOperation.openingTime"); 989 } 990 else if (name.equals("closingTime")) { 991 throw new FHIRException("Cannot call addChild on a primitive type Location.hoursOfOperation.closingTime"); 992 } 993 else 994 return super.addChild(name); 995 } 996 997 public LocationHoursOfOperationComponent copy() { 998 LocationHoursOfOperationComponent dst = new LocationHoursOfOperationComponent(); 999 copyValues(dst); 1000 return dst; 1001 } 1002 1003 public void copyValues(LocationHoursOfOperationComponent dst) { 1004 super.copyValues(dst); 1005 if (daysOfWeek != null) { 1006 dst.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>(); 1007 for (Enumeration<DaysOfWeek> i : daysOfWeek) 1008 dst.daysOfWeek.add(i.copy()); 1009 }; 1010 dst.allDay = allDay == null ? null : allDay.copy(); 1011 dst.openingTime = openingTime == null ? null : openingTime.copy(); 1012 dst.closingTime = closingTime == null ? null : closingTime.copy(); 1013 } 1014 1015 @Override 1016 public boolean equalsDeep(Base other_) { 1017 if (!super.equalsDeep(other_)) 1018 return false; 1019 if (!(other_ instanceof LocationHoursOfOperationComponent)) 1020 return false; 1021 LocationHoursOfOperationComponent o = (LocationHoursOfOperationComponent) other_; 1022 return compareDeep(daysOfWeek, o.daysOfWeek, true) && compareDeep(allDay, o.allDay, true) && compareDeep(openingTime, o.openingTime, true) 1023 && compareDeep(closingTime, o.closingTime, true); 1024 } 1025 1026 @Override 1027 public boolean equalsShallow(Base other_) { 1028 if (!super.equalsShallow(other_)) 1029 return false; 1030 if (!(other_ instanceof LocationHoursOfOperationComponent)) 1031 return false; 1032 LocationHoursOfOperationComponent o = (LocationHoursOfOperationComponent) other_; 1033 return compareValues(daysOfWeek, o.daysOfWeek, true) && compareValues(allDay, o.allDay, true) && compareValues(openingTime, o.openingTime, true) 1034 && compareValues(closingTime, o.closingTime, true); 1035 } 1036 1037 public boolean isEmpty() { 1038 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(daysOfWeek, allDay, openingTime 1039 , closingTime); 1040 } 1041 1042 public String fhirType() { 1043 return "Location.hoursOfOperation"; 1044 1045 } 1046 1047 } 1048 1049 /** 1050 * Unique code or number identifying the location to its users. 1051 */ 1052 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1053 @Description(shortDefinition="Unique code or number identifying the location to its users", formalDefinition="Unique code or number identifying the location to its users." ) 1054 protected List<Identifier> identifier; 1055 1056 /** 1057 * 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. 1058 */ 1059 @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) 1060 @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." ) 1061 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-status") 1062 protected Enumeration<LocationStatus> status; 1063 1064 /** 1065 * 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. 1066 */ 1067 @Child(name = "operationalStatus", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) 1068 @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." ) 1069 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0116") 1070 protected Coding operationalStatus; 1071 1072 /** 1073 * Name of the location as used by humans. Does not need to be unique. 1074 */ 1075 @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 1076 @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." ) 1077 protected StringType name; 1078 1079 /** 1080 * A list of alternate names that the location is known as, or was known as, in the past. 1081 */ 1082 @Child(name = "alias", type = {StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1083 @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." ) 1084 protected List<StringType> alias; 1085 1086 /** 1087 * Description of the Location, which helps in finding or referencing the place. 1088 */ 1089 @Child(name = "description", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 1090 @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." ) 1091 protected StringType description; 1092 1093 /** 1094 * Indicates whether a resource instance represents a specific location or a class of locations. 1095 */ 1096 @Child(name = "mode", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=true) 1097 @Description(shortDefinition="instance | kind", formalDefinition="Indicates whether a resource instance represents a specific location or a class of locations." ) 1098 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-mode") 1099 protected Enumeration<LocationMode> mode; 1100 1101 /** 1102 * Indicates the type of function performed at the location. 1103 */ 1104 @Child(name = "type", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1105 @Description(shortDefinition="Type of function performed", formalDefinition="Indicates the type of function performed at the location." ) 1106 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType") 1107 protected List<CodeableConcept> type; 1108 1109 /** 1110 * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites. 1111 */ 1112 @Child(name = "telecom", type = {ContactPoint.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1113 @Description(shortDefinition="Contact details of the location", formalDefinition="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites." ) 1114 protected List<ContactPoint> telecom; 1115 1116 /** 1117 * Physical location. 1118 */ 1119 @Child(name = "address", type = {Address.class}, order=9, min=0, max=1, modifier=false, summary=false) 1120 @Description(shortDefinition="Physical location", formalDefinition="Physical location." ) 1121 protected Address address; 1122 1123 /** 1124 * Physical form of the location, e.g. building, room, vehicle, road. 1125 */ 1126 @Child(name = "physicalType", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true) 1127 @Description(shortDefinition="Physical form of the location", formalDefinition="Physical form of the location, e.g. building, room, vehicle, road." ) 1128 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-physical-type") 1129 protected CodeableConcept physicalType; 1130 1131 /** 1132 * The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML). 1133 */ 1134 @Child(name = "position", type = {}, order=11, min=0, max=1, modifier=false, summary=false) 1135 @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)." ) 1136 protected LocationPositionComponent position; 1137 1138 /** 1139 * The organization responsible for the provisioning and upkeep of the location. 1140 */ 1141 @Child(name = "managingOrganization", type = {Organization.class}, order=12, min=0, max=1, modifier=false, summary=true) 1142 @Description(shortDefinition="Organization responsible for provisioning and upkeep", formalDefinition="The organization responsible for the provisioning and upkeep of the location." ) 1143 protected Reference managingOrganization; 1144 1145 /** 1146 * Another Location of which this Location is physically a part of. 1147 */ 1148 @Child(name = "partOf", type = {Location.class}, order=13, min=0, max=1, modifier=false, summary=false) 1149 @Description(shortDefinition="Another Location this one is physically a part of", formalDefinition="Another Location of which this Location is physically a part of." ) 1150 protected Reference partOf; 1151 1152 /** 1153 * What days/times during a week is this location usually open. 1154 */ 1155 @Child(name = "hoursOfOperation", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1156 @Description(shortDefinition="What days/times during a week is this location usually open", formalDefinition="What days/times during a week is this location usually open." ) 1157 protected List<LocationHoursOfOperationComponent> hoursOfOperation; 1158 1159 /** 1160 * A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times. 1161 */ 1162 @Child(name = "availabilityExceptions", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false) 1163 @Description(shortDefinition="Description of availability exceptions", formalDefinition="A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times." ) 1164 protected StringType availabilityExceptions; 1165 1166 /** 1167 * Technical endpoints providing access to services operated for the location. 1168 */ 1169 @Child(name = "endpoint", type = {Endpoint.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1170 @Description(shortDefinition="Technical endpoints providing access to services operated for the location", formalDefinition="Technical endpoints providing access to services operated for the location." ) 1171 protected List<Reference> endpoint; 1172 1173 private static final long serialVersionUID = -1479198769L; 1174 1175 /** 1176 * Constructor 1177 */ 1178 public Location() { 1179 super(); 1180 } 1181 1182 /** 1183 * @return {@link #identifier} (Unique code or number identifying the location to its users.) 1184 */ 1185 public List<Identifier> getIdentifier() { 1186 if (this.identifier == null) 1187 this.identifier = new ArrayList<Identifier>(); 1188 return this.identifier; 1189 } 1190 1191 /** 1192 * @return Returns a reference to <code>this</code> for easy method chaining 1193 */ 1194 public Location setIdentifier(List<Identifier> theIdentifier) { 1195 this.identifier = theIdentifier; 1196 return this; 1197 } 1198 1199 public boolean hasIdentifier() { 1200 if (this.identifier == null) 1201 return false; 1202 for (Identifier item : this.identifier) 1203 if (!item.isEmpty()) 1204 return true; 1205 return false; 1206 } 1207 1208 public Identifier addIdentifier() { //3 1209 Identifier t = new Identifier(); 1210 if (this.identifier == null) 1211 this.identifier = new ArrayList<Identifier>(); 1212 this.identifier.add(t); 1213 return t; 1214 } 1215 1216 public Location addIdentifier(Identifier t) { //3 1217 if (t == null) 1218 return this; 1219 if (this.identifier == null) 1220 this.identifier = new ArrayList<Identifier>(); 1221 this.identifier.add(t); 1222 return this; 1223 } 1224 1225 /** 1226 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 1227 */ 1228 public Identifier getIdentifierFirstRep() { 1229 if (getIdentifier().isEmpty()) { 1230 addIdentifier(); 1231 } 1232 return getIdentifier().get(0); 1233 } 1234 1235 /** 1236 * @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 1237 */ 1238 public Enumeration<LocationStatus> getStatusElement() { 1239 if (this.status == null) 1240 if (Configuration.errorOnAutoCreate()) 1241 throw new Error("Attempt to auto-create Location.status"); 1242 else if (Configuration.doAutoCreate()) 1243 this.status = new Enumeration<LocationStatus>(new LocationStatusEnumFactory()); // bb 1244 return this.status; 1245 } 1246 1247 public boolean hasStatusElement() { 1248 return this.status != null && !this.status.isEmpty(); 1249 } 1250 1251 public boolean hasStatus() { 1252 return this.status != null && !this.status.isEmpty(); 1253 } 1254 1255 /** 1256 * @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 1257 */ 1258 public Location setStatusElement(Enumeration<LocationStatus> value) { 1259 this.status = value; 1260 return this; 1261 } 1262 1263 /** 1264 * @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. 1265 */ 1266 public LocationStatus getStatus() { 1267 return this.status == null ? null : this.status.getValue(); 1268 } 1269 1270 /** 1271 * @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. 1272 */ 1273 public Location setStatus(LocationStatus value) { 1274 if (value == null) 1275 this.status = null; 1276 else { 1277 if (this.status == null) 1278 this.status = new Enumeration<LocationStatus>(new LocationStatusEnumFactory()); 1279 this.status.setValue(value); 1280 } 1281 return this; 1282 } 1283 1284 /** 1285 * @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.) 1286 */ 1287 public Coding getOperationalStatus() { 1288 if (this.operationalStatus == null) 1289 if (Configuration.errorOnAutoCreate()) 1290 throw new Error("Attempt to auto-create Location.operationalStatus"); 1291 else if (Configuration.doAutoCreate()) 1292 this.operationalStatus = new Coding(); // cc 1293 return this.operationalStatus; 1294 } 1295 1296 public boolean hasOperationalStatus() { 1297 return this.operationalStatus != null && !this.operationalStatus.isEmpty(); 1298 } 1299 1300 /** 1301 * @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.) 1302 */ 1303 public Location setOperationalStatus(Coding value) { 1304 this.operationalStatus = value; 1305 return this; 1306 } 1307 1308 /** 1309 * @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 1310 */ 1311 public StringType getNameElement() { 1312 if (this.name == null) 1313 if (Configuration.errorOnAutoCreate()) 1314 throw new Error("Attempt to auto-create Location.name"); 1315 else if (Configuration.doAutoCreate()) 1316 this.name = new StringType(); // bb 1317 return this.name; 1318 } 1319 1320 public boolean hasNameElement() { 1321 return this.name != null && !this.name.isEmpty(); 1322 } 1323 1324 public boolean hasName() { 1325 return this.name != null && !this.name.isEmpty(); 1326 } 1327 1328 /** 1329 * @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 1330 */ 1331 public Location setNameElement(StringType value) { 1332 this.name = value; 1333 return this; 1334 } 1335 1336 /** 1337 * @return Name of the location as used by humans. Does not need to be unique. 1338 */ 1339 public String getName() { 1340 return this.name == null ? null : this.name.getValue(); 1341 } 1342 1343 /** 1344 * @param value Name of the location as used by humans. Does not need to be unique. 1345 */ 1346 public Location setName(String value) { 1347 if (Utilities.noString(value)) 1348 this.name = null; 1349 else { 1350 if (this.name == null) 1351 this.name = new StringType(); 1352 this.name.setValue(value); 1353 } 1354 return this; 1355 } 1356 1357 /** 1358 * @return {@link #alias} (A list of alternate names that the location is known as, or was known as, in the past.) 1359 */ 1360 public List<StringType> getAlias() { 1361 if (this.alias == null) 1362 this.alias = new ArrayList<StringType>(); 1363 return this.alias; 1364 } 1365 1366 /** 1367 * @return Returns a reference to <code>this</code> for easy method chaining 1368 */ 1369 public Location setAlias(List<StringType> theAlias) { 1370 this.alias = theAlias; 1371 return this; 1372 } 1373 1374 public boolean hasAlias() { 1375 if (this.alias == null) 1376 return false; 1377 for (StringType item : this.alias) 1378 if (!item.isEmpty()) 1379 return true; 1380 return false; 1381 } 1382 1383 /** 1384 * @return {@link #alias} (A list of alternate names that the location is known as, or was known as, in the past.) 1385 */ 1386 public StringType addAliasElement() {//2 1387 StringType t = new StringType(); 1388 if (this.alias == null) 1389 this.alias = new ArrayList<StringType>(); 1390 this.alias.add(t); 1391 return t; 1392 } 1393 1394 /** 1395 * @param value {@link #alias} (A list of alternate names that the location is known as, or was known as, in the past.) 1396 */ 1397 public Location addAlias(String value) { //1 1398 StringType t = new StringType(); 1399 t.setValue(value); 1400 if (this.alias == null) 1401 this.alias = new ArrayList<StringType>(); 1402 this.alias.add(t); 1403 return this; 1404 } 1405 1406 /** 1407 * @param value {@link #alias} (A list of alternate names that the location is known as, or was known as, in the past.) 1408 */ 1409 public boolean hasAlias(String value) { 1410 if (this.alias == null) 1411 return false; 1412 for (StringType v : this.alias) 1413 if (v.getValue().equals(value)) // string 1414 return true; 1415 return false; 1416 } 1417 1418 /** 1419 * @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 1420 */ 1421 public StringType getDescriptionElement() { 1422 if (this.description == null) 1423 if (Configuration.errorOnAutoCreate()) 1424 throw new Error("Attempt to auto-create Location.description"); 1425 else if (Configuration.doAutoCreate()) 1426 this.description = new StringType(); // bb 1427 return this.description; 1428 } 1429 1430 public boolean hasDescriptionElement() { 1431 return this.description != null && !this.description.isEmpty(); 1432 } 1433 1434 public boolean hasDescription() { 1435 return this.description != null && !this.description.isEmpty(); 1436 } 1437 1438 /** 1439 * @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 1440 */ 1441 public Location setDescriptionElement(StringType value) { 1442 this.description = value; 1443 return this; 1444 } 1445 1446 /** 1447 * @return Description of the Location, which helps in finding or referencing the place. 1448 */ 1449 public String getDescription() { 1450 return this.description == null ? null : this.description.getValue(); 1451 } 1452 1453 /** 1454 * @param value Description of the Location, which helps in finding or referencing the place. 1455 */ 1456 public Location setDescription(String value) { 1457 if (Utilities.noString(value)) 1458 this.description = null; 1459 else { 1460 if (this.description == null) 1461 this.description = new StringType(); 1462 this.description.setValue(value); 1463 } 1464 return this; 1465 } 1466 1467 /** 1468 * @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 1469 */ 1470 public Enumeration<LocationMode> getModeElement() { 1471 if (this.mode == null) 1472 if (Configuration.errorOnAutoCreate()) 1473 throw new Error("Attempt to auto-create Location.mode"); 1474 else if (Configuration.doAutoCreate()) 1475 this.mode = new Enumeration<LocationMode>(new LocationModeEnumFactory()); // bb 1476 return this.mode; 1477 } 1478 1479 public boolean hasModeElement() { 1480 return this.mode != null && !this.mode.isEmpty(); 1481 } 1482 1483 public boolean hasMode() { 1484 return this.mode != null && !this.mode.isEmpty(); 1485 } 1486 1487 /** 1488 * @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 1489 */ 1490 public Location setModeElement(Enumeration<LocationMode> value) { 1491 this.mode = value; 1492 return this; 1493 } 1494 1495 /** 1496 * @return Indicates whether a resource instance represents a specific location or a class of locations. 1497 */ 1498 public LocationMode getMode() { 1499 return this.mode == null ? null : this.mode.getValue(); 1500 } 1501 1502 /** 1503 * @param value Indicates whether a resource instance represents a specific location or a class of locations. 1504 */ 1505 public Location setMode(LocationMode value) { 1506 if (value == null) 1507 this.mode = null; 1508 else { 1509 if (this.mode == null) 1510 this.mode = new Enumeration<LocationMode>(new LocationModeEnumFactory()); 1511 this.mode.setValue(value); 1512 } 1513 return this; 1514 } 1515 1516 /** 1517 * @return {@link #type} (Indicates the type of function performed at the location.) 1518 */ 1519 public List<CodeableConcept> getType() { 1520 if (this.type == null) 1521 this.type = new ArrayList<CodeableConcept>(); 1522 return this.type; 1523 } 1524 1525 /** 1526 * @return Returns a reference to <code>this</code> for easy method chaining 1527 */ 1528 public Location setType(List<CodeableConcept> theType) { 1529 this.type = theType; 1530 return this; 1531 } 1532 1533 public boolean hasType() { 1534 if (this.type == null) 1535 return false; 1536 for (CodeableConcept item : this.type) 1537 if (!item.isEmpty()) 1538 return true; 1539 return false; 1540 } 1541 1542 public CodeableConcept addType() { //3 1543 CodeableConcept t = new CodeableConcept(); 1544 if (this.type == null) 1545 this.type = new ArrayList<CodeableConcept>(); 1546 this.type.add(t); 1547 return t; 1548 } 1549 1550 public Location addType(CodeableConcept t) { //3 1551 if (t == null) 1552 return this; 1553 if (this.type == null) 1554 this.type = new ArrayList<CodeableConcept>(); 1555 this.type.add(t); 1556 return this; 1557 } 1558 1559 /** 1560 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} 1561 */ 1562 public CodeableConcept getTypeFirstRep() { 1563 if (getType().isEmpty()) { 1564 addType(); 1565 } 1566 return getType().get(0); 1567 } 1568 1569 /** 1570 * @return {@link #telecom} (The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.) 1571 */ 1572 public List<ContactPoint> getTelecom() { 1573 if (this.telecom == null) 1574 this.telecom = new ArrayList<ContactPoint>(); 1575 return this.telecom; 1576 } 1577 1578 /** 1579 * @return Returns a reference to <code>this</code> for easy method chaining 1580 */ 1581 public Location setTelecom(List<ContactPoint> theTelecom) { 1582 this.telecom = theTelecom; 1583 return this; 1584 } 1585 1586 public boolean hasTelecom() { 1587 if (this.telecom == null) 1588 return false; 1589 for (ContactPoint item : this.telecom) 1590 if (!item.isEmpty()) 1591 return true; 1592 return false; 1593 } 1594 1595 public ContactPoint addTelecom() { //3 1596 ContactPoint t = new ContactPoint(); 1597 if (this.telecom == null) 1598 this.telecom = new ArrayList<ContactPoint>(); 1599 this.telecom.add(t); 1600 return t; 1601 } 1602 1603 public Location addTelecom(ContactPoint t) { //3 1604 if (t == null) 1605 return this; 1606 if (this.telecom == null) 1607 this.telecom = new ArrayList<ContactPoint>(); 1608 this.telecom.add(t); 1609 return this; 1610 } 1611 1612 /** 1613 * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist {3} 1614 */ 1615 public ContactPoint getTelecomFirstRep() { 1616 if (getTelecom().isEmpty()) { 1617 addTelecom(); 1618 } 1619 return getTelecom().get(0); 1620 } 1621 1622 /** 1623 * @return {@link #address} (Physical location.) 1624 */ 1625 public Address getAddress() { 1626 if (this.address == null) 1627 if (Configuration.errorOnAutoCreate()) 1628 throw new Error("Attempt to auto-create Location.address"); 1629 else if (Configuration.doAutoCreate()) 1630 this.address = new Address(); // cc 1631 return this.address; 1632 } 1633 1634 public boolean hasAddress() { 1635 return this.address != null && !this.address.isEmpty(); 1636 } 1637 1638 /** 1639 * @param value {@link #address} (Physical location.) 1640 */ 1641 public Location setAddress(Address value) { 1642 this.address = value; 1643 return this; 1644 } 1645 1646 /** 1647 * @return {@link #physicalType} (Physical form of the location, e.g. building, room, vehicle, road.) 1648 */ 1649 public CodeableConcept getPhysicalType() { 1650 if (this.physicalType == null) 1651 if (Configuration.errorOnAutoCreate()) 1652 throw new Error("Attempt to auto-create Location.physicalType"); 1653 else if (Configuration.doAutoCreate()) 1654 this.physicalType = new CodeableConcept(); // cc 1655 return this.physicalType; 1656 } 1657 1658 public boolean hasPhysicalType() { 1659 return this.physicalType != null && !this.physicalType.isEmpty(); 1660 } 1661 1662 /** 1663 * @param value {@link #physicalType} (Physical form of the location, e.g. building, room, vehicle, road.) 1664 */ 1665 public Location setPhysicalType(CodeableConcept value) { 1666 this.physicalType = value; 1667 return this; 1668 } 1669 1670 /** 1671 * @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).) 1672 */ 1673 public LocationPositionComponent getPosition() { 1674 if (this.position == null) 1675 if (Configuration.errorOnAutoCreate()) 1676 throw new Error("Attempt to auto-create Location.position"); 1677 else if (Configuration.doAutoCreate()) 1678 this.position = new LocationPositionComponent(); // cc 1679 return this.position; 1680 } 1681 1682 public boolean hasPosition() { 1683 return this.position != null && !this.position.isEmpty(); 1684 } 1685 1686 /** 1687 * @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).) 1688 */ 1689 public Location setPosition(LocationPositionComponent value) { 1690 this.position = value; 1691 return this; 1692 } 1693 1694 /** 1695 * @return {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.) 1696 */ 1697 public Reference getManagingOrganization() { 1698 if (this.managingOrganization == null) 1699 if (Configuration.errorOnAutoCreate()) 1700 throw new Error("Attempt to auto-create Location.managingOrganization"); 1701 else if (Configuration.doAutoCreate()) 1702 this.managingOrganization = new Reference(); // cc 1703 return this.managingOrganization; 1704 } 1705 1706 public boolean hasManagingOrganization() { 1707 return this.managingOrganization != null && !this.managingOrganization.isEmpty(); 1708 } 1709 1710 /** 1711 * @param value {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.) 1712 */ 1713 public Location setManagingOrganization(Reference value) { 1714 this.managingOrganization = value; 1715 return this; 1716 } 1717 1718 /** 1719 * @return {@link #partOf} (Another Location of which this Location is physically a part of.) 1720 */ 1721 public Reference getPartOf() { 1722 if (this.partOf == null) 1723 if (Configuration.errorOnAutoCreate()) 1724 throw new Error("Attempt to auto-create Location.partOf"); 1725 else if (Configuration.doAutoCreate()) 1726 this.partOf = new Reference(); // cc 1727 return this.partOf; 1728 } 1729 1730 public boolean hasPartOf() { 1731 return this.partOf != null && !this.partOf.isEmpty(); 1732 } 1733 1734 /** 1735 * @param value {@link #partOf} (Another Location of which this Location is physically a part of.) 1736 */ 1737 public Location setPartOf(Reference value) { 1738 this.partOf = value; 1739 return this; 1740 } 1741 1742 /** 1743 * @return {@link #hoursOfOperation} (What days/times during a week is this location usually open.) 1744 */ 1745 public List<LocationHoursOfOperationComponent> getHoursOfOperation() { 1746 if (this.hoursOfOperation == null) 1747 this.hoursOfOperation = new ArrayList<LocationHoursOfOperationComponent>(); 1748 return this.hoursOfOperation; 1749 } 1750 1751 /** 1752 * @return Returns a reference to <code>this</code> for easy method chaining 1753 */ 1754 public Location setHoursOfOperation(List<LocationHoursOfOperationComponent> theHoursOfOperation) { 1755 this.hoursOfOperation = theHoursOfOperation; 1756 return this; 1757 } 1758 1759 public boolean hasHoursOfOperation() { 1760 if (this.hoursOfOperation == null) 1761 return false; 1762 for (LocationHoursOfOperationComponent item : this.hoursOfOperation) 1763 if (!item.isEmpty()) 1764 return true; 1765 return false; 1766 } 1767 1768 public LocationHoursOfOperationComponent addHoursOfOperation() { //3 1769 LocationHoursOfOperationComponent t = new LocationHoursOfOperationComponent(); 1770 if (this.hoursOfOperation == null) 1771 this.hoursOfOperation = new ArrayList<LocationHoursOfOperationComponent>(); 1772 this.hoursOfOperation.add(t); 1773 return t; 1774 } 1775 1776 public Location addHoursOfOperation(LocationHoursOfOperationComponent t) { //3 1777 if (t == null) 1778 return this; 1779 if (this.hoursOfOperation == null) 1780 this.hoursOfOperation = new ArrayList<LocationHoursOfOperationComponent>(); 1781 this.hoursOfOperation.add(t); 1782 return this; 1783 } 1784 1785 /** 1786 * @return The first repetition of repeating field {@link #hoursOfOperation}, creating it if it does not already exist {3} 1787 */ 1788 public LocationHoursOfOperationComponent getHoursOfOperationFirstRep() { 1789 if (getHoursOfOperation().isEmpty()) { 1790 addHoursOfOperation(); 1791 } 1792 return getHoursOfOperation().get(0); 1793 } 1794 1795 /** 1796 * @return {@link #availabilityExceptions} (A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times.). This is the underlying object with id, value and extensions. The accessor "getAvailabilityExceptions" gives direct access to the value 1797 */ 1798 public StringType getAvailabilityExceptionsElement() { 1799 if (this.availabilityExceptions == null) 1800 if (Configuration.errorOnAutoCreate()) 1801 throw new Error("Attempt to auto-create Location.availabilityExceptions"); 1802 else if (Configuration.doAutoCreate()) 1803 this.availabilityExceptions = new StringType(); // bb 1804 return this.availabilityExceptions; 1805 } 1806 1807 public boolean hasAvailabilityExceptionsElement() { 1808 return this.availabilityExceptions != null && !this.availabilityExceptions.isEmpty(); 1809 } 1810 1811 public boolean hasAvailabilityExceptions() { 1812 return this.availabilityExceptions != null && !this.availabilityExceptions.isEmpty(); 1813 } 1814 1815 /** 1816 * @param value {@link #availabilityExceptions} (A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times.). This is the underlying object with id, value and extensions. The accessor "getAvailabilityExceptions" gives direct access to the value 1817 */ 1818 public Location setAvailabilityExceptionsElement(StringType value) { 1819 this.availabilityExceptions = value; 1820 return this; 1821 } 1822 1823 /** 1824 * @return A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times. 1825 */ 1826 public String getAvailabilityExceptions() { 1827 return this.availabilityExceptions == null ? null : this.availabilityExceptions.getValue(); 1828 } 1829 1830 /** 1831 * @param value A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times. 1832 */ 1833 public Location setAvailabilityExceptions(String value) { 1834 if (Utilities.noString(value)) 1835 this.availabilityExceptions = null; 1836 else { 1837 if (this.availabilityExceptions == null) 1838 this.availabilityExceptions = new StringType(); 1839 this.availabilityExceptions.setValue(value); 1840 } 1841 return this; 1842 } 1843 1844 /** 1845 * @return {@link #endpoint} (Technical endpoints providing access to services operated for the location.) 1846 */ 1847 public List<Reference> getEndpoint() { 1848 if (this.endpoint == null) 1849 this.endpoint = new ArrayList<Reference>(); 1850 return this.endpoint; 1851 } 1852 1853 /** 1854 * @return Returns a reference to <code>this</code> for easy method chaining 1855 */ 1856 public Location setEndpoint(List<Reference> theEndpoint) { 1857 this.endpoint = theEndpoint; 1858 return this; 1859 } 1860 1861 public boolean hasEndpoint() { 1862 if (this.endpoint == null) 1863 return false; 1864 for (Reference item : this.endpoint) 1865 if (!item.isEmpty()) 1866 return true; 1867 return false; 1868 } 1869 1870 public Reference addEndpoint() { //3 1871 Reference t = new Reference(); 1872 if (this.endpoint == null) 1873 this.endpoint = new ArrayList<Reference>(); 1874 this.endpoint.add(t); 1875 return t; 1876 } 1877 1878 public Location addEndpoint(Reference t) { //3 1879 if (t == null) 1880 return this; 1881 if (this.endpoint == null) 1882 this.endpoint = new ArrayList<Reference>(); 1883 this.endpoint.add(t); 1884 return this; 1885 } 1886 1887 /** 1888 * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist {3} 1889 */ 1890 public Reference getEndpointFirstRep() { 1891 if (getEndpoint().isEmpty()) { 1892 addEndpoint(); 1893 } 1894 return getEndpoint().get(0); 1895 } 1896 1897 protected void listChildren(List<Property> children) { 1898 super.listChildren(children); 1899 children.add(new Property("identifier", "Identifier", "Unique code or number identifying the location to its users.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1900 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)); 1901 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)); 1902 children.add(new Property("name", "string", "Name of the location as used by humans. Does not need to be unique.", 0, 1, name)); 1903 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)); 1904 children.add(new Property("description", "string", "Description of the Location, which helps in finding or referencing the place.", 0, 1, description)); 1905 children.add(new Property("mode", "code", "Indicates whether a resource instance represents a specific location or a class of locations.", 0, 1, mode)); 1906 children.add(new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, java.lang.Integer.MAX_VALUE, type)); 1907 children.add(new Property("telecom", "ContactPoint", "The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, telecom)); 1908 children.add(new Property("address", "Address", "Physical location.", 0, 1, address)); 1909 children.add(new Property("physicalType", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road.", 0, 1, physicalType)); 1910 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)); 1911 children.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, 1, managingOrganization)); 1912 children.add(new Property("partOf", "Reference(Location)", "Another Location of which this Location is physically a part of.", 0, 1, partOf)); 1913 children.add(new Property("hoursOfOperation", "", "What days/times during a week is this location usually open.", 0, java.lang.Integer.MAX_VALUE, hoursOfOperation)); 1914 children.add(new Property("availabilityExceptions", "string", "A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times.", 0, 1, availabilityExceptions)); 1915 children.add(new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the location.", 0, java.lang.Integer.MAX_VALUE, endpoint)); 1916 } 1917 1918 @Override 1919 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1920 switch (_hash) { 1921 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); 1922 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); 1923 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); 1924 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); 1925 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); 1926 case -1724546052: /*description*/ return new Property("description", "string", "Description of the Location, which helps in finding or referencing the place.", 0, 1, description); 1927 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); 1928 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, java.lang.Integer.MAX_VALUE, type); 1929 case -1429363305: /*telecom*/ return new Property("telecom", "ContactPoint", "The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, telecom); 1930 case -1147692044: /*address*/ return new Property("address", "Address", "Physical location.", 0, 1, address); 1931 case -1474715471: /*physicalType*/ return new Property("physicalType", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road.", 0, 1, physicalType); 1932 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); 1933 case -2058947787: /*managingOrganization*/ return new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, 1, managingOrganization); 1934 case -995410646: /*partOf*/ return new Property("partOf", "Reference(Location)", "Another Location of which this Location is physically a part of.", 0, 1, partOf); 1935 case -1588872511: /*hoursOfOperation*/ return new Property("hoursOfOperation", "", "What days/times during a week is this location usually open.", 0, java.lang.Integer.MAX_VALUE, hoursOfOperation); 1936 case -1149143617: /*availabilityExceptions*/ return new Property("availabilityExceptions", "string", "A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times.", 0, 1, availabilityExceptions); 1937 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); 1938 default: return super.getNamedProperty(_hash, _name, _checkValid); 1939 } 1940 1941 } 1942 1943 @Override 1944 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1945 switch (hash) { 1946 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1947 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<LocationStatus> 1948 case -2103166364: /*operationalStatus*/ return this.operationalStatus == null ? new Base[0] : new Base[] {this.operationalStatus}; // Coding 1949 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1950 case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType 1951 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1952 case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<LocationMode> 1953 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept 1954 case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint 1955 case -1147692044: /*address*/ return this.address == null ? new Base[0] : new Base[] {this.address}; // Address 1956 case -1474715471: /*physicalType*/ return this.physicalType == null ? new Base[0] : new Base[] {this.physicalType}; // CodeableConcept 1957 case 747804969: /*position*/ return this.position == null ? new Base[0] : new Base[] {this.position}; // LocationPositionComponent 1958 case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : new Base[] {this.managingOrganization}; // Reference 1959 case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : new Base[] {this.partOf}; // Reference 1960 case -1588872511: /*hoursOfOperation*/ return this.hoursOfOperation == null ? new Base[0] : this.hoursOfOperation.toArray(new Base[this.hoursOfOperation.size()]); // LocationHoursOfOperationComponent 1961 case -1149143617: /*availabilityExceptions*/ return this.availabilityExceptions == null ? new Base[0] : new Base[] {this.availabilityExceptions}; // StringType 1962 case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference 1963 default: return super.getProperty(hash, name, checkValid); 1964 } 1965 1966 } 1967 1968 @Override 1969 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1970 switch (hash) { 1971 case -1618432855: // identifier 1972 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 1973 return value; 1974 case -892481550: // status 1975 value = new LocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1976 this.status = (Enumeration) value; // Enumeration<LocationStatus> 1977 return value; 1978 case -2103166364: // operationalStatus 1979 this.operationalStatus = TypeConvertor.castToCoding(value); // Coding 1980 return value; 1981 case 3373707: // name 1982 this.name = TypeConvertor.castToString(value); // StringType 1983 return value; 1984 case 92902992: // alias 1985 this.getAlias().add(TypeConvertor.castToString(value)); // StringType 1986 return value; 1987 case -1724546052: // description 1988 this.description = TypeConvertor.castToString(value); // StringType 1989 return value; 1990 case 3357091: // mode 1991 value = new LocationModeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1992 this.mode = (Enumeration) value; // Enumeration<LocationMode> 1993 return value; 1994 case 3575610: // type 1995 this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1996 return value; 1997 case -1429363305: // telecom 1998 this.getTelecom().add(TypeConvertor.castToContactPoint(value)); // ContactPoint 1999 return value; 2000 case -1147692044: // address 2001 this.address = TypeConvertor.castToAddress(value); // Address 2002 return value; 2003 case -1474715471: // physicalType 2004 this.physicalType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2005 return value; 2006 case 747804969: // position 2007 this.position = (LocationPositionComponent) value; // LocationPositionComponent 2008 return value; 2009 case -2058947787: // managingOrganization 2010 this.managingOrganization = TypeConvertor.castToReference(value); // Reference 2011 return value; 2012 case -995410646: // partOf 2013 this.partOf = TypeConvertor.castToReference(value); // Reference 2014 return value; 2015 case -1588872511: // hoursOfOperation 2016 this.getHoursOfOperation().add((LocationHoursOfOperationComponent) value); // LocationHoursOfOperationComponent 2017 return value; 2018 case -1149143617: // availabilityExceptions 2019 this.availabilityExceptions = TypeConvertor.castToString(value); // StringType 2020 return value; 2021 case 1741102485: // endpoint 2022 this.getEndpoint().add(TypeConvertor.castToReference(value)); // Reference 2023 return value; 2024 default: return super.setProperty(hash, name, value); 2025 } 2026 2027 } 2028 2029 @Override 2030 public Base setProperty(String name, Base value) throws FHIRException { 2031 if (name.equals("identifier")) { 2032 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 2033 } else if (name.equals("status")) { 2034 value = new LocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 2035 this.status = (Enumeration) value; // Enumeration<LocationStatus> 2036 } else if (name.equals("operationalStatus")) { 2037 this.operationalStatus = TypeConvertor.castToCoding(value); // Coding 2038 } else if (name.equals("name")) { 2039 this.name = TypeConvertor.castToString(value); // StringType 2040 } else if (name.equals("alias")) { 2041 this.getAlias().add(TypeConvertor.castToString(value)); 2042 } else if (name.equals("description")) { 2043 this.description = TypeConvertor.castToString(value); // StringType 2044 } else if (name.equals("mode")) { 2045 value = new LocationModeEnumFactory().fromType(TypeConvertor.castToCode(value)); 2046 this.mode = (Enumeration) value; // Enumeration<LocationMode> 2047 } else if (name.equals("type")) { 2048 this.getType().add(TypeConvertor.castToCodeableConcept(value)); 2049 } else if (name.equals("telecom")) { 2050 this.getTelecom().add(TypeConvertor.castToContactPoint(value)); 2051 } else if (name.equals("address")) { 2052 this.address = TypeConvertor.castToAddress(value); // Address 2053 } else if (name.equals("physicalType")) { 2054 this.physicalType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2055 } else if (name.equals("position")) { 2056 this.position = (LocationPositionComponent) value; // LocationPositionComponent 2057 } else if (name.equals("managingOrganization")) { 2058 this.managingOrganization = TypeConvertor.castToReference(value); // Reference 2059 } else if (name.equals("partOf")) { 2060 this.partOf = TypeConvertor.castToReference(value); // Reference 2061 } else if (name.equals("hoursOfOperation")) { 2062 this.getHoursOfOperation().add((LocationHoursOfOperationComponent) value); 2063 } else if (name.equals("availabilityExceptions")) { 2064 this.availabilityExceptions = TypeConvertor.castToString(value); // StringType 2065 } else if (name.equals("endpoint")) { 2066 this.getEndpoint().add(TypeConvertor.castToReference(value)); 2067 } else 2068 return super.setProperty(name, value); 2069 return value; 2070 } 2071 2072 @Override 2073 public Base makeProperty(int hash, String name) throws FHIRException { 2074 switch (hash) { 2075 case -1618432855: return addIdentifier(); 2076 case -892481550: return getStatusElement(); 2077 case -2103166364: return getOperationalStatus(); 2078 case 3373707: return getNameElement(); 2079 case 92902992: return addAliasElement(); 2080 case -1724546052: return getDescriptionElement(); 2081 case 3357091: return getModeElement(); 2082 case 3575610: return addType(); 2083 case -1429363305: return addTelecom(); 2084 case -1147692044: return getAddress(); 2085 case -1474715471: return getPhysicalType(); 2086 case 747804969: return getPosition(); 2087 case -2058947787: return getManagingOrganization(); 2088 case -995410646: return getPartOf(); 2089 case -1588872511: return addHoursOfOperation(); 2090 case -1149143617: return getAvailabilityExceptionsElement(); 2091 case 1741102485: return addEndpoint(); 2092 default: return super.makeProperty(hash, name); 2093 } 2094 2095 } 2096 2097 @Override 2098 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2099 switch (hash) { 2100 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2101 case -892481550: /*status*/ return new String[] {"code"}; 2102 case -2103166364: /*operationalStatus*/ return new String[] {"Coding"}; 2103 case 3373707: /*name*/ return new String[] {"string"}; 2104 case 92902992: /*alias*/ return new String[] {"string"}; 2105 case -1724546052: /*description*/ return new String[] {"string"}; 2106 case 3357091: /*mode*/ return new String[] {"code"}; 2107 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 2108 case -1429363305: /*telecom*/ return new String[] {"ContactPoint"}; 2109 case -1147692044: /*address*/ return new String[] {"Address"}; 2110 case -1474715471: /*physicalType*/ return new String[] {"CodeableConcept"}; 2111 case 747804969: /*position*/ return new String[] {}; 2112 case -2058947787: /*managingOrganization*/ return new String[] {"Reference"}; 2113 case -995410646: /*partOf*/ return new String[] {"Reference"}; 2114 case -1588872511: /*hoursOfOperation*/ return new String[] {}; 2115 case -1149143617: /*availabilityExceptions*/ return new String[] {"string"}; 2116 case 1741102485: /*endpoint*/ return new String[] {"Reference"}; 2117 default: return super.getTypesForProperty(hash, name); 2118 } 2119 2120 } 2121 2122 @Override 2123 public Base addChild(String name) throws FHIRException { 2124 if (name.equals("identifier")) { 2125 return addIdentifier(); 2126 } 2127 else if (name.equals("status")) { 2128 throw new FHIRException("Cannot call addChild on a primitive type Location.status"); 2129 } 2130 else if (name.equals("operationalStatus")) { 2131 this.operationalStatus = new Coding(); 2132 return this.operationalStatus; 2133 } 2134 else if (name.equals("name")) { 2135 throw new FHIRException("Cannot call addChild on a primitive type Location.name"); 2136 } 2137 else if (name.equals("alias")) { 2138 throw new FHIRException("Cannot call addChild on a primitive type Location.alias"); 2139 } 2140 else if (name.equals("description")) { 2141 throw new FHIRException("Cannot call addChild on a primitive type Location.description"); 2142 } 2143 else if (name.equals("mode")) { 2144 throw new FHIRException("Cannot call addChild on a primitive type Location.mode"); 2145 } 2146 else if (name.equals("type")) { 2147 return addType(); 2148 } 2149 else if (name.equals("telecom")) { 2150 return addTelecom(); 2151 } 2152 else if (name.equals("address")) { 2153 this.address = new Address(); 2154 return this.address; 2155 } 2156 else if (name.equals("physicalType")) { 2157 this.physicalType = new CodeableConcept(); 2158 return this.physicalType; 2159 } 2160 else if (name.equals("position")) { 2161 this.position = new LocationPositionComponent(); 2162 return this.position; 2163 } 2164 else if (name.equals("managingOrganization")) { 2165 this.managingOrganization = new Reference(); 2166 return this.managingOrganization; 2167 } 2168 else if (name.equals("partOf")) { 2169 this.partOf = new Reference(); 2170 return this.partOf; 2171 } 2172 else if (name.equals("hoursOfOperation")) { 2173 return addHoursOfOperation(); 2174 } 2175 else if (name.equals("availabilityExceptions")) { 2176 throw new FHIRException("Cannot call addChild on a primitive type Location.availabilityExceptions"); 2177 } 2178 else if (name.equals("endpoint")) { 2179 return addEndpoint(); 2180 } 2181 else 2182 return super.addChild(name); 2183 } 2184 2185 public String fhirType() { 2186 return "Location"; 2187 2188 } 2189 2190 public Location copy() { 2191 Location dst = new Location(); 2192 copyValues(dst); 2193 return dst; 2194 } 2195 2196 public void copyValues(Location dst) { 2197 super.copyValues(dst); 2198 if (identifier != null) { 2199 dst.identifier = new ArrayList<Identifier>(); 2200 for (Identifier i : identifier) 2201 dst.identifier.add(i.copy()); 2202 }; 2203 dst.status = status == null ? null : status.copy(); 2204 dst.operationalStatus = operationalStatus == null ? null : operationalStatus.copy(); 2205 dst.name = name == null ? null : name.copy(); 2206 if (alias != null) { 2207 dst.alias = new ArrayList<StringType>(); 2208 for (StringType i : alias) 2209 dst.alias.add(i.copy()); 2210 }; 2211 dst.description = description == null ? null : description.copy(); 2212 dst.mode = mode == null ? null : mode.copy(); 2213 if (type != null) { 2214 dst.type = new ArrayList<CodeableConcept>(); 2215 for (CodeableConcept i : type) 2216 dst.type.add(i.copy()); 2217 }; 2218 if (telecom != null) { 2219 dst.telecom = new ArrayList<ContactPoint>(); 2220 for (ContactPoint i : telecom) 2221 dst.telecom.add(i.copy()); 2222 }; 2223 dst.address = address == null ? null : address.copy(); 2224 dst.physicalType = physicalType == null ? null : physicalType.copy(); 2225 dst.position = position == null ? null : position.copy(); 2226 dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); 2227 dst.partOf = partOf == null ? null : partOf.copy(); 2228 if (hoursOfOperation != null) { 2229 dst.hoursOfOperation = new ArrayList<LocationHoursOfOperationComponent>(); 2230 for (LocationHoursOfOperationComponent i : hoursOfOperation) 2231 dst.hoursOfOperation.add(i.copy()); 2232 }; 2233 dst.availabilityExceptions = availabilityExceptions == null ? null : availabilityExceptions.copy(); 2234 if (endpoint != null) { 2235 dst.endpoint = new ArrayList<Reference>(); 2236 for (Reference i : endpoint) 2237 dst.endpoint.add(i.copy()); 2238 }; 2239 } 2240 2241 protected Location typedCopy() { 2242 return copy(); 2243 } 2244 2245 @Override 2246 public boolean equalsDeep(Base other_) { 2247 if (!super.equalsDeep(other_)) 2248 return false; 2249 if (!(other_ instanceof Location)) 2250 return false; 2251 Location o = (Location) other_; 2252 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(operationalStatus, o.operationalStatus, true) 2253 && compareDeep(name, o.name, true) && compareDeep(alias, o.alias, true) && compareDeep(description, o.description, true) 2254 && compareDeep(mode, o.mode, true) && compareDeep(type, o.type, true) && compareDeep(telecom, o.telecom, true) 2255 && compareDeep(address, o.address, true) && compareDeep(physicalType, o.physicalType, true) && compareDeep(position, o.position, true) 2256 && compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(partOf, o.partOf, true) 2257 && compareDeep(hoursOfOperation, o.hoursOfOperation, true) && compareDeep(availabilityExceptions, o.availabilityExceptions, true) 2258 && compareDeep(endpoint, o.endpoint, true); 2259 } 2260 2261 @Override 2262 public boolean equalsShallow(Base other_) { 2263 if (!super.equalsShallow(other_)) 2264 return false; 2265 if (!(other_ instanceof Location)) 2266 return false; 2267 Location o = (Location) other_; 2268 return compareValues(status, o.status, true) && compareValues(name, o.name, true) && compareValues(alias, o.alias, true) 2269 && compareValues(description, o.description, true) && compareValues(mode, o.mode, true) && compareValues(availabilityExceptions, o.availabilityExceptions, true) 2270 ; 2271 } 2272 2273 public boolean isEmpty() { 2274 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, operationalStatus 2275 , name, alias, description, mode, type, telecom, address, physicalType, position 2276 , managingOrganization, partOf, hoursOfOperation, availabilityExceptions, endpoint 2277 ); 2278 } 2279 2280 @Override 2281 public ResourceType getResourceType() { 2282 return ResourceType.Location; 2283 } 2284 2285 /** 2286 * Search parameter: <b>address-city</b> 2287 * <p> 2288 * Description: <b>A city specified in an address</b><br> 2289 * Type: <b>string</b><br> 2290 * Path: <b>Location.address.city</b><br> 2291 * </p> 2292 */ 2293 @SearchParamDefinition(name="address-city", path="Location.address.city", description="A city specified in an address", type="string" ) 2294 public static final String SP_ADDRESS_CITY = "address-city"; 2295 /** 2296 * <b>Fluent Client</b> search parameter constant for <b>address-city</b> 2297 * <p> 2298 * Description: <b>A city specified in an address</b><br> 2299 * Type: <b>string</b><br> 2300 * Path: <b>Location.address.city</b><br> 2301 * </p> 2302 */ 2303 public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_CITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_CITY); 2304 2305 /** 2306 * Search parameter: <b>address-country</b> 2307 * <p> 2308 * Description: <b>A country specified in an address</b><br> 2309 * Type: <b>string</b><br> 2310 * Path: <b>Location.address.country</b><br> 2311 * </p> 2312 */ 2313 @SearchParamDefinition(name="address-country", path="Location.address.country", description="A country specified in an address", type="string" ) 2314 public static final String SP_ADDRESS_COUNTRY = "address-country"; 2315 /** 2316 * <b>Fluent Client</b> search parameter constant for <b>address-country</b> 2317 * <p> 2318 * Description: <b>A country specified in an address</b><br> 2319 * Type: <b>string</b><br> 2320 * Path: <b>Location.address.country</b><br> 2321 * </p> 2322 */ 2323 public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_COUNTRY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_COUNTRY); 2324 2325 /** 2326 * Search parameter: <b>address-postalcode</b> 2327 * <p> 2328 * Description: <b>A postal code specified in an address</b><br> 2329 * Type: <b>string</b><br> 2330 * Path: <b>Location.address.postalCode</b><br> 2331 * </p> 2332 */ 2333 @SearchParamDefinition(name="address-postalcode", path="Location.address.postalCode", description="A postal code specified in an address", type="string" ) 2334 public static final String SP_ADDRESS_POSTALCODE = "address-postalcode"; 2335 /** 2336 * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b> 2337 * <p> 2338 * Description: <b>A postal code specified in an address</b><br> 2339 * Type: <b>string</b><br> 2340 * Path: <b>Location.address.postalCode</b><br> 2341 * </p> 2342 */ 2343 public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_POSTALCODE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_POSTALCODE); 2344 2345 /** 2346 * Search parameter: <b>address-state</b> 2347 * <p> 2348 * Description: <b>A state specified in an address</b><br> 2349 * Type: <b>string</b><br> 2350 * Path: <b>Location.address.state</b><br> 2351 * </p> 2352 */ 2353 @SearchParamDefinition(name="address-state", path="Location.address.state", description="A state specified in an address", type="string" ) 2354 public static final String SP_ADDRESS_STATE = "address-state"; 2355 /** 2356 * <b>Fluent Client</b> search parameter constant for <b>address-state</b> 2357 * <p> 2358 * Description: <b>A state specified in an address</b><br> 2359 * Type: <b>string</b><br> 2360 * Path: <b>Location.address.state</b><br> 2361 * </p> 2362 */ 2363 public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_STATE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_STATE); 2364 2365 /** 2366 * Search parameter: <b>address-use</b> 2367 * <p> 2368 * Description: <b>A use code specified in an address</b><br> 2369 * Type: <b>token</b><br> 2370 * Path: <b>Location.address.use</b><br> 2371 * </p> 2372 */ 2373 @SearchParamDefinition(name="address-use", path="Location.address.use", description="A use code specified in an address", type="token" ) 2374 public static final String SP_ADDRESS_USE = "address-use"; 2375 /** 2376 * <b>Fluent Client</b> search parameter constant for <b>address-use</b> 2377 * <p> 2378 * Description: <b>A use code specified in an address</b><br> 2379 * Type: <b>token</b><br> 2380 * Path: <b>Location.address.use</b><br> 2381 * </p> 2382 */ 2383 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ADDRESS_USE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ADDRESS_USE); 2384 2385 /** 2386 * Search parameter: <b>address</b> 2387 * <p> 2388 * Description: <b>A (part of the) address of the location</b><br> 2389 * Type: <b>string</b><br> 2390 * Path: <b>Location.address</b><br> 2391 * </p> 2392 */ 2393 @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location", type="string" ) 2394 public static final String SP_ADDRESS = "address"; 2395 /** 2396 * <b>Fluent Client</b> search parameter constant for <b>address</b> 2397 * <p> 2398 * Description: <b>A (part of the) address of the location</b><br> 2399 * Type: <b>string</b><br> 2400 * Path: <b>Location.address</b><br> 2401 * </p> 2402 */ 2403 public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS); 2404 2405 /** 2406 * Search parameter: <b>endpoint</b> 2407 * <p> 2408 * Description: <b>Technical endpoints providing access to services operated for the location</b><br> 2409 * Type: <b>reference</b><br> 2410 * Path: <b>Location.endpoint</b><br> 2411 * </p> 2412 */ 2413 @SearchParamDefinition(name="endpoint", path="Location.endpoint", description="Technical endpoints providing access to services operated for the location", type="reference", target={Endpoint.class } ) 2414 public static final String SP_ENDPOINT = "endpoint"; 2415 /** 2416 * <b>Fluent Client</b> search parameter constant for <b>endpoint</b> 2417 * <p> 2418 * Description: <b>Technical endpoints providing access to services operated for the location</b><br> 2419 * Type: <b>reference</b><br> 2420 * Path: <b>Location.endpoint</b><br> 2421 * </p> 2422 */ 2423 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT); 2424 2425/** 2426 * Constant for fluent queries to be used to add include statements. Specifies 2427 * the path value of "<b>Location:endpoint</b>". 2428 */ 2429 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("Location:endpoint").toLocked(); 2430 2431 /** 2432 * Search parameter: <b>identifier</b> 2433 * <p> 2434 * Description: <b>An identifier for the location</b><br> 2435 * Type: <b>token</b><br> 2436 * Path: <b>Location.identifier</b><br> 2437 * </p> 2438 */ 2439 @SearchParamDefinition(name="identifier", path="Location.identifier", description="An identifier for the location", type="token" ) 2440 public static final String SP_IDENTIFIER = "identifier"; 2441 /** 2442 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2443 * <p> 2444 * Description: <b>An identifier for the location</b><br> 2445 * Type: <b>token</b><br> 2446 * Path: <b>Location.identifier</b><br> 2447 * </p> 2448 */ 2449 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2450 2451 /** 2452 * Search parameter: <b>name</b> 2453 * <p> 2454 * Description: <b>A portion of the location's name or alias</b><br> 2455 * Type: <b>string</b><br> 2456 * Path: <b>Location.name | Location.alias</b><br> 2457 * </p> 2458 */ 2459 @SearchParamDefinition(name="name", path="Location.name | Location.alias", description="A portion of the location's name or alias", type="string" ) 2460 public static final String SP_NAME = "name"; 2461 /** 2462 * <b>Fluent Client</b> search parameter constant for <b>name</b> 2463 * <p> 2464 * Description: <b>A portion of the location's name or alias</b><br> 2465 * Type: <b>string</b><br> 2466 * Path: <b>Location.name | Location.alias</b><br> 2467 * </p> 2468 */ 2469 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 2470 2471 /** 2472 * Search parameter: <b>near</b> 2473 * <p> 2474 * 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). 2475If 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) 2476 2477Servers may search using various techniques that might have differing accuracies, depending on implementation efficiency. 2478 2479Requires the near-distance parameter to be provided also</b><br> 2480 * Type: <b>special</b><br> 2481 * Path: <b>Location.position</b><br> 2482 * </p> 2483 */ 2484 @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).\nIf 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)\n\nServers may search using various techniques that might have differing accuracies, depending on implementation efficiency.\n\nRequires the near-distance parameter to be provided also", type="special" ) 2485 public static final String SP_NEAR = "near"; 2486 /** 2487 * <b>Fluent Client</b> search parameter constant for <b>near</b> 2488 * <p> 2489 * 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). 2490If 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) 2491 2492Servers may search using various techniques that might have differing accuracies, depending on implementation efficiency. 2493 2494Requires the near-distance parameter to be provided also</b><br> 2495 * Type: <b>special</b><br> 2496 * Path: <b>Location.position</b><br> 2497 * </p> 2498 */ 2499 public static final ca.uhn.fhir.rest.gclient.SpecialClientParam NEAR = new ca.uhn.fhir.rest.gclient.SpecialClientParam(SP_NEAR); 2500 2501 /** 2502 * Search parameter: <b>operational-status</b> 2503 * <p> 2504 * Description: <b>Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)</b><br> 2505 * Type: <b>token</b><br> 2506 * Path: <b>Location.operationalStatus</b><br> 2507 * </p> 2508 */ 2509 @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" ) 2510 public static final String SP_OPERATIONAL_STATUS = "operational-status"; 2511 /** 2512 * <b>Fluent Client</b> search parameter constant for <b>operational-status</b> 2513 * <p> 2514 * Description: <b>Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)</b><br> 2515 * Type: <b>token</b><br> 2516 * Path: <b>Location.operationalStatus</b><br> 2517 * </p> 2518 */ 2519 public static final ca.uhn.fhir.rest.gclient.TokenClientParam OPERATIONAL_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OPERATIONAL_STATUS); 2520 2521 /** 2522 * Search parameter: <b>organization</b> 2523 * <p> 2524 * Description: <b>Searches for locations that are managed by the provided organization</b><br> 2525 * Type: <b>reference</b><br> 2526 * Path: <b>Location.managingOrganization</b><br> 2527 * </p> 2528 */ 2529 @SearchParamDefinition(name="organization", path="Location.managingOrganization", description="Searches for locations that are managed by the provided organization", type="reference", target={Organization.class } ) 2530 public static final String SP_ORGANIZATION = "organization"; 2531 /** 2532 * <b>Fluent Client</b> search parameter constant for <b>organization</b> 2533 * <p> 2534 * Description: <b>Searches for locations that are managed by the provided organization</b><br> 2535 * Type: <b>reference</b><br> 2536 * Path: <b>Location.managingOrganization</b><br> 2537 * </p> 2538 */ 2539 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); 2540 2541/** 2542 * Constant for fluent queries to be used to add include statements. Specifies 2543 * the path value of "<b>Location:organization</b>". 2544 */ 2545 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Location:organization").toLocked(); 2546 2547 /** 2548 * Search parameter: <b>partof</b> 2549 * <p> 2550 * Description: <b>A location of which this location is a part</b><br> 2551 * Type: <b>reference</b><br> 2552 * Path: <b>Location.partOf</b><br> 2553 * </p> 2554 */ 2555 @SearchParamDefinition(name="partof", path="Location.partOf", description="A location of which this location is a part", type="reference", target={Location.class } ) 2556 public static final String SP_PARTOF = "partof"; 2557 /** 2558 * <b>Fluent Client</b> search parameter constant for <b>partof</b> 2559 * <p> 2560 * Description: <b>A location of which this location is a part</b><br> 2561 * Type: <b>reference</b><br> 2562 * Path: <b>Location.partOf</b><br> 2563 * </p> 2564 */ 2565 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTOF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTOF); 2566 2567/** 2568 * Constant for fluent queries to be used to add include statements. Specifies 2569 * the path value of "<b>Location:partof</b>". 2570 */ 2571 public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTOF = new ca.uhn.fhir.model.api.Include("Location:partof").toLocked(); 2572 2573 /** 2574 * Search parameter: <b>status</b> 2575 * <p> 2576 * Description: <b>Searches for locations with a specific kind of status</b><br> 2577 * Type: <b>token</b><br> 2578 * Path: <b>Location.status</b><br> 2579 * </p> 2580 */ 2581 @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status", type="token" ) 2582 public static final String SP_STATUS = "status"; 2583 /** 2584 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2585 * <p> 2586 * Description: <b>Searches for locations with a specific kind of status</b><br> 2587 * Type: <b>token</b><br> 2588 * Path: <b>Location.status</b><br> 2589 * </p> 2590 */ 2591 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2592 2593 /** 2594 * Search parameter: <b>type</b> 2595 * <p> 2596 * Description: <b>A code for the type of location</b><br> 2597 * Type: <b>token</b><br> 2598 * Path: <b>Location.type</b><br> 2599 * </p> 2600 */ 2601 @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location", type="token" ) 2602 public static final String SP_TYPE = "type"; 2603 /** 2604 * <b>Fluent Client</b> search parameter constant for <b>type</b> 2605 * <p> 2606 * Description: <b>A code for the type of location</b><br> 2607 * Type: <b>token</b><br> 2608 * Path: <b>Location.type</b><br> 2609 * </p> 2610 */ 2611 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 2612 2613 2614} 2615