001package org.hl7.fhir.dstu2016may.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
033import java.util.ArrayList;
034import java.util.Date;
035import java.util.List;
036
037import org.hl7.fhir.dstu2016may.model.Enumerations.AdministrativeGender;
038import org.hl7.fhir.dstu2016may.model.Enumerations.AdministrativeGenderEnumFactory;
039import org.hl7.fhir.exceptions.FHIRException;
040import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
041
042import ca.uhn.fhir.model.api.annotation.Block;
043import ca.uhn.fhir.model.api.annotation.Child;
044import ca.uhn.fhir.model.api.annotation.Description;
045import ca.uhn.fhir.model.api.annotation.ResourceDef;
046import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
047/**
048 * Demographics and administrative information about a person independent of a specific health-related context.
049 */
050@ResourceDef(name="Person", profile="http://hl7.org/fhir/Profile/Person")
051public class Person extends DomainResource {
052
053    public enum IdentityAssuranceLevel {
054        /**
055         * Little or no confidence in the asserted identity's accuracy.
056         */
057        LEVEL1, 
058        /**
059         * Some confidence in the asserted identity's accuracy.
060         */
061        LEVEL2, 
062        /**
063         * High confidence in the asserted identity's accuracy.
064         */
065        LEVEL3, 
066        /**
067         * Very high confidence in the asserted identity's accuracy.
068         */
069        LEVEL4, 
070        /**
071         * added to help the parsers
072         */
073        NULL;
074        public static IdentityAssuranceLevel fromCode(String codeString) throws FHIRException {
075            if (codeString == null || "".equals(codeString))
076                return null;
077        if ("level1".equals(codeString))
078          return LEVEL1;
079        if ("level2".equals(codeString))
080          return LEVEL2;
081        if ("level3".equals(codeString))
082          return LEVEL3;
083        if ("level4".equals(codeString))
084          return LEVEL4;
085        throw new FHIRException("Unknown IdentityAssuranceLevel code '"+codeString+"'");
086        }
087        public String toCode() {
088          switch (this) {
089            case LEVEL1: return "level1";
090            case LEVEL2: return "level2";
091            case LEVEL3: return "level3";
092            case LEVEL4: return "level4";
093            default: return "?";
094          }
095        }
096        public String getSystem() {
097          switch (this) {
098            case LEVEL1: return "http://hl7.org/fhir/identity-assuranceLevel";
099            case LEVEL2: return "http://hl7.org/fhir/identity-assuranceLevel";
100            case LEVEL3: return "http://hl7.org/fhir/identity-assuranceLevel";
101            case LEVEL4: return "http://hl7.org/fhir/identity-assuranceLevel";
102            default: return "?";
103          }
104        }
105        public String getDefinition() {
106          switch (this) {
107            case LEVEL1: return "Little or no confidence in the asserted identity's accuracy.";
108            case LEVEL2: return "Some confidence in the asserted identity's accuracy.";
109            case LEVEL3: return "High confidence in the asserted identity's accuracy.";
110            case LEVEL4: return "Very high confidence in the asserted identity's accuracy.";
111            default: return "?";
112          }
113        }
114        public String getDisplay() {
115          switch (this) {
116            case LEVEL1: return "Level 1";
117            case LEVEL2: return "Level 2";
118            case LEVEL3: return "Level 3";
119            case LEVEL4: return "Level 4";
120            default: return "?";
121          }
122        }
123    }
124
125  public static class IdentityAssuranceLevelEnumFactory implements EnumFactory<IdentityAssuranceLevel> {
126    public IdentityAssuranceLevel fromCode(String codeString) throws IllegalArgumentException {
127      if (codeString == null || "".equals(codeString))
128            if (codeString == null || "".equals(codeString))
129                return null;
130        if ("level1".equals(codeString))
131          return IdentityAssuranceLevel.LEVEL1;
132        if ("level2".equals(codeString))
133          return IdentityAssuranceLevel.LEVEL2;
134        if ("level3".equals(codeString))
135          return IdentityAssuranceLevel.LEVEL3;
136        if ("level4".equals(codeString))
137          return IdentityAssuranceLevel.LEVEL4;
138        throw new IllegalArgumentException("Unknown IdentityAssuranceLevel code '"+codeString+"'");
139        }
140        public Enumeration<IdentityAssuranceLevel> fromType(Base code) throws FHIRException {
141          if (code == null || code.isEmpty())
142            return null;
143          String codeString = ((PrimitiveType) code).asStringValue();
144          if (codeString == null || "".equals(codeString))
145            return null;
146        if ("level1".equals(codeString))
147          return new Enumeration<IdentityAssuranceLevel>(this, IdentityAssuranceLevel.LEVEL1);
148        if ("level2".equals(codeString))
149          return new Enumeration<IdentityAssuranceLevel>(this, IdentityAssuranceLevel.LEVEL2);
150        if ("level3".equals(codeString))
151          return new Enumeration<IdentityAssuranceLevel>(this, IdentityAssuranceLevel.LEVEL3);
152        if ("level4".equals(codeString))
153          return new Enumeration<IdentityAssuranceLevel>(this, IdentityAssuranceLevel.LEVEL4);
154        throw new FHIRException("Unknown IdentityAssuranceLevel code '"+codeString+"'");
155        }
156    public String toCode(IdentityAssuranceLevel code) {
157      if (code == IdentityAssuranceLevel.LEVEL1)
158        return "level1";
159      if (code == IdentityAssuranceLevel.LEVEL2)
160        return "level2";
161      if (code == IdentityAssuranceLevel.LEVEL3)
162        return "level3";
163      if (code == IdentityAssuranceLevel.LEVEL4)
164        return "level4";
165      return "?";
166      }
167    public String toSystem(IdentityAssuranceLevel code) {
168      return code.getSystem();
169      }
170    }
171
172    @Block()
173    public static class PersonLinkComponent extends BackboneElement implements IBaseBackboneElement {
174        /**
175         * The resource to which this actual person is associated.
176         */
177        @Child(name = "target", type = {Patient.class, Practitioner.class, RelatedPerson.class, Person.class}, order=1, min=1, max=1, modifier=false, summary=false)
178        @Description(shortDefinition="The resource to which this actual person is associated", formalDefinition="The resource to which this actual person is associated." )
179        protected Reference target;
180
181        /**
182         * The actual object that is the target of the reference (The resource to which this actual person is associated.)
183         */
184        protected Resource targetTarget;
185
186        /**
187         * Level of assurance that this link is actually associated with the target resource.
188         */
189        @Child(name = "assurance", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false)
190        @Description(shortDefinition="level1 | level2 | level3 | level4", formalDefinition="Level of assurance that this link is actually associated with the target resource." )
191        protected Enumeration<IdentityAssuranceLevel> assurance;
192
193        private static final long serialVersionUID = 508763647L;
194
195    /**
196     * Constructor
197     */
198      public PersonLinkComponent() {
199        super();
200      }
201
202    /**
203     * Constructor
204     */
205      public PersonLinkComponent(Reference target) {
206        super();
207        this.target = target;
208      }
209
210        /**
211         * @return {@link #target} (The resource to which this actual person is associated.)
212         */
213        public Reference getTarget() { 
214          if (this.target == null)
215            if (Configuration.errorOnAutoCreate())
216              throw new Error("Attempt to auto-create PersonLinkComponent.target");
217            else if (Configuration.doAutoCreate())
218              this.target = new Reference(); // cc
219          return this.target;
220        }
221
222        public boolean hasTarget() { 
223          return this.target != null && !this.target.isEmpty();
224        }
225
226        /**
227         * @param value {@link #target} (The resource to which this actual person is associated.)
228         */
229        public PersonLinkComponent setTarget(Reference value) { 
230          this.target = value;
231          return this;
232        }
233
234        /**
235         * @return {@link #target} 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 resource to which this actual person is associated.)
236         */
237        public Resource getTargetTarget() { 
238          return this.targetTarget;
239        }
240
241        /**
242         * @param value {@link #target} 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 resource to which this actual person is associated.)
243         */
244        public PersonLinkComponent setTargetTarget(Resource value) { 
245          this.targetTarget = value;
246          return this;
247        }
248
249        /**
250         * @return {@link #assurance} (Level of assurance that this link is actually associated with the target resource.). This is the underlying object with id, value and extensions. The accessor "getAssurance" gives direct access to the value
251         */
252        public Enumeration<IdentityAssuranceLevel> getAssuranceElement() { 
253          if (this.assurance == null)
254            if (Configuration.errorOnAutoCreate())
255              throw new Error("Attempt to auto-create PersonLinkComponent.assurance");
256            else if (Configuration.doAutoCreate())
257              this.assurance = new Enumeration<IdentityAssuranceLevel>(new IdentityAssuranceLevelEnumFactory()); // bb
258          return this.assurance;
259        }
260
261        public boolean hasAssuranceElement() { 
262          return this.assurance != null && !this.assurance.isEmpty();
263        }
264
265        public boolean hasAssurance() { 
266          return this.assurance != null && !this.assurance.isEmpty();
267        }
268
269        /**
270         * @param value {@link #assurance} (Level of assurance that this link is actually associated with the target resource.). This is the underlying object with id, value and extensions. The accessor "getAssurance" gives direct access to the value
271         */
272        public PersonLinkComponent setAssuranceElement(Enumeration<IdentityAssuranceLevel> value) { 
273          this.assurance = value;
274          return this;
275        }
276
277        /**
278         * @return Level of assurance that this link is actually associated with the target resource.
279         */
280        public IdentityAssuranceLevel getAssurance() { 
281          return this.assurance == null ? null : this.assurance.getValue();
282        }
283
284        /**
285         * @param value Level of assurance that this link is actually associated with the target resource.
286         */
287        public PersonLinkComponent setAssurance(IdentityAssuranceLevel value) { 
288          if (value == null)
289            this.assurance = null;
290          else {
291            if (this.assurance == null)
292              this.assurance = new Enumeration<IdentityAssuranceLevel>(new IdentityAssuranceLevelEnumFactory());
293            this.assurance.setValue(value);
294          }
295          return this;
296        }
297
298        protected void listChildren(List<Property> childrenList) {
299          super.listChildren(childrenList);
300          childrenList.add(new Property("target", "Reference(Patient|Practitioner|RelatedPerson|Person)", "The resource to which this actual person is associated.", 0, java.lang.Integer.MAX_VALUE, target));
301          childrenList.add(new Property("assurance", "code", "Level of assurance that this link is actually associated with the target resource.", 0, java.lang.Integer.MAX_VALUE, assurance));
302        }
303
304      @Override
305      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
306        switch (hash) {
307        case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Reference
308        case 1771900717: /*assurance*/ return this.assurance == null ? new Base[0] : new Base[] {this.assurance}; // Enumeration<IdentityAssuranceLevel>
309        default: return super.getProperty(hash, name, checkValid);
310        }
311
312      }
313
314      @Override
315      public void setProperty(int hash, String name, Base value) throws FHIRException {
316        switch (hash) {
317        case -880905839: // target
318          this.target = castToReference(value); // Reference
319          break;
320        case 1771900717: // assurance
321          this.assurance = new IdentityAssuranceLevelEnumFactory().fromType(value); // Enumeration<IdentityAssuranceLevel>
322          break;
323        default: super.setProperty(hash, name, value);
324        }
325
326      }
327
328      @Override
329      public void setProperty(String name, Base value) throws FHIRException {
330        if (name.equals("target"))
331          this.target = castToReference(value); // Reference
332        else if (name.equals("assurance"))
333          this.assurance = new IdentityAssuranceLevelEnumFactory().fromType(value); // Enumeration<IdentityAssuranceLevel>
334        else
335          super.setProperty(name, value);
336      }
337
338      @Override
339      public Base makeProperty(int hash, String name) throws FHIRException {
340        switch (hash) {
341        case -880905839:  return getTarget(); // Reference
342        case 1771900717: throw new FHIRException("Cannot make property assurance as it is not a complex type"); // Enumeration<IdentityAssuranceLevel>
343        default: return super.makeProperty(hash, name);
344        }
345
346      }
347
348      @Override
349      public Base addChild(String name) throws FHIRException {
350        if (name.equals("target")) {
351          this.target = new Reference();
352          return this.target;
353        }
354        else if (name.equals("assurance")) {
355          throw new FHIRException("Cannot call addChild on a primitive type Person.assurance");
356        }
357        else
358          return super.addChild(name);
359      }
360
361      public PersonLinkComponent copy() {
362        PersonLinkComponent dst = new PersonLinkComponent();
363        copyValues(dst);
364        dst.target = target == null ? null : target.copy();
365        dst.assurance = assurance == null ? null : assurance.copy();
366        return dst;
367      }
368
369      @Override
370      public boolean equalsDeep(Base other) {
371        if (!super.equalsDeep(other))
372          return false;
373        if (!(other instanceof PersonLinkComponent))
374          return false;
375        PersonLinkComponent o = (PersonLinkComponent) other;
376        return compareDeep(target, o.target, true) && compareDeep(assurance, o.assurance, true);
377      }
378
379      @Override
380      public boolean equalsShallow(Base other) {
381        if (!super.equalsShallow(other))
382          return false;
383        if (!(other instanceof PersonLinkComponent))
384          return false;
385        PersonLinkComponent o = (PersonLinkComponent) other;
386        return compareValues(assurance, o.assurance, true);
387      }
388
389      public boolean isEmpty() {
390        return super.isEmpty() && (target == null || target.isEmpty()) && (assurance == null || assurance.isEmpty())
391          ;
392      }
393
394  public String fhirType() {
395    return "Person.link";
396
397  }
398
399  }
400
401    /**
402     * Identifier for a person within a particular scope.
403     */
404    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
405    @Description(shortDefinition="A human identifier for this person", formalDefinition="Identifier for a person within a particular scope." )
406    protected List<Identifier> identifier;
407
408    /**
409     * A name associated with the person.
410     */
411    @Child(name = "name", type = {HumanName.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
412    @Description(shortDefinition="A name associated with the person", formalDefinition="A name associated with the person." )
413    protected List<HumanName> name;
414
415    /**
416     * A contact detail for the person, e.g. a telephone number or an email address.
417     */
418    @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
419    @Description(shortDefinition="A contact detail for the person", formalDefinition="A contact detail for the person, e.g. a telephone number or an email address." )
420    protected List<ContactPoint> telecom;
421
422    /**
423     * Administrative Gender.
424     */
425    @Child(name = "gender", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true)
426    @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender." )
427    protected Enumeration<AdministrativeGender> gender;
428
429    /**
430     * The birth date for the person.
431     */
432    @Child(name = "birthDate", type = {DateType.class}, order=4, min=0, max=1, modifier=false, summary=true)
433    @Description(shortDefinition="The date on which the person was born", formalDefinition="The birth date for the person." )
434    protected DateType birthDate;
435
436    /**
437     * One or more addresses for the person.
438     */
439    @Child(name = "address", type = {Address.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
440    @Description(shortDefinition="One or more addresses for the person", formalDefinition="One or more addresses for the person." )
441    protected List<Address> address;
442
443    /**
444     * An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.
445     */
446    @Child(name = "photo", type = {Attachment.class}, order=6, min=0, max=1, modifier=false, summary=false)
447    @Description(shortDefinition="Image of the person", formalDefinition="An image that can be displayed as a thumbnail of the person to enhance the identification of the individual." )
448    protected Attachment photo;
449
450    /**
451     * The organization that is the custodian of the person record.
452     */
453    @Child(name = "managingOrganization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true)
454    @Description(shortDefinition="The organization that is the custodian of the person record", formalDefinition="The organization that is the custodian of the person record." )
455    protected Reference managingOrganization;
456
457    /**
458     * The actual object that is the target of the reference (The organization that is the custodian of the person record.)
459     */
460    protected Organization managingOrganizationTarget;
461
462    /**
463     * Whether this person's record is in active use.
464     */
465    @Child(name = "active", type = {BooleanType.class}, order=8, min=0, max=1, modifier=true, summary=true)
466    @Description(shortDefinition="This person's record is in active use", formalDefinition="Whether this person's record is in active use." )
467    protected BooleanType active;
468
469    /**
470     * Link to a resource that concerns the same actual person.
471     */
472    @Child(name = "link", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
473    @Description(shortDefinition="Link to a resource that concerns the same actual person", formalDefinition="Link to a resource that concerns the same actual person." )
474    protected List<PersonLinkComponent> link;
475
476    private static final long serialVersionUID = -117464654L;
477
478  /**
479   * Constructor
480   */
481    public Person() {
482      super();
483    }
484
485    /**
486     * @return {@link #identifier} (Identifier for a person within a particular scope.)
487     */
488    public List<Identifier> getIdentifier() { 
489      if (this.identifier == null)
490        this.identifier = new ArrayList<Identifier>();
491      return this.identifier;
492    }
493
494    public boolean hasIdentifier() { 
495      if (this.identifier == null)
496        return false;
497      for (Identifier item : this.identifier)
498        if (!item.isEmpty())
499          return true;
500      return false;
501    }
502
503    /**
504     * @return {@link #identifier} (Identifier for a person within a particular scope.)
505     */
506    // syntactic sugar
507    public Identifier addIdentifier() { //3
508      Identifier t = new Identifier();
509      if (this.identifier == null)
510        this.identifier = new ArrayList<Identifier>();
511      this.identifier.add(t);
512      return t;
513    }
514
515    // syntactic sugar
516    public Person addIdentifier(Identifier t) { //3
517      if (t == null)
518        return this;
519      if (this.identifier == null)
520        this.identifier = new ArrayList<Identifier>();
521      this.identifier.add(t);
522      return this;
523    }
524
525    /**
526     * @return {@link #name} (A name associated with the person.)
527     */
528    public List<HumanName> getName() { 
529      if (this.name == null)
530        this.name = new ArrayList<HumanName>();
531      return this.name;
532    }
533
534    public boolean hasName() { 
535      if (this.name == null)
536        return false;
537      for (HumanName item : this.name)
538        if (!item.isEmpty())
539          return true;
540      return false;
541    }
542
543    /**
544     * @return {@link #name} (A name associated with the person.)
545     */
546    // syntactic sugar
547    public HumanName addName() { //3
548      HumanName t = new HumanName();
549      if (this.name == null)
550        this.name = new ArrayList<HumanName>();
551      this.name.add(t);
552      return t;
553    }
554
555    // syntactic sugar
556    public Person addName(HumanName t) { //3
557      if (t == null)
558        return this;
559      if (this.name == null)
560        this.name = new ArrayList<HumanName>();
561      this.name.add(t);
562      return this;
563    }
564
565    /**
566     * @return {@link #telecom} (A contact detail for the person, e.g. a telephone number or an email address.)
567     */
568    public List<ContactPoint> getTelecom() { 
569      if (this.telecom == null)
570        this.telecom = new ArrayList<ContactPoint>();
571      return this.telecom;
572    }
573
574    public boolean hasTelecom() { 
575      if (this.telecom == null)
576        return false;
577      for (ContactPoint item : this.telecom)
578        if (!item.isEmpty())
579          return true;
580      return false;
581    }
582
583    /**
584     * @return {@link #telecom} (A contact detail for the person, e.g. a telephone number or an email address.)
585     */
586    // syntactic sugar
587    public ContactPoint addTelecom() { //3
588      ContactPoint t = new ContactPoint();
589      if (this.telecom == null)
590        this.telecom = new ArrayList<ContactPoint>();
591      this.telecom.add(t);
592      return t;
593    }
594
595    // syntactic sugar
596    public Person addTelecom(ContactPoint t) { //3
597      if (t == null)
598        return this;
599      if (this.telecom == null)
600        this.telecom = new ArrayList<ContactPoint>();
601      this.telecom.add(t);
602      return this;
603    }
604
605    /**
606     * @return {@link #gender} (Administrative Gender.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value
607     */
608    public Enumeration<AdministrativeGender> getGenderElement() { 
609      if (this.gender == null)
610        if (Configuration.errorOnAutoCreate())
611          throw new Error("Attempt to auto-create Person.gender");
612        else if (Configuration.doAutoCreate())
613          this.gender = new Enumeration<AdministrativeGender>(new AdministrativeGenderEnumFactory()); // bb
614      return this.gender;
615    }
616
617    public boolean hasGenderElement() { 
618      return this.gender != null && !this.gender.isEmpty();
619    }
620
621    public boolean hasGender() { 
622      return this.gender != null && !this.gender.isEmpty();
623    }
624
625    /**
626     * @param value {@link #gender} (Administrative Gender.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value
627     */
628    public Person setGenderElement(Enumeration<AdministrativeGender> value) { 
629      this.gender = value;
630      return this;
631    }
632
633    /**
634     * @return Administrative Gender.
635     */
636    public AdministrativeGender getGender() { 
637      return this.gender == null ? null : this.gender.getValue();
638    }
639
640    /**
641     * @param value Administrative Gender.
642     */
643    public Person setGender(AdministrativeGender value) { 
644      if (value == null)
645        this.gender = null;
646      else {
647        if (this.gender == null)
648          this.gender = new Enumeration<AdministrativeGender>(new AdministrativeGenderEnumFactory());
649        this.gender.setValue(value);
650      }
651      return this;
652    }
653
654    /**
655     * @return {@link #birthDate} (The birth date for the person.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value
656     */
657    public DateType getBirthDateElement() { 
658      if (this.birthDate == null)
659        if (Configuration.errorOnAutoCreate())
660          throw new Error("Attempt to auto-create Person.birthDate");
661        else if (Configuration.doAutoCreate())
662          this.birthDate = new DateType(); // bb
663      return this.birthDate;
664    }
665
666    public boolean hasBirthDateElement() { 
667      return this.birthDate != null && !this.birthDate.isEmpty();
668    }
669
670    public boolean hasBirthDate() { 
671      return this.birthDate != null && !this.birthDate.isEmpty();
672    }
673
674    /**
675     * @param value {@link #birthDate} (The birth date for the person.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value
676     */
677    public Person setBirthDateElement(DateType value) { 
678      this.birthDate = value;
679      return this;
680    }
681
682    /**
683     * @return The birth date for the person.
684     */
685    public Date getBirthDate() { 
686      return this.birthDate == null ? null : this.birthDate.getValue();
687    }
688
689    /**
690     * @param value The birth date for the person.
691     */
692    public Person setBirthDate(Date value) { 
693      if (value == null)
694        this.birthDate = null;
695      else {
696        if (this.birthDate == null)
697          this.birthDate = new DateType();
698        this.birthDate.setValue(value);
699      }
700      return this;
701    }
702
703    /**
704     * @return {@link #address} (One or more addresses for the person.)
705     */
706    public List<Address> getAddress() { 
707      if (this.address == null)
708        this.address = new ArrayList<Address>();
709      return this.address;
710    }
711
712    public boolean hasAddress() { 
713      if (this.address == null)
714        return false;
715      for (Address item : this.address)
716        if (!item.isEmpty())
717          return true;
718      return false;
719    }
720
721    /**
722     * @return {@link #address} (One or more addresses for the person.)
723     */
724    // syntactic sugar
725    public Address addAddress() { //3
726      Address t = new Address();
727      if (this.address == null)
728        this.address = new ArrayList<Address>();
729      this.address.add(t);
730      return t;
731    }
732
733    // syntactic sugar
734    public Person addAddress(Address t) { //3
735      if (t == null)
736        return this;
737      if (this.address == null)
738        this.address = new ArrayList<Address>();
739      this.address.add(t);
740      return this;
741    }
742
743    /**
744     * @return {@link #photo} (An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.)
745     */
746    public Attachment getPhoto() { 
747      if (this.photo == null)
748        if (Configuration.errorOnAutoCreate())
749          throw new Error("Attempt to auto-create Person.photo");
750        else if (Configuration.doAutoCreate())
751          this.photo = new Attachment(); // cc
752      return this.photo;
753    }
754
755    public boolean hasPhoto() { 
756      return this.photo != null && !this.photo.isEmpty();
757    }
758
759    /**
760     * @param value {@link #photo} (An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.)
761     */
762    public Person setPhoto(Attachment value) { 
763      this.photo = value;
764      return this;
765    }
766
767    /**
768     * @return {@link #managingOrganization} (The organization that is the custodian of the person record.)
769     */
770    public Reference getManagingOrganization() { 
771      if (this.managingOrganization == null)
772        if (Configuration.errorOnAutoCreate())
773          throw new Error("Attempt to auto-create Person.managingOrganization");
774        else if (Configuration.doAutoCreate())
775          this.managingOrganization = new Reference(); // cc
776      return this.managingOrganization;
777    }
778
779    public boolean hasManagingOrganization() { 
780      return this.managingOrganization != null && !this.managingOrganization.isEmpty();
781    }
782
783    /**
784     * @param value {@link #managingOrganization} (The organization that is the custodian of the person record.)
785     */
786    public Person setManagingOrganization(Reference value) { 
787      this.managingOrganization = value;
788      return this;
789    }
790
791    /**
792     * @return {@link #managingOrganization} 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 organization that is the custodian of the person record.)
793     */
794    public Organization getManagingOrganizationTarget() { 
795      if (this.managingOrganizationTarget == null)
796        if (Configuration.errorOnAutoCreate())
797          throw new Error("Attempt to auto-create Person.managingOrganization");
798        else if (Configuration.doAutoCreate())
799          this.managingOrganizationTarget = new Organization(); // aa
800      return this.managingOrganizationTarget;
801    }
802
803    /**
804     * @param value {@link #managingOrganization} 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 organization that is the custodian of the person record.)
805     */
806    public Person setManagingOrganizationTarget(Organization value) { 
807      this.managingOrganizationTarget = value;
808      return this;
809    }
810
811    /**
812     * @return {@link #active} (Whether this person's record is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
813     */
814    public BooleanType getActiveElement() { 
815      if (this.active == null)
816        if (Configuration.errorOnAutoCreate())
817          throw new Error("Attempt to auto-create Person.active");
818        else if (Configuration.doAutoCreate())
819          this.active = new BooleanType(); // bb
820      return this.active;
821    }
822
823    public boolean hasActiveElement() { 
824      return this.active != null && !this.active.isEmpty();
825    }
826
827    public boolean hasActive() { 
828      return this.active != null && !this.active.isEmpty();
829    }
830
831    /**
832     * @param value {@link #active} (Whether this person's record is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
833     */
834    public Person setActiveElement(BooleanType value) { 
835      this.active = value;
836      return this;
837    }
838
839    /**
840     * @return Whether this person's record is in active use.
841     */
842    public boolean getActive() { 
843      return this.active == null || this.active.isEmpty() ? false : this.active.getValue();
844    }
845
846    /**
847     * @param value Whether this person's record is in active use.
848     */
849    public Person setActive(boolean value) { 
850        if (this.active == null)
851          this.active = new BooleanType();
852        this.active.setValue(value);
853      return this;
854    }
855
856    /**
857     * @return {@link #link} (Link to a resource that concerns the same actual person.)
858     */
859    public List<PersonLinkComponent> getLink() { 
860      if (this.link == null)
861        this.link = new ArrayList<PersonLinkComponent>();
862      return this.link;
863    }
864
865    public boolean hasLink() { 
866      if (this.link == null)
867        return false;
868      for (PersonLinkComponent item : this.link)
869        if (!item.isEmpty())
870          return true;
871      return false;
872    }
873
874    /**
875     * @return {@link #link} (Link to a resource that concerns the same actual person.)
876     */
877    // syntactic sugar
878    public PersonLinkComponent addLink() { //3
879      PersonLinkComponent t = new PersonLinkComponent();
880      if (this.link == null)
881        this.link = new ArrayList<PersonLinkComponent>();
882      this.link.add(t);
883      return t;
884    }
885
886    // syntactic sugar
887    public Person addLink(PersonLinkComponent t) { //3
888      if (t == null)
889        return this;
890      if (this.link == null)
891        this.link = new ArrayList<PersonLinkComponent>();
892      this.link.add(t);
893      return this;
894    }
895
896      protected void listChildren(List<Property> childrenList) {
897        super.listChildren(childrenList);
898        childrenList.add(new Property("identifier", "Identifier", "Identifier for a person within a particular scope.", 0, java.lang.Integer.MAX_VALUE, identifier));
899        childrenList.add(new Property("name", "HumanName", "A name associated with the person.", 0, java.lang.Integer.MAX_VALUE, name));
900        childrenList.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));
901        childrenList.add(new Property("gender", "code", "Administrative Gender.", 0, java.lang.Integer.MAX_VALUE, gender));
902        childrenList.add(new Property("birthDate", "date", "The birth date for the person.", 0, java.lang.Integer.MAX_VALUE, birthDate));
903        childrenList.add(new Property("address", "Address", "One or more addresses for the person.", 0, java.lang.Integer.MAX_VALUE, address));
904        childrenList.add(new Property("photo", "Attachment", "An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.", 0, java.lang.Integer.MAX_VALUE, photo));
905        childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization that is the custodian of the person record.", 0, java.lang.Integer.MAX_VALUE, managingOrganization));
906        childrenList.add(new Property("active", "boolean", "Whether this person's record is in active use.", 0, java.lang.Integer.MAX_VALUE, active));
907        childrenList.add(new Property("link", "", "Link to a resource that concerns the same actual person.", 0, java.lang.Integer.MAX_VALUE, link));
908      }
909
910      @Override
911      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
912        switch (hash) {
913        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
914        case 3373707: /*name*/ return this.name == null ? new Base[0] : this.name.toArray(new Base[this.name.size()]); // HumanName
915        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
916        case -1249512767: /*gender*/ return this.gender == null ? new Base[0] : new Base[] {this.gender}; // Enumeration<AdministrativeGender>
917        case -1210031859: /*birthDate*/ return this.birthDate == null ? new Base[0] : new Base[] {this.birthDate}; // DateType
918        case -1147692044: /*address*/ return this.address == null ? new Base[0] : this.address.toArray(new Base[this.address.size()]); // Address
919        case 106642994: /*photo*/ return this.photo == null ? new Base[0] : new Base[] {this.photo}; // Attachment
920        case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : new Base[] {this.managingOrganization}; // Reference
921        case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType
922        case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // PersonLinkComponent
923        default: return super.getProperty(hash, name, checkValid);
924        }
925
926      }
927
928      @Override
929      public void setProperty(int hash, String name, Base value) throws FHIRException {
930        switch (hash) {
931        case -1618432855: // identifier
932          this.getIdentifier().add(castToIdentifier(value)); // Identifier
933          break;
934        case 3373707: // name
935          this.getName().add(castToHumanName(value)); // HumanName
936          break;
937        case -1429363305: // telecom
938          this.getTelecom().add(castToContactPoint(value)); // ContactPoint
939          break;
940        case -1249512767: // gender
941          this.gender = new AdministrativeGenderEnumFactory().fromType(value); // Enumeration<AdministrativeGender>
942          break;
943        case -1210031859: // birthDate
944          this.birthDate = castToDate(value); // DateType
945          break;
946        case -1147692044: // address
947          this.getAddress().add(castToAddress(value)); // Address
948          break;
949        case 106642994: // photo
950          this.photo = castToAttachment(value); // Attachment
951          break;
952        case -2058947787: // managingOrganization
953          this.managingOrganization = castToReference(value); // Reference
954          break;
955        case -1422950650: // active
956          this.active = castToBoolean(value); // BooleanType
957          break;
958        case 3321850: // link
959          this.getLink().add((PersonLinkComponent) value); // PersonLinkComponent
960          break;
961        default: super.setProperty(hash, name, value);
962        }
963
964      }
965
966      @Override
967      public void setProperty(String name, Base value) throws FHIRException {
968        if (name.equals("identifier"))
969          this.getIdentifier().add(castToIdentifier(value));
970        else if (name.equals("name"))
971          this.getName().add(castToHumanName(value));
972        else if (name.equals("telecom"))
973          this.getTelecom().add(castToContactPoint(value));
974        else if (name.equals("gender"))
975          this.gender = new AdministrativeGenderEnumFactory().fromType(value); // Enumeration<AdministrativeGender>
976        else if (name.equals("birthDate"))
977          this.birthDate = castToDate(value); // DateType
978        else if (name.equals("address"))
979          this.getAddress().add(castToAddress(value));
980        else if (name.equals("photo"))
981          this.photo = castToAttachment(value); // Attachment
982        else if (name.equals("managingOrganization"))
983          this.managingOrganization = castToReference(value); // Reference
984        else if (name.equals("active"))
985          this.active = castToBoolean(value); // BooleanType
986        else if (name.equals("link"))
987          this.getLink().add((PersonLinkComponent) value);
988        else
989          super.setProperty(name, value);
990      }
991
992      @Override
993      public Base makeProperty(int hash, String name) throws FHIRException {
994        switch (hash) {
995        case -1618432855:  return addIdentifier(); // Identifier
996        case 3373707:  return addName(); // HumanName
997        case -1429363305:  return addTelecom(); // ContactPoint
998        case -1249512767: throw new FHIRException("Cannot make property gender as it is not a complex type"); // Enumeration<AdministrativeGender>
999        case -1210031859: throw new FHIRException("Cannot make property birthDate as it is not a complex type"); // DateType
1000        case -1147692044:  return addAddress(); // Address
1001        case 106642994:  return getPhoto(); // Attachment
1002        case -2058947787:  return getManagingOrganization(); // Reference
1003        case -1422950650: throw new FHIRException("Cannot make property active as it is not a complex type"); // BooleanType
1004        case 3321850:  return addLink(); // PersonLinkComponent
1005        default: return super.makeProperty(hash, name);
1006        }
1007
1008      }
1009
1010      @Override
1011      public Base addChild(String name) throws FHIRException {
1012        if (name.equals("identifier")) {
1013          return addIdentifier();
1014        }
1015        else if (name.equals("name")) {
1016          return addName();
1017        }
1018        else if (name.equals("telecom")) {
1019          return addTelecom();
1020        }
1021        else if (name.equals("gender")) {
1022          throw new FHIRException("Cannot call addChild on a primitive type Person.gender");
1023        }
1024        else if (name.equals("birthDate")) {
1025          throw new FHIRException("Cannot call addChild on a primitive type Person.birthDate");
1026        }
1027        else if (name.equals("address")) {
1028          return addAddress();
1029        }
1030        else if (name.equals("photo")) {
1031          this.photo = new Attachment();
1032          return this.photo;
1033        }
1034        else if (name.equals("managingOrganization")) {
1035          this.managingOrganization = new Reference();
1036          return this.managingOrganization;
1037        }
1038        else if (name.equals("active")) {
1039          throw new FHIRException("Cannot call addChild on a primitive type Person.active");
1040        }
1041        else if (name.equals("link")) {
1042          return addLink();
1043        }
1044        else
1045          return super.addChild(name);
1046      }
1047
1048  public String fhirType() {
1049    return "Person";
1050
1051  }
1052
1053      public Person copy() {
1054        Person dst = new Person();
1055        copyValues(dst);
1056        if (identifier != null) {
1057          dst.identifier = new ArrayList<Identifier>();
1058          for (Identifier i : identifier)
1059            dst.identifier.add(i.copy());
1060        };
1061        if (name != null) {
1062          dst.name = new ArrayList<HumanName>();
1063          for (HumanName i : name)
1064            dst.name.add(i.copy());
1065        };
1066        if (telecom != null) {
1067          dst.telecom = new ArrayList<ContactPoint>();
1068          for (ContactPoint i : telecom)
1069            dst.telecom.add(i.copy());
1070        };
1071        dst.gender = gender == null ? null : gender.copy();
1072        dst.birthDate = birthDate == null ? null : birthDate.copy();
1073        if (address != null) {
1074          dst.address = new ArrayList<Address>();
1075          for (Address i : address)
1076            dst.address.add(i.copy());
1077        };
1078        dst.photo = photo == null ? null : photo.copy();
1079        dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy();
1080        dst.active = active == null ? null : active.copy();
1081        if (link != null) {
1082          dst.link = new ArrayList<PersonLinkComponent>();
1083          for (PersonLinkComponent i : link)
1084            dst.link.add(i.copy());
1085        };
1086        return dst;
1087      }
1088
1089      protected Person typedCopy() {
1090        return copy();
1091      }
1092
1093      @Override
1094      public boolean equalsDeep(Base other) {
1095        if (!super.equalsDeep(other))
1096          return false;
1097        if (!(other instanceof Person))
1098          return false;
1099        Person o = (Person) other;
1100        return compareDeep(identifier, o.identifier, true) && compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true)
1101           && compareDeep(gender, o.gender, true) && compareDeep(birthDate, o.birthDate, true) && compareDeep(address, o.address, true)
1102           && compareDeep(photo, o.photo, true) && compareDeep(managingOrganization, o.managingOrganization, true)
1103           && compareDeep(active, o.active, true) && compareDeep(link, o.link, true);
1104      }
1105
1106      @Override
1107      public boolean equalsShallow(Base other) {
1108        if (!super.equalsShallow(other))
1109          return false;
1110        if (!(other instanceof Person))
1111          return false;
1112        Person o = (Person) other;
1113        return compareValues(gender, o.gender, true) && compareValues(birthDate, o.birthDate, true) && compareValues(active, o.active, true)
1114          ;
1115      }
1116
1117      public boolean isEmpty() {
1118        return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (name == null || name.isEmpty())
1119           && (telecom == null || telecom.isEmpty()) && (gender == null || gender.isEmpty()) && (birthDate == null || birthDate.isEmpty())
1120           && (address == null || address.isEmpty()) && (photo == null || photo.isEmpty()) && (managingOrganization == null || managingOrganization.isEmpty())
1121           && (active == null || active.isEmpty()) && (link == null || link.isEmpty());
1122      }
1123
1124  @Override
1125  public ResourceType getResourceType() {
1126    return ResourceType.Person;
1127   }
1128
1129 /**
1130   * Search parameter: <b>phone</b>
1131   * <p>
1132   * Description: <b>A value in a phone contact</b><br>
1133   * Type: <b>token</b><br>
1134   * Path: <b>Person.telecom(system=phone)</b><br>
1135   * </p>
1136   */
1137  @SearchParamDefinition(name="phone", path="Person.telecom.where(system='phone')", description="A value in a phone contact", type="token" )
1138  public static final String SP_PHONE = "phone";
1139 /**
1140   * <b>Fluent Client</b> search parameter constant for <b>phone</b>
1141   * <p>
1142   * Description: <b>A value in a phone contact</b><br>
1143   * Type: <b>token</b><br>
1144   * Path: <b>Person.telecom(system=phone)</b><br>
1145   * </p>
1146   */
1147  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PHONE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PHONE);
1148
1149 /**
1150   * Search parameter: <b>phonetic</b>
1151   * <p>
1152   * Description: <b>A portion of name using some kind of phonetic matching algorithm</b><br>
1153   * Type: <b>string</b><br>
1154   * Path: <b>Person.name</b><br>
1155   * </p>
1156   */
1157  @SearchParamDefinition(name="phonetic", path="Person.name", description="A portion of name using some kind of phonetic matching algorithm", type="string" )
1158  public static final String SP_PHONETIC = "phonetic";
1159 /**
1160   * <b>Fluent Client</b> search parameter constant for <b>phonetic</b>
1161   * <p>
1162   * Description: <b>A portion of name using some kind of phonetic matching algorithm</b><br>
1163   * Type: <b>string</b><br>
1164   * Path: <b>Person.name</b><br>
1165   * </p>
1166   */
1167  public static final ca.uhn.fhir.rest.gclient.StringClientParam PHONETIC = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PHONETIC);
1168
1169 /**
1170   * Search parameter: <b>link</b>
1171   * <p>
1172   * Description: <b>Any link has this Patient, Person, RelatedPerson or Practitioner reference</b><br>
1173   * Type: <b>reference</b><br>
1174   * Path: <b>Person.link.target</b><br>
1175   * </p>
1176   */
1177  @SearchParamDefinition(name="link", path="Person.link.target", description="Any link has this Patient, Person, RelatedPerson or Practitioner reference", type="reference" )
1178  public static final String SP_LINK = "link";
1179 /**
1180   * <b>Fluent Client</b> search parameter constant for <b>link</b>
1181   * <p>
1182   * Description: <b>Any link has this Patient, Person, RelatedPerson or Practitioner reference</b><br>
1183   * Type: <b>reference</b><br>
1184   * Path: <b>Person.link.target</b><br>
1185   * </p>
1186   */
1187  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LINK = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LINK);
1188
1189/**
1190   * Constant for fluent queries to be used to add include statements. Specifies
1191   * the path value of "<b>Person:link</b>".
1192   */
1193  public static final ca.uhn.fhir.model.api.Include INCLUDE_LINK = new ca.uhn.fhir.model.api.Include("Person:link").toLocked();
1194
1195 /**
1196   * Search parameter: <b>address-country</b>
1197   * <p>
1198   * Description: <b>A country specified in an address</b><br>
1199   * Type: <b>string</b><br>
1200   * Path: <b>Person.address.country</b><br>
1201   * </p>
1202   */
1203  @SearchParamDefinition(name="address-country", path="Person.address.country", description="A country specified in an address", type="string" )
1204  public static final String SP_ADDRESS_COUNTRY = "address-country";
1205 /**
1206   * <b>Fluent Client</b> search parameter constant for <b>address-country</b>
1207   * <p>
1208   * Description: <b>A country specified in an address</b><br>
1209   * Type: <b>string</b><br>
1210   * Path: <b>Person.address.country</b><br>
1211   * </p>
1212   */
1213  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_COUNTRY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_COUNTRY);
1214
1215 /**
1216   * Search parameter: <b>relatedperson</b>
1217   * <p>
1218   * Description: <b>The Person links to this RelatedPerson</b><br>
1219   * Type: <b>reference</b><br>
1220   * Path: <b>Person.link.target</b><br>
1221   * </p>
1222   */
1223  @SearchParamDefinition(name="relatedperson", path="Person.link.target", description="The Person links to this RelatedPerson", type="reference" )
1224  public static final String SP_RELATEDPERSON = "relatedperson";
1225 /**
1226   * <b>Fluent Client</b> search parameter constant for <b>relatedperson</b>
1227   * <p>
1228   * Description: <b>The Person links to this RelatedPerson</b><br>
1229   * Type: <b>reference</b><br>
1230   * Path: <b>Person.link.target</b><br>
1231   * </p>
1232   */
1233  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RELATEDPERSON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RELATEDPERSON);
1234
1235/**
1236   * Constant for fluent queries to be used to add include statements. Specifies
1237   * the path value of "<b>Person:relatedperson</b>".
1238   */
1239  public static final ca.uhn.fhir.model.api.Include INCLUDE_RELATEDPERSON = new ca.uhn.fhir.model.api.Include("Person:relatedperson").toLocked();
1240
1241 /**
1242   * Search parameter: <b>organization</b>
1243   * <p>
1244   * Description: <b>The organization at which this person record is being managed</b><br>
1245   * Type: <b>reference</b><br>
1246   * Path: <b>Person.managingOrganization</b><br>
1247   * </p>
1248   */
1249  @SearchParamDefinition(name="organization", path="Person.managingOrganization", description="The organization at which this person record is being managed", type="reference" )
1250  public static final String SP_ORGANIZATION = "organization";
1251 /**
1252   * <b>Fluent Client</b> search parameter constant for <b>organization</b>
1253   * <p>
1254   * Description: <b>The organization at which this person record is being managed</b><br>
1255   * Type: <b>reference</b><br>
1256   * Path: <b>Person.managingOrganization</b><br>
1257   * </p>
1258   */
1259  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION);
1260
1261/**
1262   * Constant for fluent queries to be used to add include statements. Specifies
1263   * the path value of "<b>Person:organization</b>".
1264   */
1265  public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Person:organization").toLocked();
1266
1267 /**
1268   * Search parameter: <b>patient</b>
1269   * <p>
1270   * Description: <b>The Person links to this Patient</b><br>
1271   * Type: <b>reference</b><br>
1272   * Path: <b>Person.link.target</b><br>
1273   * </p>
1274   */
1275  @SearchParamDefinition(name="patient", path="Person.link.target", description="The Person links to this Patient", type="reference" )
1276  public static final String SP_PATIENT = "patient";
1277 /**
1278   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1279   * <p>
1280   * Description: <b>The Person links to this Patient</b><br>
1281   * Type: <b>reference</b><br>
1282   * Path: <b>Person.link.target</b><br>
1283   * </p>
1284   */
1285  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1286
1287/**
1288   * Constant for fluent queries to be used to add include statements. Specifies
1289   * the path value of "<b>Person:patient</b>".
1290   */
1291  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Person:patient").toLocked();
1292
1293 /**
1294   * Search parameter: <b>address-city</b>
1295   * <p>
1296   * Description: <b>A city specified in an address</b><br>
1297   * Type: <b>string</b><br>
1298   * Path: <b>Person.address.city</b><br>
1299   * </p>
1300   */
1301  @SearchParamDefinition(name="address-city", path="Person.address.city", description="A city specified in an address", type="string" )
1302  public static final String SP_ADDRESS_CITY = "address-city";
1303 /**
1304   * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
1305   * <p>
1306   * Description: <b>A city specified in an address</b><br>
1307   * Type: <b>string</b><br>
1308   * Path: <b>Person.address.city</b><br>
1309   * </p>
1310   */
1311  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_CITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_CITY);
1312
1313 /**
1314   * Search parameter: <b>address-state</b>
1315   * <p>
1316   * Description: <b>A state specified in an address</b><br>
1317   * Type: <b>string</b><br>
1318   * Path: <b>Person.address.state</b><br>
1319   * </p>
1320   */
1321  @SearchParamDefinition(name="address-state", path="Person.address.state", description="A state specified in an address", type="string" )
1322  public static final String SP_ADDRESS_STATE = "address-state";
1323 /**
1324   * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
1325   * <p>
1326   * Description: <b>A state specified in an address</b><br>
1327   * Type: <b>string</b><br>
1328   * Path: <b>Person.address.state</b><br>
1329   * </p>
1330   */
1331  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_STATE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_STATE);
1332
1333 /**
1334   * Search parameter: <b>practitioner</b>
1335   * <p>
1336   * Description: <b>The Person links to this Practitioner</b><br>
1337   * Type: <b>reference</b><br>
1338   * Path: <b>Person.link.target</b><br>
1339   * </p>
1340   */
1341  @SearchParamDefinition(name="practitioner", path="Person.link.target", description="The Person links to this Practitioner", type="reference" )
1342  public static final String SP_PRACTITIONER = "practitioner";
1343 /**
1344   * <b>Fluent Client</b> search parameter constant for <b>practitioner</b>
1345   * <p>
1346   * Description: <b>The Person links to this Practitioner</b><br>
1347   * Type: <b>reference</b><br>
1348   * Path: <b>Person.link.target</b><br>
1349   * </p>
1350   */
1351  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PRACTITIONER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PRACTITIONER);
1352
1353/**
1354   * Constant for fluent queries to be used to add include statements. Specifies
1355   * the path value of "<b>Person:practitioner</b>".
1356   */
1357  public static final ca.uhn.fhir.model.api.Include INCLUDE_PRACTITIONER = new ca.uhn.fhir.model.api.Include("Person:practitioner").toLocked();
1358
1359 /**
1360   * Search parameter: <b>email</b>
1361   * <p>
1362   * Description: <b>A value in an email contact</b><br>
1363   * Type: <b>token</b><br>
1364   * Path: <b>Person.telecom(system=email)</b><br>
1365   * </p>
1366   */
1367  @SearchParamDefinition(name="email", path="Person.telecom.where(system='email')", description="A value in an email contact", type="token" )
1368  public static final String SP_EMAIL = "email";
1369 /**
1370   * <b>Fluent Client</b> search parameter constant for <b>email</b>
1371   * <p>
1372   * Description: <b>A value in an email contact</b><br>
1373   * Type: <b>token</b><br>
1374   * Path: <b>Person.telecom(system=email)</b><br>
1375   * </p>
1376   */
1377  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EMAIL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EMAIL);
1378
1379 /**
1380   * Search parameter: <b>address</b>
1381   * <p>
1382   * Description: <b>An address in any kind of address/part</b><br>
1383   * Type: <b>string</b><br>
1384   * Path: <b>Person.address</b><br>
1385   * </p>
1386   */
1387  @SearchParamDefinition(name="address", path="Person.address", description="An address in any kind of address/part", type="string" )
1388  public static final String SP_ADDRESS = "address";
1389 /**
1390   * <b>Fluent Client</b> search parameter constant for <b>address</b>
1391   * <p>
1392   * Description: <b>An address in any kind of address/part</b><br>
1393   * Type: <b>string</b><br>
1394   * Path: <b>Person.address</b><br>
1395   * </p>
1396   */
1397  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS);
1398
1399 /**
1400   * Search parameter: <b>address-use</b>
1401   * <p>
1402   * Description: <b>A use code specified in an address</b><br>
1403   * Type: <b>token</b><br>
1404   * Path: <b>Person.address.use</b><br>
1405   * </p>
1406   */
1407  @SearchParamDefinition(name="address-use", path="Person.address.use", description="A use code specified in an address", type="token" )
1408  public static final String SP_ADDRESS_USE = "address-use";
1409 /**
1410   * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
1411   * <p>
1412   * Description: <b>A use code specified in an address</b><br>
1413   * Type: <b>token</b><br>
1414   * Path: <b>Person.address.use</b><br>
1415   * </p>
1416   */
1417  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ADDRESS_USE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ADDRESS_USE);
1418
1419 /**
1420   * Search parameter: <b>name</b>
1421   * <p>
1422   * Description: <b>A portion of name in any name part</b><br>
1423   * Type: <b>string</b><br>
1424   * Path: <b>Person.name</b><br>
1425   * </p>
1426   */
1427  @SearchParamDefinition(name="name", path="Person.name", description="A portion of name in any name part", type="string" )
1428  public static final String SP_NAME = "name";
1429 /**
1430   * <b>Fluent Client</b> search parameter constant for <b>name</b>
1431   * <p>
1432   * Description: <b>A portion of name in any name part</b><br>
1433   * Type: <b>string</b><br>
1434   * Path: <b>Person.name</b><br>
1435   * </p>
1436   */
1437  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
1438
1439 /**
1440   * Search parameter: <b>birthdate</b>
1441   * <p>
1442   * Description: <b>The person's date of birth</b><br>
1443   * Type: <b>date</b><br>
1444   * Path: <b>Person.birthDate</b><br>
1445   * </p>
1446   */
1447  @SearchParamDefinition(name="birthdate", path="Person.birthDate", description="The person's date of birth", type="date" )
1448  public static final String SP_BIRTHDATE = "birthdate";
1449 /**
1450   * <b>Fluent Client</b> search parameter constant for <b>birthdate</b>
1451   * <p>
1452   * Description: <b>The person's date of birth</b><br>
1453   * Type: <b>date</b><br>
1454   * Path: <b>Person.birthDate</b><br>
1455   * </p>
1456   */
1457  public static final ca.uhn.fhir.rest.gclient.DateClientParam BIRTHDATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_BIRTHDATE);
1458
1459 /**
1460   * Search parameter: <b>telecom</b>
1461   * <p>
1462   * Description: <b>The value in any kind of contact</b><br>
1463   * Type: <b>token</b><br>
1464   * Path: <b>Person.telecom</b><br>
1465   * </p>
1466   */
1467  @SearchParamDefinition(name="telecom", path="Person.telecom", description="The value in any kind of contact", type="token" )
1468  public static final String SP_TELECOM = "telecom";
1469 /**
1470   * <b>Fluent Client</b> search parameter constant for <b>telecom</b>
1471   * <p>
1472   * Description: <b>The value in any kind of contact</b><br>
1473   * Type: <b>token</b><br>
1474   * Path: <b>Person.telecom</b><br>
1475   * </p>
1476   */
1477  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TELECOM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TELECOM);
1478
1479 /**
1480   * Search parameter: <b>gender</b>
1481   * <p>
1482   * Description: <b>The gender of the person</b><br>
1483   * Type: <b>token</b><br>
1484   * Path: <b>Person.gender</b><br>
1485   * </p>
1486   */
1487  @SearchParamDefinition(name="gender", path="Person.gender", description="The gender of the person", type="token" )
1488  public static final String SP_GENDER = "gender";
1489 /**
1490   * <b>Fluent Client</b> search parameter constant for <b>gender</b>
1491   * <p>
1492   * Description: <b>The gender of the person</b><br>
1493   * Type: <b>token</b><br>
1494   * Path: <b>Person.gender</b><br>
1495   * </p>
1496   */
1497  public static final ca.uhn.fhir.rest.gclient.TokenClientParam GENDER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GENDER);
1498
1499 /**
1500   * Search parameter: <b>identifier</b>
1501   * <p>
1502   * Description: <b>A person Identifier</b><br>
1503   * Type: <b>token</b><br>
1504   * Path: <b>Person.identifier</b><br>
1505   * </p>
1506   */
1507  @SearchParamDefinition(name="identifier", path="Person.identifier", description="A person Identifier", type="token" )
1508  public static final String SP_IDENTIFIER = "identifier";
1509 /**
1510   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1511   * <p>
1512   * Description: <b>A person Identifier</b><br>
1513   * Type: <b>token</b><br>
1514   * Path: <b>Person.identifier</b><br>
1515   * </p>
1516   */
1517  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1518
1519 /**
1520   * Search parameter: <b>address-postalcode</b>
1521   * <p>
1522   * Description: <b>A postal code specified in an address</b><br>
1523   * Type: <b>string</b><br>
1524   * Path: <b>Person.address.postalCode</b><br>
1525   * </p>
1526   */
1527  @SearchParamDefinition(name="address-postalcode", path="Person.address.postalCode", description="A postal code specified in an address", type="string" )
1528  public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
1529 /**
1530   * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
1531   * <p>
1532   * Description: <b>A postal code specified in an address</b><br>
1533   * Type: <b>string</b><br>
1534   * Path: <b>Person.address.postalCode</b><br>
1535   * </p>
1536   */
1537  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_POSTALCODE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_POSTALCODE);
1538
1539
1540}
1541