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