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