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