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