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