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