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