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