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