001package org.hl7.fhir.dstu2.model; 002 003 004 005 006import java.math.BigDecimal; 007 008/* 009 Copyright (c) 2011+, HL7, Inc. 010 All rights reserved. 011 012 Redistribution and use in source and binary forms, with or without modification, 013 are permitted provided that the following conditions are met: 014 015 * Redistributions of source code must retain the above copyright notice, this 016 list of conditions and the following disclaimer. 017 * Redistributions in binary form must reproduce the above copyright notice, 018 this list of conditions and the following disclaimer in the documentation 019 and/or other materials provided with the distribution. 020 * Neither the name of HL7 nor the names of its contributors may be used to 021 endorse or promote products derived from this software without specific 022 prior written permission. 023 024 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 025 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 026 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 027 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 028 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 029 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 030 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 031 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 032 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 033 POSSIBILITY OF SUCH DAMAGE. 034 035*/ 036 037// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2 038import java.util.ArrayList; 039import java.util.List; 040 041import ca.uhn.fhir.model.api.annotation.Block; 042import ca.uhn.fhir.model.api.annotation.Child; 043import ca.uhn.fhir.model.api.annotation.Description; 044import ca.uhn.fhir.model.api.annotation.ResourceDef; 045import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 046import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 047import org.hl7.fhir.exceptions.FHIRException; 048import org.hl7.fhir.utilities.Utilities; 049/** 050 * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated. 051 */ 052@ResourceDef(name="Location", profile="http://hl7.org/fhir/Profile/Location") 053public class Location extends DomainResource { 054 055 public enum LocationStatus { 056 /** 057 * The location is operational. 058 */ 059 ACTIVE, 060 /** 061 * The location is temporarily closed. 062 */ 063 SUSPENDED, 064 /** 065 * The location is no longer used. 066 */ 067 INACTIVE, 068 /** 069 * added to help the parsers 070 */ 071 NULL; 072 public static LocationStatus fromCode(String codeString) throws FHIRException { 073 if (codeString == null || "".equals(codeString)) 074 return null; 075 if ("active".equals(codeString)) 076 return ACTIVE; 077 if ("suspended".equals(codeString)) 078 return SUSPENDED; 079 if ("inactive".equals(codeString)) 080 return INACTIVE; 081 throw new FHIRException("Unknown LocationStatus code '"+codeString+"'"); 082 } 083 public String toCode() { 084 switch (this) { 085 case ACTIVE: return "active"; 086 case SUSPENDED: return "suspended"; 087 case INACTIVE: return "inactive"; 088 case NULL: return null; 089 default: return "?"; 090 } 091 } 092 public String getSystem() { 093 switch (this) { 094 case ACTIVE: return "http://hl7.org/fhir/location-status"; 095 case SUSPENDED: return "http://hl7.org/fhir/location-status"; 096 case INACTIVE: return "http://hl7.org/fhir/location-status"; 097 case NULL: return null; 098 default: return "?"; 099 } 100 } 101 public String getDefinition() { 102 switch (this) { 103 case ACTIVE: return "The location is operational."; 104 case SUSPENDED: return "The location is temporarily closed."; 105 case INACTIVE: return "The location is no longer used."; 106 case NULL: return null; 107 default: return "?"; 108 } 109 } 110 public String getDisplay() { 111 switch (this) { 112 case ACTIVE: return "Active"; 113 case SUSPENDED: return "Suspended"; 114 case INACTIVE: return "Inactive"; 115 case NULL: return null; 116 default: return "?"; 117 } 118 } 119 } 120 121 public static class LocationStatusEnumFactory implements EnumFactory<LocationStatus> { 122 public LocationStatus fromCode(String codeString) throws IllegalArgumentException { 123 if (codeString == null || "".equals(codeString)) 124 if (codeString == null || "".equals(codeString)) 125 return null; 126 if ("active".equals(codeString)) 127 return LocationStatus.ACTIVE; 128 if ("suspended".equals(codeString)) 129 return LocationStatus.SUSPENDED; 130 if ("inactive".equals(codeString)) 131 return LocationStatus.INACTIVE; 132 throw new IllegalArgumentException("Unknown LocationStatus code '"+codeString+"'"); 133 } 134 public Enumeration<LocationStatus> fromType(Base code) throws FHIRException { 135 if (code == null || code.isEmpty()) 136 return null; 137 String codeString = ((PrimitiveType) code).asStringValue(); 138 if (codeString == null || "".equals(codeString)) 139 return null; 140 if ("active".equals(codeString)) 141 return new Enumeration<LocationStatus>(this, LocationStatus.ACTIVE); 142 if ("suspended".equals(codeString)) 143 return new Enumeration<LocationStatus>(this, LocationStatus.SUSPENDED); 144 if ("inactive".equals(codeString)) 145 return new Enumeration<LocationStatus>(this, LocationStatus.INACTIVE); 146 throw new FHIRException("Unknown LocationStatus code '"+codeString+"'"); 147 } 148 public String toCode(LocationStatus code) { 149 if (code == LocationStatus.ACTIVE) 150 return "active"; 151 if (code == LocationStatus.SUSPENDED) 152 return "suspended"; 153 if (code == LocationStatus.INACTIVE) 154 return "inactive"; 155 return "?"; 156 } 157 } 158 159 public enum LocationMode { 160 /** 161 * The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A). 162 */ 163 INSTANCE, 164 /** 165 * 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.). 166 */ 167 KIND, 168 /** 169 * added to help the parsers 170 */ 171 NULL; 172 public static LocationMode fromCode(String codeString) throws FHIRException { 173 if (codeString == null || "".equals(codeString)) 174 return null; 175 if ("instance".equals(codeString)) 176 return INSTANCE; 177 if ("kind".equals(codeString)) 178 return KIND; 179 throw new FHIRException("Unknown LocationMode code '"+codeString+"'"); 180 } 181 public String toCode() { 182 switch (this) { 183 case INSTANCE: return "instance"; 184 case KIND: return "kind"; 185 case NULL: return null; 186 default: return "?"; 187 } 188 } 189 public String getSystem() { 190 switch (this) { 191 case INSTANCE: return "http://hl7.org/fhir/location-mode"; 192 case KIND: return "http://hl7.org/fhir/location-mode"; 193 case NULL: return null; 194 default: return "?"; 195 } 196 } 197 public String getDefinition() { 198 switch (this) { 199 case INSTANCE: return "The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A)."; 200 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.)."; 201 case NULL: return null; 202 default: return "?"; 203 } 204 } 205 public String getDisplay() { 206 switch (this) { 207 case INSTANCE: return "Instance"; 208 case KIND: return "Kind"; 209 case NULL: return null; 210 default: return "?"; 211 } 212 } 213 } 214 215 public static class LocationModeEnumFactory implements EnumFactory<LocationMode> { 216 public LocationMode fromCode(String codeString) throws IllegalArgumentException { 217 if (codeString == null || "".equals(codeString)) 218 if (codeString == null || "".equals(codeString)) 219 return null; 220 if ("instance".equals(codeString)) 221 return LocationMode.INSTANCE; 222 if ("kind".equals(codeString)) 223 return LocationMode.KIND; 224 throw new IllegalArgumentException("Unknown LocationMode code '"+codeString+"'"); 225 } 226 public Enumeration<LocationMode> fromType(Base code) throws FHIRException { 227 if (code == null || code.isEmpty()) 228 return null; 229 String codeString = ((PrimitiveType) code).asStringValue(); 230 if (codeString == null || "".equals(codeString)) 231 return null; 232 if ("instance".equals(codeString)) 233 return new Enumeration<LocationMode>(this, LocationMode.INSTANCE); 234 if ("kind".equals(codeString)) 235 return new Enumeration<LocationMode>(this, LocationMode.KIND); 236 throw new FHIRException("Unknown LocationMode code '"+codeString+"'"); 237 } 238 public String toCode(LocationMode code) { 239 if (code == LocationMode.INSTANCE) 240 return "instance"; 241 if (code == LocationMode.KIND) 242 return "kind"; 243 return "?"; 244 } 245 } 246 247 @Block() 248 public static class LocationPositionComponent extends BackboneElement implements IBaseBackboneElement { 249 /** 250 * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). 251 */ 252 @Child(name = "longitude", type = {DecimalType.class}, order=1, min=1, max=1, modifier=false, summary=false) 253 @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)." ) 254 protected DecimalType longitude; 255 256 /** 257 * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). 258 */ 259 @Child(name = "latitude", type = {DecimalType.class}, order=2, min=1, max=1, modifier=false, summary=false) 260 @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)." ) 261 protected DecimalType latitude; 262 263 /** 264 * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). 265 */ 266 @Child(name = "altitude", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false) 267 @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)." ) 268 protected DecimalType altitude; 269 270 private static final long serialVersionUID = -74276134L; 271 272 /* 273 * Constructor 274 */ 275 public LocationPositionComponent() { 276 super(); 277 } 278 279 /* 280 * Constructor 281 */ 282 public LocationPositionComponent(DecimalType longitude, DecimalType latitude) { 283 super(); 284 this.longitude = longitude; 285 this.latitude = latitude; 286 } 287 288 /** 289 * @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 290 */ 291 public DecimalType getLongitudeElement() { 292 if (this.longitude == null) 293 if (Configuration.errorOnAutoCreate()) 294 throw new Error("Attempt to auto-create LocationPositionComponent.longitude"); 295 else if (Configuration.doAutoCreate()) 296 this.longitude = new DecimalType(); // bb 297 return this.longitude; 298 } 299 300 public boolean hasLongitudeElement() { 301 return this.longitude != null && !this.longitude.isEmpty(); 302 } 303 304 public boolean hasLongitude() { 305 return this.longitude != null && !this.longitude.isEmpty(); 306 } 307 308 /** 309 * @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 310 */ 311 public LocationPositionComponent setLongitudeElement(DecimalType value) { 312 this.longitude = value; 313 return this; 314 } 315 316 /** 317 * @return Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below). 318 */ 319 public BigDecimal getLongitude() { 320 return this.longitude == null ? null : this.longitude.getValue(); 321 } 322 323 /** 324 * @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). 325 */ 326 public LocationPositionComponent setLongitude(BigDecimal value) { 327 if (this.longitude == null) 328 this.longitude = new DecimalType(); 329 this.longitude.setValue(value); 330 return this; 331 } 332 333 /** 334 * @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 335 */ 336 public DecimalType getLatitudeElement() { 337 if (this.latitude == null) 338 if (Configuration.errorOnAutoCreate()) 339 throw new Error("Attempt to auto-create LocationPositionComponent.latitude"); 340 else if (Configuration.doAutoCreate()) 341 this.latitude = new DecimalType(); // bb 342 return this.latitude; 343 } 344 345 public boolean hasLatitudeElement() { 346 return this.latitude != null && !this.latitude.isEmpty(); 347 } 348 349 public boolean hasLatitude() { 350 return this.latitude != null && !this.latitude.isEmpty(); 351 } 352 353 /** 354 * @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 355 */ 356 public LocationPositionComponent setLatitudeElement(DecimalType value) { 357 this.latitude = value; 358 return this; 359 } 360 361 /** 362 * @return Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below). 363 */ 364 public BigDecimal getLatitude() { 365 return this.latitude == null ? null : this.latitude.getValue(); 366 } 367 368 /** 369 * @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). 370 */ 371 public LocationPositionComponent setLatitude(BigDecimal value) { 372 if (this.latitude == null) 373 this.latitude = new DecimalType(); 374 this.latitude.setValue(value); 375 return this; 376 } 377 378 /** 379 * @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 380 */ 381 public DecimalType getAltitudeElement() { 382 if (this.altitude == null) 383 if (Configuration.errorOnAutoCreate()) 384 throw new Error("Attempt to auto-create LocationPositionComponent.altitude"); 385 else if (Configuration.doAutoCreate()) 386 this.altitude = new DecimalType(); // bb 387 return this.altitude; 388 } 389 390 public boolean hasAltitudeElement() { 391 return this.altitude != null && !this.altitude.isEmpty(); 392 } 393 394 public boolean hasAltitude() { 395 return this.altitude != null && !this.altitude.isEmpty(); 396 } 397 398 /** 399 * @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 400 */ 401 public LocationPositionComponent setAltitudeElement(DecimalType value) { 402 this.altitude = value; 403 return this; 404 } 405 406 /** 407 * @return Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below). 408 */ 409 public BigDecimal getAltitude() { 410 return this.altitude == null ? null : this.altitude.getValue(); 411 } 412 413 /** 414 * @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). 415 */ 416 public LocationPositionComponent setAltitude(BigDecimal value) { 417 if (value == null) 418 this.altitude = null; 419 else { 420 if (this.altitude == null) 421 this.altitude = new DecimalType(); 422 this.altitude.setValue(value); 423 } 424 return this; 425 } 426 427 protected void listChildren(List<Property> childrenList) { 428 super.listChildren(childrenList); 429 childrenList.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, java.lang.Integer.MAX_VALUE, longitude)); 430 childrenList.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, java.lang.Integer.MAX_VALUE, latitude)); 431 childrenList.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, java.lang.Integer.MAX_VALUE, altitude)); 432 } 433 434 @Override 435 public void setProperty(String name, Base value) throws FHIRException { 436 if (name.equals("longitude")) 437 this.longitude = castToDecimal(value); // DecimalType 438 else if (name.equals("latitude")) 439 this.latitude = castToDecimal(value); // DecimalType 440 else if (name.equals("altitude")) 441 this.altitude = castToDecimal(value); // DecimalType 442 else 443 super.setProperty(name, value); 444 } 445 446 @Override 447 public Base addChild(String name) throws FHIRException { 448 if (name.equals("longitude")) { 449 throw new FHIRException("Cannot call addChild on a primitive type Location.longitude"); 450 } 451 else if (name.equals("latitude")) { 452 throw new FHIRException("Cannot call addChild on a primitive type Location.latitude"); 453 } 454 else if (name.equals("altitude")) { 455 throw new FHIRException("Cannot call addChild on a primitive type Location.altitude"); 456 } 457 else 458 return super.addChild(name); 459 } 460 461 public LocationPositionComponent copy() { 462 LocationPositionComponent dst = new LocationPositionComponent(); 463 copyValues(dst); 464 dst.longitude = longitude == null ? null : longitude.copy(); 465 dst.latitude = latitude == null ? null : latitude.copy(); 466 dst.altitude = altitude == null ? null : altitude.copy(); 467 return dst; 468 } 469 470 @Override 471 public boolean equalsDeep(Base other) { 472 if (!super.equalsDeep(other)) 473 return false; 474 if (!(other instanceof LocationPositionComponent)) 475 return false; 476 LocationPositionComponent o = (LocationPositionComponent) other; 477 return compareDeep(longitude, o.longitude, true) && compareDeep(latitude, o.latitude, true) && compareDeep(altitude, o.altitude, true) 478 ; 479 } 480 481 @Override 482 public boolean equalsShallow(Base other) { 483 if (!super.equalsShallow(other)) 484 return false; 485 if (!(other instanceof LocationPositionComponent)) 486 return false; 487 LocationPositionComponent o = (LocationPositionComponent) other; 488 return compareValues(longitude, o.longitude, true) && compareValues(latitude, o.latitude, true) && compareValues(altitude, o.altitude, true) 489 ; 490 } 491 492 public boolean isEmpty() { 493 return super.isEmpty() && (longitude == null || longitude.isEmpty()) && (latitude == null || latitude.isEmpty()) 494 && (altitude == null || altitude.isEmpty()); 495 } 496 497 public String fhirType() { 498 return "Location.position"; 499 500 } 501 502 } 503 504 /** 505 * Unique code or number identifying the location to its users. 506 */ 507 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 508 @Description(shortDefinition="Unique code or number identifying the location to its users", formalDefinition="Unique code or number identifying the location to its users." ) 509 protected List<Identifier> identifier; 510 511 /** 512 * active | suspended | inactive. 513 */ 514 @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) 515 @Description(shortDefinition="active | suspended | inactive", formalDefinition="active | suspended | inactive." ) 516 protected Enumeration<LocationStatus> status; 517 518 /** 519 * Name of the location as used by humans. Does not need to be unique. 520 */ 521 @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 522 @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." ) 523 protected StringType name; 524 525 /** 526 * Description of the Location, which helps in finding or referencing the place. 527 */ 528 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 529 @Description(shortDefinition="Description of the location", formalDefinition="Description of the Location, which helps in finding or referencing the place." ) 530 protected StringType description; 531 532 /** 533 * Indicates whether a resource instance represents a specific location or a class of locations. 534 */ 535 @Child(name = "mode", type = {CodeType.class}, order=4, min=0, max=1, modifier=true, summary=true) 536 @Description(shortDefinition="instance | kind", formalDefinition="Indicates whether a resource instance represents a specific location or a class of locations." ) 537 protected Enumeration<LocationMode> mode; 538 539 /** 540 * Indicates the type of function performed at the location. 541 */ 542 @Child(name = "type", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) 543 @Description(shortDefinition="Type of function performed", formalDefinition="Indicates the type of function performed at the location." ) 544 protected CodeableConcept type; 545 546 /** 547 * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites. 548 */ 549 @Child(name = "telecom", type = {ContactPoint.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 550 @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." ) 551 protected List<ContactPoint> telecom; 552 553 /** 554 * Physical location. 555 */ 556 @Child(name = "address", type = {Address.class}, order=7, min=0, max=1, modifier=false, summary=false) 557 @Description(shortDefinition="Physical location", formalDefinition="Physical location." ) 558 protected Address address; 559 560 /** 561 * Physical form of the location, e.g. building, room, vehicle, road. 562 */ 563 @Child(name = "physicalType", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true) 564 @Description(shortDefinition="Physical form of the location", formalDefinition="Physical form of the location, e.g. building, room, vehicle, road." ) 565 protected CodeableConcept physicalType; 566 567 /** 568 * The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML). 569 */ 570 @Child(name = "position", type = {}, order=9, min=0, max=1, modifier=false, summary=false) 571 @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)." ) 572 protected LocationPositionComponent position; 573 574 /** 575 * The organization responsible for the provisioning and upkeep of the location. 576 */ 577 @Child(name = "managingOrganization", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=true) 578 @Description(shortDefinition="Organization responsible for provisioning and upkeep", formalDefinition="The organization responsible for the provisioning and upkeep of the location." ) 579 protected Reference managingOrganization; 580 581 /** 582 * The actual object that is the target of the reference (The organization responsible for the provisioning and upkeep of the location.) 583 */ 584 protected Organization managingOrganizationTarget; 585 586 /** 587 * Another Location which this Location is physically part of. 588 */ 589 @Child(name = "partOf", type = {Location.class}, order=11, min=0, max=1, modifier=false, summary=false) 590 @Description(shortDefinition="Another Location this one is physically part of", formalDefinition="Another Location which this Location is physically part of." ) 591 protected Reference partOf; 592 593 /** 594 * The actual object that is the target of the reference (Another Location which this Location is physically part of.) 595 */ 596 protected Location partOfTarget; 597 598 private static final long serialVersionUID = -2100435761L; 599 600 /* 601 * Constructor 602 */ 603 public Location() { 604 super(); 605 } 606 607 /** 608 * @return {@link #identifier} (Unique code or number identifying the location to its users.) 609 */ 610 public List<Identifier> getIdentifier() { 611 if (this.identifier == null) 612 this.identifier = new ArrayList<Identifier>(); 613 return this.identifier; 614 } 615 616 public boolean hasIdentifier() { 617 if (this.identifier == null) 618 return false; 619 for (Identifier item : this.identifier) 620 if (!item.isEmpty()) 621 return true; 622 return false; 623 } 624 625 /** 626 * @return {@link #identifier} (Unique code or number identifying the location to its users.) 627 */ 628 // syntactic sugar 629 public Identifier addIdentifier() { //3 630 Identifier t = new Identifier(); 631 if (this.identifier == null) 632 this.identifier = new ArrayList<Identifier>(); 633 this.identifier.add(t); 634 return t; 635 } 636 637 // syntactic sugar 638 public Location addIdentifier(Identifier t) { //3 639 if (t == null) 640 return this; 641 if (this.identifier == null) 642 this.identifier = new ArrayList<Identifier>(); 643 this.identifier.add(t); 644 return this; 645 } 646 647 /** 648 * @return {@link #status} (active | suspended | inactive.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 649 */ 650 public Enumeration<LocationStatus> getStatusElement() { 651 if (this.status == null) 652 if (Configuration.errorOnAutoCreate()) 653 throw new Error("Attempt to auto-create Location.status"); 654 else if (Configuration.doAutoCreate()) 655 this.status = new Enumeration<LocationStatus>(new LocationStatusEnumFactory()); // bb 656 return this.status; 657 } 658 659 public boolean hasStatusElement() { 660 return this.status != null && !this.status.isEmpty(); 661 } 662 663 public boolean hasStatus() { 664 return this.status != null && !this.status.isEmpty(); 665 } 666 667 /** 668 * @param value {@link #status} (active | suspended | inactive.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 669 */ 670 public Location setStatusElement(Enumeration<LocationStatus> value) { 671 this.status = value; 672 return this; 673 } 674 675 /** 676 * @return active | suspended | inactive. 677 */ 678 public LocationStatus getStatus() { 679 return this.status == null ? null : this.status.getValue(); 680 } 681 682 /** 683 * @param value active | suspended | inactive. 684 */ 685 public Location setStatus(LocationStatus value) { 686 if (value == null) 687 this.status = null; 688 else { 689 if (this.status == null) 690 this.status = new Enumeration<LocationStatus>(new LocationStatusEnumFactory()); 691 this.status.setValue(value); 692 } 693 return this; 694 } 695 696 /** 697 * @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 698 */ 699 public StringType getNameElement() { 700 if (this.name == null) 701 if (Configuration.errorOnAutoCreate()) 702 throw new Error("Attempt to auto-create Location.name"); 703 else if (Configuration.doAutoCreate()) 704 this.name = new StringType(); // bb 705 return this.name; 706 } 707 708 public boolean hasNameElement() { 709 return this.name != null && !this.name.isEmpty(); 710 } 711 712 public boolean hasName() { 713 return this.name != null && !this.name.isEmpty(); 714 } 715 716 /** 717 * @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 718 */ 719 public Location setNameElement(StringType value) { 720 this.name = value; 721 return this; 722 } 723 724 /** 725 * @return Name of the location as used by humans. Does not need to be unique. 726 */ 727 public String getName() { 728 return this.name == null ? null : this.name.getValue(); 729 } 730 731 /** 732 * @param value Name of the location as used by humans. Does not need to be unique. 733 */ 734 public Location setName(String value) { 735 if (Utilities.noString(value)) 736 this.name = null; 737 else { 738 if (this.name == null) 739 this.name = new StringType(); 740 this.name.setValue(value); 741 } 742 return this; 743 } 744 745 /** 746 * @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 747 */ 748 public StringType getDescriptionElement() { 749 if (this.description == null) 750 if (Configuration.errorOnAutoCreate()) 751 throw new Error("Attempt to auto-create Location.description"); 752 else if (Configuration.doAutoCreate()) 753 this.description = new StringType(); // bb 754 return this.description; 755 } 756 757 public boolean hasDescriptionElement() { 758 return this.description != null && !this.description.isEmpty(); 759 } 760 761 public boolean hasDescription() { 762 return this.description != null && !this.description.isEmpty(); 763 } 764 765 /** 766 * @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 767 */ 768 public Location setDescriptionElement(StringType value) { 769 this.description = value; 770 return this; 771 } 772 773 /** 774 * @return Description of the Location, which helps in finding or referencing the place. 775 */ 776 public String getDescription() { 777 return this.description == null ? null : this.description.getValue(); 778 } 779 780 /** 781 * @param value Description of the Location, which helps in finding or referencing the place. 782 */ 783 public Location setDescription(String value) { 784 if (Utilities.noString(value)) 785 this.description = null; 786 else { 787 if (this.description == null) 788 this.description = new StringType(); 789 this.description.setValue(value); 790 } 791 return this; 792 } 793 794 /** 795 * @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 796 */ 797 public Enumeration<LocationMode> getModeElement() { 798 if (this.mode == null) 799 if (Configuration.errorOnAutoCreate()) 800 throw new Error("Attempt to auto-create Location.mode"); 801 else if (Configuration.doAutoCreate()) 802 this.mode = new Enumeration<LocationMode>(new LocationModeEnumFactory()); // bb 803 return this.mode; 804 } 805 806 public boolean hasModeElement() { 807 return this.mode != null && !this.mode.isEmpty(); 808 } 809 810 public boolean hasMode() { 811 return this.mode != null && !this.mode.isEmpty(); 812 } 813 814 /** 815 * @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 816 */ 817 public Location setModeElement(Enumeration<LocationMode> value) { 818 this.mode = value; 819 return this; 820 } 821 822 /** 823 * @return Indicates whether a resource instance represents a specific location or a class of locations. 824 */ 825 public LocationMode getMode() { 826 return this.mode == null ? null : this.mode.getValue(); 827 } 828 829 /** 830 * @param value Indicates whether a resource instance represents a specific location or a class of locations. 831 */ 832 public Location setMode(LocationMode value) { 833 if (value == null) 834 this.mode = null; 835 else { 836 if (this.mode == null) 837 this.mode = new Enumeration<LocationMode>(new LocationModeEnumFactory()); 838 this.mode.setValue(value); 839 } 840 return this; 841 } 842 843 /** 844 * @return {@link #type} (Indicates the type of function performed at the location.) 845 */ 846 public CodeableConcept getType() { 847 if (this.type == null) 848 if (Configuration.errorOnAutoCreate()) 849 throw new Error("Attempt to auto-create Location.type"); 850 else if (Configuration.doAutoCreate()) 851 this.type = new CodeableConcept(); // cc 852 return this.type; 853 } 854 855 public boolean hasType() { 856 return this.type != null && !this.type.isEmpty(); 857 } 858 859 /** 860 * @param value {@link #type} (Indicates the type of function performed at the location.) 861 */ 862 public Location setType(CodeableConcept value) { 863 this.type = value; 864 return this; 865 } 866 867 /** 868 * @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.) 869 */ 870 public List<ContactPoint> getTelecom() { 871 if (this.telecom == null) 872 this.telecom = new ArrayList<ContactPoint>(); 873 return this.telecom; 874 } 875 876 public boolean hasTelecom() { 877 if (this.telecom == null) 878 return false; 879 for (ContactPoint item : this.telecom) 880 if (!item.isEmpty()) 881 return true; 882 return false; 883 } 884 885 /** 886 * @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.) 887 */ 888 // syntactic sugar 889 public ContactPoint addTelecom() { //3 890 ContactPoint t = new ContactPoint(); 891 if (this.telecom == null) 892 this.telecom = new ArrayList<ContactPoint>(); 893 this.telecom.add(t); 894 return t; 895 } 896 897 // syntactic sugar 898 public Location addTelecom(ContactPoint t) { //3 899 if (t == null) 900 return this; 901 if (this.telecom == null) 902 this.telecom = new ArrayList<ContactPoint>(); 903 this.telecom.add(t); 904 return this; 905 } 906 907 /** 908 * @return {@link #address} (Physical location.) 909 */ 910 public Address getAddress() { 911 if (this.address == null) 912 if (Configuration.errorOnAutoCreate()) 913 throw new Error("Attempt to auto-create Location.address"); 914 else if (Configuration.doAutoCreate()) 915 this.address = new Address(); // cc 916 return this.address; 917 } 918 919 public boolean hasAddress() { 920 return this.address != null && !this.address.isEmpty(); 921 } 922 923 /** 924 * @param value {@link #address} (Physical location.) 925 */ 926 public Location setAddress(Address value) { 927 this.address = value; 928 return this; 929 } 930 931 /** 932 * @return {@link #physicalType} (Physical form of the location, e.g. building, room, vehicle, road.) 933 */ 934 public CodeableConcept getPhysicalType() { 935 if (this.physicalType == null) 936 if (Configuration.errorOnAutoCreate()) 937 throw new Error("Attempt to auto-create Location.physicalType"); 938 else if (Configuration.doAutoCreate()) 939 this.physicalType = new CodeableConcept(); // cc 940 return this.physicalType; 941 } 942 943 public boolean hasPhysicalType() { 944 return this.physicalType != null && !this.physicalType.isEmpty(); 945 } 946 947 /** 948 * @param value {@link #physicalType} (Physical form of the location, e.g. building, room, vehicle, road.) 949 */ 950 public Location setPhysicalType(CodeableConcept value) { 951 this.physicalType = value; 952 return this; 953 } 954 955 /** 956 * @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).) 957 */ 958 public LocationPositionComponent getPosition() { 959 if (this.position == null) 960 if (Configuration.errorOnAutoCreate()) 961 throw new Error("Attempt to auto-create Location.position"); 962 else if (Configuration.doAutoCreate()) 963 this.position = new LocationPositionComponent(); // cc 964 return this.position; 965 } 966 967 public boolean hasPosition() { 968 return this.position != null && !this.position.isEmpty(); 969 } 970 971 /** 972 * @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).) 973 */ 974 public Location setPosition(LocationPositionComponent value) { 975 this.position = value; 976 return this; 977 } 978 979 /** 980 * @return {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.) 981 */ 982 public Reference getManagingOrganization() { 983 if (this.managingOrganization == null) 984 if (Configuration.errorOnAutoCreate()) 985 throw new Error("Attempt to auto-create Location.managingOrganization"); 986 else if (Configuration.doAutoCreate()) 987 this.managingOrganization = new Reference(); // cc 988 return this.managingOrganization; 989 } 990 991 public boolean hasManagingOrganization() { 992 return this.managingOrganization != null && !this.managingOrganization.isEmpty(); 993 } 994 995 /** 996 * @param value {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.) 997 */ 998 public Location setManagingOrganization(Reference value) { 999 this.managingOrganization = value; 1000 return this; 1001 } 1002 1003 /** 1004 * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization responsible for the provisioning and upkeep of the location.) 1005 */ 1006 public Organization getManagingOrganizationTarget() { 1007 if (this.managingOrganizationTarget == null) 1008 if (Configuration.errorOnAutoCreate()) 1009 throw new Error("Attempt to auto-create Location.managingOrganization"); 1010 else if (Configuration.doAutoCreate()) 1011 this.managingOrganizationTarget = new Organization(); // aa 1012 return this.managingOrganizationTarget; 1013 } 1014 1015 /** 1016 * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization responsible for the provisioning and upkeep of the location.) 1017 */ 1018 public Location setManagingOrganizationTarget(Organization value) { 1019 this.managingOrganizationTarget = value; 1020 return this; 1021 } 1022 1023 /** 1024 * @return {@link #partOf} (Another Location which this Location is physically part of.) 1025 */ 1026 public Reference getPartOf() { 1027 if (this.partOf == null) 1028 if (Configuration.errorOnAutoCreate()) 1029 throw new Error("Attempt to auto-create Location.partOf"); 1030 else if (Configuration.doAutoCreate()) 1031 this.partOf = new Reference(); // cc 1032 return this.partOf; 1033 } 1034 1035 public boolean hasPartOf() { 1036 return this.partOf != null && !this.partOf.isEmpty(); 1037 } 1038 1039 /** 1040 * @param value {@link #partOf} (Another Location which this Location is physically part of.) 1041 */ 1042 public Location setPartOf(Reference value) { 1043 this.partOf = value; 1044 return this; 1045 } 1046 1047 /** 1048 * @return {@link #partOf} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Another Location which this Location is physically part of.) 1049 */ 1050 public Location getPartOfTarget() { 1051 if (this.partOfTarget == null) 1052 if (Configuration.errorOnAutoCreate()) 1053 throw new Error("Attempt to auto-create Location.partOf"); 1054 else if (Configuration.doAutoCreate()) 1055 this.partOfTarget = new Location(); // aa 1056 return this.partOfTarget; 1057 } 1058 1059 /** 1060 * @param value {@link #partOf} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Another Location which this Location is physically part of.) 1061 */ 1062 public Location setPartOfTarget(Location value) { 1063 this.partOfTarget = value; 1064 return this; 1065 } 1066 1067 protected void listChildren(List<Property> childrenList) { 1068 super.listChildren(childrenList); 1069 childrenList.add(new Property("identifier", "Identifier", "Unique code or number identifying the location to its users.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1070 childrenList.add(new Property("status", "code", "active | suspended | inactive.", 0, java.lang.Integer.MAX_VALUE, status)); 1071 childrenList.add(new Property("name", "string", "Name of the location as used by humans. Does not need to be unique.", 0, java.lang.Integer.MAX_VALUE, name)); 1072 childrenList.add(new Property("description", "string", "Description of the Location, which helps in finding or referencing the place.", 0, java.lang.Integer.MAX_VALUE, description)); 1073 childrenList.add(new Property("mode", "code", "Indicates whether a resource instance represents a specific location or a class of locations.", 0, java.lang.Integer.MAX_VALUE, mode)); 1074 childrenList.add(new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, java.lang.Integer.MAX_VALUE, type)); 1075 childrenList.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)); 1076 childrenList.add(new Property("address", "Address", "Physical location.", 0, java.lang.Integer.MAX_VALUE, address)); 1077 childrenList.add(new Property("physicalType", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road.", 0, java.lang.Integer.MAX_VALUE, physicalType)); 1078 childrenList.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, java.lang.Integer.MAX_VALUE, position)); 1079 childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); 1080 childrenList.add(new Property("partOf", "Reference(Location)", "Another Location which this Location is physically part of.", 0, java.lang.Integer.MAX_VALUE, partOf)); 1081 } 1082 1083 @Override 1084 public void setProperty(String name, Base value) throws FHIRException { 1085 if (name.equals("identifier")) 1086 this.getIdentifier().add(castToIdentifier(value)); 1087 else if (name.equals("status")) 1088 this.status = new LocationStatusEnumFactory().fromType(value); // Enumeration<LocationStatus> 1089 else if (name.equals("name")) 1090 this.name = castToString(value); // StringType 1091 else if (name.equals("description")) 1092 this.description = castToString(value); // StringType 1093 else if (name.equals("mode")) 1094 this.mode = new LocationModeEnumFactory().fromType(value); // Enumeration<LocationMode> 1095 else if (name.equals("type")) 1096 this.type = castToCodeableConcept(value); // CodeableConcept 1097 else if (name.equals("telecom")) 1098 this.getTelecom().add(castToContactPoint(value)); 1099 else if (name.equals("address")) 1100 this.address = castToAddress(value); // Address 1101 else if (name.equals("physicalType")) 1102 this.physicalType = castToCodeableConcept(value); // CodeableConcept 1103 else if (name.equals("position")) 1104 this.position = (LocationPositionComponent) value; // LocationPositionComponent 1105 else if (name.equals("managingOrganization")) 1106 this.managingOrganization = castToReference(value); // Reference 1107 else if (name.equals("partOf")) 1108 this.partOf = castToReference(value); // Reference 1109 else 1110 super.setProperty(name, value); 1111 } 1112 1113 @Override 1114 public Base addChild(String name) throws FHIRException { 1115 if (name.equals("identifier")) { 1116 return addIdentifier(); 1117 } 1118 else if (name.equals("status")) { 1119 throw new FHIRException("Cannot call addChild on a primitive type Location.status"); 1120 } 1121 else if (name.equals("name")) { 1122 throw new FHIRException("Cannot call addChild on a primitive type Location.name"); 1123 } 1124 else if (name.equals("description")) { 1125 throw new FHIRException("Cannot call addChild on a primitive type Location.description"); 1126 } 1127 else if (name.equals("mode")) { 1128 throw new FHIRException("Cannot call addChild on a primitive type Location.mode"); 1129 } 1130 else if (name.equals("type")) { 1131 this.type = new CodeableConcept(); 1132 return this.type; 1133 } 1134 else if (name.equals("telecom")) { 1135 return addTelecom(); 1136 } 1137 else if (name.equals("address")) { 1138 this.address = new Address(); 1139 return this.address; 1140 } 1141 else if (name.equals("physicalType")) { 1142 this.physicalType = new CodeableConcept(); 1143 return this.physicalType; 1144 } 1145 else if (name.equals("position")) { 1146 this.position = new LocationPositionComponent(); 1147 return this.position; 1148 } 1149 else if (name.equals("managingOrganization")) { 1150 this.managingOrganization = new Reference(); 1151 return this.managingOrganization; 1152 } 1153 else if (name.equals("partOf")) { 1154 this.partOf = new Reference(); 1155 return this.partOf; 1156 } 1157 else 1158 return super.addChild(name); 1159 } 1160 1161 public String fhirType() { 1162 return "Location"; 1163 1164 } 1165 1166 public Location copy() { 1167 Location dst = new Location(); 1168 copyValues(dst); 1169 if (identifier != null) { 1170 dst.identifier = new ArrayList<Identifier>(); 1171 for (Identifier i : identifier) 1172 dst.identifier.add(i.copy()); 1173 }; 1174 dst.status = status == null ? null : status.copy(); 1175 dst.name = name == null ? null : name.copy(); 1176 dst.description = description == null ? null : description.copy(); 1177 dst.mode = mode == null ? null : mode.copy(); 1178 dst.type = type == null ? null : type.copy(); 1179 if (telecom != null) { 1180 dst.telecom = new ArrayList<ContactPoint>(); 1181 for (ContactPoint i : telecom) 1182 dst.telecom.add(i.copy()); 1183 }; 1184 dst.address = address == null ? null : address.copy(); 1185 dst.physicalType = physicalType == null ? null : physicalType.copy(); 1186 dst.position = position == null ? null : position.copy(); 1187 dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); 1188 dst.partOf = partOf == null ? null : partOf.copy(); 1189 return dst; 1190 } 1191 1192 protected Location typedCopy() { 1193 return copy(); 1194 } 1195 1196 @Override 1197 public boolean equalsDeep(Base other) { 1198 if (!super.equalsDeep(other)) 1199 return false; 1200 if (!(other instanceof Location)) 1201 return false; 1202 Location o = (Location) other; 1203 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(name, o.name, true) 1204 && compareDeep(description, o.description, true) && compareDeep(mode, o.mode, true) && compareDeep(type, o.type, true) 1205 && compareDeep(telecom, o.telecom, true) && compareDeep(address, o.address, true) && compareDeep(physicalType, o.physicalType, true) 1206 && compareDeep(position, o.position, true) && compareDeep(managingOrganization, o.managingOrganization, true) 1207 && compareDeep(partOf, o.partOf, true); 1208 } 1209 1210 @Override 1211 public boolean equalsShallow(Base other) { 1212 if (!super.equalsShallow(other)) 1213 return false; 1214 if (!(other instanceof Location)) 1215 return false; 1216 Location o = (Location) other; 1217 return compareValues(status, o.status, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) 1218 && compareValues(mode, o.mode, true); 1219 } 1220 1221 public boolean isEmpty() { 1222 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) 1223 && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) && (mode == null || mode.isEmpty()) 1224 && (type == null || type.isEmpty()) && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty()) 1225 && (physicalType == null || physicalType.isEmpty()) && (position == null || position.isEmpty()) 1226 && (managingOrganization == null || managingOrganization.isEmpty()) && (partOf == null || partOf.isEmpty()) 1227 ; 1228 } 1229 1230 @Override 1231 public ResourceType getResourceType() { 1232 return ResourceType.Location; 1233 } 1234 1235 @SearchParamDefinition(name="identifier", path="Location.identifier", description="Unique code or number identifying the location to its users", type="token" ) 1236 public static final String SP_IDENTIFIER = "identifier"; 1237 @SearchParamDefinition(name="partof", path="Location.partOf", description="The location of which this location is a part", type="reference" ) 1238 public static final String SP_PARTOF = "partof"; 1239 @SearchParamDefinition(name="near-distance", path="Location.position", description="A distance quantity to limit the near search to locations within a specific distance", type="token" ) 1240 public static final String SP_NEARDISTANCE = "near-distance"; 1241 @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location", type="string" ) 1242 public static final String SP_ADDRESS = "address"; 1243 @SearchParamDefinition(name="address-state", path="Location.address.state", description="A state specified in an address", type="string" ) 1244 public static final String SP_ADDRESSSTATE = "address-state"; 1245 @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location", type="token" ) 1246 public static final String SP_TYPE = "type"; 1247 @SearchParamDefinition(name="address-postalcode", path="Location.address.postalCode", description="A postal code specified in an address", type="string" ) 1248 public static final String SP_ADDRESSPOSTALCODE = "address-postalcode"; 1249 @SearchParamDefinition(name="address-country", path="Location.address.country", description="A country specified in an address", type="string" ) 1250 public static final String SP_ADDRESSCOUNTRY = "address-country"; 1251 @SearchParamDefinition(name="organization", path="Location.managingOrganization", description="Searches for locations that are managed by the provided organization", type="reference" ) 1252 public static final String SP_ORGANIZATION = "organization"; 1253 @SearchParamDefinition(name="name", path="Location.name", description="A (portion of the) name of the location", type="string" ) 1254 public static final String SP_NAME = "name"; 1255 @SearchParamDefinition(name="address-use", path="Location.address.use", description="A use code specified in an address", type="token" ) 1256 public static final String SP_ADDRESSUSE = "address-use"; 1257 @SearchParamDefinition(name="near", path="Location.position", description="The coordinates expressed as [lat],[long] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)", type="token" ) 1258 public static final String SP_NEAR = "near"; 1259 @SearchParamDefinition(name="address-city", path="Location.address.city", description="A city specified in an address", type="string" ) 1260 public static final String SP_ADDRESSCITY = "address-city"; 1261 @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status", type="token" ) 1262 public static final String SP_STATUS = "status"; 1263 1264}