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 Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.0-snapshot1
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.
052 */
053@ResourceDef(name="Organization", profile="http://hl7.org/fhir/StructureDefinition/Organization")
054public class Organization extends DomainResource {
055
056    @Block()
057    public static class OrganizationContactComponent extends BackboneElement implements IBaseBackboneElement {
058        /**
059         * Indicates a purpose for which the contact can be reached.
060         */
061        @Child(name = "purpose", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
062        @Description(shortDefinition="The type of contact", formalDefinition="Indicates a purpose for which the contact can be reached." )
063        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/contactentity-type")
064        protected CodeableConcept purpose;
065
066        /**
067         * A name associated with the contact.
068         */
069        @Child(name = "name", type = {HumanName.class}, order=2, min=0, max=1, modifier=false, summary=false)
070        @Description(shortDefinition="A name associated with the contact", formalDefinition="A name associated with the contact." )
071        protected HumanName name;
072
073        /**
074         * A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
075         */
076        @Child(name = "telecom", type = {ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
077        @Description(shortDefinition="Contact details (telephone, email, etc.)  for a contact", formalDefinition="A contact detail (e.g. a telephone number or an email address) by which the party may be contacted." )
078        protected List<ContactPoint> telecom;
079
080        /**
081         * Visiting or postal addresses for the contact.
082         */
083        @Child(name = "address", type = {Address.class}, order=4, min=0, max=1, modifier=false, summary=false)
084        @Description(shortDefinition="Visiting or postal addresses for the contact", formalDefinition="Visiting or postal addresses for the contact." )
085        protected Address address;
086
087        private static final long serialVersionUID = 1831121305L;
088
089    /**
090     * Constructor
091     */
092      public OrganizationContactComponent() {
093        super();
094      }
095
096        /**
097         * @return {@link #purpose} (Indicates a purpose for which the contact can be reached.)
098         */
099        public CodeableConcept getPurpose() { 
100          if (this.purpose == null)
101            if (Configuration.errorOnAutoCreate())
102              throw new Error("Attempt to auto-create OrganizationContactComponent.purpose");
103            else if (Configuration.doAutoCreate())
104              this.purpose = new CodeableConcept(); // cc
105          return this.purpose;
106        }
107
108        public boolean hasPurpose() { 
109          return this.purpose != null && !this.purpose.isEmpty();
110        }
111
112        /**
113         * @param value {@link #purpose} (Indicates a purpose for which the contact can be reached.)
114         */
115        public OrganizationContactComponent setPurpose(CodeableConcept value) { 
116          this.purpose = value;
117          return this;
118        }
119
120        /**
121         * @return {@link #name} (A name associated with the contact.)
122         */
123        public HumanName getName() { 
124          if (this.name == null)
125            if (Configuration.errorOnAutoCreate())
126              throw new Error("Attempt to auto-create OrganizationContactComponent.name");
127            else if (Configuration.doAutoCreate())
128              this.name = new HumanName(); // cc
129          return this.name;
130        }
131
132        public boolean hasName() { 
133          return this.name != null && !this.name.isEmpty();
134        }
135
136        /**
137         * @param value {@link #name} (A name associated with the contact.)
138         */
139        public OrganizationContactComponent setName(HumanName value) { 
140          this.name = value;
141          return this;
142        }
143
144        /**
145         * @return {@link #telecom} (A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.)
146         */
147        public List<ContactPoint> getTelecom() { 
148          if (this.telecom == null)
149            this.telecom = new ArrayList<ContactPoint>();
150          return this.telecom;
151        }
152
153        /**
154         * @return Returns a reference to <code>this</code> for easy method chaining
155         */
156        public OrganizationContactComponent setTelecom(List<ContactPoint> theTelecom) { 
157          this.telecom = theTelecom;
158          return this;
159        }
160
161        public boolean hasTelecom() { 
162          if (this.telecom == null)
163            return false;
164          for (ContactPoint item : this.telecom)
165            if (!item.isEmpty())
166              return true;
167          return false;
168        }
169
170        public ContactPoint addTelecom() { //3
171          ContactPoint t = new ContactPoint();
172          if (this.telecom == null)
173            this.telecom = new ArrayList<ContactPoint>();
174          this.telecom.add(t);
175          return t;
176        }
177
178        public OrganizationContactComponent addTelecom(ContactPoint t) { //3
179          if (t == null)
180            return this;
181          if (this.telecom == null)
182            this.telecom = new ArrayList<ContactPoint>();
183          this.telecom.add(t);
184          return this;
185        }
186
187        /**
188         * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist {3}
189         */
190        public ContactPoint getTelecomFirstRep() { 
191          if (getTelecom().isEmpty()) {
192            addTelecom();
193          }
194          return getTelecom().get(0);
195        }
196
197        /**
198         * @return {@link #address} (Visiting or postal addresses for the contact.)
199         */
200        public Address getAddress() { 
201          if (this.address == null)
202            if (Configuration.errorOnAutoCreate())
203              throw new Error("Attempt to auto-create OrganizationContactComponent.address");
204            else if (Configuration.doAutoCreate())
205              this.address = new Address(); // cc
206          return this.address;
207        }
208
209        public boolean hasAddress() { 
210          return this.address != null && !this.address.isEmpty();
211        }
212
213        /**
214         * @param value {@link #address} (Visiting or postal addresses for the contact.)
215         */
216        public OrganizationContactComponent setAddress(Address value) { 
217          this.address = value;
218          return this;
219        }
220
221        protected void listChildren(List<Property> children) {
222          super.listChildren(children);
223          children.add(new Property("purpose", "CodeableConcept", "Indicates a purpose for which the contact can be reached.", 0, 1, purpose));
224          children.add(new Property("name", "HumanName", "A name associated with the contact.", 0, 1, name));
225          children.add(new Property("telecom", "ContactPoint", "A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.", 0, java.lang.Integer.MAX_VALUE, telecom));
226          children.add(new Property("address", "Address", "Visiting or postal addresses for the contact.", 0, 1, address));
227        }
228
229        @Override
230        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
231          switch (_hash) {
232          case -220463842: /*purpose*/  return new Property("purpose", "CodeableConcept", "Indicates a purpose for which the contact can be reached.", 0, 1, purpose);
233          case 3373707: /*name*/  return new Property("name", "HumanName", "A name associated with the contact.", 0, 1, name);
234          case -1429363305: /*telecom*/  return new Property("telecom", "ContactPoint", "A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.", 0, java.lang.Integer.MAX_VALUE, telecom);
235          case -1147692044: /*address*/  return new Property("address", "Address", "Visiting or postal addresses for the contact.", 0, 1, address);
236          default: return super.getNamedProperty(_hash, _name, _checkValid);
237          }
238
239        }
240
241      @Override
242      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
243        switch (hash) {
244        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // CodeableConcept
245        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // HumanName
246        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
247        case -1147692044: /*address*/ return this.address == null ? new Base[0] : new Base[] {this.address}; // Address
248        default: return super.getProperty(hash, name, checkValid);
249        }
250
251      }
252
253      @Override
254      public Base setProperty(int hash, String name, Base value) throws FHIRException {
255        switch (hash) {
256        case -220463842: // purpose
257          this.purpose = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
258          return value;
259        case 3373707: // name
260          this.name = TypeConvertor.castToHumanName(value); // HumanName
261          return value;
262        case -1429363305: // telecom
263          this.getTelecom().add(TypeConvertor.castToContactPoint(value)); // ContactPoint
264          return value;
265        case -1147692044: // address
266          this.address = TypeConvertor.castToAddress(value); // Address
267          return value;
268        default: return super.setProperty(hash, name, value);
269        }
270
271      }
272
273      @Override
274      public Base setProperty(String name, Base value) throws FHIRException {
275        if (name.equals("purpose")) {
276          this.purpose = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
277        } else if (name.equals("name")) {
278          this.name = TypeConvertor.castToHumanName(value); // HumanName
279        } else if (name.equals("telecom")) {
280          this.getTelecom().add(TypeConvertor.castToContactPoint(value));
281        } else if (name.equals("address")) {
282          this.address = TypeConvertor.castToAddress(value); // Address
283        } else
284          return super.setProperty(name, value);
285        return value;
286      }
287
288      @Override
289      public Base makeProperty(int hash, String name) throws FHIRException {
290        switch (hash) {
291        case -220463842:  return getPurpose();
292        case 3373707:  return getName();
293        case -1429363305:  return addTelecom(); 
294        case -1147692044:  return getAddress();
295        default: return super.makeProperty(hash, name);
296        }
297
298      }
299
300      @Override
301      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
302        switch (hash) {
303        case -220463842: /*purpose*/ return new String[] {"CodeableConcept"};
304        case 3373707: /*name*/ return new String[] {"HumanName"};
305        case -1429363305: /*telecom*/ return new String[] {"ContactPoint"};
306        case -1147692044: /*address*/ return new String[] {"Address"};
307        default: return super.getTypesForProperty(hash, name);
308        }
309
310      }
311
312      @Override
313      public Base addChild(String name) throws FHIRException {
314        if (name.equals("purpose")) {
315          this.purpose = new CodeableConcept();
316          return this.purpose;
317        }
318        else if (name.equals("name")) {
319          this.name = new HumanName();
320          return this.name;
321        }
322        else if (name.equals("telecom")) {
323          return addTelecom();
324        }
325        else if (name.equals("address")) {
326          this.address = new Address();
327          return this.address;
328        }
329        else
330          return super.addChild(name);
331      }
332
333      public OrganizationContactComponent copy() {
334        OrganizationContactComponent dst = new OrganizationContactComponent();
335        copyValues(dst);
336        return dst;
337      }
338
339      public void copyValues(OrganizationContactComponent dst) {
340        super.copyValues(dst);
341        dst.purpose = purpose == null ? null : purpose.copy();
342        dst.name = name == null ? null : name.copy();
343        if (telecom != null) {
344          dst.telecom = new ArrayList<ContactPoint>();
345          for (ContactPoint i : telecom)
346            dst.telecom.add(i.copy());
347        };
348        dst.address = address == null ? null : address.copy();
349      }
350
351      @Override
352      public boolean equalsDeep(Base other_) {
353        if (!super.equalsDeep(other_))
354          return false;
355        if (!(other_ instanceof OrganizationContactComponent))
356          return false;
357        OrganizationContactComponent o = (OrganizationContactComponent) other_;
358        return compareDeep(purpose, o.purpose, true) && compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true)
359           && compareDeep(address, o.address, true);
360      }
361
362      @Override
363      public boolean equalsShallow(Base other_) {
364        if (!super.equalsShallow(other_))
365          return false;
366        if (!(other_ instanceof OrganizationContactComponent))
367          return false;
368        OrganizationContactComponent o = (OrganizationContactComponent) other_;
369        return true;
370      }
371
372      public boolean isEmpty() {
373        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(purpose, name, telecom, address
374          );
375      }
376
377  public String fhirType() {
378    return "Organization.contact";
379
380  }
381
382  }
383
384    /**
385     * Identifier for the organization that is used to identify the organization across multiple disparate systems.
386     */
387    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
388    @Description(shortDefinition="Identifies this organization  across multiple systems", formalDefinition="Identifier for the organization that is used to identify the organization across multiple disparate systems." )
389    protected List<Identifier> identifier;
390
391    /**
392     * Whether the organization's record is still in active use.
393     */
394    @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=true, summary=true)
395    @Description(shortDefinition="Whether the organization's record is still in active use", formalDefinition="Whether the organization's record is still in active use." )
396    protected BooleanType active;
397
398    /**
399     * The kind(s) of organization that this is.
400     */
401    @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
402    @Description(shortDefinition="Kind of organization", formalDefinition="The kind(s) of organization that this is." )
403    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/organization-type")
404    protected List<CodeableConcept> type;
405
406    /**
407     * A name associated with the organization.
408     */
409    @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
410    @Description(shortDefinition="Name used for the organization", formalDefinition="A name associated with the organization." )
411    protected StringType name;
412
413    /**
414     * A list of alternate names that the organization is known as, or was known as in the past.
415     */
416    @Child(name = "alias", type = {StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
417    @Description(shortDefinition="A list of alternate names that the organization is known as, or was known as in the past", formalDefinition="A list of alternate names that the organization is known as, or was known as in the past." )
418    protected List<StringType> alias;
419
420    /**
421     * A contact detail for the organization.
422     */
423    @Child(name = "telecom", type = {ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
424    @Description(shortDefinition="A contact detail for the organization", formalDefinition="A contact detail for the organization." )
425    protected List<ContactPoint> telecom;
426
427    /**
428     * An address for the organization.
429     */
430    @Child(name = "address", type = {Address.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
431    @Description(shortDefinition="An address for the organization", formalDefinition="An address for the organization." )
432    protected List<Address> address;
433
434    /**
435     * The organization of which this organization forms a part.
436     */
437    @Child(name = "partOf", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true)
438    @Description(shortDefinition="The organization of which this organization forms a part", formalDefinition="The organization of which this organization forms a part." )
439    protected Reference partOf;
440
441    /**
442     * Contact for the organization for a certain purpose.
443     */
444    @Child(name = "contact", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
445    @Description(shortDefinition="Contact for the organization for a certain purpose", formalDefinition="Contact for the organization for a certain purpose." )
446    protected List<OrganizationContactComponent> contact;
447
448    /**
449     * Technical endpoints providing access to services operated for the organization.
450     */
451    @Child(name = "endpoint", type = {Endpoint.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
452    @Description(shortDefinition="Technical endpoints providing access to services operated for the organization", formalDefinition="Technical endpoints providing access to services operated for the organization." )
453    protected List<Reference> endpoint;
454
455    private static final long serialVersionUID = -1305337184L;
456
457  /**
458   * Constructor
459   */
460    public Organization() {
461      super();
462    }
463
464    /**
465     * @return {@link #identifier} (Identifier for the organization that is used to identify the organization across multiple disparate systems.)
466     */
467    public List<Identifier> getIdentifier() { 
468      if (this.identifier == null)
469        this.identifier = new ArrayList<Identifier>();
470      return this.identifier;
471    }
472
473    /**
474     * @return Returns a reference to <code>this</code> for easy method chaining
475     */
476    public Organization setIdentifier(List<Identifier> theIdentifier) { 
477      this.identifier = theIdentifier;
478      return this;
479    }
480
481    public boolean hasIdentifier() { 
482      if (this.identifier == null)
483        return false;
484      for (Identifier item : this.identifier)
485        if (!item.isEmpty())
486          return true;
487      return false;
488    }
489
490    public Identifier addIdentifier() { //3
491      Identifier t = new Identifier();
492      if (this.identifier == null)
493        this.identifier = new ArrayList<Identifier>();
494      this.identifier.add(t);
495      return t;
496    }
497
498    public Organization addIdentifier(Identifier t) { //3
499      if (t == null)
500        return this;
501      if (this.identifier == null)
502        this.identifier = new ArrayList<Identifier>();
503      this.identifier.add(t);
504      return this;
505    }
506
507    /**
508     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
509     */
510    public Identifier getIdentifierFirstRep() { 
511      if (getIdentifier().isEmpty()) {
512        addIdentifier();
513      }
514      return getIdentifier().get(0);
515    }
516
517    /**
518     * @return {@link #active} (Whether the organization's record is still in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
519     */
520    public BooleanType getActiveElement() { 
521      if (this.active == null)
522        if (Configuration.errorOnAutoCreate())
523          throw new Error("Attempt to auto-create Organization.active");
524        else if (Configuration.doAutoCreate())
525          this.active = new BooleanType(); // bb
526      return this.active;
527    }
528
529    public boolean hasActiveElement() { 
530      return this.active != null && !this.active.isEmpty();
531    }
532
533    public boolean hasActive() { 
534      return this.active != null && !this.active.isEmpty();
535    }
536
537    /**
538     * @param value {@link #active} (Whether the organization's record is still in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
539     */
540    public Organization setActiveElement(BooleanType value) { 
541      this.active = value;
542      return this;
543    }
544
545    /**
546     * @return Whether the organization's record is still in active use.
547     */
548    public boolean getActive() { 
549      return this.active == null || this.active.isEmpty() ? false : this.active.getValue();
550    }
551
552    /**
553     * @param value Whether the organization's record is still in active use.
554     */
555    public Organization setActive(boolean value) { 
556        if (this.active == null)
557          this.active = new BooleanType();
558        this.active.setValue(value);
559      return this;
560    }
561
562    /**
563     * @return {@link #type} (The kind(s) of organization that this is.)
564     */
565    public List<CodeableConcept> getType() { 
566      if (this.type == null)
567        this.type = new ArrayList<CodeableConcept>();
568      return this.type;
569    }
570
571    /**
572     * @return Returns a reference to <code>this</code> for easy method chaining
573     */
574    public Organization setType(List<CodeableConcept> theType) { 
575      this.type = theType;
576      return this;
577    }
578
579    public boolean hasType() { 
580      if (this.type == null)
581        return false;
582      for (CodeableConcept item : this.type)
583        if (!item.isEmpty())
584          return true;
585      return false;
586    }
587
588    public CodeableConcept addType() { //3
589      CodeableConcept t = new CodeableConcept();
590      if (this.type == null)
591        this.type = new ArrayList<CodeableConcept>();
592      this.type.add(t);
593      return t;
594    }
595
596    public Organization addType(CodeableConcept t) { //3
597      if (t == null)
598        return this;
599      if (this.type == null)
600        this.type = new ArrayList<CodeableConcept>();
601      this.type.add(t);
602      return this;
603    }
604
605    /**
606     * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3}
607     */
608    public CodeableConcept getTypeFirstRep() { 
609      if (getType().isEmpty()) {
610        addType();
611      }
612      return getType().get(0);
613    }
614
615    /**
616     * @return {@link #name} (A name associated with the organization.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
617     */
618    public StringType getNameElement() { 
619      if (this.name == null)
620        if (Configuration.errorOnAutoCreate())
621          throw new Error("Attempt to auto-create Organization.name");
622        else if (Configuration.doAutoCreate())
623          this.name = new StringType(); // bb
624      return this.name;
625    }
626
627    public boolean hasNameElement() { 
628      return this.name != null && !this.name.isEmpty();
629    }
630
631    public boolean hasName() { 
632      return this.name != null && !this.name.isEmpty();
633    }
634
635    /**
636     * @param value {@link #name} (A name associated with the organization.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
637     */
638    public Organization setNameElement(StringType value) { 
639      this.name = value;
640      return this;
641    }
642
643    /**
644     * @return A name associated with the organization.
645     */
646    public String getName() { 
647      return this.name == null ? null : this.name.getValue();
648    }
649
650    /**
651     * @param value A name associated with the organization.
652     */
653    public Organization setName(String value) { 
654      if (Utilities.noString(value))
655        this.name = null;
656      else {
657        if (this.name == null)
658          this.name = new StringType();
659        this.name.setValue(value);
660      }
661      return this;
662    }
663
664    /**
665     * @return {@link #alias} (A list of alternate names that the organization is known as, or was known as in the past.)
666     */
667    public List<StringType> getAlias() { 
668      if (this.alias == null)
669        this.alias = new ArrayList<StringType>();
670      return this.alias;
671    }
672
673    /**
674     * @return Returns a reference to <code>this</code> for easy method chaining
675     */
676    public Organization setAlias(List<StringType> theAlias) { 
677      this.alias = theAlias;
678      return this;
679    }
680
681    public boolean hasAlias() { 
682      if (this.alias == null)
683        return false;
684      for (StringType item : this.alias)
685        if (!item.isEmpty())
686          return true;
687      return false;
688    }
689
690    /**
691     * @return {@link #alias} (A list of alternate names that the organization is known as, or was known as in the past.)
692     */
693    public StringType addAliasElement() {//2 
694      StringType t = new StringType();
695      if (this.alias == null)
696        this.alias = new ArrayList<StringType>();
697      this.alias.add(t);
698      return t;
699    }
700
701    /**
702     * @param value {@link #alias} (A list of alternate names that the organization is known as, or was known as in the past.)
703     */
704    public Organization addAlias(String value) { //1
705      StringType t = new StringType();
706      t.setValue(value);
707      if (this.alias == null)
708        this.alias = new ArrayList<StringType>();
709      this.alias.add(t);
710      return this;
711    }
712
713    /**
714     * @param value {@link #alias} (A list of alternate names that the organization is known as, or was known as in the past.)
715     */
716    public boolean hasAlias(String value) { 
717      if (this.alias == null)
718        return false;
719      for (StringType v : this.alias)
720        if (v.getValue().equals(value)) // string
721          return true;
722      return false;
723    }
724
725    /**
726     * @return {@link #telecom} (A contact detail for the organization.)
727     */
728    public List<ContactPoint> getTelecom() { 
729      if (this.telecom == null)
730        this.telecom = new ArrayList<ContactPoint>();
731      return this.telecom;
732    }
733
734    /**
735     * @return Returns a reference to <code>this</code> for easy method chaining
736     */
737    public Organization setTelecom(List<ContactPoint> theTelecom) { 
738      this.telecom = theTelecom;
739      return this;
740    }
741
742    public boolean hasTelecom() { 
743      if (this.telecom == null)
744        return false;
745      for (ContactPoint item : this.telecom)
746        if (!item.isEmpty())
747          return true;
748      return false;
749    }
750
751    public ContactPoint addTelecom() { //3
752      ContactPoint t = new ContactPoint();
753      if (this.telecom == null)
754        this.telecom = new ArrayList<ContactPoint>();
755      this.telecom.add(t);
756      return t;
757    }
758
759    public Organization addTelecom(ContactPoint t) { //3
760      if (t == null)
761        return this;
762      if (this.telecom == null)
763        this.telecom = new ArrayList<ContactPoint>();
764      this.telecom.add(t);
765      return this;
766    }
767
768    /**
769     * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist {3}
770     */
771    public ContactPoint getTelecomFirstRep() { 
772      if (getTelecom().isEmpty()) {
773        addTelecom();
774      }
775      return getTelecom().get(0);
776    }
777
778    /**
779     * @return {@link #address} (An address for the organization.)
780     */
781    public List<Address> getAddress() { 
782      if (this.address == null)
783        this.address = new ArrayList<Address>();
784      return this.address;
785    }
786
787    /**
788     * @return Returns a reference to <code>this</code> for easy method chaining
789     */
790    public Organization setAddress(List<Address> theAddress) { 
791      this.address = theAddress;
792      return this;
793    }
794
795    public boolean hasAddress() { 
796      if (this.address == null)
797        return false;
798      for (Address item : this.address)
799        if (!item.isEmpty())
800          return true;
801      return false;
802    }
803
804    public Address addAddress() { //3
805      Address t = new Address();
806      if (this.address == null)
807        this.address = new ArrayList<Address>();
808      this.address.add(t);
809      return t;
810    }
811
812    public Organization addAddress(Address t) { //3
813      if (t == null)
814        return this;
815      if (this.address == null)
816        this.address = new ArrayList<Address>();
817      this.address.add(t);
818      return this;
819    }
820
821    /**
822     * @return The first repetition of repeating field {@link #address}, creating it if it does not already exist {3}
823     */
824    public Address getAddressFirstRep() { 
825      if (getAddress().isEmpty()) {
826        addAddress();
827      }
828      return getAddress().get(0);
829    }
830
831    /**
832     * @return {@link #partOf} (The organization of which this organization forms a part.)
833     */
834    public Reference getPartOf() { 
835      if (this.partOf == null)
836        if (Configuration.errorOnAutoCreate())
837          throw new Error("Attempt to auto-create Organization.partOf");
838        else if (Configuration.doAutoCreate())
839          this.partOf = new Reference(); // cc
840      return this.partOf;
841    }
842
843    public boolean hasPartOf() { 
844      return this.partOf != null && !this.partOf.isEmpty();
845    }
846
847    /**
848     * @param value {@link #partOf} (The organization of which this organization forms a part.)
849     */
850    public Organization setPartOf(Reference value) { 
851      this.partOf = value;
852      return this;
853    }
854
855    /**
856     * @return {@link #contact} (Contact for the organization for a certain purpose.)
857     */
858    public List<OrganizationContactComponent> getContact() { 
859      if (this.contact == null)
860        this.contact = new ArrayList<OrganizationContactComponent>();
861      return this.contact;
862    }
863
864    /**
865     * @return Returns a reference to <code>this</code> for easy method chaining
866     */
867    public Organization setContact(List<OrganizationContactComponent> theContact) { 
868      this.contact = theContact;
869      return this;
870    }
871
872    public boolean hasContact() { 
873      if (this.contact == null)
874        return false;
875      for (OrganizationContactComponent item : this.contact)
876        if (!item.isEmpty())
877          return true;
878      return false;
879    }
880
881    public OrganizationContactComponent addContact() { //3
882      OrganizationContactComponent t = new OrganizationContactComponent();
883      if (this.contact == null)
884        this.contact = new ArrayList<OrganizationContactComponent>();
885      this.contact.add(t);
886      return t;
887    }
888
889    public Organization addContact(OrganizationContactComponent t) { //3
890      if (t == null)
891        return this;
892      if (this.contact == null)
893        this.contact = new ArrayList<OrganizationContactComponent>();
894      this.contact.add(t);
895      return this;
896    }
897
898    /**
899     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
900     */
901    public OrganizationContactComponent getContactFirstRep() { 
902      if (getContact().isEmpty()) {
903        addContact();
904      }
905      return getContact().get(0);
906    }
907
908    /**
909     * @return {@link #endpoint} (Technical endpoints providing access to services operated for the organization.)
910     */
911    public List<Reference> getEndpoint() { 
912      if (this.endpoint == null)
913        this.endpoint = new ArrayList<Reference>();
914      return this.endpoint;
915    }
916
917    /**
918     * @return Returns a reference to <code>this</code> for easy method chaining
919     */
920    public Organization setEndpoint(List<Reference> theEndpoint) { 
921      this.endpoint = theEndpoint;
922      return this;
923    }
924
925    public boolean hasEndpoint() { 
926      if (this.endpoint == null)
927        return false;
928      for (Reference item : this.endpoint)
929        if (!item.isEmpty())
930          return true;
931      return false;
932    }
933
934    public Reference addEndpoint() { //3
935      Reference t = new Reference();
936      if (this.endpoint == null)
937        this.endpoint = new ArrayList<Reference>();
938      this.endpoint.add(t);
939      return t;
940    }
941
942    public Organization addEndpoint(Reference t) { //3
943      if (t == null)
944        return this;
945      if (this.endpoint == null)
946        this.endpoint = new ArrayList<Reference>();
947      this.endpoint.add(t);
948      return this;
949    }
950
951    /**
952     * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist {3}
953     */
954    public Reference getEndpointFirstRep() { 
955      if (getEndpoint().isEmpty()) {
956        addEndpoint();
957      }
958      return getEndpoint().get(0);
959    }
960
961      protected void listChildren(List<Property> children) {
962        super.listChildren(children);
963        children.add(new Property("identifier", "Identifier", "Identifier for the organization that is used to identify the organization across multiple disparate systems.", 0, java.lang.Integer.MAX_VALUE, identifier));
964        children.add(new Property("active", "boolean", "Whether the organization's record is still in active use.", 0, 1, active));
965        children.add(new Property("type", "CodeableConcept", "The kind(s) of organization that this is.", 0, java.lang.Integer.MAX_VALUE, type));
966        children.add(new Property("name", "string", "A name associated with the organization.", 0, 1, name));
967        children.add(new Property("alias", "string", "A list of alternate names that the organization is known as, or was known as in the past.", 0, java.lang.Integer.MAX_VALUE, alias));
968        children.add(new Property("telecom", "ContactPoint", "A contact detail for the organization.", 0, java.lang.Integer.MAX_VALUE, telecom));
969        children.add(new Property("address", "Address", "An address for the organization.", 0, java.lang.Integer.MAX_VALUE, address));
970        children.add(new Property("partOf", "Reference(Organization)", "The organization of which this organization forms a part.", 0, 1, partOf));
971        children.add(new Property("contact", "", "Contact for the organization for a certain purpose.", 0, java.lang.Integer.MAX_VALUE, contact));
972        children.add(new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the organization.", 0, java.lang.Integer.MAX_VALUE, endpoint));
973      }
974
975      @Override
976      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
977        switch (_hash) {
978        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Identifier for the organization that is used to identify the organization across multiple disparate systems.", 0, java.lang.Integer.MAX_VALUE, identifier);
979        case -1422950650: /*active*/  return new Property("active", "boolean", "Whether the organization's record is still in active use.", 0, 1, active);
980        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The kind(s) of organization that this is.", 0, java.lang.Integer.MAX_VALUE, type);
981        case 3373707: /*name*/  return new Property("name", "string", "A name associated with the organization.", 0, 1, name);
982        case 92902992: /*alias*/  return new Property("alias", "string", "A list of alternate names that the organization is known as, or was known as in the past.", 0, java.lang.Integer.MAX_VALUE, alias);
983        case -1429363305: /*telecom*/  return new Property("telecom", "ContactPoint", "A contact detail for the organization.", 0, java.lang.Integer.MAX_VALUE, telecom);
984        case -1147692044: /*address*/  return new Property("address", "Address", "An address for the organization.", 0, java.lang.Integer.MAX_VALUE, address);
985        case -995410646: /*partOf*/  return new Property("partOf", "Reference(Organization)", "The organization of which this organization forms a part.", 0, 1, partOf);
986        case 951526432: /*contact*/  return new Property("contact", "", "Contact for the organization for a certain purpose.", 0, java.lang.Integer.MAX_VALUE, contact);
987        case 1741102485: /*endpoint*/  return new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the organization.", 0, java.lang.Integer.MAX_VALUE, endpoint);
988        default: return super.getNamedProperty(_hash, _name, _checkValid);
989        }
990
991      }
992
993      @Override
994      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
995        switch (hash) {
996        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
997        case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType
998        case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
999        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1000        case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType
1001        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
1002        case -1147692044: /*address*/ return this.address == null ? new Base[0] : this.address.toArray(new Base[this.address.size()]); // Address
1003        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : new Base[] {this.partOf}; // Reference
1004        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // OrganizationContactComponent
1005        case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference
1006        default: return super.getProperty(hash, name, checkValid);
1007        }
1008
1009      }
1010
1011      @Override
1012      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1013        switch (hash) {
1014        case -1618432855: // identifier
1015          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1016          return value;
1017        case -1422950650: // active
1018          this.active = TypeConvertor.castToBoolean(value); // BooleanType
1019          return value;
1020        case 3575610: // type
1021          this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1022          return value;
1023        case 3373707: // name
1024          this.name = TypeConvertor.castToString(value); // StringType
1025          return value;
1026        case 92902992: // alias
1027          this.getAlias().add(TypeConvertor.castToString(value)); // StringType
1028          return value;
1029        case -1429363305: // telecom
1030          this.getTelecom().add(TypeConvertor.castToContactPoint(value)); // ContactPoint
1031          return value;
1032        case -1147692044: // address
1033          this.getAddress().add(TypeConvertor.castToAddress(value)); // Address
1034          return value;
1035        case -995410646: // partOf
1036          this.partOf = TypeConvertor.castToReference(value); // Reference
1037          return value;
1038        case 951526432: // contact
1039          this.getContact().add((OrganizationContactComponent) value); // OrganizationContactComponent
1040          return value;
1041        case 1741102485: // endpoint
1042          this.getEndpoint().add(TypeConvertor.castToReference(value)); // Reference
1043          return value;
1044        default: return super.setProperty(hash, name, value);
1045        }
1046
1047      }
1048
1049      @Override
1050      public Base setProperty(String name, Base value) throws FHIRException {
1051        if (name.equals("identifier")) {
1052          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1053        } else if (name.equals("active")) {
1054          this.active = TypeConvertor.castToBoolean(value); // BooleanType
1055        } else if (name.equals("type")) {
1056          this.getType().add(TypeConvertor.castToCodeableConcept(value));
1057        } else if (name.equals("name")) {
1058          this.name = TypeConvertor.castToString(value); // StringType
1059        } else if (name.equals("alias")) {
1060          this.getAlias().add(TypeConvertor.castToString(value));
1061        } else if (name.equals("telecom")) {
1062          this.getTelecom().add(TypeConvertor.castToContactPoint(value));
1063        } else if (name.equals("address")) {
1064          this.getAddress().add(TypeConvertor.castToAddress(value));
1065        } else if (name.equals("partOf")) {
1066          this.partOf = TypeConvertor.castToReference(value); // Reference
1067        } else if (name.equals("contact")) {
1068          this.getContact().add((OrganizationContactComponent) value);
1069        } else if (name.equals("endpoint")) {
1070          this.getEndpoint().add(TypeConvertor.castToReference(value));
1071        } else
1072          return super.setProperty(name, value);
1073        return value;
1074      }
1075
1076      @Override
1077      public Base makeProperty(int hash, String name) throws FHIRException {
1078        switch (hash) {
1079        case -1618432855:  return addIdentifier(); 
1080        case -1422950650:  return getActiveElement();
1081        case 3575610:  return addType(); 
1082        case 3373707:  return getNameElement();
1083        case 92902992:  return addAliasElement();
1084        case -1429363305:  return addTelecom(); 
1085        case -1147692044:  return addAddress(); 
1086        case -995410646:  return getPartOf();
1087        case 951526432:  return addContact(); 
1088        case 1741102485:  return addEndpoint(); 
1089        default: return super.makeProperty(hash, name);
1090        }
1091
1092      }
1093
1094      @Override
1095      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1096        switch (hash) {
1097        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1098        case -1422950650: /*active*/ return new String[] {"boolean"};
1099        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1100        case 3373707: /*name*/ return new String[] {"string"};
1101        case 92902992: /*alias*/ return new String[] {"string"};
1102        case -1429363305: /*telecom*/ return new String[] {"ContactPoint"};
1103        case -1147692044: /*address*/ return new String[] {"Address"};
1104        case -995410646: /*partOf*/ return new String[] {"Reference"};
1105        case 951526432: /*contact*/ return new String[] {};
1106        case 1741102485: /*endpoint*/ return new String[] {"Reference"};
1107        default: return super.getTypesForProperty(hash, name);
1108        }
1109
1110      }
1111
1112      @Override
1113      public Base addChild(String name) throws FHIRException {
1114        if (name.equals("identifier")) {
1115          return addIdentifier();
1116        }
1117        else if (name.equals("active")) {
1118          throw new FHIRException("Cannot call addChild on a primitive type Organization.active");
1119        }
1120        else if (name.equals("type")) {
1121          return addType();
1122        }
1123        else if (name.equals("name")) {
1124          throw new FHIRException("Cannot call addChild on a primitive type Organization.name");
1125        }
1126        else if (name.equals("alias")) {
1127          throw new FHIRException("Cannot call addChild on a primitive type Organization.alias");
1128        }
1129        else if (name.equals("telecom")) {
1130          return addTelecom();
1131        }
1132        else if (name.equals("address")) {
1133          return addAddress();
1134        }
1135        else if (name.equals("partOf")) {
1136          this.partOf = new Reference();
1137          return this.partOf;
1138        }
1139        else if (name.equals("contact")) {
1140          return addContact();
1141        }
1142        else if (name.equals("endpoint")) {
1143          return addEndpoint();
1144        }
1145        else
1146          return super.addChild(name);
1147      }
1148
1149  public String fhirType() {
1150    return "Organization";
1151
1152  }
1153
1154      public Organization copy() {
1155        Organization dst = new Organization();
1156        copyValues(dst);
1157        return dst;
1158      }
1159
1160      public void copyValues(Organization dst) {
1161        super.copyValues(dst);
1162        if (identifier != null) {
1163          dst.identifier = new ArrayList<Identifier>();
1164          for (Identifier i : identifier)
1165            dst.identifier.add(i.copy());
1166        };
1167        dst.active = active == null ? null : active.copy();
1168        if (type != null) {
1169          dst.type = new ArrayList<CodeableConcept>();
1170          for (CodeableConcept i : type)
1171            dst.type.add(i.copy());
1172        };
1173        dst.name = name == null ? null : name.copy();
1174        if (alias != null) {
1175          dst.alias = new ArrayList<StringType>();
1176          for (StringType i : alias)
1177            dst.alias.add(i.copy());
1178        };
1179        if (telecom != null) {
1180          dst.telecom = new ArrayList<ContactPoint>();
1181          for (ContactPoint i : telecom)
1182            dst.telecom.add(i.copy());
1183        };
1184        if (address != null) {
1185          dst.address = new ArrayList<Address>();
1186          for (Address i : address)
1187            dst.address.add(i.copy());
1188        };
1189        dst.partOf = partOf == null ? null : partOf.copy();
1190        if (contact != null) {
1191          dst.contact = new ArrayList<OrganizationContactComponent>();
1192          for (OrganizationContactComponent i : contact)
1193            dst.contact.add(i.copy());
1194        };
1195        if (endpoint != null) {
1196          dst.endpoint = new ArrayList<Reference>();
1197          for (Reference i : endpoint)
1198            dst.endpoint.add(i.copy());
1199        };
1200      }
1201
1202      protected Organization typedCopy() {
1203        return copy();
1204      }
1205
1206      @Override
1207      public boolean equalsDeep(Base other_) {
1208        if (!super.equalsDeep(other_))
1209          return false;
1210        if (!(other_ instanceof Organization))
1211          return false;
1212        Organization o = (Organization) other_;
1213        return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(type, o.type, true)
1214           && compareDeep(name, o.name, true) && compareDeep(alias, o.alias, true) && compareDeep(telecom, o.telecom, true)
1215           && compareDeep(address, o.address, true) && compareDeep(partOf, o.partOf, true) && compareDeep(contact, o.contact, true)
1216           && compareDeep(endpoint, o.endpoint, true);
1217      }
1218
1219      @Override
1220      public boolean equalsShallow(Base other_) {
1221        if (!super.equalsShallow(other_))
1222          return false;
1223        if (!(other_ instanceof Organization))
1224          return false;
1225        Organization o = (Organization) other_;
1226        return compareValues(active, o.active, true) && compareValues(name, o.name, true) && compareValues(alias, o.alias, true)
1227          ;
1228      }
1229
1230      public boolean isEmpty() {
1231        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, active, type
1232          , name, alias, telecom, address, partOf, contact, endpoint);
1233      }
1234
1235  @Override
1236  public ResourceType getResourceType() {
1237    return ResourceType.Organization;
1238   }
1239
1240 /**
1241   * Search parameter: <b>active</b>
1242   * <p>
1243   * Description: <b>Is the Organization record active</b><br>
1244   * Type: <b>token</b><br>
1245   * Path: <b>Organization.active</b><br>
1246   * </p>
1247   */
1248  @SearchParamDefinition(name="active", path="Organization.active", description="Is the Organization record active", type="token" )
1249  public static final String SP_ACTIVE = "active";
1250 /**
1251   * <b>Fluent Client</b> search parameter constant for <b>active</b>
1252   * <p>
1253   * Description: <b>Is the Organization record active</b><br>
1254   * Type: <b>token</b><br>
1255   * Path: <b>Organization.active</b><br>
1256   * </p>
1257   */
1258  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTIVE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTIVE);
1259
1260 /**
1261   * Search parameter: <b>address-city</b>
1262   * <p>
1263   * Description: <b>A city specified in an address</b><br>
1264   * Type: <b>string</b><br>
1265   * Path: <b>Organization.address.city</b><br>
1266   * </p>
1267   */
1268  @SearchParamDefinition(name="address-city", path="Organization.address.city", description="A city specified in an address", type="string" )
1269  public static final String SP_ADDRESS_CITY = "address-city";
1270 /**
1271   * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
1272   * <p>
1273   * Description: <b>A city specified in an address</b><br>
1274   * Type: <b>string</b><br>
1275   * Path: <b>Organization.address.city</b><br>
1276   * </p>
1277   */
1278  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_CITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_CITY);
1279
1280 /**
1281   * Search parameter: <b>address-country</b>
1282   * <p>
1283   * Description: <b>A country specified in an address</b><br>
1284   * Type: <b>string</b><br>
1285   * Path: <b>Organization.address.country</b><br>
1286   * </p>
1287   */
1288  @SearchParamDefinition(name="address-country", path="Organization.address.country", description="A country specified in an address", type="string" )
1289  public static final String SP_ADDRESS_COUNTRY = "address-country";
1290 /**
1291   * <b>Fluent Client</b> search parameter constant for <b>address-country</b>
1292   * <p>
1293   * Description: <b>A country specified in an address</b><br>
1294   * Type: <b>string</b><br>
1295   * Path: <b>Organization.address.country</b><br>
1296   * </p>
1297   */
1298  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_COUNTRY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_COUNTRY);
1299
1300 /**
1301   * Search parameter: <b>address-postalcode</b>
1302   * <p>
1303   * Description: <b>A postal code specified in an address</b><br>
1304   * Type: <b>string</b><br>
1305   * Path: <b>Organization.address.postalCode</b><br>
1306   * </p>
1307   */
1308  @SearchParamDefinition(name="address-postalcode", path="Organization.address.postalCode", description="A postal code specified in an address", type="string" )
1309  public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
1310 /**
1311   * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
1312   * <p>
1313   * Description: <b>A postal code specified in an address</b><br>
1314   * Type: <b>string</b><br>
1315   * Path: <b>Organization.address.postalCode</b><br>
1316   * </p>
1317   */
1318  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_POSTALCODE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_POSTALCODE);
1319
1320 /**
1321   * Search parameter: <b>address-state</b>
1322   * <p>
1323   * Description: <b>A state specified in an address</b><br>
1324   * Type: <b>string</b><br>
1325   * Path: <b>Organization.address.state</b><br>
1326   * </p>
1327   */
1328  @SearchParamDefinition(name="address-state", path="Organization.address.state", description="A state specified in an address", type="string" )
1329  public static final String SP_ADDRESS_STATE = "address-state";
1330 /**
1331   * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
1332   * <p>
1333   * Description: <b>A state specified in an address</b><br>
1334   * Type: <b>string</b><br>
1335   * Path: <b>Organization.address.state</b><br>
1336   * </p>
1337   */
1338  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_STATE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_STATE);
1339
1340 /**
1341   * Search parameter: <b>address-use</b>
1342   * <p>
1343   * Description: <b>A use code specified in an address</b><br>
1344   * Type: <b>token</b><br>
1345   * Path: <b>Organization.address.use</b><br>
1346   * </p>
1347   */
1348  @SearchParamDefinition(name="address-use", path="Organization.address.use", description="A use code specified in an address", type="token" )
1349  public static final String SP_ADDRESS_USE = "address-use";
1350 /**
1351   * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
1352   * <p>
1353   * Description: <b>A use code specified in an address</b><br>
1354   * Type: <b>token</b><br>
1355   * Path: <b>Organization.address.use</b><br>
1356   * </p>
1357   */
1358  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ADDRESS_USE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ADDRESS_USE);
1359
1360 /**
1361   * Search parameter: <b>address</b>
1362   * <p>
1363   * Description: <b>A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text</b><br>
1364   * Type: <b>string</b><br>
1365   * Path: <b>Organization.address</b><br>
1366   * </p>
1367   */
1368  @SearchParamDefinition(name="address", path="Organization.address", description="A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text", type="string" )
1369  public static final String SP_ADDRESS = "address";
1370 /**
1371   * <b>Fluent Client</b> search parameter constant for <b>address</b>
1372   * <p>
1373   * Description: <b>A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text</b><br>
1374   * Type: <b>string</b><br>
1375   * Path: <b>Organization.address</b><br>
1376   * </p>
1377   */
1378  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS);
1379
1380 /**
1381   * Search parameter: <b>endpoint</b>
1382   * <p>
1383   * Description: <b>Technical endpoints providing access to services operated for the organization</b><br>
1384   * Type: <b>reference</b><br>
1385   * Path: <b>Organization.endpoint</b><br>
1386   * </p>
1387   */
1388  @SearchParamDefinition(name="endpoint", path="Organization.endpoint", description="Technical endpoints providing access to services operated for the organization", type="reference", target={Endpoint.class } )
1389  public static final String SP_ENDPOINT = "endpoint";
1390 /**
1391   * <b>Fluent Client</b> search parameter constant for <b>endpoint</b>
1392   * <p>
1393   * Description: <b>Technical endpoints providing access to services operated for the organization</b><br>
1394   * Type: <b>reference</b><br>
1395   * Path: <b>Organization.endpoint</b><br>
1396   * </p>
1397   */
1398  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT);
1399
1400/**
1401   * Constant for fluent queries to be used to add include statements. Specifies
1402   * the path value of "<b>Organization:endpoint</b>".
1403   */
1404  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("Organization:endpoint").toLocked();
1405
1406 /**
1407   * Search parameter: <b>identifier</b>
1408   * <p>
1409   * Description: <b>Any identifier for the organization (not the accreditation issuer's identifier)</b><br>
1410   * Type: <b>token</b><br>
1411   * Path: <b>Organization.identifier</b><br>
1412   * </p>
1413   */
1414  @SearchParamDefinition(name="identifier", path="Organization.identifier", description="Any identifier for the organization (not the accreditation issuer's identifier)", type="token" )
1415  public static final String SP_IDENTIFIER = "identifier";
1416 /**
1417   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1418   * <p>
1419   * Description: <b>Any identifier for the organization (not the accreditation issuer's identifier)</b><br>
1420   * Type: <b>token</b><br>
1421   * Path: <b>Organization.identifier</b><br>
1422   * </p>
1423   */
1424  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1425
1426 /**
1427   * Search parameter: <b>name</b>
1428   * <p>
1429   * Description: <b>A portion of the organization's name or alias</b><br>
1430   * Type: <b>string</b><br>
1431   * Path: <b>Organization.name | Organization.alias</b><br>
1432   * </p>
1433   */
1434  @SearchParamDefinition(name="name", path="Organization.name | Organization.alias", description="A portion of the organization's name or alias", type="string" )
1435  public static final String SP_NAME = "name";
1436 /**
1437   * <b>Fluent Client</b> search parameter constant for <b>name</b>
1438   * <p>
1439   * Description: <b>A portion of the organization's name or alias</b><br>
1440   * Type: <b>string</b><br>
1441   * Path: <b>Organization.name | Organization.alias</b><br>
1442   * </p>
1443   */
1444  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
1445
1446 /**
1447   * Search parameter: <b>partof</b>
1448   * <p>
1449   * Description: <b>An organization of which this organization forms a part</b><br>
1450   * Type: <b>reference</b><br>
1451   * Path: <b>Organization.partOf</b><br>
1452   * </p>
1453   */
1454  @SearchParamDefinition(name="partof", path="Organization.partOf", description="An organization of which this organization forms a part", type="reference", target={Organization.class } )
1455  public static final String SP_PARTOF = "partof";
1456 /**
1457   * <b>Fluent Client</b> search parameter constant for <b>partof</b>
1458   * <p>
1459   * Description: <b>An organization of which this organization forms a part</b><br>
1460   * Type: <b>reference</b><br>
1461   * Path: <b>Organization.partOf</b><br>
1462   * </p>
1463   */
1464  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTOF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTOF);
1465
1466/**
1467   * Constant for fluent queries to be used to add include statements. Specifies
1468   * the path value of "<b>Organization:partof</b>".
1469   */
1470  public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTOF = new ca.uhn.fhir.model.api.Include("Organization:partof").toLocked();
1471
1472 /**
1473   * Search parameter: <b>phonetic</b>
1474   * <p>
1475   * Description: <b>A portion of the organization's name using some kind of phonetic matching algorithm</b><br>
1476   * Type: <b>string</b><br>
1477   * Path: <b>Organization.name</b><br>
1478   * </p>
1479   */
1480  @SearchParamDefinition(name="phonetic", path="Organization.name", description="A portion of the organization's name using some kind of phonetic matching algorithm", type="string" )
1481  public static final String SP_PHONETIC = "phonetic";
1482 /**
1483   * <b>Fluent Client</b> search parameter constant for <b>phonetic</b>
1484   * <p>
1485   * Description: <b>A portion of the organization's name using some kind of phonetic matching algorithm</b><br>
1486   * Type: <b>string</b><br>
1487   * Path: <b>Organization.name</b><br>
1488   * </p>
1489   */
1490  public static final ca.uhn.fhir.rest.gclient.StringClientParam PHONETIC = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PHONETIC);
1491
1492 /**
1493   * Search parameter: <b>type</b>
1494   * <p>
1495   * Description: <b>A code for the type of organization</b><br>
1496   * Type: <b>token</b><br>
1497   * Path: <b>Organization.type</b><br>
1498   * </p>
1499   */
1500  @SearchParamDefinition(name="type", path="Organization.type", description="A code for the type of organization", type="token" )
1501  public static final String SP_TYPE = "type";
1502 /**
1503   * <b>Fluent Client</b> search parameter constant for <b>type</b>
1504   * <p>
1505   * Description: <b>A code for the type of organization</b><br>
1506   * Type: <b>token</b><br>
1507   * Path: <b>Organization.type</b><br>
1508   * </p>
1509   */
1510  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
1511
1512
1513}
1514