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