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