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