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