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