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