001package org.hl7.fhir.dstu3.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 Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x
038import java.util.ArrayList;
039import java.util.List;
040
041import org.hl7.fhir.exceptions.FHIRException;
042import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
043import org.hl7.fhir.utilities.Utilities;
044
045import ca.uhn.fhir.model.api.annotation.Block;
046import ca.uhn.fhir.model.api.annotation.Child;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.ResourceDef;
049import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
050/**
051 * Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.
052 */
053@ResourceDef(name="Location", profile="http://hl7.org/fhir/Profile/Location")
054public class Location extends DomainResource {
055
056    public enum LocationStatus {
057        /**
058         * The location is operational.
059         */
060        ACTIVE, 
061        /**
062         * The location is temporarily closed.
063         */
064        SUSPENDED, 
065        /**
066         * The location is no longer used.
067         */
068        INACTIVE, 
069        /**
070         * added to help the parsers with the generic types
071         */
072        NULL;
073        public static LocationStatus fromCode(String codeString) throws FHIRException {
074            if (codeString == null || "".equals(codeString))
075                return null;
076        if ("active".equals(codeString))
077          return ACTIVE;
078        if ("suspended".equals(codeString))
079          return SUSPENDED;
080        if ("inactive".equals(codeString))
081          return INACTIVE;
082        if (Configuration.isAcceptInvalidEnums())
083          return null;
084        else
085          throw new FHIRException("Unknown LocationStatus code '"+codeString+"'");
086        }
087        public String toCode() {
088          switch (this) {
089            case ACTIVE: return "active";
090            case SUSPENDED: return "suspended";
091            case INACTIVE: return "inactive";
092            case NULL: return null;
093            default: return "?";
094          }
095        }
096        public String getSystem() {
097          switch (this) {
098            case ACTIVE: return "http://hl7.org/fhir/location-status";
099            case SUSPENDED: return "http://hl7.org/fhir/location-status";
100            case INACTIVE: return "http://hl7.org/fhir/location-status";
101            case NULL: return null;
102            default: return "?";
103          }
104        }
105        public String getDefinition() {
106          switch (this) {
107            case ACTIVE: return "The location is operational.";
108            case SUSPENDED: return "The location is temporarily closed.";
109            case INACTIVE: return "The location is no longer used.";
110            case NULL: return null;
111            default: return "?";
112          }
113        }
114        public String getDisplay() {
115          switch (this) {
116            case ACTIVE: return "Active";
117            case SUSPENDED: return "Suspended";
118            case INACTIVE: return "Inactive";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123    }
124
125  public static class LocationStatusEnumFactory implements EnumFactory<LocationStatus> {
126    public LocationStatus fromCode(String codeString) throws IllegalArgumentException {
127      if (codeString == null || "".equals(codeString))
128            if (codeString == null || "".equals(codeString))
129                return null;
130        if ("active".equals(codeString))
131          return LocationStatus.ACTIVE;
132        if ("suspended".equals(codeString))
133          return LocationStatus.SUSPENDED;
134        if ("inactive".equals(codeString))
135          return LocationStatus.INACTIVE;
136        throw new IllegalArgumentException("Unknown LocationStatus code '"+codeString+"'");
137        }
138        public Enumeration<LocationStatus> fromType(PrimitiveType<?> code) throws FHIRException {
139          if (code == null)
140            return null;
141          if (code.isEmpty())
142            return new Enumeration<LocationStatus>(this);
143          String codeString = code.asStringValue();
144          if (codeString == null || "".equals(codeString))
145            return null;
146        if ("active".equals(codeString))
147          return new Enumeration<LocationStatus>(this, LocationStatus.ACTIVE);
148        if ("suspended".equals(codeString))
149          return new Enumeration<LocationStatus>(this, LocationStatus.SUSPENDED);
150        if ("inactive".equals(codeString))
151          return new Enumeration<LocationStatus>(this, LocationStatus.INACTIVE);
152        throw new FHIRException("Unknown LocationStatus code '"+codeString+"'");
153        }
154    public String toCode(LocationStatus code) {
155       if (code == LocationStatus.NULL)
156           return null;
157       if (code == LocationStatus.ACTIVE)
158        return "active";
159      if (code == LocationStatus.SUSPENDED)
160        return "suspended";
161      if (code == LocationStatus.INACTIVE)
162        return "inactive";
163      return "?";
164   }
165    public String toSystem(LocationStatus code) {
166      return code.getSystem();
167      }
168    }
169
170    public enum LocationMode {
171        /**
172         * The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A).
173         */
174        INSTANCE, 
175        /**
176         * 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.).
177         */
178        KIND, 
179        /**
180         * added to help the parsers with the generic types
181         */
182        NULL;
183        public static LocationMode fromCode(String codeString) throws FHIRException {
184            if (codeString == null || "".equals(codeString))
185                return null;
186        if ("instance".equals(codeString))
187          return INSTANCE;
188        if ("kind".equals(codeString))
189          return KIND;
190        if (Configuration.isAcceptInvalidEnums())
191          return null;
192        else
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            case NULL: return null;
200            default: return "?";
201          }
202        }
203        public String getSystem() {
204          switch (this) {
205            case INSTANCE: return "http://hl7.org/fhir/location-mode";
206            case KIND: return "http://hl7.org/fhir/location-mode";
207            case NULL: return null;
208            default: return "?";
209          }
210        }
211        public String getDefinition() {
212          switch (this) {
213            case INSTANCE: return "The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A).";
214            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.).";
215            case NULL: return null;
216            default: return "?";
217          }
218        }
219        public String getDisplay() {
220          switch (this) {
221            case INSTANCE: return "Instance";
222            case KIND: return "Kind";
223            case NULL: return null;
224            default: return "?";
225          }
226        }
227    }
228
229  public static class LocationModeEnumFactory implements EnumFactory<LocationMode> {
230    public LocationMode fromCode(String codeString) throws IllegalArgumentException {
231      if (codeString == null || "".equals(codeString))
232            if (codeString == null || "".equals(codeString))
233                return null;
234        if ("instance".equals(codeString))
235          return LocationMode.INSTANCE;
236        if ("kind".equals(codeString))
237          return LocationMode.KIND;
238        throw new IllegalArgumentException("Unknown LocationMode code '"+codeString+"'");
239        }
240        public Enumeration<LocationMode> fromType(PrimitiveType<?> code) throws FHIRException {
241          if (code == null)
242            return null;
243          if (code.isEmpty())
244            return new Enumeration<LocationMode>(this);
245          String codeString = code.asStringValue();
246          if (codeString == null || "".equals(codeString))
247            return null;
248        if ("instance".equals(codeString))
249          return new Enumeration<LocationMode>(this, LocationMode.INSTANCE);
250        if ("kind".equals(codeString))
251          return new Enumeration<LocationMode>(this, LocationMode.KIND);
252        throw new FHIRException("Unknown LocationMode code '"+codeString+"'");
253        }
254    public String toCode(LocationMode code) {
255       if (code == LocationMode.NULL)
256           return null;
257       if (code == LocationMode.INSTANCE)
258        return "instance";
259      if (code == LocationMode.KIND)
260        return "kind";
261      return "?";
262   }
263    public String toSystem(LocationMode code) {
264      return code.getSystem();
265      }
266    }
267
268    @Block()
269    public static class LocationPositionComponent extends BackboneElement implements IBaseBackboneElement {
270        /**
271         * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).
272         */
273        @Child(name = "longitude", type = {DecimalType.class}, order=1, min=1, max=1, modifier=false, summary=false)
274        @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)." )
275        protected DecimalType longitude;
276
277        /**
278         * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).
279         */
280        @Child(name = "latitude", type = {DecimalType.class}, order=2, min=1, max=1, modifier=false, summary=false)
281        @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)." )
282        protected DecimalType latitude;
283
284        /**
285         * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).
286         */
287        @Child(name = "altitude", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false)
288        @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)." )
289        protected DecimalType altitude;
290
291        private static final long serialVersionUID = -74276134L;
292
293    /**
294     * Constructor
295     */
296      public LocationPositionComponent() {
297        super();
298      }
299
300    /**
301     * Constructor
302     */
303      public LocationPositionComponent(DecimalType longitude, DecimalType latitude) {
304        super();
305        this.longitude = longitude;
306        this.latitude = latitude;
307      }
308
309        /**
310         * @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
311         */
312        public DecimalType getLongitudeElement() { 
313          if (this.longitude == null)
314            if (Configuration.errorOnAutoCreate())
315              throw new Error("Attempt to auto-create LocationPositionComponent.longitude");
316            else if (Configuration.doAutoCreate())
317              this.longitude = new DecimalType(); // bb
318          return this.longitude;
319        }
320
321        public boolean hasLongitudeElement() { 
322          return this.longitude != null && !this.longitude.isEmpty();
323        }
324
325        public boolean hasLongitude() { 
326          return this.longitude != null && !this.longitude.isEmpty();
327        }
328
329        /**
330         * @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
331         */
332        public LocationPositionComponent setLongitudeElement(DecimalType value) { 
333          this.longitude = value;
334          return this;
335        }
336
337        /**
338         * @return Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).
339         */
340        public BigDecimal getLongitude() { 
341          return this.longitude == null ? null : this.longitude.getValue();
342        }
343
344        /**
345         * @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).
346         */
347        public LocationPositionComponent setLongitude(BigDecimal value) { 
348            if (this.longitude == null)
349              this.longitude = new DecimalType();
350            this.longitude.setValue(value);
351          return this;
352        }
353
354        /**
355         * @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).
356         */
357        public LocationPositionComponent setLongitude(long value) { 
358              this.longitude = new DecimalType();
359            this.longitude.setValue(value);
360          return this;
361        }
362
363        /**
364         * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).
365         */
366        public LocationPositionComponent setLongitude(double value) { 
367              this.longitude = new DecimalType();
368            this.longitude.setValue(value);
369          return this;
370        }
371
372        /**
373         * @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
374         */
375        public DecimalType getLatitudeElement() { 
376          if (this.latitude == null)
377            if (Configuration.errorOnAutoCreate())
378              throw new Error("Attempt to auto-create LocationPositionComponent.latitude");
379            else if (Configuration.doAutoCreate())
380              this.latitude = new DecimalType(); // bb
381          return this.latitude;
382        }
383
384        public boolean hasLatitudeElement() { 
385          return this.latitude != null && !this.latitude.isEmpty();
386        }
387
388        public boolean hasLatitude() { 
389          return this.latitude != null && !this.latitude.isEmpty();
390        }
391
392        /**
393         * @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
394         */
395        public LocationPositionComponent setLatitudeElement(DecimalType value) { 
396          this.latitude = value;
397          return this;
398        }
399
400        /**
401         * @return Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).
402         */
403        public BigDecimal getLatitude() { 
404          return this.latitude == null ? null : this.latitude.getValue();
405        }
406
407        /**
408         * @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).
409         */
410        public LocationPositionComponent setLatitude(BigDecimal value) { 
411            if (this.latitude == null)
412              this.latitude = new DecimalType();
413            this.latitude.setValue(value);
414          return this;
415        }
416
417        /**
418         * @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).
419         */
420        public LocationPositionComponent setLatitude(long value) { 
421              this.latitude = new DecimalType();
422            this.latitude.setValue(value);
423          return this;
424        }
425
426        /**
427         * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).
428         */
429        public LocationPositionComponent setLatitude(double value) { 
430              this.latitude = new DecimalType();
431            this.latitude.setValue(value);
432          return this;
433        }
434
435        /**
436         * @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
437         */
438        public DecimalType getAltitudeElement() { 
439          if (this.altitude == null)
440            if (Configuration.errorOnAutoCreate())
441              throw new Error("Attempt to auto-create LocationPositionComponent.altitude");
442            else if (Configuration.doAutoCreate())
443              this.altitude = new DecimalType(); // bb
444          return this.altitude;
445        }
446
447        public boolean hasAltitudeElement() { 
448          return this.altitude != null && !this.altitude.isEmpty();
449        }
450
451        public boolean hasAltitude() { 
452          return this.altitude != null && !this.altitude.isEmpty();
453        }
454
455        /**
456         * @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
457         */
458        public LocationPositionComponent setAltitudeElement(DecimalType value) { 
459          this.altitude = value;
460          return this;
461        }
462
463        /**
464         * @return Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).
465         */
466        public BigDecimal getAltitude() { 
467          return this.altitude == null ? null : this.altitude.getValue();
468        }
469
470        /**
471         * @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).
472         */
473        public LocationPositionComponent setAltitude(BigDecimal value) { 
474          if (value == null)
475            this.altitude = null;
476          else {
477            if (this.altitude == null)
478              this.altitude = new DecimalType();
479            this.altitude.setValue(value);
480          }
481          return this;
482        }
483
484        /**
485         * @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).
486         */
487        public LocationPositionComponent setAltitude(long value) { 
488              this.altitude = new DecimalType();
489            this.altitude.setValue(value);
490          return this;
491        }
492
493        /**
494         * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).
495         */
496        public LocationPositionComponent setAltitude(double value) { 
497              this.altitude = new DecimalType();
498            this.altitude.setValue(value);
499          return this;
500        }
501
502        protected void listChildren(List<Property> children) {
503          super.listChildren(children);
504          children.add(new Property("longitude", "decimal", "Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).", 0, 1, longitude));
505          children.add(new Property("latitude", "decimal", "Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).", 0, 1, latitude));
506          children.add(new Property("altitude", "decimal", "Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).", 0, 1, altitude));
507        }
508
509        @Override
510        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
511          switch (_hash) {
512          case 137365935: /*longitude*/  return new Property("longitude", "decimal", "Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).", 0, 1, longitude);
513          case -1439978388: /*latitude*/  return new Property("latitude", "decimal", "Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).", 0, 1, latitude);
514          case 2036550306: /*altitude*/  return new Property("altitude", "decimal", "Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).", 0, 1, altitude);
515          default: return super.getNamedProperty(_hash, _name, _checkValid);
516          }
517
518        }
519
520      @Override
521      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
522        switch (hash) {
523        case 137365935: /*longitude*/ return this.longitude == null ? new Base[0] : new Base[] {this.longitude}; // DecimalType
524        case -1439978388: /*latitude*/ return this.latitude == null ? new Base[0] : new Base[] {this.latitude}; // DecimalType
525        case 2036550306: /*altitude*/ return this.altitude == null ? new Base[0] : new Base[] {this.altitude}; // DecimalType
526        default: return super.getProperty(hash, name, checkValid);
527        }
528
529      }
530
531      @Override
532      public Base setProperty(int hash, String name, Base value) throws FHIRException {
533        switch (hash) {
534        case 137365935: // longitude
535          this.longitude = castToDecimal(value); // DecimalType
536          return value;
537        case -1439978388: // latitude
538          this.latitude = castToDecimal(value); // DecimalType
539          return value;
540        case 2036550306: // altitude
541          this.altitude = castToDecimal(value); // DecimalType
542          return value;
543        default: return super.setProperty(hash, name, value);
544        }
545
546      }
547
548      @Override
549      public Base setProperty(String name, Base value) throws FHIRException {
550        if (name.equals("longitude")) {
551          this.longitude = castToDecimal(value); // DecimalType
552        } else if (name.equals("latitude")) {
553          this.latitude = castToDecimal(value); // DecimalType
554        } else if (name.equals("altitude")) {
555          this.altitude = castToDecimal(value); // DecimalType
556        } else
557          return super.setProperty(name, value);
558        return value;
559      }
560
561      @Override
562      public Base makeProperty(int hash, String name) throws FHIRException {
563        switch (hash) {
564        case 137365935:  return getLongitudeElement();
565        case -1439978388:  return getLatitudeElement();
566        case 2036550306:  return getAltitudeElement();
567        default: return super.makeProperty(hash, name);
568        }
569
570      }
571
572      @Override
573      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
574        switch (hash) {
575        case 137365935: /*longitude*/ return new String[] {"decimal"};
576        case -1439978388: /*latitude*/ return new String[] {"decimal"};
577        case 2036550306: /*altitude*/ return new String[] {"decimal"};
578        default: return super.getTypesForProperty(hash, name);
579        }
580
581      }
582
583      @Override
584      public Base addChild(String name) throws FHIRException {
585        if (name.equals("longitude")) {
586          throw new FHIRException("Cannot call addChild on a singleton property Location.longitude");
587        }
588        else if (name.equals("latitude")) {
589          throw new FHIRException("Cannot call addChild on a singleton property Location.latitude");
590        }
591        else if (name.equals("altitude")) {
592          throw new FHIRException("Cannot call addChild on a singleton property Location.altitude");
593        }
594        else
595          return super.addChild(name);
596      }
597
598      public LocationPositionComponent copy() {
599        LocationPositionComponent dst = new LocationPositionComponent();
600        copyValues(dst);
601        dst.longitude = longitude == null ? null : longitude.copy();
602        dst.latitude = latitude == null ? null : latitude.copy();
603        dst.altitude = altitude == null ? null : altitude.copy();
604        return dst;
605      }
606
607      @Override
608      public boolean equalsDeep(Base other_) {
609        if (!super.equalsDeep(other_))
610          return false;
611        if (!(other_ instanceof LocationPositionComponent))
612          return false;
613        LocationPositionComponent o = (LocationPositionComponent) other_;
614        return compareDeep(longitude, o.longitude, true) && compareDeep(latitude, o.latitude, true) && compareDeep(altitude, o.altitude, true)
615          ;
616      }
617
618      @Override
619      public boolean equalsShallow(Base other_) {
620        if (!super.equalsShallow(other_))
621          return false;
622        if (!(other_ instanceof LocationPositionComponent))
623          return false;
624        LocationPositionComponent o = (LocationPositionComponent) other_;
625        return compareValues(longitude, o.longitude, true) && compareValues(latitude, o.latitude, true) && compareValues(altitude, o.altitude, true)
626          ;
627      }
628
629      public boolean isEmpty() {
630        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(longitude, latitude, altitude
631          );
632      }
633
634  public String fhirType() {
635    return "Location.position";
636
637  }
638
639  }
640
641    /**
642     * Unique code or number identifying the location to its users.
643     */
644    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
645    @Description(shortDefinition="Unique code or number identifying the location to its users", formalDefinition="Unique code or number identifying the location to its users." )
646    protected List<Identifier> identifier;
647
648    /**
649     * The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.
650     */
651    @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true)
652    @Description(shortDefinition="active | suspended | inactive", formalDefinition="The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location." )
653    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-status")
654    protected Enumeration<LocationStatus> status;
655
656    /**
657     * The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.
658     */
659    @Child(name = "operationalStatus", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true)
660    @Description(shortDefinition="The Operational status of the location (typically only for a bed/room)", formalDefinition="The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance." )
661    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v2-0116")
662    protected Coding operationalStatus;
663
664    /**
665     * Name of the location as used by humans. Does not need to be unique.
666     */
667    @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
668    @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." )
669    protected StringType name;
670
671    /**
672     * A list of alternate names that the location is known as, or was known as in the past.
673     */
674    @Child(name = "alias", type = {StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
675    @Description(shortDefinition="A list of alternate names that the location is known as, or was known as in the past", formalDefinition="A list of alternate names that the location is known as, or was known as in the past." )
676    protected List<StringType> alias;
677
678    /**
679     * Description of the Location, which helps in finding or referencing the place.
680     */
681    @Child(name = "description", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
682    @Description(shortDefinition="Additional details about the location that could be displayed as further information to identify the location beyond its name", formalDefinition="Description of the Location, which helps in finding or referencing the place." )
683    protected StringType description;
684
685    /**
686     * Indicates whether a resource instance represents a specific location or a class of locations.
687     */
688    @Child(name = "mode", type = {CodeType.class}, order=6, min=0, max=1, modifier=true, summary=true)
689    @Description(shortDefinition="instance | kind", formalDefinition="Indicates whether a resource instance represents a specific location or a class of locations." )
690    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-mode")
691    protected Enumeration<LocationMode> mode;
692
693    /**
694     * Indicates the type of function performed at the location.
695     */
696    @Child(name = "type", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true)
697    @Description(shortDefinition="Type of function performed", formalDefinition="Indicates the type of function performed at the location." )
698    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-ServiceDeliveryLocationRoleType")
699    protected CodeableConcept type;
700
701    /**
702     * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.
703     */
704    @Child(name = "telecom", type = {ContactPoint.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
705    @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." )
706    protected List<ContactPoint> telecom;
707
708    /**
709     * Physical location.
710     */
711    @Child(name = "address", type = {Address.class}, order=9, min=0, max=1, modifier=false, summary=false)
712    @Description(shortDefinition="Physical location", formalDefinition="Physical location." )
713    protected Address address;
714
715    /**
716     * Physical form of the location, e.g. building, room, vehicle, road.
717     */
718    @Child(name = "physicalType", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true)
719    @Description(shortDefinition="Physical form of the location", formalDefinition="Physical form of the location, e.g. building, room, vehicle, road." )
720    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-physical-type")
721    protected CodeableConcept physicalType;
722
723    /**
724     * The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).
725     */
726    @Child(name = "position", type = {}, order=11, min=0, max=1, modifier=false, summary=false)
727    @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)." )
728    protected LocationPositionComponent position;
729
730    /**
731     * The organization responsible for the provisioning and upkeep of the location.
732     */
733    @Child(name = "managingOrganization", type = {Organization.class}, order=12, min=0, max=1, modifier=false, summary=true)
734    @Description(shortDefinition="Organization responsible for provisioning and upkeep", formalDefinition="The organization responsible for the provisioning and upkeep of the location." )
735    protected Reference managingOrganization;
736
737    /**
738     * The actual object that is the target of the reference (The organization responsible for the provisioning and upkeep of the location.)
739     */
740    protected Organization managingOrganizationTarget;
741
742    /**
743     * Another Location which this Location is physically part of.
744     */
745    @Child(name = "partOf", type = {Location.class}, order=13, min=0, max=1, modifier=false, summary=false)
746    @Description(shortDefinition="Another Location this one is physically part of", formalDefinition="Another Location which this Location is physically part of." )
747    protected Reference partOf;
748
749    /**
750     * The actual object that is the target of the reference (Another Location which this Location is physically part of.)
751     */
752    protected Location partOfTarget;
753
754    /**
755     * Technical endpoints providing access to services operated for the location.
756     */
757    @Child(name = "endpoint", type = {Endpoint.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
758    @Description(shortDefinition="Technical endpoints providing access to services operated for the location", formalDefinition="Technical endpoints providing access to services operated for the location." )
759    protected List<Reference> endpoint;
760    /**
761     * The actual objects that are the target of the reference (Technical endpoints providing access to services operated for the location.)
762     */
763    protected List<Endpoint> endpointTarget;
764
765
766    private static final long serialVersionUID = -1603579027L;
767
768  /**
769   * Constructor
770   */
771    public Location() {
772      super();
773    }
774
775    /**
776     * @return {@link #identifier} (Unique code or number identifying the location to its users.)
777     */
778    public List<Identifier> getIdentifier() { 
779      if (this.identifier == null)
780        this.identifier = new ArrayList<Identifier>();
781      return this.identifier;
782    }
783
784    /**
785     * @return Returns a reference to <code>this</code> for easy method chaining
786     */
787    public Location setIdentifier(List<Identifier> theIdentifier) { 
788      this.identifier = theIdentifier;
789      return this;
790    }
791
792    public boolean hasIdentifier() { 
793      if (this.identifier == null)
794        return false;
795      for (Identifier item : this.identifier)
796        if (!item.isEmpty())
797          return true;
798      return false;
799    }
800
801    public Identifier addIdentifier() { //3
802      Identifier t = new Identifier();
803      if (this.identifier == null)
804        this.identifier = new ArrayList<Identifier>();
805      this.identifier.add(t);
806      return t;
807    }
808
809    public Location addIdentifier(Identifier t) { //3
810      if (t == null)
811        return this;
812      if (this.identifier == null)
813        this.identifier = new ArrayList<Identifier>();
814      this.identifier.add(t);
815      return this;
816    }
817
818    /**
819     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
820     */
821    public Identifier getIdentifierFirstRep() { 
822      if (getIdentifier().isEmpty()) {
823        addIdentifier();
824      }
825      return getIdentifier().get(0);
826    }
827
828    /**
829     * @return {@link #status} (The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
830     */
831    public Enumeration<LocationStatus> getStatusElement() { 
832      if (this.status == null)
833        if (Configuration.errorOnAutoCreate())
834          throw new Error("Attempt to auto-create Location.status");
835        else if (Configuration.doAutoCreate())
836          this.status = new Enumeration<LocationStatus>(new LocationStatusEnumFactory()); // bb
837      return this.status;
838    }
839
840    public boolean hasStatusElement() { 
841      return this.status != null && !this.status.isEmpty();
842    }
843
844    public boolean hasStatus() { 
845      return this.status != null && !this.status.isEmpty();
846    }
847
848    /**
849     * @param value {@link #status} (The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
850     */
851    public Location setStatusElement(Enumeration<LocationStatus> value) { 
852      this.status = value;
853      return this;
854    }
855
856    /**
857     * @return The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.
858     */
859    public LocationStatus getStatus() { 
860      return this.status == null ? null : this.status.getValue();
861    }
862
863    /**
864     * @param value The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.
865     */
866    public Location setStatus(LocationStatus value) { 
867      if (value == null)
868        this.status = null;
869      else {
870        if (this.status == null)
871          this.status = new Enumeration<LocationStatus>(new LocationStatusEnumFactory());
872        this.status.setValue(value);
873      }
874      return this;
875    }
876
877    /**
878     * @return {@link #operationalStatus} (The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.)
879     */
880    public Coding getOperationalStatus() { 
881      if (this.operationalStatus == null)
882        if (Configuration.errorOnAutoCreate())
883          throw new Error("Attempt to auto-create Location.operationalStatus");
884        else if (Configuration.doAutoCreate())
885          this.operationalStatus = new Coding(); // cc
886      return this.operationalStatus;
887    }
888
889    public boolean hasOperationalStatus() { 
890      return this.operationalStatus != null && !this.operationalStatus.isEmpty();
891    }
892
893    /**
894     * @param value {@link #operationalStatus} (The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.)
895     */
896    public Location setOperationalStatus(Coding value)  { 
897      this.operationalStatus = value;
898      return this;
899    }
900
901    /**
902     * @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
903     */
904    public StringType getNameElement() { 
905      if (this.name == null)
906        if (Configuration.errorOnAutoCreate())
907          throw new Error("Attempt to auto-create Location.name");
908        else if (Configuration.doAutoCreate())
909          this.name = new StringType(); // bb
910      return this.name;
911    }
912
913    public boolean hasNameElement() { 
914      return this.name != null && !this.name.isEmpty();
915    }
916
917    public boolean hasName() { 
918      return this.name != null && !this.name.isEmpty();
919    }
920
921    /**
922     * @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
923     */
924    public Location setNameElement(StringType value) { 
925      this.name = value;
926      return this;
927    }
928
929    /**
930     * @return Name of the location as used by humans. Does not need to be unique.
931     */
932    public String getName() { 
933      return this.name == null ? null : this.name.getValue();
934    }
935
936    /**
937     * @param value Name of the location as used by humans. Does not need to be unique.
938     */
939    public Location setName(String value) { 
940      if (Utilities.noString(value))
941        this.name = null;
942      else {
943        if (this.name == null)
944          this.name = new StringType();
945        this.name.setValue(value);
946      }
947      return this;
948    }
949
950    /**
951     * @return {@link #alias} (A list of alternate names that the location is known as, or was known as in the past.)
952     */
953    public List<StringType> getAlias() { 
954      if (this.alias == null)
955        this.alias = new ArrayList<StringType>();
956      return this.alias;
957    }
958
959    /**
960     * @return Returns a reference to <code>this</code> for easy method chaining
961     */
962    public Location setAlias(List<StringType> theAlias) { 
963      this.alias = theAlias;
964      return this;
965    }
966
967    public boolean hasAlias() { 
968      if (this.alias == null)
969        return false;
970      for (StringType item : this.alias)
971        if (!item.isEmpty())
972          return true;
973      return false;
974    }
975
976    /**
977     * @return {@link #alias} (A list of alternate names that the location is known as, or was known as in the past.)
978     */
979    public StringType addAliasElement() {//2 
980      StringType t = new StringType();
981      if (this.alias == null)
982        this.alias = new ArrayList<StringType>();
983      this.alias.add(t);
984      return t;
985    }
986
987    /**
988     * @param value {@link #alias} (A list of alternate names that the location is known as, or was known as in the past.)
989     */
990    public Location addAlias(String value) { //1
991      StringType t = new StringType();
992      t.setValue(value);
993      if (this.alias == null)
994        this.alias = new ArrayList<StringType>();
995      this.alias.add(t);
996      return this;
997    }
998
999    /**
1000     * @param value {@link #alias} (A list of alternate names that the location is known as, or was known as in the past.)
1001     */
1002    public boolean hasAlias(String value) { 
1003      if (this.alias == null)
1004        return false;
1005      for (StringType v : this.alias)
1006        if (v.getValue().equals(value)) // string
1007          return true;
1008      return false;
1009    }
1010
1011    /**
1012     * @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
1013     */
1014    public StringType getDescriptionElement() { 
1015      if (this.description == null)
1016        if (Configuration.errorOnAutoCreate())
1017          throw new Error("Attempt to auto-create Location.description");
1018        else if (Configuration.doAutoCreate())
1019          this.description = new StringType(); // bb
1020      return this.description;
1021    }
1022
1023    public boolean hasDescriptionElement() { 
1024      return this.description != null && !this.description.isEmpty();
1025    }
1026
1027    public boolean hasDescription() { 
1028      return this.description != null && !this.description.isEmpty();
1029    }
1030
1031    /**
1032     * @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
1033     */
1034    public Location setDescriptionElement(StringType value) { 
1035      this.description = value;
1036      return this;
1037    }
1038
1039    /**
1040     * @return Description of the Location, which helps in finding or referencing the place.
1041     */
1042    public String getDescription() { 
1043      return this.description == null ? null : this.description.getValue();
1044    }
1045
1046    /**
1047     * @param value Description of the Location, which helps in finding or referencing the place.
1048     */
1049    public Location setDescription(String value) { 
1050      if (Utilities.noString(value))
1051        this.description = null;
1052      else {
1053        if (this.description == null)
1054          this.description = new StringType();
1055        this.description.setValue(value);
1056      }
1057      return this;
1058    }
1059
1060    /**
1061     * @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
1062     */
1063    public Enumeration<LocationMode> getModeElement() { 
1064      if (this.mode == null)
1065        if (Configuration.errorOnAutoCreate())
1066          throw new Error("Attempt to auto-create Location.mode");
1067        else if (Configuration.doAutoCreate())
1068          this.mode = new Enumeration<LocationMode>(new LocationModeEnumFactory()); // bb
1069      return this.mode;
1070    }
1071
1072    public boolean hasModeElement() { 
1073      return this.mode != null && !this.mode.isEmpty();
1074    }
1075
1076    public boolean hasMode() { 
1077      return this.mode != null && !this.mode.isEmpty();
1078    }
1079
1080    /**
1081     * @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
1082     */
1083    public Location setModeElement(Enumeration<LocationMode> value) { 
1084      this.mode = value;
1085      return this;
1086    }
1087
1088    /**
1089     * @return Indicates whether a resource instance represents a specific location or a class of locations.
1090     */
1091    public LocationMode getMode() { 
1092      return this.mode == null ? null : this.mode.getValue();
1093    }
1094
1095    /**
1096     * @param value Indicates whether a resource instance represents a specific location or a class of locations.
1097     */
1098    public Location setMode(LocationMode value) { 
1099      if (value == null)
1100        this.mode = null;
1101      else {
1102        if (this.mode == null)
1103          this.mode = new Enumeration<LocationMode>(new LocationModeEnumFactory());
1104        this.mode.setValue(value);
1105      }
1106      return this;
1107    }
1108
1109    /**
1110     * @return {@link #type} (Indicates the type of function performed at the location.)
1111     */
1112    public CodeableConcept getType() { 
1113      if (this.type == null)
1114        if (Configuration.errorOnAutoCreate())
1115          throw new Error("Attempt to auto-create Location.type");
1116        else if (Configuration.doAutoCreate())
1117          this.type = new CodeableConcept(); // cc
1118      return this.type;
1119    }
1120
1121    public boolean hasType() { 
1122      return this.type != null && !this.type.isEmpty();
1123    }
1124
1125    /**
1126     * @param value {@link #type} (Indicates the type of function performed at the location.)
1127     */
1128    public Location setType(CodeableConcept value)  { 
1129      this.type = value;
1130      return this;
1131    }
1132
1133    /**
1134     * @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.)
1135     */
1136    public List<ContactPoint> getTelecom() { 
1137      if (this.telecom == null)
1138        this.telecom = new ArrayList<ContactPoint>();
1139      return this.telecom;
1140    }
1141
1142    /**
1143     * @return Returns a reference to <code>this</code> for easy method chaining
1144     */
1145    public Location setTelecom(List<ContactPoint> theTelecom) { 
1146      this.telecom = theTelecom;
1147      return this;
1148    }
1149
1150    public boolean hasTelecom() { 
1151      if (this.telecom == null)
1152        return false;
1153      for (ContactPoint item : this.telecom)
1154        if (!item.isEmpty())
1155          return true;
1156      return false;
1157    }
1158
1159    public ContactPoint addTelecom() { //3
1160      ContactPoint t = new ContactPoint();
1161      if (this.telecom == null)
1162        this.telecom = new ArrayList<ContactPoint>();
1163      this.telecom.add(t);
1164      return t;
1165    }
1166
1167    public Location addTelecom(ContactPoint t) { //3
1168      if (t == null)
1169        return this;
1170      if (this.telecom == null)
1171        this.telecom = new ArrayList<ContactPoint>();
1172      this.telecom.add(t);
1173      return this;
1174    }
1175
1176    /**
1177     * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist
1178     */
1179    public ContactPoint getTelecomFirstRep() { 
1180      if (getTelecom().isEmpty()) {
1181        addTelecom();
1182      }
1183      return getTelecom().get(0);
1184    }
1185
1186    /**
1187     * @return {@link #address} (Physical location.)
1188     */
1189    public Address getAddress() { 
1190      if (this.address == null)
1191        if (Configuration.errorOnAutoCreate())
1192          throw new Error("Attempt to auto-create Location.address");
1193        else if (Configuration.doAutoCreate())
1194          this.address = new Address(); // cc
1195      return this.address;
1196    }
1197
1198    public boolean hasAddress() { 
1199      return this.address != null && !this.address.isEmpty();
1200    }
1201
1202    /**
1203     * @param value {@link #address} (Physical location.)
1204     */
1205    public Location setAddress(Address value)  { 
1206      this.address = value;
1207      return this;
1208    }
1209
1210    /**
1211     * @return {@link #physicalType} (Physical form of the location, e.g. building, room, vehicle, road.)
1212     */
1213    public CodeableConcept getPhysicalType() { 
1214      if (this.physicalType == null)
1215        if (Configuration.errorOnAutoCreate())
1216          throw new Error("Attempt to auto-create Location.physicalType");
1217        else if (Configuration.doAutoCreate())
1218          this.physicalType = new CodeableConcept(); // cc
1219      return this.physicalType;
1220    }
1221
1222    public boolean hasPhysicalType() { 
1223      return this.physicalType != null && !this.physicalType.isEmpty();
1224    }
1225
1226    /**
1227     * @param value {@link #physicalType} (Physical form of the location, e.g. building, room, vehicle, road.)
1228     */
1229    public Location setPhysicalType(CodeableConcept value)  { 
1230      this.physicalType = value;
1231      return this;
1232    }
1233
1234    /**
1235     * @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).)
1236     */
1237    public LocationPositionComponent getPosition() { 
1238      if (this.position == null)
1239        if (Configuration.errorOnAutoCreate())
1240          throw new Error("Attempt to auto-create Location.position");
1241        else if (Configuration.doAutoCreate())
1242          this.position = new LocationPositionComponent(); // cc
1243      return this.position;
1244    }
1245
1246    public boolean hasPosition() { 
1247      return this.position != null && !this.position.isEmpty();
1248    }
1249
1250    /**
1251     * @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).)
1252     */
1253    public Location setPosition(LocationPositionComponent value)  { 
1254      this.position = value;
1255      return this;
1256    }
1257
1258    /**
1259     * @return {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.)
1260     */
1261    public Reference getManagingOrganization() { 
1262      if (this.managingOrganization == null)
1263        if (Configuration.errorOnAutoCreate())
1264          throw new Error("Attempt to auto-create Location.managingOrganization");
1265        else if (Configuration.doAutoCreate())
1266          this.managingOrganization = new Reference(); // cc
1267      return this.managingOrganization;
1268    }
1269
1270    public boolean hasManagingOrganization() { 
1271      return this.managingOrganization != null && !this.managingOrganization.isEmpty();
1272    }
1273
1274    /**
1275     * @param value {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.)
1276     */
1277    public Location setManagingOrganization(Reference value)  { 
1278      this.managingOrganization = value;
1279      return this;
1280    }
1281
1282    /**
1283     * @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.)
1284     */
1285    public Organization getManagingOrganizationTarget() { 
1286      if (this.managingOrganizationTarget == null)
1287        if (Configuration.errorOnAutoCreate())
1288          throw new Error("Attempt to auto-create Location.managingOrganization");
1289        else if (Configuration.doAutoCreate())
1290          this.managingOrganizationTarget = new Organization(); // aa
1291      return this.managingOrganizationTarget;
1292    }
1293
1294    /**
1295     * @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.)
1296     */
1297    public Location setManagingOrganizationTarget(Organization value) { 
1298      this.managingOrganizationTarget = value;
1299      return this;
1300    }
1301
1302    /**
1303     * @return {@link #partOf} (Another Location which this Location is physically part of.)
1304     */
1305    public Reference getPartOf() { 
1306      if (this.partOf == null)
1307        if (Configuration.errorOnAutoCreate())
1308          throw new Error("Attempt to auto-create Location.partOf");
1309        else if (Configuration.doAutoCreate())
1310          this.partOf = new Reference(); // cc
1311      return this.partOf;
1312    }
1313
1314    public boolean hasPartOf() { 
1315      return this.partOf != null && !this.partOf.isEmpty();
1316    }
1317
1318    /**
1319     * @param value {@link #partOf} (Another Location which this Location is physically part of.)
1320     */
1321    public Location setPartOf(Reference value)  { 
1322      this.partOf = value;
1323      return this;
1324    }
1325
1326    /**
1327     * @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.)
1328     */
1329    public Location getPartOfTarget() { 
1330      if (this.partOfTarget == null)
1331        if (Configuration.errorOnAutoCreate())
1332          throw new Error("Attempt to auto-create Location.partOf");
1333        else if (Configuration.doAutoCreate())
1334          this.partOfTarget = new Location(); // aa
1335      return this.partOfTarget;
1336    }
1337
1338    /**
1339     * @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.)
1340     */
1341    public Location setPartOfTarget(Location value) { 
1342      this.partOfTarget = value;
1343      return this;
1344    }
1345
1346    /**
1347     * @return {@link #endpoint} (Technical endpoints providing access to services operated for the location.)
1348     */
1349    public List<Reference> getEndpoint() { 
1350      if (this.endpoint == null)
1351        this.endpoint = new ArrayList<Reference>();
1352      return this.endpoint;
1353    }
1354
1355    /**
1356     * @return Returns a reference to <code>this</code> for easy method chaining
1357     */
1358    public Location setEndpoint(List<Reference> theEndpoint) { 
1359      this.endpoint = theEndpoint;
1360      return this;
1361    }
1362
1363    public boolean hasEndpoint() { 
1364      if (this.endpoint == null)
1365        return false;
1366      for (Reference item : this.endpoint)
1367        if (!item.isEmpty())
1368          return true;
1369      return false;
1370    }
1371
1372    public Reference addEndpoint() { //3
1373      Reference t = new Reference();
1374      if (this.endpoint == null)
1375        this.endpoint = new ArrayList<Reference>();
1376      this.endpoint.add(t);
1377      return t;
1378    }
1379
1380    public Location addEndpoint(Reference t) { //3
1381      if (t == null)
1382        return this;
1383      if (this.endpoint == null)
1384        this.endpoint = new ArrayList<Reference>();
1385      this.endpoint.add(t);
1386      return this;
1387    }
1388
1389    /**
1390     * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist
1391     */
1392    public Reference getEndpointFirstRep() { 
1393      if (getEndpoint().isEmpty()) {
1394        addEndpoint();
1395      }
1396      return getEndpoint().get(0);
1397    }
1398
1399      protected void listChildren(List<Property> children) {
1400        super.listChildren(children);
1401        children.add(new Property("identifier", "Identifier", "Unique code or number identifying the location to its users.", 0, java.lang.Integer.MAX_VALUE, identifier));
1402        children.add(new Property("status", "code", "The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.", 0, 1, status));
1403        children.add(new Property("operationalStatus", "Coding", "The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.", 0, 1, operationalStatus));
1404        children.add(new Property("name", "string", "Name of the location as used by humans. Does not need to be unique.", 0, 1, name));
1405        children.add(new Property("alias", "string", "A list of alternate names that the location is known as, or was known as in the past.", 0, java.lang.Integer.MAX_VALUE, alias));
1406        children.add(new Property("description", "string", "Description of the Location, which helps in finding or referencing the place.", 0, 1, description));
1407        children.add(new Property("mode", "code", "Indicates whether a resource instance represents a specific location or a class of locations.", 0, 1, mode));
1408        children.add(new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, 1, type));
1409        children.add(new Property("telecom", "ContactPoint", "The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, telecom));
1410        children.add(new Property("address", "Address", "Physical location.", 0, 1, address));
1411        children.add(new Property("physicalType", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road.", 0, 1, physicalType));
1412        children.add(new Property("position", "", "The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).", 0, 1, position));
1413        children.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, 1, managingOrganization));
1414        children.add(new Property("partOf", "Reference(Location)", "Another Location which this Location is physically part of.", 0, 1, partOf));
1415        children.add(new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the location.", 0, java.lang.Integer.MAX_VALUE, endpoint));
1416      }
1417
1418      @Override
1419      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1420        switch (_hash) {
1421        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Unique code or number identifying the location to its users.", 0, java.lang.Integer.MAX_VALUE, identifier);
1422        case -892481550: /*status*/  return new Property("status", "code", "The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.", 0, 1, status);
1423        case -2103166364: /*operationalStatus*/  return new Property("operationalStatus", "Coding", "The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.", 0, 1, operationalStatus);
1424        case 3373707: /*name*/  return new Property("name", "string", "Name of the location as used by humans. Does not need to be unique.", 0, 1, name);
1425        case 92902992: /*alias*/  return new Property("alias", "string", "A list of alternate names that the location is known as, or was known as in the past.", 0, java.lang.Integer.MAX_VALUE, alias);
1426        case -1724546052: /*description*/  return new Property("description", "string", "Description of the Location, which helps in finding or referencing the place.", 0, 1, description);
1427        case 3357091: /*mode*/  return new Property("mode", "code", "Indicates whether a resource instance represents a specific location or a class of locations.", 0, 1, mode);
1428        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, 1, type);
1429        case -1429363305: /*telecom*/  return new Property("telecom", "ContactPoint", "The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, telecom);
1430        case -1147692044: /*address*/  return new Property("address", "Address", "Physical location.", 0, 1, address);
1431        case -1474715471: /*physicalType*/  return new Property("physicalType", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road.", 0, 1, physicalType);
1432        case 747804969: /*position*/  return new Property("position", "", "The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).", 0, 1, position);
1433        case -2058947787: /*managingOrganization*/  return new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, 1, managingOrganization);
1434        case -995410646: /*partOf*/  return new Property("partOf", "Reference(Location)", "Another Location which this Location is physically part of.", 0, 1, partOf);
1435        case 1741102485: /*endpoint*/  return new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the location.", 0, java.lang.Integer.MAX_VALUE, endpoint);
1436        default: return super.getNamedProperty(_hash, _name, _checkValid);
1437        }
1438
1439      }
1440
1441      @Override
1442      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1443        switch (hash) {
1444        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1445        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<LocationStatus>
1446        case -2103166364: /*operationalStatus*/ return this.operationalStatus == null ? new Base[0] : new Base[] {this.operationalStatus}; // Coding
1447        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1448        case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType
1449        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1450        case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<LocationMode>
1451        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1452        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
1453        case -1147692044: /*address*/ return this.address == null ? new Base[0] : new Base[] {this.address}; // Address
1454        case -1474715471: /*physicalType*/ return this.physicalType == null ? new Base[0] : new Base[] {this.physicalType}; // CodeableConcept
1455        case 747804969: /*position*/ return this.position == null ? new Base[0] : new Base[] {this.position}; // LocationPositionComponent
1456        case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : new Base[] {this.managingOrganization}; // Reference
1457        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : new Base[] {this.partOf}; // Reference
1458        case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference
1459        default: return super.getProperty(hash, name, checkValid);
1460        }
1461
1462      }
1463
1464      @Override
1465      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1466        switch (hash) {
1467        case -1618432855: // identifier
1468          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1469          return value;
1470        case -892481550: // status
1471          value = new LocationStatusEnumFactory().fromType(castToCode(value));
1472          this.status = (Enumeration) value; // Enumeration<LocationStatus>
1473          return value;
1474        case -2103166364: // operationalStatus
1475          this.operationalStatus = castToCoding(value); // Coding
1476          return value;
1477        case 3373707: // name
1478          this.name = castToString(value); // StringType
1479          return value;
1480        case 92902992: // alias
1481          this.getAlias().add(castToString(value)); // StringType
1482          return value;
1483        case -1724546052: // description
1484          this.description = castToString(value); // StringType
1485          return value;
1486        case 3357091: // mode
1487          value = new LocationModeEnumFactory().fromType(castToCode(value));
1488          this.mode = (Enumeration) value; // Enumeration<LocationMode>
1489          return value;
1490        case 3575610: // type
1491          this.type = castToCodeableConcept(value); // CodeableConcept
1492          return value;
1493        case -1429363305: // telecom
1494          this.getTelecom().add(castToContactPoint(value)); // ContactPoint
1495          return value;
1496        case -1147692044: // address
1497          this.address = castToAddress(value); // Address
1498          return value;
1499        case -1474715471: // physicalType
1500          this.physicalType = castToCodeableConcept(value); // CodeableConcept
1501          return value;
1502        case 747804969: // position
1503          this.position = (LocationPositionComponent) value; // LocationPositionComponent
1504          return value;
1505        case -2058947787: // managingOrganization
1506          this.managingOrganization = castToReference(value); // Reference
1507          return value;
1508        case -995410646: // partOf
1509          this.partOf = castToReference(value); // Reference
1510          return value;
1511        case 1741102485: // endpoint
1512          this.getEndpoint().add(castToReference(value)); // Reference
1513          return value;
1514        default: return super.setProperty(hash, name, value);
1515        }
1516
1517      }
1518
1519      @Override
1520      public Base setProperty(String name, Base value) throws FHIRException {
1521        if (name.equals("identifier")) {
1522          this.getIdentifier().add(castToIdentifier(value));
1523        } else if (name.equals("status")) {
1524          value = new LocationStatusEnumFactory().fromType(castToCode(value));
1525          this.status = (Enumeration) value; // Enumeration<LocationStatus>
1526        } else if (name.equals("operationalStatus")) {
1527          this.operationalStatus = castToCoding(value); // Coding
1528        } else if (name.equals("name")) {
1529          this.name = castToString(value); // StringType
1530        } else if (name.equals("alias")) {
1531          this.getAlias().add(castToString(value));
1532        } else if (name.equals("description")) {
1533          this.description = castToString(value); // StringType
1534        } else if (name.equals("mode")) {
1535          value = new LocationModeEnumFactory().fromType(castToCode(value));
1536          this.mode = (Enumeration) value; // Enumeration<LocationMode>
1537        } else if (name.equals("type")) {
1538          this.type = castToCodeableConcept(value); // CodeableConcept
1539        } else if (name.equals("telecom")) {
1540          this.getTelecom().add(castToContactPoint(value));
1541        } else if (name.equals("address")) {
1542          this.address = castToAddress(value); // Address
1543        } else if (name.equals("physicalType")) {
1544          this.physicalType = castToCodeableConcept(value); // CodeableConcept
1545        } else if (name.equals("position")) {
1546          this.position = (LocationPositionComponent) value; // LocationPositionComponent
1547        } else if (name.equals("managingOrganization")) {
1548          this.managingOrganization = castToReference(value); // Reference
1549        } else if (name.equals("partOf")) {
1550          this.partOf = castToReference(value); // Reference
1551        } else if (name.equals("endpoint")) {
1552          this.getEndpoint().add(castToReference(value));
1553        } else
1554          return super.setProperty(name, value);
1555        return value;
1556      }
1557
1558      @Override
1559      public Base makeProperty(int hash, String name) throws FHIRException {
1560        switch (hash) {
1561        case -1618432855:  return addIdentifier(); 
1562        case -892481550:  return getStatusElement();
1563        case -2103166364:  return getOperationalStatus(); 
1564        case 3373707:  return getNameElement();
1565        case 92902992:  return addAliasElement();
1566        case -1724546052:  return getDescriptionElement();
1567        case 3357091:  return getModeElement();
1568        case 3575610:  return getType(); 
1569        case -1429363305:  return addTelecom(); 
1570        case -1147692044:  return getAddress(); 
1571        case -1474715471:  return getPhysicalType(); 
1572        case 747804969:  return getPosition(); 
1573        case -2058947787:  return getManagingOrganization(); 
1574        case -995410646:  return getPartOf(); 
1575        case 1741102485:  return addEndpoint(); 
1576        default: return super.makeProperty(hash, name);
1577        }
1578
1579      }
1580
1581      @Override
1582      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1583        switch (hash) {
1584        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1585        case -892481550: /*status*/ return new String[] {"code"};
1586        case -2103166364: /*operationalStatus*/ return new String[] {"Coding"};
1587        case 3373707: /*name*/ return new String[] {"string"};
1588        case 92902992: /*alias*/ return new String[] {"string"};
1589        case -1724546052: /*description*/ return new String[] {"string"};
1590        case 3357091: /*mode*/ return new String[] {"code"};
1591        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1592        case -1429363305: /*telecom*/ return new String[] {"ContactPoint"};
1593        case -1147692044: /*address*/ return new String[] {"Address"};
1594        case -1474715471: /*physicalType*/ return new String[] {"CodeableConcept"};
1595        case 747804969: /*position*/ return new String[] {};
1596        case -2058947787: /*managingOrganization*/ return new String[] {"Reference"};
1597        case -995410646: /*partOf*/ return new String[] {"Reference"};
1598        case 1741102485: /*endpoint*/ return new String[] {"Reference"};
1599        default: return super.getTypesForProperty(hash, name);
1600        }
1601
1602      }
1603
1604      @Override
1605      public Base addChild(String name) throws FHIRException {
1606        if (name.equals("identifier")) {
1607          return addIdentifier();
1608        }
1609        else if (name.equals("status")) {
1610          throw new FHIRException("Cannot call addChild on a singleton property Location.status");
1611        }
1612        else if (name.equals("operationalStatus")) {
1613          this.operationalStatus = new Coding();
1614          return this.operationalStatus;
1615        }
1616        else if (name.equals("name")) {
1617          throw new FHIRException("Cannot call addChild on a singleton property Location.name");
1618        }
1619        else if (name.equals("alias")) {
1620          throw new FHIRException("Cannot call addChild on a singleton property Location.alias");
1621        }
1622        else if (name.equals("description")) {
1623          throw new FHIRException("Cannot call addChild on a singleton property Location.description");
1624        }
1625        else if (name.equals("mode")) {
1626          throw new FHIRException("Cannot call addChild on a singleton property Location.mode");
1627        }
1628        else if (name.equals("type")) {
1629          this.type = new CodeableConcept();
1630          return this.type;
1631        }
1632        else if (name.equals("telecom")) {
1633          return addTelecom();
1634        }
1635        else if (name.equals("address")) {
1636          this.address = new Address();
1637          return this.address;
1638        }
1639        else if (name.equals("physicalType")) {
1640          this.physicalType = new CodeableConcept();
1641          return this.physicalType;
1642        }
1643        else if (name.equals("position")) {
1644          this.position = new LocationPositionComponent();
1645          return this.position;
1646        }
1647        else if (name.equals("managingOrganization")) {
1648          this.managingOrganization = new Reference();
1649          return this.managingOrganization;
1650        }
1651        else if (name.equals("partOf")) {
1652          this.partOf = new Reference();
1653          return this.partOf;
1654        }
1655        else if (name.equals("endpoint")) {
1656          return addEndpoint();
1657        }
1658        else
1659          return super.addChild(name);
1660      }
1661
1662  public String fhirType() {
1663    return "Location";
1664
1665  }
1666
1667      public Location copy() {
1668        Location dst = new Location();
1669        copyValues(dst);
1670        if (identifier != null) {
1671          dst.identifier = new ArrayList<Identifier>();
1672          for (Identifier i : identifier)
1673            dst.identifier.add(i.copy());
1674        };
1675        dst.status = status == null ? null : status.copy();
1676        dst.operationalStatus = operationalStatus == null ? null : operationalStatus.copy();
1677        dst.name = name == null ? null : name.copy();
1678        if (alias != null) {
1679          dst.alias = new ArrayList<StringType>();
1680          for (StringType i : alias)
1681            dst.alias.add(i.copy());
1682        };
1683        dst.description = description == null ? null : description.copy();
1684        dst.mode = mode == null ? null : mode.copy();
1685        dst.type = type == null ? null : type.copy();
1686        if (telecom != null) {
1687          dst.telecom = new ArrayList<ContactPoint>();
1688          for (ContactPoint i : telecom)
1689            dst.telecom.add(i.copy());
1690        };
1691        dst.address = address == null ? null : address.copy();
1692        dst.physicalType = physicalType == null ? null : physicalType.copy();
1693        dst.position = position == null ? null : position.copy();
1694        dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy();
1695        dst.partOf = partOf == null ? null : partOf.copy();
1696        if (endpoint != null) {
1697          dst.endpoint = new ArrayList<Reference>();
1698          for (Reference i : endpoint)
1699            dst.endpoint.add(i.copy());
1700        };
1701        return dst;
1702      }
1703
1704      protected Location typedCopy() {
1705        return copy();
1706      }
1707
1708      @Override
1709      public boolean equalsDeep(Base other_) {
1710        if (!super.equalsDeep(other_))
1711          return false;
1712        if (!(other_ instanceof Location))
1713          return false;
1714        Location o = (Location) other_;
1715        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(operationalStatus, o.operationalStatus, true)
1716           && compareDeep(name, o.name, true) && compareDeep(alias, o.alias, true) && compareDeep(description, o.description, true)
1717           && compareDeep(mode, o.mode, true) && compareDeep(type, o.type, true) && compareDeep(telecom, o.telecom, true)
1718           && compareDeep(address, o.address, true) && compareDeep(physicalType, o.physicalType, true) && compareDeep(position, o.position, true)
1719           && compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(partOf, o.partOf, true)
1720           && compareDeep(endpoint, o.endpoint, true);
1721      }
1722
1723      @Override
1724      public boolean equalsShallow(Base other_) {
1725        if (!super.equalsShallow(other_))
1726          return false;
1727        if (!(other_ instanceof Location))
1728          return false;
1729        Location o = (Location) other_;
1730        return compareValues(status, o.status, true) && compareValues(name, o.name, true) && compareValues(alias, o.alias, true)
1731           && compareValues(description, o.description, true) && compareValues(mode, o.mode, true);
1732      }
1733
1734      public boolean isEmpty() {
1735        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, operationalStatus
1736          , name, alias, description, mode, type, telecom, address, physicalType, position
1737          , managingOrganization, partOf, endpoint);
1738      }
1739
1740  @Override
1741  public ResourceType getResourceType() {
1742    return ResourceType.Location;
1743   }
1744
1745 /**
1746   * Search parameter: <b>identifier</b>
1747   * <p>
1748   * Description: <b>An identifier for the location</b><br>
1749   * Type: <b>token</b><br>
1750   * Path: <b>Location.identifier</b><br>
1751   * </p>
1752   */
1753  @SearchParamDefinition(name="identifier", path="Location.identifier", description="An identifier for the location", type="token" )
1754  public static final String SP_IDENTIFIER = "identifier";
1755 /**
1756   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1757   * <p>
1758   * Description: <b>An identifier for the location</b><br>
1759   * Type: <b>token</b><br>
1760   * Path: <b>Location.identifier</b><br>
1761   * </p>
1762   */
1763  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1764
1765 /**
1766   * Search parameter: <b>partof</b>
1767   * <p>
1768   * Description: <b>A location of which this location is a part</b><br>
1769   * Type: <b>reference</b><br>
1770   * Path: <b>Location.partOf</b><br>
1771   * </p>
1772   */
1773  @SearchParamDefinition(name="partof", path="Location.partOf", description="A location of which this location is a part", type="reference", target={Location.class } )
1774  public static final String SP_PARTOF = "partof";
1775 /**
1776   * <b>Fluent Client</b> search parameter constant for <b>partof</b>
1777   * <p>
1778   * Description: <b>A location of which this location is a part</b><br>
1779   * Type: <b>reference</b><br>
1780   * Path: <b>Location.partOf</b><br>
1781   * </p>
1782   */
1783  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTOF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTOF);
1784
1785/**
1786   * Constant for fluent queries to be used to add include statements. Specifies
1787   * the path value of "<b>Location:partof</b>".
1788   */
1789  public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTOF = new ca.uhn.fhir.model.api.Include("Location:partof").toLocked();
1790
1791 /**
1792   * Search parameter: <b>near-distance</b>
1793   * <p>
1794   * Description: <b>A distance quantity to limit the near search to locations within a specific distance
1795
1796Requires the near parameter to also be included</b><br>
1797   * Type: <b>quantity</b><br>
1798   * Path: <b>Location.position</b><br>
1799   * </p>
1800   */
1801  @SearchParamDefinition(name="near-distance", path="Location.position", description="A distance quantity to limit the near search to locations within a specific distance\n\nRequires the near parameter to also be included", type="quantity" )
1802  public static final String SP_NEAR_DISTANCE = "near-distance";
1803 /**
1804   * <b>Fluent Client</b> search parameter constant for <b>near-distance</b>
1805   * <p>
1806   * Description: <b>A distance quantity to limit the near search to locations within a specific distance
1807
1808Requires the near parameter to also be included</b><br>
1809   * Type: <b>quantity</b><br>
1810   * Path: <b>Location.position</b><br>
1811   * </p>
1812   */
1813  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam NEAR_DISTANCE = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_NEAR_DISTANCE);
1814
1815 /**
1816   * Search parameter: <b>address</b>
1817   * <p>
1818   * Description: <b>A (part of the) address of the location</b><br>
1819   * Type: <b>string</b><br>
1820   * Path: <b>Location.address</b><br>
1821   * </p>
1822   */
1823  @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location", type="string" )
1824  public static final String SP_ADDRESS = "address";
1825 /**
1826   * <b>Fluent Client</b> search parameter constant for <b>address</b>
1827   * <p>
1828   * Description: <b>A (part of the) address of the location</b><br>
1829   * Type: <b>string</b><br>
1830   * Path: <b>Location.address</b><br>
1831   * </p>
1832   */
1833  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS);
1834
1835 /**
1836   * Search parameter: <b>address-state</b>
1837   * <p>
1838   * Description: <b>A state specified in an address</b><br>
1839   * Type: <b>string</b><br>
1840   * Path: <b>Location.address.state</b><br>
1841   * </p>
1842   */
1843  @SearchParamDefinition(name="address-state", path="Location.address.state", description="A state specified in an address", type="string" )
1844  public static final String SP_ADDRESS_STATE = "address-state";
1845 /**
1846   * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
1847   * <p>
1848   * Description: <b>A state specified in an address</b><br>
1849   * Type: <b>string</b><br>
1850   * Path: <b>Location.address.state</b><br>
1851   * </p>
1852   */
1853  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_STATE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_STATE);
1854
1855 /**
1856   * Search parameter: <b>operational-status</b>
1857   * <p>
1858   * Description: <b>Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)</b><br>
1859   * Type: <b>token</b><br>
1860   * Path: <b>Location.operationalStatus</b><br>
1861   * </p>
1862   */
1863  @SearchParamDefinition(name="operational-status", path="Location.operationalStatus", description="Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)", type="token" )
1864  public static final String SP_OPERATIONAL_STATUS = "operational-status";
1865 /**
1866   * <b>Fluent Client</b> search parameter constant for <b>operational-status</b>
1867   * <p>
1868   * Description: <b>Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)</b><br>
1869   * Type: <b>token</b><br>
1870   * Path: <b>Location.operationalStatus</b><br>
1871   * </p>
1872   */
1873  public static final ca.uhn.fhir.rest.gclient.TokenClientParam OPERATIONAL_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OPERATIONAL_STATUS);
1874
1875 /**
1876   * Search parameter: <b>type</b>
1877   * <p>
1878   * Description: <b>A code for the type of location</b><br>
1879   * Type: <b>token</b><br>
1880   * Path: <b>Location.type</b><br>
1881   * </p>
1882   */
1883  @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location", type="token" )
1884  public static final String SP_TYPE = "type";
1885 /**
1886   * <b>Fluent Client</b> search parameter constant for <b>type</b>
1887   * <p>
1888   * Description: <b>A code for the type of location</b><br>
1889   * Type: <b>token</b><br>
1890   * Path: <b>Location.type</b><br>
1891   * </p>
1892   */
1893  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
1894
1895 /**
1896   * Search parameter: <b>address-postalcode</b>
1897   * <p>
1898   * Description: <b>A postal code specified in an address</b><br>
1899   * Type: <b>string</b><br>
1900   * Path: <b>Location.address.postalCode</b><br>
1901   * </p>
1902   */
1903  @SearchParamDefinition(name="address-postalcode", path="Location.address.postalCode", description="A postal code specified in an address", type="string" )
1904  public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
1905 /**
1906   * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
1907   * <p>
1908   * Description: <b>A postal code specified in an address</b><br>
1909   * Type: <b>string</b><br>
1910   * Path: <b>Location.address.postalCode</b><br>
1911   * </p>
1912   */
1913  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_POSTALCODE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_POSTALCODE);
1914
1915 /**
1916   * Search parameter: <b>address-country</b>
1917   * <p>
1918   * Description: <b>A country specified in an address</b><br>
1919   * Type: <b>string</b><br>
1920   * Path: <b>Location.address.country</b><br>
1921   * </p>
1922   */
1923  @SearchParamDefinition(name="address-country", path="Location.address.country", description="A country specified in an address", type="string" )
1924  public static final String SP_ADDRESS_COUNTRY = "address-country";
1925 /**
1926   * <b>Fluent Client</b> search parameter constant for <b>address-country</b>
1927   * <p>
1928   * Description: <b>A country specified in an address</b><br>
1929   * Type: <b>string</b><br>
1930   * Path: <b>Location.address.country</b><br>
1931   * </p>
1932   */
1933  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_COUNTRY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_COUNTRY);
1934
1935 /**
1936   * Search parameter: <b>endpoint</b>
1937   * <p>
1938   * Description: <b>Technical endpoints providing access to services operated for the location</b><br>
1939   * Type: <b>reference</b><br>
1940   * Path: <b>Location.endpoint</b><br>
1941   * </p>
1942   */
1943  @SearchParamDefinition(name="endpoint", path="Location.endpoint", description="Technical endpoints providing access to services operated for the location", type="reference", target={Endpoint.class } )
1944  public static final String SP_ENDPOINT = "endpoint";
1945 /**
1946   * <b>Fluent Client</b> search parameter constant for <b>endpoint</b>
1947   * <p>
1948   * Description: <b>Technical endpoints providing access to services operated for the location</b><br>
1949   * Type: <b>reference</b><br>
1950   * Path: <b>Location.endpoint</b><br>
1951   * </p>
1952   */
1953  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT);
1954
1955/**
1956   * Constant for fluent queries to be used to add include statements. Specifies
1957   * the path value of "<b>Location:endpoint</b>".
1958   */
1959  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("Location:endpoint").toLocked();
1960
1961 /**
1962   * Search parameter: <b>organization</b>
1963   * <p>
1964   * Description: <b>Searches for locations that are managed by the provided organization</b><br>
1965   * Type: <b>reference</b><br>
1966   * Path: <b>Location.managingOrganization</b><br>
1967   * </p>
1968   */
1969  @SearchParamDefinition(name="organization", path="Location.managingOrganization", description="Searches for locations that are managed by the provided organization", type="reference", target={Organization.class } )
1970  public static final String SP_ORGANIZATION = "organization";
1971 /**
1972   * <b>Fluent Client</b> search parameter constant for <b>organization</b>
1973   * <p>
1974   * Description: <b>Searches for locations that are managed by the provided organization</b><br>
1975   * Type: <b>reference</b><br>
1976   * Path: <b>Location.managingOrganization</b><br>
1977   * </p>
1978   */
1979  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION);
1980
1981/**
1982   * Constant for fluent queries to be used to add include statements. Specifies
1983   * the path value of "<b>Location:organization</b>".
1984   */
1985  public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Location:organization").toLocked();
1986
1987 /**
1988   * Search parameter: <b>name</b>
1989   * <p>
1990   * Description: <b>A portion of the location's name or alias</b><br>
1991   * Type: <b>string</b><br>
1992   * Path: <b>Location.name, Location.alias</b><br>
1993   * </p>
1994   */
1995  @SearchParamDefinition(name="name", path="Location.name | Location.alias", description="A portion of the location's name or alias", type="string" )
1996  public static final String SP_NAME = "name";
1997 /**
1998   * <b>Fluent Client</b> search parameter constant for <b>name</b>
1999   * <p>
2000   * Description: <b>A portion of the location's name or alias</b><br>
2001   * Type: <b>string</b><br>
2002   * Path: <b>Location.name, Location.alias</b><br>
2003   * </p>
2004   */
2005  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
2006
2007 /**
2008   * Search parameter: <b>address-use</b>
2009   * <p>
2010   * Description: <b>A use code specified in an address</b><br>
2011   * Type: <b>token</b><br>
2012   * Path: <b>Location.address.use</b><br>
2013   * </p>
2014   */
2015  @SearchParamDefinition(name="address-use", path="Location.address.use", description="A use code specified in an address", type="token" )
2016  public static final String SP_ADDRESS_USE = "address-use";
2017 /**
2018   * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
2019   * <p>
2020   * Description: <b>A use code specified in an address</b><br>
2021   * Type: <b>token</b><br>
2022   * Path: <b>Location.address.use</b><br>
2023   * </p>
2024   */
2025  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ADDRESS_USE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ADDRESS_USE);
2026
2027 /**
2028   * Search parameter: <b>near</b>
2029   * <p>
2030   * Description: <b>The coordinates expressed as [latitude]:[longitude] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)
2031
2032Requires the near-distance parameter to be provided also</b><br>
2033   * Type: <b>token</b><br>
2034   * Path: <b>Location.position</b><br>
2035   * </p>
2036   */
2037  @SearchParamDefinition(name="near", path="Location.position", description="The coordinates expressed as [latitude]:[longitude] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)\n\nRequires the near-distance parameter to be provided also", type="token" )
2038  public static final String SP_NEAR = "near";
2039 /**
2040   * <b>Fluent Client</b> search parameter constant for <b>near</b>
2041   * <p>
2042   * Description: <b>The coordinates expressed as [latitude]:[longitude] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)
2043
2044Requires the near-distance parameter to be provided also</b><br>
2045   * Type: <b>token</b><br>
2046   * Path: <b>Location.position</b><br>
2047   * </p>
2048   */
2049  public static final ca.uhn.fhir.rest.gclient.TokenClientParam NEAR = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_NEAR);
2050
2051 /**
2052   * Search parameter: <b>address-city</b>
2053   * <p>
2054   * Description: <b>A city specified in an address</b><br>
2055   * Type: <b>string</b><br>
2056   * Path: <b>Location.address.city</b><br>
2057   * </p>
2058   */
2059  @SearchParamDefinition(name="address-city", path="Location.address.city", description="A city specified in an address", type="string" )
2060  public static final String SP_ADDRESS_CITY = "address-city";
2061 /**
2062   * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
2063   * <p>
2064   * Description: <b>A city specified in an address</b><br>
2065   * Type: <b>string</b><br>
2066   * Path: <b>Location.address.city</b><br>
2067   * </p>
2068   */
2069  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_CITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_CITY);
2070
2071 /**
2072   * Search parameter: <b>status</b>
2073   * <p>
2074   * Description: <b>Searches for locations with a specific kind of status</b><br>
2075   * Type: <b>token</b><br>
2076   * Path: <b>Location.status</b><br>
2077   * </p>
2078   */
2079  @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status", type="token" )
2080  public static final String SP_STATUS = "status";
2081 /**
2082   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2083   * <p>
2084   * Description: <b>Searches for locations with a specific kind of status</b><br>
2085   * Type: <b>token</b><br>
2086   * Path: <b>Location.status</b><br>
2087   * </p>
2088   */
2089  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2090
2091
2092}