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