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