001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
052 */
053@ResourceDef(name="Patient", profile="http://hl7.org/fhir/StructureDefinition/Patient")
054public class Patient extends DomainResource {
055
056    public enum LinkType {
057        /**
058         * The patient resource containing this link must no longer be used. The link points forward to another patient resource that must be used in lieu of the patient resource that contains this link.
059         */
060        REPLACEDBY, 
061        /**
062         * The patient resource containing this link is the current active patient record. The link points back to an inactive patient resource that has been merged into this resource, and should be consulted to retrieve additional referenced information.
063         */
064        REPLACES, 
065        /**
066         * The patient resource containing this link is in use and valid but not considered the main source of information about a patient. The link points forward to another patient resource that should be consulted to retrieve additional patient information.
067         */
068        REFER, 
069        /**
070         * The patient resource containing this link is in use and valid, but points to another Patient or RelatedPerson resource that is known to contain data about the same person. Data in this resource might overlap or contradict information found in the other Patient/RelatedPerson resource. This link does not indicate any relative importance of the resources concerned, and both should be regarded as equally valid.
071         */
072        SEEALSO, 
073        /**
074         * added to help the parsers with the generic types
075         */
076        NULL;
077        public static LinkType fromCode(String codeString) throws FHIRException {
078            if (codeString == null || "".equals(codeString))
079                return null;
080        if ("replaced-by".equals(codeString))
081          return REPLACEDBY;
082        if ("replaces".equals(codeString))
083          return REPLACES;
084        if ("refer".equals(codeString))
085          return REFER;
086        if ("seealso".equals(codeString))
087          return SEEALSO;
088        if (Configuration.isAcceptInvalidEnums())
089          return null;
090        else
091          throw new FHIRException("Unknown LinkType code '"+codeString+"'");
092        }
093        public String toCode() {
094          switch (this) {
095            case REPLACEDBY: return "replaced-by";
096            case REPLACES: return "replaces";
097            case REFER: return "refer";
098            case SEEALSO: return "seealso";
099            case NULL: return null;
100            default: return "?";
101          }
102        }
103        public String getSystem() {
104          switch (this) {
105            case REPLACEDBY: return "http://hl7.org/fhir/link-type";
106            case REPLACES: return "http://hl7.org/fhir/link-type";
107            case REFER: return "http://hl7.org/fhir/link-type";
108            case SEEALSO: return "http://hl7.org/fhir/link-type";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113        public String getDefinition() {
114          switch (this) {
115            case REPLACEDBY: return "The patient resource containing this link must no longer be used. The link points forward to another patient resource that must be used in lieu of the patient resource that contains this link.";
116            case REPLACES: return "The patient resource containing this link is the current active patient record. The link points back to an inactive patient resource that has been merged into this resource, and should be consulted to retrieve additional referenced information.";
117            case REFER: return "The patient resource containing this link is in use and valid but not considered the main source of information about a patient. The link points forward to another patient resource that should be consulted to retrieve additional patient information.";
118            case SEEALSO: return "The patient resource containing this link is in use and valid, but points to another Patient or RelatedPerson resource that is known to contain data about the same person. Data in this resource might overlap or contradict information found in the other Patient/RelatedPerson resource. This link does not indicate any relative importance of the resources concerned, and both should be regarded as equally valid.";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123        public String getDisplay() {
124          switch (this) {
125            case REPLACEDBY: return "Replaced-by";
126            case REPLACES: return "Replaces";
127            case REFER: return "Refer";
128            case SEEALSO: return "See also";
129            case NULL: return null;
130            default: return "?";
131          }
132        }
133    }
134
135  public static class LinkTypeEnumFactory implements EnumFactory<LinkType> {
136    public LinkType fromCode(String codeString) throws IllegalArgumentException {
137      if (codeString == null || "".equals(codeString))
138            if (codeString == null || "".equals(codeString))
139                return null;
140        if ("replaced-by".equals(codeString))
141          return LinkType.REPLACEDBY;
142        if ("replaces".equals(codeString))
143          return LinkType.REPLACES;
144        if ("refer".equals(codeString))
145          return LinkType.REFER;
146        if ("seealso".equals(codeString))
147          return LinkType.SEEALSO;
148        throw new IllegalArgumentException("Unknown LinkType code '"+codeString+"'");
149        }
150        public Enumeration<LinkType> fromType(PrimitiveType<?> code) throws FHIRException {
151          if (code == null)
152            return null;
153          if (code.isEmpty())
154            return new Enumeration<LinkType>(this, LinkType.NULL, code);
155          String codeString = ((PrimitiveType) code).asStringValue();
156          if (codeString == null || "".equals(codeString))
157            return new Enumeration<LinkType>(this, LinkType.NULL, code);
158        if ("replaced-by".equals(codeString))
159          return new Enumeration<LinkType>(this, LinkType.REPLACEDBY, code);
160        if ("replaces".equals(codeString))
161          return new Enumeration<LinkType>(this, LinkType.REPLACES, code);
162        if ("refer".equals(codeString))
163          return new Enumeration<LinkType>(this, LinkType.REFER, code);
164        if ("seealso".equals(codeString))
165          return new Enumeration<LinkType>(this, LinkType.SEEALSO, code);
166        throw new FHIRException("Unknown LinkType code '"+codeString+"'");
167        }
168    public String toCode(LinkType code) {
169      if (code == LinkType.REPLACEDBY)
170        return "replaced-by";
171      if (code == LinkType.REPLACES)
172        return "replaces";
173      if (code == LinkType.REFER)
174        return "refer";
175      if (code == LinkType.SEEALSO)
176        return "seealso";
177      return "?";
178      }
179    public String toSystem(LinkType code) {
180      return code.getSystem();
181      }
182    }
183
184    @Block()
185    public static class ContactComponent extends BackboneElement implements IBaseBackboneElement {
186        /**
187         * The nature of the relationship between the patient and the contact person.
188         */
189        @Child(name = "relationship", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
190        @Description(shortDefinition="The kind of relationship", formalDefinition="The nature of the relationship between the patient and the contact person." )
191        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/patient-contactrelationship")
192        protected List<CodeableConcept> relationship;
193
194        /**
195         * A name associated with the contact person.
196         */
197        @Child(name = "name", type = {HumanName.class}, order=2, min=0, max=1, modifier=false, summary=false)
198        @Description(shortDefinition="A name associated with the contact person", formalDefinition="A name associated with the contact person." )
199        protected HumanName name;
200
201        /**
202         * A contact detail for the person, e.g. a telephone number or an email address.
203         */
204        @Child(name = "telecom", type = {ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
205        @Description(shortDefinition="A contact detail for the person", formalDefinition="A contact detail for the person, e.g. a telephone number or an email address." )
206        protected List<ContactPoint> telecom;
207
208        /**
209         * Address for the contact person.
210         */
211        @Child(name = "address", type = {Address.class}, order=4, min=0, max=1, modifier=false, summary=false)
212        @Description(shortDefinition="Address for the contact person", formalDefinition="Address for the contact person." )
213        protected Address address;
214
215        /**
216         * Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.
217         */
218        @Child(name = "gender", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
219        @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes." )
220        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/administrative-gender")
221        protected Enumeration<AdministrativeGender> gender;
222
223        /**
224         * Organization on behalf of which the contact is acting or for which the contact is working.
225         */
226        @Child(name = "organization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=false)
227        @Description(shortDefinition="Organization that is associated with the contact", formalDefinition="Organization on behalf of which the contact is acting or for which the contact is working." )
228        protected Reference organization;
229
230        /**
231         * The period during which this contact person or organization is valid to be contacted relating to this patient.
232         */
233        @Child(name = "period", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=false)
234        @Description(shortDefinition="The period during which this contact person or organization is valid to be contacted relating to this patient", formalDefinition="The period during which this contact person or organization is valid to be contacted relating to this patient." )
235        protected Period period;
236
237        private static final long serialVersionUID = 117984384L;
238
239    /**
240     * Constructor
241     */
242      public ContactComponent() {
243        super();
244      }
245
246        /**
247         * @return {@link #relationship} (The nature of the relationship between the patient and the contact person.)
248         */
249        public List<CodeableConcept> getRelationship() { 
250          if (this.relationship == null)
251            this.relationship = new ArrayList<CodeableConcept>();
252          return this.relationship;
253        }
254
255        /**
256         * @return Returns a reference to <code>this</code> for easy method chaining
257         */
258        public ContactComponent setRelationship(List<CodeableConcept> theRelationship) { 
259          this.relationship = theRelationship;
260          return this;
261        }
262
263        public boolean hasRelationship() { 
264          if (this.relationship == null)
265            return false;
266          for (CodeableConcept item : this.relationship)
267            if (!item.isEmpty())
268              return true;
269          return false;
270        }
271
272        public CodeableConcept addRelationship() { //3
273          CodeableConcept t = new CodeableConcept();
274          if (this.relationship == null)
275            this.relationship = new ArrayList<CodeableConcept>();
276          this.relationship.add(t);
277          return t;
278        }
279
280        public ContactComponent addRelationship(CodeableConcept t) { //3
281          if (t == null)
282            return this;
283          if (this.relationship == null)
284            this.relationship = new ArrayList<CodeableConcept>();
285          this.relationship.add(t);
286          return this;
287        }
288
289        /**
290         * @return The first repetition of repeating field {@link #relationship}, creating it if it does not already exist {3}
291         */
292        public CodeableConcept getRelationshipFirstRep() { 
293          if (getRelationship().isEmpty()) {
294            addRelationship();
295          }
296          return getRelationship().get(0);
297        }
298
299        /**
300         * @return {@link #name} (A name associated with the contact person.)
301         */
302        public HumanName getName() { 
303          if (this.name == null)
304            if (Configuration.errorOnAutoCreate())
305              throw new Error("Attempt to auto-create ContactComponent.name");
306            else if (Configuration.doAutoCreate())
307              this.name = new HumanName(); // cc
308          return this.name;
309        }
310
311        public boolean hasName() { 
312          return this.name != null && !this.name.isEmpty();
313        }
314
315        /**
316         * @param value {@link #name} (A name associated with the contact person.)
317         */
318        public ContactComponent setName(HumanName value) { 
319          this.name = value;
320          return this;
321        }
322
323        /**
324         * @return {@link #telecom} (A contact detail for the person, e.g. a telephone number or an email address.)
325         */
326        public List<ContactPoint> getTelecom() { 
327          if (this.telecom == null)
328            this.telecom = new ArrayList<ContactPoint>();
329          return this.telecom;
330        }
331
332        /**
333         * @return Returns a reference to <code>this</code> for easy method chaining
334         */
335        public ContactComponent setTelecom(List<ContactPoint> theTelecom) { 
336          this.telecom = theTelecom;
337          return this;
338        }
339
340        public boolean hasTelecom() { 
341          if (this.telecom == null)
342            return false;
343          for (ContactPoint item : this.telecom)
344            if (!item.isEmpty())
345              return true;
346          return false;
347        }
348
349        public ContactPoint addTelecom() { //3
350          ContactPoint t = new ContactPoint();
351          if (this.telecom == null)
352            this.telecom = new ArrayList<ContactPoint>();
353          this.telecom.add(t);
354          return t;
355        }
356
357        public ContactComponent addTelecom(ContactPoint t) { //3
358          if (t == null)
359            return this;
360          if (this.telecom == null)
361            this.telecom = new ArrayList<ContactPoint>();
362          this.telecom.add(t);
363          return this;
364        }
365
366        /**
367         * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist {3}
368         */
369        public ContactPoint getTelecomFirstRep() { 
370          if (getTelecom().isEmpty()) {
371            addTelecom();
372          }
373          return getTelecom().get(0);
374        }
375
376        /**
377         * @return {@link #address} (Address for the contact person.)
378         */
379        public Address getAddress() { 
380          if (this.address == null)
381            if (Configuration.errorOnAutoCreate())
382              throw new Error("Attempt to auto-create ContactComponent.address");
383            else if (Configuration.doAutoCreate())
384              this.address = new Address(); // cc
385          return this.address;
386        }
387
388        public boolean hasAddress() { 
389          return this.address != null && !this.address.isEmpty();
390        }
391
392        /**
393         * @param value {@link #address} (Address for the contact person.)
394         */
395        public ContactComponent setAddress(Address value) { 
396          this.address = value;
397          return this;
398        }
399
400        /**
401         * @return {@link #gender} (Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value
402         */
403        public Enumeration<AdministrativeGender> getGenderElement() { 
404          if (this.gender == null)
405            if (Configuration.errorOnAutoCreate())
406              throw new Error("Attempt to auto-create ContactComponent.gender");
407            else if (Configuration.doAutoCreate())
408              this.gender = new Enumeration<AdministrativeGender>(new AdministrativeGenderEnumFactory()); // bb
409          return this.gender;
410        }
411
412        public boolean hasGenderElement() { 
413          return this.gender != null && !this.gender.isEmpty();
414        }
415
416        public boolean hasGender() { 
417          return this.gender != null && !this.gender.isEmpty();
418        }
419
420        /**
421         * @param value {@link #gender} (Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value
422         */
423        public ContactComponent setGenderElement(Enumeration<AdministrativeGender> value) { 
424          this.gender = value;
425          return this;
426        }
427
428        /**
429         * @return Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.
430         */
431        public AdministrativeGender getGender() { 
432          return this.gender == null ? null : this.gender.getValue();
433        }
434
435        /**
436         * @param value Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.
437         */
438        public ContactComponent setGender(AdministrativeGender value) { 
439          if (value == null)
440            this.gender = null;
441          else {
442            if (this.gender == null)
443              this.gender = new Enumeration<AdministrativeGender>(new AdministrativeGenderEnumFactory());
444            this.gender.setValue(value);
445          }
446          return this;
447        }
448
449        /**
450         * @return {@link #organization} (Organization on behalf of which the contact is acting or for which the contact is working.)
451         */
452        public Reference getOrganization() { 
453          if (this.organization == null)
454            if (Configuration.errorOnAutoCreate())
455              throw new Error("Attempt to auto-create ContactComponent.organization");
456            else if (Configuration.doAutoCreate())
457              this.organization = new Reference(); // cc
458          return this.organization;
459        }
460
461        public boolean hasOrganization() { 
462          return this.organization != null && !this.organization.isEmpty();
463        }
464
465        /**
466         * @param value {@link #organization} (Organization on behalf of which the contact is acting or for which the contact is working.)
467         */
468        public ContactComponent setOrganization(Reference value) { 
469          this.organization = value;
470          return this;
471        }
472
473        /**
474         * @return {@link #period} (The period during which this contact person or organization is valid to be contacted relating to this patient.)
475         */
476        public Period getPeriod() { 
477          if (this.period == null)
478            if (Configuration.errorOnAutoCreate())
479              throw new Error("Attempt to auto-create ContactComponent.period");
480            else if (Configuration.doAutoCreate())
481              this.period = new Period(); // cc
482          return this.period;
483        }
484
485        public boolean hasPeriod() { 
486          return this.period != null && !this.period.isEmpty();
487        }
488
489        /**
490         * @param value {@link #period} (The period during which this contact person or organization is valid to be contacted relating to this patient.)
491         */
492        public ContactComponent setPeriod(Period value) { 
493          this.period = value;
494          return this;
495        }
496
497        protected void listChildren(List<Property> children) {
498          super.listChildren(children);
499          children.add(new Property("relationship", "CodeableConcept", "The nature of the relationship between the patient and the contact person.", 0, java.lang.Integer.MAX_VALUE, relationship));
500          children.add(new Property("name", "HumanName", "A name associated with the contact person.", 0, 1, name));
501          children.add(new Property("telecom", "ContactPoint", "A contact detail for the person, e.g. a telephone number or an email address.", 0, java.lang.Integer.MAX_VALUE, telecom));
502          children.add(new Property("address", "Address", "Address for the contact person.", 0, 1, address));
503          children.add(new Property("gender", "code", "Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.", 0, 1, gender));
504          children.add(new Property("organization", "Reference(Organization)", "Organization on behalf of which the contact is acting or for which the contact is working.", 0, 1, organization));
505          children.add(new Property("period", "Period", "The period during which this contact person or organization is valid to be contacted relating to this patient.", 0, 1, period));
506        }
507
508        @Override
509        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
510          switch (_hash) {
511          case -261851592: /*relationship*/  return new Property("relationship", "CodeableConcept", "The nature of the relationship between the patient and the contact person.", 0, java.lang.Integer.MAX_VALUE, relationship);
512          case 3373707: /*name*/  return new Property("name", "HumanName", "A name associated with the contact person.", 0, 1, name);
513          case -1429363305: /*telecom*/  return new Property("telecom", "ContactPoint", "A contact detail for the person, e.g. a telephone number or an email address.", 0, java.lang.Integer.MAX_VALUE, telecom);
514          case -1147692044: /*address*/  return new Property("address", "Address", "Address for the contact person.", 0, 1, address);
515          case -1249512767: /*gender*/  return new Property("gender", "code", "Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.", 0, 1, gender);
516          case 1178922291: /*organization*/  return new Property("organization", "Reference(Organization)", "Organization on behalf of which the contact is acting or for which the contact is working.", 0, 1, organization);
517          case -991726143: /*period*/  return new Property("period", "Period", "The period during which this contact person or organization is valid to be contacted relating to this patient.", 0, 1, period);
518          default: return super.getNamedProperty(_hash, _name, _checkValid);
519          }
520
521        }
522
523      @Override
524      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
525        switch (hash) {
526        case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : this.relationship.toArray(new Base[this.relationship.size()]); // CodeableConcept
527        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // HumanName
528        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
529        case -1147692044: /*address*/ return this.address == null ? new Base[0] : new Base[] {this.address}; // Address
530        case -1249512767: /*gender*/ return this.gender == null ? new Base[0] : new Base[] {this.gender}; // Enumeration<AdministrativeGender>
531        case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference
532        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
533        default: return super.getProperty(hash, name, checkValid);
534        }
535
536      }
537
538      @Override
539      public Base setProperty(int hash, String name, Base value) throws FHIRException {
540        switch (hash) {
541        case -261851592: // relationship
542          this.getRelationship().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
543          return value;
544        case 3373707: // name
545          this.name = TypeConvertor.castToHumanName(value); // HumanName
546          return value;
547        case -1429363305: // telecom
548          this.getTelecom().add(TypeConvertor.castToContactPoint(value)); // ContactPoint
549          return value;
550        case -1147692044: // address
551          this.address = TypeConvertor.castToAddress(value); // Address
552          return value;
553        case -1249512767: // gender
554          value = new AdministrativeGenderEnumFactory().fromType(TypeConvertor.castToCode(value));
555          this.gender = (Enumeration) value; // Enumeration<AdministrativeGender>
556          return value;
557        case 1178922291: // organization
558          this.organization = TypeConvertor.castToReference(value); // Reference
559          return value;
560        case -991726143: // period
561          this.period = TypeConvertor.castToPeriod(value); // Period
562          return value;
563        default: return super.setProperty(hash, name, value);
564        }
565
566      }
567
568      @Override
569      public Base setProperty(String name, Base value) throws FHIRException {
570        if (name.equals("relationship")) {
571          this.getRelationship().add(TypeConvertor.castToCodeableConcept(value));
572        } else if (name.equals("name")) {
573          this.name = TypeConvertor.castToHumanName(value); // HumanName
574        } else if (name.equals("telecom")) {
575          this.getTelecom().add(TypeConvertor.castToContactPoint(value));
576        } else if (name.equals("address")) {
577          this.address = TypeConvertor.castToAddress(value); // Address
578        } else if (name.equals("gender")) {
579          value = new AdministrativeGenderEnumFactory().fromType(TypeConvertor.castToCode(value));
580          this.gender = (Enumeration) value; // Enumeration<AdministrativeGender>
581        } else if (name.equals("organization")) {
582          this.organization = TypeConvertor.castToReference(value); // Reference
583        } else if (name.equals("period")) {
584          this.period = TypeConvertor.castToPeriod(value); // Period
585        } else
586          return super.setProperty(name, value);
587        return value;
588      }
589
590  @Override
591  public void removeChild(String name, Base value) throws FHIRException {
592        if (name.equals("relationship")) {
593          this.getRelationship().remove(value);
594        } else if (name.equals("name")) {
595          this.name = null;
596        } else if (name.equals("telecom")) {
597          this.getTelecom().remove(value);
598        } else if (name.equals("address")) {
599          this.address = null;
600        } else if (name.equals("gender")) {
601          value = new AdministrativeGenderEnumFactory().fromType(TypeConvertor.castToCode(value));
602          this.gender = (Enumeration) value; // Enumeration<AdministrativeGender>
603        } else if (name.equals("organization")) {
604          this.organization = null;
605        } else if (name.equals("period")) {
606          this.period = null;
607        } else
608          super.removeChild(name, value);
609        
610      }
611
612      @Override
613      public Base makeProperty(int hash, String name) throws FHIRException {
614        switch (hash) {
615        case -261851592:  return addRelationship(); 
616        case 3373707:  return getName();
617        case -1429363305:  return addTelecom(); 
618        case -1147692044:  return getAddress();
619        case -1249512767:  return getGenderElement();
620        case 1178922291:  return getOrganization();
621        case -991726143:  return getPeriod();
622        default: return super.makeProperty(hash, name);
623        }
624
625      }
626
627      @Override
628      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
629        switch (hash) {
630        case -261851592: /*relationship*/ return new String[] {"CodeableConcept"};
631        case 3373707: /*name*/ return new String[] {"HumanName"};
632        case -1429363305: /*telecom*/ return new String[] {"ContactPoint"};
633        case -1147692044: /*address*/ return new String[] {"Address"};
634        case -1249512767: /*gender*/ return new String[] {"code"};
635        case 1178922291: /*organization*/ return new String[] {"Reference"};
636        case -991726143: /*period*/ return new String[] {"Period"};
637        default: return super.getTypesForProperty(hash, name);
638        }
639
640      }
641
642      @Override
643      public Base addChild(String name) throws FHIRException {
644        if (name.equals("relationship")) {
645          return addRelationship();
646        }
647        else if (name.equals("name")) {
648          this.name = new HumanName();
649          return this.name;
650        }
651        else if (name.equals("telecom")) {
652          return addTelecom();
653        }
654        else if (name.equals("address")) {
655          this.address = new Address();
656          return this.address;
657        }
658        else if (name.equals("gender")) {
659          throw new FHIRException("Cannot call addChild on a singleton property Patient.contact.gender");
660        }
661        else if (name.equals("organization")) {
662          this.organization = new Reference();
663          return this.organization;
664        }
665        else if (name.equals("period")) {
666          this.period = new Period();
667          return this.period;
668        }
669        else
670          return super.addChild(name);
671      }
672
673      public ContactComponent copy() {
674        ContactComponent dst = new ContactComponent();
675        copyValues(dst);
676        return dst;
677      }
678
679      public void copyValues(ContactComponent dst) {
680        super.copyValues(dst);
681        if (relationship != null) {
682          dst.relationship = new ArrayList<CodeableConcept>();
683          for (CodeableConcept i : relationship)
684            dst.relationship.add(i.copy());
685        };
686        dst.name = name == null ? null : name.copy();
687        if (telecom != null) {
688          dst.telecom = new ArrayList<ContactPoint>();
689          for (ContactPoint i : telecom)
690            dst.telecom.add(i.copy());
691        };
692        dst.address = address == null ? null : address.copy();
693        dst.gender = gender == null ? null : gender.copy();
694        dst.organization = organization == null ? null : organization.copy();
695        dst.period = period == null ? null : period.copy();
696      }
697
698      @Override
699      public boolean equalsDeep(Base other_) {
700        if (!super.equalsDeep(other_))
701          return false;
702        if (!(other_ instanceof ContactComponent))
703          return false;
704        ContactComponent o = (ContactComponent) other_;
705        return compareDeep(relationship, o.relationship, true) && compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true)
706           && compareDeep(address, o.address, true) && compareDeep(gender, o.gender, true) && compareDeep(organization, o.organization, true)
707           && compareDeep(period, o.period, true);
708      }
709
710      @Override
711      public boolean equalsShallow(Base other_) {
712        if (!super.equalsShallow(other_))
713          return false;
714        if (!(other_ instanceof ContactComponent))
715          return false;
716        ContactComponent o = (ContactComponent) other_;
717        return compareValues(gender, o.gender, true);
718      }
719
720      public boolean isEmpty() {
721        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(relationship, name, telecom
722          , address, gender, organization, period);
723      }
724
725  public String fhirType() {
726    return "Patient.contact";
727
728  }
729
730  }
731
732    @Block()
733    public static class PatientCommunicationComponent extends BackboneElement implements IBaseBackboneElement {
734        /**
735         * The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-AU" for Australian English.
736         */
737        @Child(name = "language", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
738        @Description(shortDefinition="The language which can be used to communicate with the patient about his or her health", formalDefinition="The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-AU\" for Australian English." )
739        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/all-languages")
740        protected CodeableConcept language;
741
742        /**
743         * Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).
744         */
745        @Child(name = "preferred", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false)
746        @Description(shortDefinition="Language preference indicator", formalDefinition="Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)." )
747        protected BooleanType preferred;
748
749        private static final long serialVersionUID = 633792918L;
750
751    /**
752     * Constructor
753     */
754      public PatientCommunicationComponent() {
755        super();
756      }
757
758    /**
759     * Constructor
760     */
761      public PatientCommunicationComponent(CodeableConcept language) {
762        super();
763        this.setLanguage(language);
764      }
765
766        /**
767         * @return {@link #language} (The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-AU" for Australian English.)
768         */
769        public CodeableConcept getLanguage() { 
770          if (this.language == null)
771            if (Configuration.errorOnAutoCreate())
772              throw new Error("Attempt to auto-create PatientCommunicationComponent.language");
773            else if (Configuration.doAutoCreate())
774              this.language = new CodeableConcept(); // cc
775          return this.language;
776        }
777
778        public boolean hasLanguage() { 
779          return this.language != null && !this.language.isEmpty();
780        }
781
782        /**
783         * @param value {@link #language} (The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-AU" for Australian English.)
784         */
785        public PatientCommunicationComponent setLanguage(CodeableConcept value) { 
786          this.language = value;
787          return this;
788        }
789
790        /**
791         * @return {@link #preferred} (Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).). This is the underlying object with id, value and extensions. The accessor "getPreferred" gives direct access to the value
792         */
793        public BooleanType getPreferredElement() { 
794          if (this.preferred == null)
795            if (Configuration.errorOnAutoCreate())
796              throw new Error("Attempt to auto-create PatientCommunicationComponent.preferred");
797            else if (Configuration.doAutoCreate())
798              this.preferred = new BooleanType(); // bb
799          return this.preferred;
800        }
801
802        public boolean hasPreferredElement() { 
803          return this.preferred != null && !this.preferred.isEmpty();
804        }
805
806        public boolean hasPreferred() { 
807          return this.preferred != null && !this.preferred.isEmpty();
808        }
809
810        /**
811         * @param value {@link #preferred} (Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).). This is the underlying object with id, value and extensions. The accessor "getPreferred" gives direct access to the value
812         */
813        public PatientCommunicationComponent setPreferredElement(BooleanType value) { 
814          this.preferred = value;
815          return this;
816        }
817
818        /**
819         * @return Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).
820         */
821        public boolean getPreferred() { 
822          return this.preferred == null || this.preferred.isEmpty() ? false : this.preferred.getValue();
823        }
824
825        /**
826         * @param value Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).
827         */
828        public PatientCommunicationComponent setPreferred(boolean value) { 
829            if (this.preferred == null)
830              this.preferred = new BooleanType();
831            this.preferred.setValue(value);
832          return this;
833        }
834
835        protected void listChildren(List<Property> children) {
836          super.listChildren(children);
837          children.add(new Property("language", "CodeableConcept", "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-AU\" for Australian English.", 0, 1, language));
838          children.add(new Property("preferred", "boolean", "Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).", 0, 1, preferred));
839        }
840
841        @Override
842        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
843          switch (_hash) {
844          case -1613589672: /*language*/  return new Property("language", "CodeableConcept", "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-AU\" for Australian English.", 0, 1, language);
845          case -1294005119: /*preferred*/  return new Property("preferred", "boolean", "Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).", 0, 1, preferred);
846          default: return super.getNamedProperty(_hash, _name, _checkValid);
847          }
848
849        }
850
851      @Override
852      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
853        switch (hash) {
854        case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeableConcept
855        case -1294005119: /*preferred*/ return this.preferred == null ? new Base[0] : new Base[] {this.preferred}; // BooleanType
856        default: return super.getProperty(hash, name, checkValid);
857        }
858
859      }
860
861      @Override
862      public Base setProperty(int hash, String name, Base value) throws FHIRException {
863        switch (hash) {
864        case -1613589672: // language
865          this.language = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
866          return value;
867        case -1294005119: // preferred
868          this.preferred = TypeConvertor.castToBoolean(value); // BooleanType
869          return value;
870        default: return super.setProperty(hash, name, value);
871        }
872
873      }
874
875      @Override
876      public Base setProperty(String name, Base value) throws FHIRException {
877        if (name.equals("language")) {
878          this.language = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
879        } else if (name.equals("preferred")) {
880          this.preferred = TypeConvertor.castToBoolean(value); // BooleanType
881        } else
882          return super.setProperty(name, value);
883        return value;
884      }
885
886  @Override
887  public void removeChild(String name, Base value) throws FHIRException {
888        if (name.equals("language")) {
889          this.language = null;
890        } else if (name.equals("preferred")) {
891          this.preferred = null;
892        } else
893          super.removeChild(name, value);
894        
895      }
896
897      @Override
898      public Base makeProperty(int hash, String name) throws FHIRException {
899        switch (hash) {
900        case -1613589672:  return getLanguage();
901        case -1294005119:  return getPreferredElement();
902        default: return super.makeProperty(hash, name);
903        }
904
905      }
906
907      @Override
908      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
909        switch (hash) {
910        case -1613589672: /*language*/ return new String[] {"CodeableConcept"};
911        case -1294005119: /*preferred*/ return new String[] {"boolean"};
912        default: return super.getTypesForProperty(hash, name);
913        }
914
915      }
916
917      @Override
918      public Base addChild(String name) throws FHIRException {
919        if (name.equals("language")) {
920          this.language = new CodeableConcept();
921          return this.language;
922        }
923        else if (name.equals("preferred")) {
924          throw new FHIRException("Cannot call addChild on a singleton property Patient.communication.preferred");
925        }
926        else
927          return super.addChild(name);
928      }
929
930      public PatientCommunicationComponent copy() {
931        PatientCommunicationComponent dst = new PatientCommunicationComponent();
932        copyValues(dst);
933        return dst;
934      }
935
936      public void copyValues(PatientCommunicationComponent dst) {
937        super.copyValues(dst);
938        dst.language = language == null ? null : language.copy();
939        dst.preferred = preferred == null ? null : preferred.copy();
940      }
941
942      @Override
943      public boolean equalsDeep(Base other_) {
944        if (!super.equalsDeep(other_))
945          return false;
946        if (!(other_ instanceof PatientCommunicationComponent))
947          return false;
948        PatientCommunicationComponent o = (PatientCommunicationComponent) other_;
949        return compareDeep(language, o.language, true) && compareDeep(preferred, o.preferred, true);
950      }
951
952      @Override
953      public boolean equalsShallow(Base other_) {
954        if (!super.equalsShallow(other_))
955          return false;
956        if (!(other_ instanceof PatientCommunicationComponent))
957          return false;
958        PatientCommunicationComponent o = (PatientCommunicationComponent) other_;
959        return compareValues(preferred, o.preferred, true);
960      }
961
962      public boolean isEmpty() {
963        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(language, preferred);
964      }
965
966  public String fhirType() {
967    return "Patient.communication";
968
969  }
970
971  }
972
973    @Block()
974    public static class PatientLinkComponent extends BackboneElement implements IBaseBackboneElement {
975        /**
976         * Link to a Patient or RelatedPerson resource that concerns the same actual individual.
977         */
978        @Child(name = "other", type = {Patient.class, RelatedPerson.class}, order=1, min=1, max=1, modifier=false, summary=true)
979        @Description(shortDefinition="The other patient or related person resource that the link refers to", formalDefinition="Link to a Patient or RelatedPerson resource that concerns the same actual individual." )
980        protected Reference other;
981
982        /**
983         * The type of link between this patient resource and another patient resource.
984         */
985        @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true)
986        @Description(shortDefinition="replaced-by | replaces | refer | seealso", formalDefinition="The type of link between this patient resource and another patient resource." )
987        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/link-type")
988        protected Enumeration<LinkType> type;
989
990        private static final long serialVersionUID = 182421394L;
991
992    /**
993     * Constructor
994     */
995      public PatientLinkComponent() {
996        super();
997      }
998
999    /**
1000     * Constructor
1001     */
1002      public PatientLinkComponent(Reference other, LinkType type) {
1003        super();
1004        this.setOther(other);
1005        this.setType(type);
1006      }
1007
1008        /**
1009         * @return {@link #other} (Link to a Patient or RelatedPerson resource that concerns the same actual individual.)
1010         */
1011        public Reference getOther() { 
1012          if (this.other == null)
1013            if (Configuration.errorOnAutoCreate())
1014              throw new Error("Attempt to auto-create PatientLinkComponent.other");
1015            else if (Configuration.doAutoCreate())
1016              this.other = new Reference(); // cc
1017          return this.other;
1018        }
1019
1020        public boolean hasOther() { 
1021          return this.other != null && !this.other.isEmpty();
1022        }
1023
1024        /**
1025         * @param value {@link #other} (Link to a Patient or RelatedPerson resource that concerns the same actual individual.)
1026         */
1027        public PatientLinkComponent setOther(Reference value) { 
1028          this.other = value;
1029          return this;
1030        }
1031
1032        /**
1033         * @return {@link #type} (The type of link between this patient resource and another patient resource.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1034         */
1035        public Enumeration<LinkType> getTypeElement() { 
1036          if (this.type == null)
1037            if (Configuration.errorOnAutoCreate())
1038              throw new Error("Attempt to auto-create PatientLinkComponent.type");
1039            else if (Configuration.doAutoCreate())
1040              this.type = new Enumeration<LinkType>(new LinkTypeEnumFactory()); // bb
1041          return this.type;
1042        }
1043
1044        public boolean hasTypeElement() { 
1045          return this.type != null && !this.type.isEmpty();
1046        }
1047
1048        public boolean hasType() { 
1049          return this.type != null && !this.type.isEmpty();
1050        }
1051
1052        /**
1053         * @param value {@link #type} (The type of link between this patient resource and another patient resource.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1054         */
1055        public PatientLinkComponent setTypeElement(Enumeration<LinkType> value) { 
1056          this.type = value;
1057          return this;
1058        }
1059
1060        /**
1061         * @return The type of link between this patient resource and another patient resource.
1062         */
1063        public LinkType getType() { 
1064          return this.type == null ? null : this.type.getValue();
1065        }
1066
1067        /**
1068         * @param value The type of link between this patient resource and another patient resource.
1069         */
1070        public PatientLinkComponent setType(LinkType value) { 
1071            if (this.type == null)
1072              this.type = new Enumeration<LinkType>(new LinkTypeEnumFactory());
1073            this.type.setValue(value);
1074          return this;
1075        }
1076
1077        protected void listChildren(List<Property> children) {
1078          super.listChildren(children);
1079          children.add(new Property("other", "Reference(Patient|RelatedPerson)", "Link to a Patient or RelatedPerson resource that concerns the same actual individual.", 0, 1, other));
1080          children.add(new Property("type", "code", "The type of link between this patient resource and another patient resource.", 0, 1, type));
1081        }
1082
1083        @Override
1084        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1085          switch (_hash) {
1086          case 106069776: /*other*/  return new Property("other", "Reference(Patient|RelatedPerson)", "Link to a Patient or RelatedPerson resource that concerns the same actual individual.", 0, 1, other);
1087          case 3575610: /*type*/  return new Property("type", "code", "The type of link between this patient resource and another patient resource.", 0, 1, type);
1088          default: return super.getNamedProperty(_hash, _name, _checkValid);
1089          }
1090
1091        }
1092
1093      @Override
1094      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1095        switch (hash) {
1096        case 106069776: /*other*/ return this.other == null ? new Base[0] : new Base[] {this.other}; // Reference
1097        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<LinkType>
1098        default: return super.getProperty(hash, name, checkValid);
1099        }
1100
1101      }
1102
1103      @Override
1104      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1105        switch (hash) {
1106        case 106069776: // other
1107          this.other = TypeConvertor.castToReference(value); // Reference
1108          return value;
1109        case 3575610: // type
1110          value = new LinkTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1111          this.type = (Enumeration) value; // Enumeration<LinkType>
1112          return value;
1113        default: return super.setProperty(hash, name, value);
1114        }
1115
1116      }
1117
1118      @Override
1119      public Base setProperty(String name, Base value) throws FHIRException {
1120        if (name.equals("other")) {
1121          this.other = TypeConvertor.castToReference(value); // Reference
1122        } else if (name.equals("type")) {
1123          value = new LinkTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1124          this.type = (Enumeration) value; // Enumeration<LinkType>
1125        } else
1126          return super.setProperty(name, value);
1127        return value;
1128      }
1129
1130  @Override
1131  public void removeChild(String name, Base value) throws FHIRException {
1132        if (name.equals("other")) {
1133          this.other = null;
1134        } else if (name.equals("type")) {
1135          value = new LinkTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1136          this.type = (Enumeration) value; // Enumeration<LinkType>
1137        } else
1138          super.removeChild(name, value);
1139        
1140      }
1141
1142      @Override
1143      public Base makeProperty(int hash, String name) throws FHIRException {
1144        switch (hash) {
1145        case 106069776:  return getOther();
1146        case 3575610:  return getTypeElement();
1147        default: return super.makeProperty(hash, name);
1148        }
1149
1150      }
1151
1152      @Override
1153      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1154        switch (hash) {
1155        case 106069776: /*other*/ return new String[] {"Reference"};
1156        case 3575610: /*type*/ return new String[] {"code"};
1157        default: return super.getTypesForProperty(hash, name);
1158        }
1159
1160      }
1161
1162      @Override
1163      public Base addChild(String name) throws FHIRException {
1164        if (name.equals("other")) {
1165          this.other = new Reference();
1166          return this.other;
1167        }
1168        else if (name.equals("type")) {
1169          throw new FHIRException("Cannot call addChild on a singleton property Patient.link.type");
1170        }
1171        else
1172          return super.addChild(name);
1173      }
1174
1175      public PatientLinkComponent copy() {
1176        PatientLinkComponent dst = new PatientLinkComponent();
1177        copyValues(dst);
1178        return dst;
1179      }
1180
1181      public void copyValues(PatientLinkComponent dst) {
1182        super.copyValues(dst);
1183        dst.other = other == null ? null : other.copy();
1184        dst.type = type == null ? null : type.copy();
1185      }
1186
1187      @Override
1188      public boolean equalsDeep(Base other_) {
1189        if (!super.equalsDeep(other_))
1190          return false;
1191        if (!(other_ instanceof PatientLinkComponent))
1192          return false;
1193        PatientLinkComponent o = (PatientLinkComponent) other_;
1194        return compareDeep(other, o.other, true) && compareDeep(type, o.type, true);
1195      }
1196
1197      @Override
1198      public boolean equalsShallow(Base other_) {
1199        if (!super.equalsShallow(other_))
1200          return false;
1201        if (!(other_ instanceof PatientLinkComponent))
1202          return false;
1203        PatientLinkComponent o = (PatientLinkComponent) other_;
1204        return compareValues(type, o.type, true);
1205      }
1206
1207      public boolean isEmpty() {
1208        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(other, type);
1209      }
1210
1211  public String fhirType() {
1212    return "Patient.link";
1213
1214  }
1215
1216  }
1217
1218    /**
1219     * An identifier for this patient.
1220     */
1221    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1222    @Description(shortDefinition="An identifier for this patient", formalDefinition="An identifier for this patient." )
1223    protected List<Identifier> identifier;
1224
1225    /**
1226     * Whether this patient record is in active use. 
1227Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.
1228
1229It is often used to filter patient lists to exclude inactive patients
1230
1231Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.
1232     */
1233    @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=true, summary=true)
1234    @Description(shortDefinition="Whether this patient's record is in active use", formalDefinition="Whether this patient record is in active use. \nMany systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.\n\nIt is often used to filter patient lists to exclude inactive patients\n\nDeceased patients may also be marked as inactive for the same reasons, but may be active for some time after death." )
1235    protected BooleanType active;
1236
1237    /**
1238     * A name associated with the individual.
1239     */
1240    @Child(name = "name", type = {HumanName.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1241    @Description(shortDefinition="A name associated with the patient", formalDefinition="A name associated with the individual." )
1242    protected List<HumanName> name;
1243
1244    /**
1245     * A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
1246     */
1247    @Child(name = "telecom", type = {ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1248    @Description(shortDefinition="A contact detail for the individual", formalDefinition="A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted." )
1249    protected List<ContactPoint> telecom;
1250
1251    /**
1252     * Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
1253     */
1254    @Child(name = "gender", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=true)
1255    @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes." )
1256    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/administrative-gender")
1257    protected Enumeration<AdministrativeGender> gender;
1258
1259    /**
1260     * The date of birth for the individual.
1261     */
1262    @Child(name = "birthDate", type = {DateType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1263    @Description(shortDefinition="The date of birth for the individual", formalDefinition="The date of birth for the individual." )
1264    protected DateType birthDate;
1265
1266    /**
1267     * Indicates if the individual is deceased or not.
1268     */
1269    @Child(name = "deceased", type = {BooleanType.class, DateTimeType.class}, order=6, min=0, max=1, modifier=true, summary=true)
1270    @Description(shortDefinition="Indicates if the individual is deceased or not", formalDefinition="Indicates if the individual is deceased or not." )
1271    protected DataType deceased;
1272
1273    /**
1274     * An address for the individual.
1275     */
1276    @Child(name = "address", type = {Address.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1277    @Description(shortDefinition="An address for the individual", formalDefinition="An address for the individual." )
1278    protected List<Address> address;
1279
1280    /**
1281     * This field contains a patient's most recent marital (civil) status.
1282     */
1283    @Child(name = "maritalStatus", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false)
1284    @Description(shortDefinition="Marital (civil) status of a patient", formalDefinition="This field contains a patient's most recent marital (civil) status." )
1285    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/marital-status")
1286    protected CodeableConcept maritalStatus;
1287
1288    /**
1289     * Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).
1290     */
1291    @Child(name = "multipleBirth", type = {BooleanType.class, IntegerType.class}, order=9, min=0, max=1, modifier=false, summary=false)
1292    @Description(shortDefinition="Whether patient is part of a multiple birth", formalDefinition="Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer)." )
1293    protected DataType multipleBirth;
1294
1295    /**
1296     * Image of the patient.
1297     */
1298    @Child(name = "photo", type = {Attachment.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1299    @Description(shortDefinition="Image of the patient", formalDefinition="Image of the patient." )
1300    protected List<Attachment> photo;
1301
1302    /**
1303     * A contact party (e.g. guardian, partner, friend) for the patient.
1304     */
1305    @Child(name = "contact", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1306    @Description(shortDefinition="A contact party (e.g. guardian, partner, friend) for the patient", formalDefinition="A contact party (e.g. guardian, partner, friend) for the patient." )
1307    protected List<ContactComponent> contact;
1308
1309    /**
1310     * A language which may be used to communicate with the patient about his or her health.
1311     */
1312    @Child(name = "communication", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1313    @Description(shortDefinition="A language which may be used to communicate with the patient about his or her health", formalDefinition="A language which may be used to communicate with the patient about his or her health." )
1314    protected List<PatientCommunicationComponent> communication;
1315
1316    /**
1317     * Patient's nominated care provider.
1318     */
1319    @Child(name = "generalPractitioner", type = {Organization.class, Practitioner.class, PractitionerRole.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1320    @Description(shortDefinition="Patient's nominated primary care provider", formalDefinition="Patient's nominated care provider." )
1321    protected List<Reference> generalPractitioner;
1322
1323    /**
1324     * Organization that is the custodian of the patient record.
1325     */
1326    @Child(name = "managingOrganization", type = {Organization.class}, order=14, min=0, max=1, modifier=false, summary=true)
1327    @Description(shortDefinition="Organization that is the custodian of the patient record", formalDefinition="Organization that is the custodian of the patient record." )
1328    protected Reference managingOrganization;
1329
1330    /**
1331     * Link to a Patient or RelatedPerson resource that concerns the same actual individual.
1332     */
1333    @Child(name = "link", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=true, summary=true)
1334    @Description(shortDefinition="Link to a Patient or RelatedPerson resource that concerns the same actual individual", formalDefinition="Link to a Patient or RelatedPerson resource that concerns the same actual individual." )
1335    protected List<PatientLinkComponent> link;
1336
1337    private static final long serialVersionUID = 1376657499L;
1338
1339  /**
1340   * Constructor
1341   */
1342    public Patient() {
1343      super();
1344    }
1345
1346    /**
1347     * @return {@link #identifier} (An identifier for this patient.)
1348     */
1349    public List<Identifier> getIdentifier() { 
1350      if (this.identifier == null)
1351        this.identifier = new ArrayList<Identifier>();
1352      return this.identifier;
1353    }
1354
1355    /**
1356     * @return Returns a reference to <code>this</code> for easy method chaining
1357     */
1358    public Patient setIdentifier(List<Identifier> theIdentifier) { 
1359      this.identifier = theIdentifier;
1360      return this;
1361    }
1362
1363    public boolean hasIdentifier() { 
1364      if (this.identifier == null)
1365        return false;
1366      for (Identifier item : this.identifier)
1367        if (!item.isEmpty())
1368          return true;
1369      return false;
1370    }
1371
1372    public Identifier addIdentifier() { //3
1373      Identifier t = new Identifier();
1374      if (this.identifier == null)
1375        this.identifier = new ArrayList<Identifier>();
1376      this.identifier.add(t);
1377      return t;
1378    }
1379
1380    public Patient addIdentifier(Identifier t) { //3
1381      if (t == null)
1382        return this;
1383      if (this.identifier == null)
1384        this.identifier = new ArrayList<Identifier>();
1385      this.identifier.add(t);
1386      return this;
1387    }
1388
1389    /**
1390     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1391     */
1392    public Identifier getIdentifierFirstRep() { 
1393      if (getIdentifier().isEmpty()) {
1394        addIdentifier();
1395      }
1396      return getIdentifier().get(0);
1397    }
1398
1399    /**
1400     * @return {@link #active} (Whether this patient record is in active use. 
1401Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.
1402
1403It is often used to filter patient lists to exclude inactive patients
1404
1405Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
1406     */
1407    public BooleanType getActiveElement() { 
1408      if (this.active == null)
1409        if (Configuration.errorOnAutoCreate())
1410          throw new Error("Attempt to auto-create Patient.active");
1411        else if (Configuration.doAutoCreate())
1412          this.active = new BooleanType(); // bb
1413      return this.active;
1414    }
1415
1416    public boolean hasActiveElement() { 
1417      return this.active != null && !this.active.isEmpty();
1418    }
1419
1420    public boolean hasActive() { 
1421      return this.active != null && !this.active.isEmpty();
1422    }
1423
1424    /**
1425     * @param value {@link #active} (Whether this patient record is in active use. 
1426Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.
1427
1428It is often used to filter patient lists to exclude inactive patients
1429
1430Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
1431     */
1432    public Patient setActiveElement(BooleanType value) { 
1433      this.active = value;
1434      return this;
1435    }
1436
1437    /**
1438     * @return Whether this patient record is in active use. 
1439Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.
1440
1441It is often used to filter patient lists to exclude inactive patients
1442
1443Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.
1444     */
1445    public boolean getActive() { 
1446      return this.active == null || this.active.isEmpty() ? false : this.active.getValue();
1447    }
1448
1449    /**
1450     * @param value Whether this patient record is in active use. 
1451Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.
1452
1453It is often used to filter patient lists to exclude inactive patients
1454
1455Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.
1456     */
1457    public Patient setActive(boolean value) { 
1458        if (this.active == null)
1459          this.active = new BooleanType();
1460        this.active.setValue(value);
1461      return this;
1462    }
1463
1464    /**
1465     * @return {@link #name} (A name associated with the individual.)
1466     */
1467    public List<HumanName> getName() { 
1468      if (this.name == null)
1469        this.name = new ArrayList<HumanName>();
1470      return this.name;
1471    }
1472
1473    /**
1474     * @return Returns a reference to <code>this</code> for easy method chaining
1475     */
1476    public Patient setName(List<HumanName> theName) { 
1477      this.name = theName;
1478      return this;
1479    }
1480
1481    public boolean hasName() { 
1482      if (this.name == null)
1483        return false;
1484      for (HumanName item : this.name)
1485        if (!item.isEmpty())
1486          return true;
1487      return false;
1488    }
1489
1490    public HumanName addName() { //3
1491      HumanName t = new HumanName();
1492      if (this.name == null)
1493        this.name = new ArrayList<HumanName>();
1494      this.name.add(t);
1495      return t;
1496    }
1497
1498    public Patient addName(HumanName t) { //3
1499      if (t == null)
1500        return this;
1501      if (this.name == null)
1502        this.name = new ArrayList<HumanName>();
1503      this.name.add(t);
1504      return this;
1505    }
1506
1507    /**
1508     * @return The first repetition of repeating field {@link #name}, creating it if it does not already exist {3}
1509     */
1510    public HumanName getNameFirstRep() { 
1511      if (getName().isEmpty()) {
1512        addName();
1513      }
1514      return getName().get(0);
1515    }
1516
1517    /**
1518     * @return {@link #telecom} (A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.)
1519     */
1520    public List<ContactPoint> getTelecom() { 
1521      if (this.telecom == null)
1522        this.telecom = new ArrayList<ContactPoint>();
1523      return this.telecom;
1524    }
1525
1526    /**
1527     * @return Returns a reference to <code>this</code> for easy method chaining
1528     */
1529    public Patient setTelecom(List<ContactPoint> theTelecom) { 
1530      this.telecom = theTelecom;
1531      return this;
1532    }
1533
1534    public boolean hasTelecom() { 
1535      if (this.telecom == null)
1536        return false;
1537      for (ContactPoint item : this.telecom)
1538        if (!item.isEmpty())
1539          return true;
1540      return false;
1541    }
1542
1543    public ContactPoint addTelecom() { //3
1544      ContactPoint t = new ContactPoint();
1545      if (this.telecom == null)
1546        this.telecom = new ArrayList<ContactPoint>();
1547      this.telecom.add(t);
1548      return t;
1549    }
1550
1551    public Patient addTelecom(ContactPoint t) { //3
1552      if (t == null)
1553        return this;
1554      if (this.telecom == null)
1555        this.telecom = new ArrayList<ContactPoint>();
1556      this.telecom.add(t);
1557      return this;
1558    }
1559
1560    /**
1561     * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist {3}
1562     */
1563    public ContactPoint getTelecomFirstRep() { 
1564      if (getTelecom().isEmpty()) {
1565        addTelecom();
1566      }
1567      return getTelecom().get(0);
1568    }
1569
1570    /**
1571     * @return {@link #gender} (Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value
1572     */
1573    public Enumeration<AdministrativeGender> getGenderElement() { 
1574      if (this.gender == null)
1575        if (Configuration.errorOnAutoCreate())
1576          throw new Error("Attempt to auto-create Patient.gender");
1577        else if (Configuration.doAutoCreate())
1578          this.gender = new Enumeration<AdministrativeGender>(new AdministrativeGenderEnumFactory()); // bb
1579      return this.gender;
1580    }
1581
1582    public boolean hasGenderElement() { 
1583      return this.gender != null && !this.gender.isEmpty();
1584    }
1585
1586    public boolean hasGender() { 
1587      return this.gender != null && !this.gender.isEmpty();
1588    }
1589
1590    /**
1591     * @param value {@link #gender} (Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value
1592     */
1593    public Patient setGenderElement(Enumeration<AdministrativeGender> value) { 
1594      this.gender = value;
1595      return this;
1596    }
1597
1598    /**
1599     * @return Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
1600     */
1601    public AdministrativeGender getGender() { 
1602      return this.gender == null ? null : this.gender.getValue();
1603    }
1604
1605    /**
1606     * @param value Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
1607     */
1608    public Patient setGender(AdministrativeGender value) { 
1609      if (value == null)
1610        this.gender = null;
1611      else {
1612        if (this.gender == null)
1613          this.gender = new Enumeration<AdministrativeGender>(new AdministrativeGenderEnumFactory());
1614        this.gender.setValue(value);
1615      }
1616      return this;
1617    }
1618
1619    /**
1620     * @return {@link #birthDate} (The date of birth for the individual.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value
1621     */
1622    public DateType getBirthDateElement() { 
1623      if (this.birthDate == null)
1624        if (Configuration.errorOnAutoCreate())
1625          throw new Error("Attempt to auto-create Patient.birthDate");
1626        else if (Configuration.doAutoCreate())
1627          this.birthDate = new DateType(); // bb
1628      return this.birthDate;
1629    }
1630
1631    public boolean hasBirthDateElement() { 
1632      return this.birthDate != null && !this.birthDate.isEmpty();
1633    }
1634
1635    public boolean hasBirthDate() { 
1636      return this.birthDate != null && !this.birthDate.isEmpty();
1637    }
1638
1639    /**
1640     * @param value {@link #birthDate} (The date of birth for the individual.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value
1641     */
1642    public Patient setBirthDateElement(DateType value) { 
1643      this.birthDate = value;
1644      return this;
1645    }
1646
1647    /**
1648     * @return The date of birth for the individual.
1649     */
1650    public Date getBirthDate() { 
1651      return this.birthDate == null ? null : this.birthDate.getValue();
1652    }
1653
1654    /**
1655     * @param value The date of birth for the individual.
1656     */
1657    public Patient setBirthDate(Date value) { 
1658      if (value == null)
1659        this.birthDate = null;
1660      else {
1661        if (this.birthDate == null)
1662          this.birthDate = new DateType();
1663        this.birthDate.setValue(value);
1664      }
1665      return this;
1666    }
1667
1668    /**
1669     * @return {@link #deceased} (Indicates if the individual is deceased or not.)
1670     */
1671    public DataType getDeceased() { 
1672      return this.deceased;
1673    }
1674
1675    /**
1676     * @return {@link #deceased} (Indicates if the individual is deceased or not.)
1677     */
1678    public BooleanType getDeceasedBooleanType() throws FHIRException { 
1679      if (this.deceased == null)
1680        this.deceased = new BooleanType();
1681      if (!(this.deceased instanceof BooleanType))
1682        throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.deceased.getClass().getName()+" was encountered");
1683      return (BooleanType) this.deceased;
1684    }
1685
1686    public boolean hasDeceasedBooleanType() { 
1687      return this != null && this.deceased instanceof BooleanType;
1688    }
1689
1690    /**
1691     * @return {@link #deceased} (Indicates if the individual is deceased or not.)
1692     */
1693    public DateTimeType getDeceasedDateTimeType() throws FHIRException { 
1694      if (this.deceased == null)
1695        this.deceased = new DateTimeType();
1696      if (!(this.deceased instanceof DateTimeType))
1697        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.deceased.getClass().getName()+" was encountered");
1698      return (DateTimeType) this.deceased;
1699    }
1700
1701    public boolean hasDeceasedDateTimeType() { 
1702      return this != null && this.deceased instanceof DateTimeType;
1703    }
1704
1705    public boolean hasDeceased() { 
1706      return this.deceased != null && !this.deceased.isEmpty();
1707    }
1708
1709    /**
1710     * @param value {@link #deceased} (Indicates if the individual is deceased or not.)
1711     */
1712    public Patient setDeceased(DataType value) { 
1713      if (value != null && !(value instanceof BooleanType || value instanceof DateTimeType))
1714        throw new FHIRException("Not the right type for Patient.deceased[x]: "+value.fhirType());
1715      this.deceased = value;
1716      return this;
1717    }
1718
1719    /**
1720     * @return {@link #address} (An address for the individual.)
1721     */
1722    public List<Address> getAddress() { 
1723      if (this.address == null)
1724        this.address = new ArrayList<Address>();
1725      return this.address;
1726    }
1727
1728    /**
1729     * @return Returns a reference to <code>this</code> for easy method chaining
1730     */
1731    public Patient setAddress(List<Address> theAddress) { 
1732      this.address = theAddress;
1733      return this;
1734    }
1735
1736    public boolean hasAddress() { 
1737      if (this.address == null)
1738        return false;
1739      for (Address item : this.address)
1740        if (!item.isEmpty())
1741          return true;
1742      return false;
1743    }
1744
1745    public Address addAddress() { //3
1746      Address t = new Address();
1747      if (this.address == null)
1748        this.address = new ArrayList<Address>();
1749      this.address.add(t);
1750      return t;
1751    }
1752
1753    public Patient addAddress(Address t) { //3
1754      if (t == null)
1755        return this;
1756      if (this.address == null)
1757        this.address = new ArrayList<Address>();
1758      this.address.add(t);
1759      return this;
1760    }
1761
1762    /**
1763     * @return The first repetition of repeating field {@link #address}, creating it if it does not already exist {3}
1764     */
1765    public Address getAddressFirstRep() { 
1766      if (getAddress().isEmpty()) {
1767        addAddress();
1768      }
1769      return getAddress().get(0);
1770    }
1771
1772    /**
1773     * @return {@link #maritalStatus} (This field contains a patient's most recent marital (civil) status.)
1774     */
1775    public CodeableConcept getMaritalStatus() { 
1776      if (this.maritalStatus == null)
1777        if (Configuration.errorOnAutoCreate())
1778          throw new Error("Attempt to auto-create Patient.maritalStatus");
1779        else if (Configuration.doAutoCreate())
1780          this.maritalStatus = new CodeableConcept(); // cc
1781      return this.maritalStatus;
1782    }
1783
1784    public boolean hasMaritalStatus() { 
1785      return this.maritalStatus != null && !this.maritalStatus.isEmpty();
1786    }
1787
1788    /**
1789     * @param value {@link #maritalStatus} (This field contains a patient's most recent marital (civil) status.)
1790     */
1791    public Patient setMaritalStatus(CodeableConcept value) { 
1792      this.maritalStatus = value;
1793      return this;
1794    }
1795
1796    /**
1797     * @return {@link #multipleBirth} (Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).)
1798     */
1799    public DataType getMultipleBirth() { 
1800      return this.multipleBirth;
1801    }
1802
1803    /**
1804     * @return {@link #multipleBirth} (Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).)
1805     */
1806    public BooleanType getMultipleBirthBooleanType() throws FHIRException { 
1807      if (this.multipleBirth == null)
1808        this.multipleBirth = new BooleanType();
1809      if (!(this.multipleBirth instanceof BooleanType))
1810        throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.multipleBirth.getClass().getName()+" was encountered");
1811      return (BooleanType) this.multipleBirth;
1812    }
1813
1814    public boolean hasMultipleBirthBooleanType() { 
1815      return this != null && this.multipleBirth instanceof BooleanType;
1816    }
1817
1818    /**
1819     * @return {@link #multipleBirth} (Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).)
1820     */
1821    public IntegerType getMultipleBirthIntegerType() throws FHIRException { 
1822      if (this.multipleBirth == null)
1823        this.multipleBirth = new IntegerType();
1824      if (!(this.multipleBirth instanceof IntegerType))
1825        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.multipleBirth.getClass().getName()+" was encountered");
1826      return (IntegerType) this.multipleBirth;
1827    }
1828
1829    public boolean hasMultipleBirthIntegerType() { 
1830      return this != null && this.multipleBirth instanceof IntegerType;
1831    }
1832
1833    public boolean hasMultipleBirth() { 
1834      return this.multipleBirth != null && !this.multipleBirth.isEmpty();
1835    }
1836
1837    /**
1838     * @param value {@link #multipleBirth} (Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).)
1839     */
1840    public Patient setMultipleBirth(DataType value) { 
1841      if (value != null && !(value instanceof BooleanType || value instanceof IntegerType))
1842        throw new FHIRException("Not the right type for Patient.multipleBirth[x]: "+value.fhirType());
1843      this.multipleBirth = value;
1844      return this;
1845    }
1846
1847    /**
1848     * @return {@link #photo} (Image of the patient.)
1849     */
1850    public List<Attachment> getPhoto() { 
1851      if (this.photo == null)
1852        this.photo = new ArrayList<Attachment>();
1853      return this.photo;
1854    }
1855
1856    /**
1857     * @return Returns a reference to <code>this</code> for easy method chaining
1858     */
1859    public Patient setPhoto(List<Attachment> thePhoto) { 
1860      this.photo = thePhoto;
1861      return this;
1862    }
1863
1864    public boolean hasPhoto() { 
1865      if (this.photo == null)
1866        return false;
1867      for (Attachment item : this.photo)
1868        if (!item.isEmpty())
1869          return true;
1870      return false;
1871    }
1872
1873    public Attachment addPhoto() { //3
1874      Attachment t = new Attachment();
1875      if (this.photo == null)
1876        this.photo = new ArrayList<Attachment>();
1877      this.photo.add(t);
1878      return t;
1879    }
1880
1881    public Patient addPhoto(Attachment t) { //3
1882      if (t == null)
1883        return this;
1884      if (this.photo == null)
1885        this.photo = new ArrayList<Attachment>();
1886      this.photo.add(t);
1887      return this;
1888    }
1889
1890    /**
1891     * @return The first repetition of repeating field {@link #photo}, creating it if it does not already exist {3}
1892     */
1893    public Attachment getPhotoFirstRep() { 
1894      if (getPhoto().isEmpty()) {
1895        addPhoto();
1896      }
1897      return getPhoto().get(0);
1898    }
1899
1900    /**
1901     * @return {@link #contact} (A contact party (e.g. guardian, partner, friend) for the patient.)
1902     */
1903    public List<ContactComponent> getContact() { 
1904      if (this.contact == null)
1905        this.contact = new ArrayList<ContactComponent>();
1906      return this.contact;
1907    }
1908
1909    /**
1910     * @return Returns a reference to <code>this</code> for easy method chaining
1911     */
1912    public Patient setContact(List<ContactComponent> theContact) { 
1913      this.contact = theContact;
1914      return this;
1915    }
1916
1917    public boolean hasContact() { 
1918      if (this.contact == null)
1919        return false;
1920      for (ContactComponent item : this.contact)
1921        if (!item.isEmpty())
1922          return true;
1923      return false;
1924    }
1925
1926    public ContactComponent addContact() { //3
1927      ContactComponent t = new ContactComponent();
1928      if (this.contact == null)
1929        this.contact = new ArrayList<ContactComponent>();
1930      this.contact.add(t);
1931      return t;
1932    }
1933
1934    public Patient addContact(ContactComponent t) { //3
1935      if (t == null)
1936        return this;
1937      if (this.contact == null)
1938        this.contact = new ArrayList<ContactComponent>();
1939      this.contact.add(t);
1940      return this;
1941    }
1942
1943    /**
1944     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
1945     */
1946    public ContactComponent getContactFirstRep() { 
1947      if (getContact().isEmpty()) {
1948        addContact();
1949      }
1950      return getContact().get(0);
1951    }
1952
1953    /**
1954     * @return {@link #communication} (A language which may be used to communicate with the patient about his or her health.)
1955     */
1956    public List<PatientCommunicationComponent> getCommunication() { 
1957      if (this.communication == null)
1958        this.communication = new ArrayList<PatientCommunicationComponent>();
1959      return this.communication;
1960    }
1961
1962    /**
1963     * @return Returns a reference to <code>this</code> for easy method chaining
1964     */
1965    public Patient setCommunication(List<PatientCommunicationComponent> theCommunication) { 
1966      this.communication = theCommunication;
1967      return this;
1968    }
1969
1970    public boolean hasCommunication() { 
1971      if (this.communication == null)
1972        return false;
1973      for (PatientCommunicationComponent item : this.communication)
1974        if (!item.isEmpty())
1975          return true;
1976      return false;
1977    }
1978
1979    public PatientCommunicationComponent addCommunication() { //3
1980      PatientCommunicationComponent t = new PatientCommunicationComponent();
1981      if (this.communication == null)
1982        this.communication = new ArrayList<PatientCommunicationComponent>();
1983      this.communication.add(t);
1984      return t;
1985    }
1986
1987    public Patient addCommunication(PatientCommunicationComponent t) { //3
1988      if (t == null)
1989        return this;
1990      if (this.communication == null)
1991        this.communication = new ArrayList<PatientCommunicationComponent>();
1992      this.communication.add(t);
1993      return this;
1994    }
1995
1996    /**
1997     * @return The first repetition of repeating field {@link #communication}, creating it if it does not already exist {3}
1998     */
1999    public PatientCommunicationComponent getCommunicationFirstRep() { 
2000      if (getCommunication().isEmpty()) {
2001        addCommunication();
2002      }
2003      return getCommunication().get(0);
2004    }
2005
2006    /**
2007     * @return {@link #generalPractitioner} (Patient's nominated care provider.)
2008     */
2009    public List<Reference> getGeneralPractitioner() { 
2010      if (this.generalPractitioner == null)
2011        this.generalPractitioner = new ArrayList<Reference>();
2012      return this.generalPractitioner;
2013    }
2014
2015    /**
2016     * @return Returns a reference to <code>this</code> for easy method chaining
2017     */
2018    public Patient setGeneralPractitioner(List<Reference> theGeneralPractitioner) { 
2019      this.generalPractitioner = theGeneralPractitioner;
2020      return this;
2021    }
2022
2023    public boolean hasGeneralPractitioner() { 
2024      if (this.generalPractitioner == null)
2025        return false;
2026      for (Reference item : this.generalPractitioner)
2027        if (!item.isEmpty())
2028          return true;
2029      return false;
2030    }
2031
2032    public Reference addGeneralPractitioner() { //3
2033      Reference t = new Reference();
2034      if (this.generalPractitioner == null)
2035        this.generalPractitioner = new ArrayList<Reference>();
2036      this.generalPractitioner.add(t);
2037      return t;
2038    }
2039
2040    public Patient addGeneralPractitioner(Reference t) { //3
2041      if (t == null)
2042        return this;
2043      if (this.generalPractitioner == null)
2044        this.generalPractitioner = new ArrayList<Reference>();
2045      this.generalPractitioner.add(t);
2046      return this;
2047    }
2048
2049    /**
2050     * @return The first repetition of repeating field {@link #generalPractitioner}, creating it if it does not already exist {3}
2051     */
2052    public Reference getGeneralPractitionerFirstRep() { 
2053      if (getGeneralPractitioner().isEmpty()) {
2054        addGeneralPractitioner();
2055      }
2056      return getGeneralPractitioner().get(0);
2057    }
2058
2059    /**
2060     * @return {@link #managingOrganization} (Organization that is the custodian of the patient record.)
2061     */
2062    public Reference getManagingOrganization() { 
2063      if (this.managingOrganization == null)
2064        if (Configuration.errorOnAutoCreate())
2065          throw new Error("Attempt to auto-create Patient.managingOrganization");
2066        else if (Configuration.doAutoCreate())
2067          this.managingOrganization = new Reference(); // cc
2068      return this.managingOrganization;
2069    }
2070
2071    public boolean hasManagingOrganization() { 
2072      return this.managingOrganization != null && !this.managingOrganization.isEmpty();
2073    }
2074
2075    /**
2076     * @param value {@link #managingOrganization} (Organization that is the custodian of the patient record.)
2077     */
2078    public Patient setManagingOrganization(Reference value) { 
2079      this.managingOrganization = value;
2080      return this;
2081    }
2082
2083    /**
2084     * @return {@link #link} (Link to a Patient or RelatedPerson resource that concerns the same actual individual.)
2085     */
2086    public List<PatientLinkComponent> getLink() { 
2087      if (this.link == null)
2088        this.link = new ArrayList<PatientLinkComponent>();
2089      return this.link;
2090    }
2091
2092    /**
2093     * @return Returns a reference to <code>this</code> for easy method chaining
2094     */
2095    public Patient setLink(List<PatientLinkComponent> theLink) { 
2096      this.link = theLink;
2097      return this;
2098    }
2099
2100    public boolean hasLink() { 
2101      if (this.link == null)
2102        return false;
2103      for (PatientLinkComponent item : this.link)
2104        if (!item.isEmpty())
2105          return true;
2106      return false;
2107    }
2108
2109    public PatientLinkComponent addLink() { //3
2110      PatientLinkComponent t = new PatientLinkComponent();
2111      if (this.link == null)
2112        this.link = new ArrayList<PatientLinkComponent>();
2113      this.link.add(t);
2114      return t;
2115    }
2116
2117    public Patient addLink(PatientLinkComponent t) { //3
2118      if (t == null)
2119        return this;
2120      if (this.link == null)
2121        this.link = new ArrayList<PatientLinkComponent>();
2122      this.link.add(t);
2123      return this;
2124    }
2125
2126    /**
2127     * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist {3}
2128     */
2129    public PatientLinkComponent getLinkFirstRep() { 
2130      if (getLink().isEmpty()) {
2131        addLink();
2132      }
2133      return getLink().get(0);
2134    }
2135
2136      protected void listChildren(List<Property> children) {
2137        super.listChildren(children);
2138        children.add(new Property("identifier", "Identifier", "An identifier for this patient.", 0, java.lang.Integer.MAX_VALUE, identifier));
2139        children.add(new Property("active", "boolean", "Whether this patient record is in active use. \nMany systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.\n\nIt is often used to filter patient lists to exclude inactive patients\n\nDeceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.", 0, 1, active));
2140        children.add(new Property("name", "HumanName", "A name associated with the individual.", 0, java.lang.Integer.MAX_VALUE, name));
2141        children.add(new Property("telecom", "ContactPoint", "A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.", 0, java.lang.Integer.MAX_VALUE, telecom));
2142        children.add(new Property("gender", "code", "Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.", 0, 1, gender));
2143        children.add(new Property("birthDate", "date", "The date of birth for the individual.", 0, 1, birthDate));
2144        children.add(new Property("deceased[x]", "boolean|dateTime", "Indicates if the individual is deceased or not.", 0, 1, deceased));
2145        children.add(new Property("address", "Address", "An address for the individual.", 0, java.lang.Integer.MAX_VALUE, address));
2146        children.add(new Property("maritalStatus", "CodeableConcept", "This field contains a patient's most recent marital (civil) status.", 0, 1, maritalStatus));
2147        children.add(new Property("multipleBirth[x]", "boolean|integer", "Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).", 0, 1, multipleBirth));
2148        children.add(new Property("photo", "Attachment", "Image of the patient.", 0, java.lang.Integer.MAX_VALUE, photo));
2149        children.add(new Property("contact", "", "A contact party (e.g. guardian, partner, friend) for the patient.", 0, java.lang.Integer.MAX_VALUE, contact));
2150        children.add(new Property("communication", "", "A language which may be used to communicate with the patient about his or her health.", 0, java.lang.Integer.MAX_VALUE, communication));
2151        children.add(new Property("generalPractitioner", "Reference(Organization|Practitioner|PractitionerRole)", "Patient's nominated care provider.", 0, java.lang.Integer.MAX_VALUE, generalPractitioner));
2152        children.add(new Property("managingOrganization", "Reference(Organization)", "Organization that is the custodian of the patient record.", 0, 1, managingOrganization));
2153        children.add(new Property("link", "", "Link to a Patient or RelatedPerson resource that concerns the same actual individual.", 0, java.lang.Integer.MAX_VALUE, link));
2154      }
2155
2156      @Override
2157      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2158        switch (_hash) {
2159        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "An identifier for this patient.", 0, java.lang.Integer.MAX_VALUE, identifier);
2160        case -1422950650: /*active*/  return new Property("active", "boolean", "Whether this patient record is in active use. \nMany systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.\n\nIt is often used to filter patient lists to exclude inactive patients\n\nDeceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.", 0, 1, active);
2161        case 3373707: /*name*/  return new Property("name", "HumanName", "A name associated with the individual.", 0, java.lang.Integer.MAX_VALUE, name);
2162        case -1429363305: /*telecom*/  return new Property("telecom", "ContactPoint", "A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.", 0, java.lang.Integer.MAX_VALUE, telecom);
2163        case -1249512767: /*gender*/  return new Property("gender", "code", "Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.", 0, 1, gender);
2164        case -1210031859: /*birthDate*/  return new Property("birthDate", "date", "The date of birth for the individual.", 0, 1, birthDate);
2165        case -1311442804: /*deceased[x]*/  return new Property("deceased[x]", "boolean|dateTime", "Indicates if the individual is deceased or not.", 0, 1, deceased);
2166        case 561497972: /*deceased*/  return new Property("deceased[x]", "boolean|dateTime", "Indicates if the individual is deceased or not.", 0, 1, deceased);
2167        case 497463828: /*deceasedBoolean*/  return new Property("deceased[x]", "boolean", "Indicates if the individual is deceased or not.", 0, 1, deceased);
2168        case -1971804369: /*deceasedDateTime*/  return new Property("deceased[x]", "dateTime", "Indicates if the individual is deceased or not.", 0, 1, deceased);
2169        case -1147692044: /*address*/  return new Property("address", "Address", "An address for the individual.", 0, java.lang.Integer.MAX_VALUE, address);
2170        case 1756919302: /*maritalStatus*/  return new Property("maritalStatus", "CodeableConcept", "This field contains a patient's most recent marital (civil) status.", 0, 1, maritalStatus);
2171        case -1764672111: /*multipleBirth[x]*/  return new Property("multipleBirth[x]", "boolean|integer", "Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).", 0, 1, multipleBirth);
2172        case -677369713: /*multipleBirth*/  return new Property("multipleBirth[x]", "boolean|integer", "Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).", 0, 1, multipleBirth);
2173        case -247534439: /*multipleBirthBoolean*/  return new Property("multipleBirth[x]", "boolean", "Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).", 0, 1, multipleBirth);
2174        case 1645805999: /*multipleBirthInteger*/  return new Property("multipleBirth[x]", "integer", "Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).", 0, 1, multipleBirth);
2175        case 106642994: /*photo*/  return new Property("photo", "Attachment", "Image of the patient.", 0, java.lang.Integer.MAX_VALUE, photo);
2176        case 951526432: /*contact*/  return new Property("contact", "", "A contact party (e.g. guardian, partner, friend) for the patient.", 0, java.lang.Integer.MAX_VALUE, contact);
2177        case -1035284522: /*communication*/  return new Property("communication", "", "A language which may be used to communicate with the patient about his or her health.", 0, java.lang.Integer.MAX_VALUE, communication);
2178        case 1488292898: /*generalPractitioner*/  return new Property("generalPractitioner", "Reference(Organization|Practitioner|PractitionerRole)", "Patient's nominated care provider.", 0, java.lang.Integer.MAX_VALUE, generalPractitioner);
2179        case -2058947787: /*managingOrganization*/  return new Property("managingOrganization", "Reference(Organization)", "Organization that is the custodian of the patient record.", 0, 1, managingOrganization);
2180        case 3321850: /*link*/  return new Property("link", "", "Link to a Patient or RelatedPerson resource that concerns the same actual individual.", 0, java.lang.Integer.MAX_VALUE, link);
2181        default: return super.getNamedProperty(_hash, _name, _checkValid);
2182        }
2183
2184      }
2185
2186      @Override
2187      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2188        switch (hash) {
2189        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2190        case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType
2191        case 3373707: /*name*/ return this.name == null ? new Base[0] : this.name.toArray(new Base[this.name.size()]); // HumanName
2192        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
2193        case -1249512767: /*gender*/ return this.gender == null ? new Base[0] : new Base[] {this.gender}; // Enumeration<AdministrativeGender>
2194        case -1210031859: /*birthDate*/ return this.birthDate == null ? new Base[0] : new Base[] {this.birthDate}; // DateType
2195        case 561497972: /*deceased*/ return this.deceased == null ? new Base[0] : new Base[] {this.deceased}; // DataType
2196        case -1147692044: /*address*/ return this.address == null ? new Base[0] : this.address.toArray(new Base[this.address.size()]); // Address
2197        case 1756919302: /*maritalStatus*/ return this.maritalStatus == null ? new Base[0] : new Base[] {this.maritalStatus}; // CodeableConcept
2198        case -677369713: /*multipleBirth*/ return this.multipleBirth == null ? new Base[0] : new Base[] {this.multipleBirth}; // DataType
2199        case 106642994: /*photo*/ return this.photo == null ? new Base[0] : this.photo.toArray(new Base[this.photo.size()]); // Attachment
2200        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactComponent
2201        case -1035284522: /*communication*/ return this.communication == null ? new Base[0] : this.communication.toArray(new Base[this.communication.size()]); // PatientCommunicationComponent
2202        case 1488292898: /*generalPractitioner*/ return this.generalPractitioner == null ? new Base[0] : this.generalPractitioner.toArray(new Base[this.generalPractitioner.size()]); // Reference
2203        case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : new Base[] {this.managingOrganization}; // Reference
2204        case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // PatientLinkComponent
2205        default: return super.getProperty(hash, name, checkValid);
2206        }
2207
2208      }
2209
2210      @Override
2211      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2212        switch (hash) {
2213        case -1618432855: // identifier
2214          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2215          return value;
2216        case -1422950650: // active
2217          this.active = TypeConvertor.castToBoolean(value); // BooleanType
2218          return value;
2219        case 3373707: // name
2220          this.getName().add(TypeConvertor.castToHumanName(value)); // HumanName
2221          return value;
2222        case -1429363305: // telecom
2223          this.getTelecom().add(TypeConvertor.castToContactPoint(value)); // ContactPoint
2224          return value;
2225        case -1249512767: // gender
2226          value = new AdministrativeGenderEnumFactory().fromType(TypeConvertor.castToCode(value));
2227          this.gender = (Enumeration) value; // Enumeration<AdministrativeGender>
2228          return value;
2229        case -1210031859: // birthDate
2230          this.birthDate = TypeConvertor.castToDate(value); // DateType
2231          return value;
2232        case 561497972: // deceased
2233          this.deceased = TypeConvertor.castToType(value); // DataType
2234          return value;
2235        case -1147692044: // address
2236          this.getAddress().add(TypeConvertor.castToAddress(value)); // Address
2237          return value;
2238        case 1756919302: // maritalStatus
2239          this.maritalStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2240          return value;
2241        case -677369713: // multipleBirth
2242          this.multipleBirth = TypeConvertor.castToType(value); // DataType
2243          return value;
2244        case 106642994: // photo
2245          this.getPhoto().add(TypeConvertor.castToAttachment(value)); // Attachment
2246          return value;
2247        case 951526432: // contact
2248          this.getContact().add((ContactComponent) value); // ContactComponent
2249          return value;
2250        case -1035284522: // communication
2251          this.getCommunication().add((PatientCommunicationComponent) value); // PatientCommunicationComponent
2252          return value;
2253        case 1488292898: // generalPractitioner
2254          this.getGeneralPractitioner().add(TypeConvertor.castToReference(value)); // Reference
2255          return value;
2256        case -2058947787: // managingOrganization
2257          this.managingOrganization = TypeConvertor.castToReference(value); // Reference
2258          return value;
2259        case 3321850: // link
2260          this.getLink().add((PatientLinkComponent) value); // PatientLinkComponent
2261          return value;
2262        default: return super.setProperty(hash, name, value);
2263        }
2264
2265      }
2266
2267      @Override
2268      public Base setProperty(String name, Base value) throws FHIRException {
2269        if (name.equals("identifier")) {
2270          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2271        } else if (name.equals("active")) {
2272          this.active = TypeConvertor.castToBoolean(value); // BooleanType
2273        } else if (name.equals("name")) {
2274          this.getName().add(TypeConvertor.castToHumanName(value));
2275        } else if (name.equals("telecom")) {
2276          this.getTelecom().add(TypeConvertor.castToContactPoint(value));
2277        } else if (name.equals("gender")) {
2278          value = new AdministrativeGenderEnumFactory().fromType(TypeConvertor.castToCode(value));
2279          this.gender = (Enumeration) value; // Enumeration<AdministrativeGender>
2280        } else if (name.equals("birthDate")) {
2281          this.birthDate = TypeConvertor.castToDate(value); // DateType
2282        } else if (name.equals("deceased[x]")) {
2283          this.deceased = TypeConvertor.castToType(value); // DataType
2284        } else if (name.equals("address")) {
2285          this.getAddress().add(TypeConvertor.castToAddress(value));
2286        } else if (name.equals("maritalStatus")) {
2287          this.maritalStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2288        } else if (name.equals("multipleBirth[x]")) {
2289          this.multipleBirth = TypeConvertor.castToType(value); // DataType
2290        } else if (name.equals("photo")) {
2291          this.getPhoto().add(TypeConvertor.castToAttachment(value));
2292        } else if (name.equals("contact")) {
2293          this.getContact().add((ContactComponent) value);
2294        } else if (name.equals("communication")) {
2295          this.getCommunication().add((PatientCommunicationComponent) value);
2296        } else if (name.equals("generalPractitioner")) {
2297          this.getGeneralPractitioner().add(TypeConvertor.castToReference(value));
2298        } else if (name.equals("managingOrganization")) {
2299          this.managingOrganization = TypeConvertor.castToReference(value); // Reference
2300        } else if (name.equals("link")) {
2301          this.getLink().add((PatientLinkComponent) value);
2302        } else
2303          return super.setProperty(name, value);
2304        return value;
2305      }
2306
2307  @Override
2308  public void removeChild(String name, Base value) throws FHIRException {
2309        if (name.equals("identifier")) {
2310          this.getIdentifier().remove(value);
2311        } else if (name.equals("active")) {
2312          this.active = null;
2313        } else if (name.equals("name")) {
2314          this.getName().remove(value);
2315        } else if (name.equals("telecom")) {
2316          this.getTelecom().remove(value);
2317        } else if (name.equals("gender")) {
2318          value = new AdministrativeGenderEnumFactory().fromType(TypeConvertor.castToCode(value));
2319          this.gender = (Enumeration) value; // Enumeration<AdministrativeGender>
2320        } else if (name.equals("birthDate")) {
2321          this.birthDate = null;
2322        } else if (name.equals("deceased[x]")) {
2323          this.deceased = null;
2324        } else if (name.equals("address")) {
2325          this.getAddress().remove(value);
2326        } else if (name.equals("maritalStatus")) {
2327          this.maritalStatus = null;
2328        } else if (name.equals("multipleBirth[x]")) {
2329          this.multipleBirth = null;
2330        } else if (name.equals("photo")) {
2331          this.getPhoto().remove(value);
2332        } else if (name.equals("contact")) {
2333          this.getContact().remove((ContactComponent) value);
2334        } else if (name.equals("communication")) {
2335          this.getCommunication().remove((PatientCommunicationComponent) value);
2336        } else if (name.equals("generalPractitioner")) {
2337          this.getGeneralPractitioner().remove(value);
2338        } else if (name.equals("managingOrganization")) {
2339          this.managingOrganization = null;
2340        } else if (name.equals("link")) {
2341          this.getLink().remove((PatientLinkComponent) value);
2342        } else
2343          super.removeChild(name, value);
2344        
2345      }
2346
2347      @Override
2348      public Base makeProperty(int hash, String name) throws FHIRException {
2349        switch (hash) {
2350        case -1618432855:  return addIdentifier(); 
2351        case -1422950650:  return getActiveElement();
2352        case 3373707:  return addName(); 
2353        case -1429363305:  return addTelecom(); 
2354        case -1249512767:  return getGenderElement();
2355        case -1210031859:  return getBirthDateElement();
2356        case -1311442804:  return getDeceased();
2357        case 561497972:  return getDeceased();
2358        case -1147692044:  return addAddress(); 
2359        case 1756919302:  return getMaritalStatus();
2360        case -1764672111:  return getMultipleBirth();
2361        case -677369713:  return getMultipleBirth();
2362        case 106642994:  return addPhoto(); 
2363        case 951526432:  return addContact(); 
2364        case -1035284522:  return addCommunication(); 
2365        case 1488292898:  return addGeneralPractitioner(); 
2366        case -2058947787:  return getManagingOrganization();
2367        case 3321850:  return addLink(); 
2368        default: return super.makeProperty(hash, name);
2369        }
2370
2371      }
2372
2373      @Override
2374      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2375        switch (hash) {
2376        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2377        case -1422950650: /*active*/ return new String[] {"boolean"};
2378        case 3373707: /*name*/ return new String[] {"HumanName"};
2379        case -1429363305: /*telecom*/ return new String[] {"ContactPoint"};
2380        case -1249512767: /*gender*/ return new String[] {"code"};
2381        case -1210031859: /*birthDate*/ return new String[] {"date"};
2382        case 561497972: /*deceased*/ return new String[] {"boolean", "dateTime"};
2383        case -1147692044: /*address*/ return new String[] {"Address"};
2384        case 1756919302: /*maritalStatus*/ return new String[] {"CodeableConcept"};
2385        case -677369713: /*multipleBirth*/ return new String[] {"boolean", "integer"};
2386        case 106642994: /*photo*/ return new String[] {"Attachment"};
2387        case 951526432: /*contact*/ return new String[] {};
2388        case -1035284522: /*communication*/ return new String[] {};
2389        case 1488292898: /*generalPractitioner*/ return new String[] {"Reference"};
2390        case -2058947787: /*managingOrganization*/ return new String[] {"Reference"};
2391        case 3321850: /*link*/ return new String[] {};
2392        default: return super.getTypesForProperty(hash, name);
2393        }
2394
2395      }
2396
2397      @Override
2398      public Base addChild(String name) throws FHIRException {
2399        if (name.equals("identifier")) {
2400          return addIdentifier();
2401        }
2402        else if (name.equals("active")) {
2403          throw new FHIRException("Cannot call addChild on a singleton property Patient.active");
2404        }
2405        else if (name.equals("name")) {
2406          return addName();
2407        }
2408        else if (name.equals("telecom")) {
2409          return addTelecom();
2410        }
2411        else if (name.equals("gender")) {
2412          throw new FHIRException("Cannot call addChild on a singleton property Patient.gender");
2413        }
2414        else if (name.equals("birthDate")) {
2415          throw new FHIRException("Cannot call addChild on a singleton property Patient.birthDate");
2416        }
2417        else if (name.equals("deceasedBoolean")) {
2418          this.deceased = new BooleanType();
2419          return this.deceased;
2420        }
2421        else if (name.equals("deceasedDateTime")) {
2422          this.deceased = new DateTimeType();
2423          return this.deceased;
2424        }
2425        else if (name.equals("address")) {
2426          return addAddress();
2427        }
2428        else if (name.equals("maritalStatus")) {
2429          this.maritalStatus = new CodeableConcept();
2430          return this.maritalStatus;
2431        }
2432        else if (name.equals("multipleBirthBoolean")) {
2433          this.multipleBirth = new BooleanType();
2434          return this.multipleBirth;
2435        }
2436        else if (name.equals("multipleBirthInteger")) {
2437          this.multipleBirth = new IntegerType();
2438          return this.multipleBirth;
2439        }
2440        else if (name.equals("photo")) {
2441          return addPhoto();
2442        }
2443        else if (name.equals("contact")) {
2444          return addContact();
2445        }
2446        else if (name.equals("communication")) {
2447          return addCommunication();
2448        }
2449        else if (name.equals("generalPractitioner")) {
2450          return addGeneralPractitioner();
2451        }
2452        else if (name.equals("managingOrganization")) {
2453          this.managingOrganization = new Reference();
2454          return this.managingOrganization;
2455        }
2456        else if (name.equals("link")) {
2457          return addLink();
2458        }
2459        else
2460          return super.addChild(name);
2461      }
2462
2463  public String fhirType() {
2464    return "Patient";
2465
2466  }
2467
2468      public Patient copy() {
2469        Patient dst = new Patient();
2470        copyValues(dst);
2471        return dst;
2472      }
2473
2474      public void copyValues(Patient dst) {
2475        super.copyValues(dst);
2476        if (identifier != null) {
2477          dst.identifier = new ArrayList<Identifier>();
2478          for (Identifier i : identifier)
2479            dst.identifier.add(i.copy());
2480        };
2481        dst.active = active == null ? null : active.copy();
2482        if (name != null) {
2483          dst.name = new ArrayList<HumanName>();
2484          for (HumanName i : name)
2485            dst.name.add(i.copy());
2486        };
2487        if (telecom != null) {
2488          dst.telecom = new ArrayList<ContactPoint>();
2489          for (ContactPoint i : telecom)
2490            dst.telecom.add(i.copy());
2491        };
2492        dst.gender = gender == null ? null : gender.copy();
2493        dst.birthDate = birthDate == null ? null : birthDate.copy();
2494        dst.deceased = deceased == null ? null : deceased.copy();
2495        if (address != null) {
2496          dst.address = new ArrayList<Address>();
2497          for (Address i : address)
2498            dst.address.add(i.copy());
2499        };
2500        dst.maritalStatus = maritalStatus == null ? null : maritalStatus.copy();
2501        dst.multipleBirth = multipleBirth == null ? null : multipleBirth.copy();
2502        if (photo != null) {
2503          dst.photo = new ArrayList<Attachment>();
2504          for (Attachment i : photo)
2505            dst.photo.add(i.copy());
2506        };
2507        if (contact != null) {
2508          dst.contact = new ArrayList<ContactComponent>();
2509          for (ContactComponent i : contact)
2510            dst.contact.add(i.copy());
2511        };
2512        if (communication != null) {
2513          dst.communication = new ArrayList<PatientCommunicationComponent>();
2514          for (PatientCommunicationComponent i : communication)
2515            dst.communication.add(i.copy());
2516        };
2517        if (generalPractitioner != null) {
2518          dst.generalPractitioner = new ArrayList<Reference>();
2519          for (Reference i : generalPractitioner)
2520            dst.generalPractitioner.add(i.copy());
2521        };
2522        dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy();
2523        if (link != null) {
2524          dst.link = new ArrayList<PatientLinkComponent>();
2525          for (PatientLinkComponent i : link)
2526            dst.link.add(i.copy());
2527        };
2528      }
2529
2530      protected Patient typedCopy() {
2531        return copy();
2532      }
2533
2534      @Override
2535      public boolean equalsDeep(Base other_) {
2536        if (!super.equalsDeep(other_))
2537          return false;
2538        if (!(other_ instanceof Patient))
2539          return false;
2540        Patient o = (Patient) other_;
2541        return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(name, o.name, true)
2542           && compareDeep(telecom, o.telecom, true) && compareDeep(gender, o.gender, true) && compareDeep(birthDate, o.birthDate, true)
2543           && compareDeep(deceased, o.deceased, true) && compareDeep(address, o.address, true) && compareDeep(maritalStatus, o.maritalStatus, true)
2544           && compareDeep(multipleBirth, o.multipleBirth, true) && compareDeep(photo, o.photo, true) && compareDeep(contact, o.contact, true)
2545           && compareDeep(communication, o.communication, true) && compareDeep(generalPractitioner, o.generalPractitioner, true)
2546           && compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(link, o.link, true)
2547          ;
2548      }
2549
2550      @Override
2551      public boolean equalsShallow(Base other_) {
2552        if (!super.equalsShallow(other_))
2553          return false;
2554        if (!(other_ instanceof Patient))
2555          return false;
2556        Patient o = (Patient) other_;
2557        return compareValues(active, o.active, true) && compareValues(gender, o.gender, true) && compareValues(birthDate, o.birthDate, true)
2558          ;
2559      }
2560
2561      public boolean isEmpty() {
2562        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, active, name
2563          , telecom, gender, birthDate, deceased, address, maritalStatus, multipleBirth
2564          , photo, contact, communication, generalPractitioner, managingOrganization, link
2565          );
2566      }
2567
2568  @Override
2569  public ResourceType getResourceType() {
2570    return ResourceType.Patient;
2571   }
2572
2573 /**
2574   * Search parameter: <b>active</b>
2575   * <p>
2576   * Description: <b>Whether the patient record is active</b><br>
2577   * Type: <b>token</b><br>
2578   * Path: <b>Patient.active</b><br>
2579   * </p>
2580   */
2581  @SearchParamDefinition(name="active", path="Patient.active", description="Whether the patient record is active", type="token" )
2582  public static final String SP_ACTIVE = "active";
2583 /**
2584   * <b>Fluent Client</b> search parameter constant for <b>active</b>
2585   * <p>
2586   * Description: <b>Whether the patient record is active</b><br>
2587   * Type: <b>token</b><br>
2588   * Path: <b>Patient.active</b><br>
2589   * </p>
2590   */
2591  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTIVE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTIVE);
2592
2593 /**
2594   * Search parameter: <b>death-date</b>
2595   * <p>
2596   * Description: <b>The date of death has been provided and satisfies this search value</b><br>
2597   * Type: <b>date</b><br>
2598   * Path: <b>(Patient.deceased.ofType(dateTime))</b><br>
2599   * </p>
2600   */
2601  @SearchParamDefinition(name="death-date", path="(Patient.deceased.ofType(dateTime))", description="The date of death has been provided and satisfies this search value", type="date" )
2602  public static final String SP_DEATH_DATE = "death-date";
2603 /**
2604   * <b>Fluent Client</b> search parameter constant for <b>death-date</b>
2605   * <p>
2606   * Description: <b>The date of death has been provided and satisfies this search value</b><br>
2607   * Type: <b>date</b><br>
2608   * Path: <b>(Patient.deceased.ofType(dateTime))</b><br>
2609   * </p>
2610   */
2611  public static final ca.uhn.fhir.rest.gclient.DateClientParam DEATH_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DEATH_DATE);
2612
2613 /**
2614   * Search parameter: <b>deceased</b>
2615   * <p>
2616   * Description: <b>This patient has been marked as deceased, or has a death date entered</b><br>
2617   * Type: <b>token</b><br>
2618   * Path: <b>Patient.deceased.exists() and Patient.deceased != false</b><br>
2619   * </p>
2620   */
2621  @SearchParamDefinition(name="deceased", path="Patient.deceased.exists() and Patient.deceased != false", description="This patient has been marked as deceased, or has a death date entered", type="token" )
2622  public static final String SP_DECEASED = "deceased";
2623 /**
2624   * <b>Fluent Client</b> search parameter constant for <b>deceased</b>
2625   * <p>
2626   * Description: <b>This patient has been marked as deceased, or has a death date entered</b><br>
2627   * Type: <b>token</b><br>
2628   * Path: <b>Patient.deceased.exists() and Patient.deceased != false</b><br>
2629   * </p>
2630   */
2631  public static final ca.uhn.fhir.rest.gclient.TokenClientParam DECEASED = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DECEASED);
2632
2633 /**
2634   * Search parameter: <b>general-practitioner</b>
2635   * <p>
2636   * Description: <b>Patient's nominated general practitioner, not the organization that manages the record</b><br>
2637   * Type: <b>reference</b><br>
2638   * Path: <b>Patient.generalPractitioner</b><br>
2639   * </p>
2640   */
2641  @SearchParamDefinition(name="general-practitioner", path="Patient.generalPractitioner", description="Patient's nominated general practitioner, not the organization that manages the record", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Organization.class, Practitioner.class, PractitionerRole.class } )
2642  public static final String SP_GENERAL_PRACTITIONER = "general-practitioner";
2643 /**
2644   * <b>Fluent Client</b> search parameter constant for <b>general-practitioner</b>
2645   * <p>
2646   * Description: <b>Patient's nominated general practitioner, not the organization that manages the record</b><br>
2647   * Type: <b>reference</b><br>
2648   * Path: <b>Patient.generalPractitioner</b><br>
2649   * </p>
2650   */
2651  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam GENERAL_PRACTITIONER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_GENERAL_PRACTITIONER);
2652
2653/**
2654   * Constant for fluent queries to be used to add include statements. Specifies
2655   * the path value of "<b>Patient:general-practitioner</b>".
2656   */
2657  public static final ca.uhn.fhir.model.api.Include INCLUDE_GENERAL_PRACTITIONER = new ca.uhn.fhir.model.api.Include("Patient:general-practitioner").toLocked();
2658
2659 /**
2660   * Search parameter: <b>identifier</b>
2661   * <p>
2662   * Description: <b>A patient identifier</b><br>
2663   * Type: <b>token</b><br>
2664   * Path: <b>Patient.identifier</b><br>
2665   * </p>
2666   */
2667  @SearchParamDefinition(name="identifier", path="Patient.identifier", description="A patient identifier", type="token" )
2668  public static final String SP_IDENTIFIER = "identifier";
2669 /**
2670   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2671   * <p>
2672   * Description: <b>A patient identifier</b><br>
2673   * Type: <b>token</b><br>
2674   * Path: <b>Patient.identifier</b><br>
2675   * </p>
2676   */
2677  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2678
2679 /**
2680   * Search parameter: <b>language</b>
2681   * <p>
2682   * Description: <b>Language code (irrespective of use value)</b><br>
2683   * Type: <b>token</b><br>
2684   * Path: <b>Patient.communication.language</b><br>
2685   * </p>
2686   */
2687  @SearchParamDefinition(name="language", path="Patient.communication.language", description="Language code (irrespective of use value)", type="token" )
2688  public static final String SP_LANGUAGE = "language";
2689 /**
2690   * <b>Fluent Client</b> search parameter constant for <b>language</b>
2691   * <p>
2692   * Description: <b>Language code (irrespective of use value)</b><br>
2693   * Type: <b>token</b><br>
2694   * Path: <b>Patient.communication.language</b><br>
2695   * </p>
2696   */
2697  public static final ca.uhn.fhir.rest.gclient.TokenClientParam LANGUAGE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_LANGUAGE);
2698
2699 /**
2700   * Search parameter: <b>link</b>
2701   * <p>
2702   * Description: <b>All patients/related persons linked to the given patient</b><br>
2703   * Type: <b>reference</b><br>
2704   * Path: <b>Patient.link.other</b><br>
2705   * </p>
2706   */
2707  @SearchParamDefinition(name="link", path="Patient.link.other", description="All patients/related persons linked to the given patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={Patient.class, RelatedPerson.class } )
2708  public static final String SP_LINK = "link";
2709 /**
2710   * <b>Fluent Client</b> search parameter constant for <b>link</b>
2711   * <p>
2712   * Description: <b>All patients/related persons linked to the given patient</b><br>
2713   * Type: <b>reference</b><br>
2714   * Path: <b>Patient.link.other</b><br>
2715   * </p>
2716   */
2717  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LINK = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LINK);
2718
2719/**
2720   * Constant for fluent queries to be used to add include statements. Specifies
2721   * the path value of "<b>Patient:link</b>".
2722   */
2723  public static final ca.uhn.fhir.model.api.Include INCLUDE_LINK = new ca.uhn.fhir.model.api.Include("Patient:link").toLocked();
2724
2725 /**
2726   * Search parameter: <b>name</b>
2727   * <p>
2728   * Description: <b>A server defined search that may match any of the string fields in the HumanName, including family, given, prefix, suffix, and/or text</b><br>
2729   * Type: <b>string</b><br>
2730   * Path: <b>Patient.name</b><br>
2731   * </p>
2732   */
2733  @SearchParamDefinition(name="name", path="Patient.name", description="A server defined search that may match any of the string fields in the HumanName, including family, given, prefix, suffix, and/or text", type="string" )
2734  public static final String SP_NAME = "name";
2735 /**
2736   * <b>Fluent Client</b> search parameter constant for <b>name</b>
2737   * <p>
2738   * Description: <b>A server defined search that may match any of the string fields in the HumanName, including family, given, prefix, suffix, and/or text</b><br>
2739   * Type: <b>string</b><br>
2740   * Path: <b>Patient.name</b><br>
2741   * </p>
2742   */
2743  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
2744
2745 /**
2746   * Search parameter: <b>organization</b>
2747   * <p>
2748   * Description: <b>The organization that is the custodian of the patient record</b><br>
2749   * Type: <b>reference</b><br>
2750   * Path: <b>Patient.managingOrganization</b><br>
2751   * </p>
2752   */
2753  @SearchParamDefinition(name="organization", path="Patient.managingOrganization", description="The organization that is the custodian of the patient record", type="reference", target={Organization.class } )
2754  public static final String SP_ORGANIZATION = "organization";
2755 /**
2756   * <b>Fluent Client</b> search parameter constant for <b>organization</b>
2757   * <p>
2758   * Description: <b>The organization that is the custodian of the patient record</b><br>
2759   * Type: <b>reference</b><br>
2760   * Path: <b>Patient.managingOrganization</b><br>
2761   * </p>
2762   */
2763  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION);
2764
2765/**
2766   * Constant for fluent queries to be used to add include statements. Specifies
2767   * the path value of "<b>Patient:organization</b>".
2768   */
2769  public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Patient:organization").toLocked();
2770
2771 /**
2772   * Search parameter: <b>part-agree</b>
2773   * <p>
2774   * Description: <b>Search by url for a participation agreement, which is stored as an extension referencing a DocumentReference</b><br>
2775   * Type: <b>reference</b><br>
2776   * Path: <b>Patient.extension('http://example.org/fhir/StructureDefinition/participation-agreement').value</b><br>
2777   * </p>
2778   */
2779  @SearchParamDefinition(name="part-agree", path="Patient.extension('http://example.org/fhir/StructureDefinition/participation-agreement').value", description="Search by url for a participation agreement, which is stored as an extension referencing a DocumentReference", type="reference", target={DocumentReference.class } )
2780  public static final String SP_PART_AGREE = "part-agree";
2781 /**
2782   * <b>Fluent Client</b> search parameter constant for <b>part-agree</b>
2783   * <p>
2784   * Description: <b>Search by url for a participation agreement, which is stored as an extension referencing a DocumentReference</b><br>
2785   * Type: <b>reference</b><br>
2786   * Path: <b>Patient.extension('http://example.org/fhir/StructureDefinition/participation-agreement').value</b><br>
2787   * </p>
2788   */
2789  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_AGREE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_AGREE);
2790
2791/**
2792   * Constant for fluent queries to be used to add include statements. Specifies
2793   * the path value of "<b>Patient:part-agree</b>".
2794   */
2795  public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_AGREE = new ca.uhn.fhir.model.api.Include("Patient:part-agree").toLocked();
2796
2797 /**
2798   * Search parameter: <b>address-city</b>
2799   * <p>
2800   * Description: <b>Multiple Resources: 
2801
2802* [Patient](patient.html): A city specified in an address
2803* [Person](person.html): A city specified in an address
2804* [Practitioner](practitioner.html): A city specified in an address
2805* [RelatedPerson](relatedperson.html): A city specified in an address
2806</b><br>
2807   * Type: <b>string</b><br>
2808   * Path: <b>Patient.address.city | Person.address.city | Practitioner.address.city | RelatedPerson.address.city</b><br>
2809   * </p>
2810   */
2811  @SearchParamDefinition(name="address-city", path="Patient.address.city | Person.address.city | Practitioner.address.city | RelatedPerson.address.city", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A city specified in an address\r\n* [Person](person.html): A city specified in an address\r\n* [Practitioner](practitioner.html): A city specified in an address\r\n* [RelatedPerson](relatedperson.html): A city specified in an address\r\n", type="string" )
2812  public static final String SP_ADDRESS_CITY = "address-city";
2813 /**
2814   * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
2815   * <p>
2816   * Description: <b>Multiple Resources: 
2817
2818* [Patient](patient.html): A city specified in an address
2819* [Person](person.html): A city specified in an address
2820* [Practitioner](practitioner.html): A city specified in an address
2821* [RelatedPerson](relatedperson.html): A city specified in an address
2822</b><br>
2823   * Type: <b>string</b><br>
2824   * Path: <b>Patient.address.city | Person.address.city | Practitioner.address.city | RelatedPerson.address.city</b><br>
2825   * </p>
2826   */
2827  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_CITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_CITY);
2828
2829 /**
2830   * Search parameter: <b>address-country</b>
2831   * <p>
2832   * Description: <b>Multiple Resources: 
2833
2834* [Patient](patient.html): A country specified in an address
2835* [Person](person.html): A country specified in an address
2836* [Practitioner](practitioner.html): A country specified in an address
2837* [RelatedPerson](relatedperson.html): A country specified in an address
2838</b><br>
2839   * Type: <b>string</b><br>
2840   * Path: <b>Patient.address.country | Person.address.country | Practitioner.address.country | RelatedPerson.address.country</b><br>
2841   * </p>
2842   */
2843  @SearchParamDefinition(name="address-country", path="Patient.address.country | Person.address.country | Practitioner.address.country | RelatedPerson.address.country", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A country specified in an address\r\n* [Person](person.html): A country specified in an address\r\n* [Practitioner](practitioner.html): A country specified in an address\r\n* [RelatedPerson](relatedperson.html): A country specified in an address\r\n", type="string" )
2844  public static final String SP_ADDRESS_COUNTRY = "address-country";
2845 /**
2846   * <b>Fluent Client</b> search parameter constant for <b>address-country</b>
2847   * <p>
2848   * Description: <b>Multiple Resources: 
2849
2850* [Patient](patient.html): A country specified in an address
2851* [Person](person.html): A country specified in an address
2852* [Practitioner](practitioner.html): A country specified in an address
2853* [RelatedPerson](relatedperson.html): A country specified in an address
2854</b><br>
2855   * Type: <b>string</b><br>
2856   * Path: <b>Patient.address.country | Person.address.country | Practitioner.address.country | RelatedPerson.address.country</b><br>
2857   * </p>
2858   */
2859  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_COUNTRY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_COUNTRY);
2860
2861 /**
2862   * Search parameter: <b>address-postalcode</b>
2863   * <p>
2864   * Description: <b>Multiple Resources: 
2865
2866* [Patient](patient.html): A postalCode specified in an address
2867* [Person](person.html): A postal code specified in an address
2868* [Practitioner](practitioner.html): A postalCode specified in an address
2869* [RelatedPerson](relatedperson.html): A postal code specified in an address
2870</b><br>
2871   * Type: <b>string</b><br>
2872   * Path: <b>Patient.address.postalCode | Person.address.postalCode | Practitioner.address.postalCode | RelatedPerson.address.postalCode</b><br>
2873   * </p>
2874   */
2875  @SearchParamDefinition(name="address-postalcode", path="Patient.address.postalCode | Person.address.postalCode | Practitioner.address.postalCode | RelatedPerson.address.postalCode", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A postalCode specified in an address\r\n* [Person](person.html): A postal code specified in an address\r\n* [Practitioner](practitioner.html): A postalCode specified in an address\r\n* [RelatedPerson](relatedperson.html): A postal code specified in an address\r\n", type="string" )
2876  public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
2877 /**
2878   * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
2879   * <p>
2880   * Description: <b>Multiple Resources: 
2881
2882* [Patient](patient.html): A postalCode specified in an address
2883* [Person](person.html): A postal code specified in an address
2884* [Practitioner](practitioner.html): A postalCode specified in an address
2885* [RelatedPerson](relatedperson.html): A postal code specified in an address
2886</b><br>
2887   * Type: <b>string</b><br>
2888   * Path: <b>Patient.address.postalCode | Person.address.postalCode | Practitioner.address.postalCode | RelatedPerson.address.postalCode</b><br>
2889   * </p>
2890   */
2891  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_POSTALCODE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_POSTALCODE);
2892
2893 /**
2894   * Search parameter: <b>address-state</b>
2895   * <p>
2896   * Description: <b>Multiple Resources: 
2897
2898* [Patient](patient.html): A state specified in an address
2899* [Person](person.html): A state specified in an address
2900* [Practitioner](practitioner.html): A state specified in an address
2901* [RelatedPerson](relatedperson.html): A state specified in an address
2902</b><br>
2903   * Type: <b>string</b><br>
2904   * Path: <b>Patient.address.state | Person.address.state | Practitioner.address.state | RelatedPerson.address.state</b><br>
2905   * </p>
2906   */
2907  @SearchParamDefinition(name="address-state", path="Patient.address.state | Person.address.state | Practitioner.address.state | RelatedPerson.address.state", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A state specified in an address\r\n* [Person](person.html): A state specified in an address\r\n* [Practitioner](practitioner.html): A state specified in an address\r\n* [RelatedPerson](relatedperson.html): A state specified in an address\r\n", type="string" )
2908  public static final String SP_ADDRESS_STATE = "address-state";
2909 /**
2910   * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
2911   * <p>
2912   * Description: <b>Multiple Resources: 
2913
2914* [Patient](patient.html): A state specified in an address
2915* [Person](person.html): A state specified in an address
2916* [Practitioner](practitioner.html): A state specified in an address
2917* [RelatedPerson](relatedperson.html): A state specified in an address
2918</b><br>
2919   * Type: <b>string</b><br>
2920   * Path: <b>Patient.address.state | Person.address.state | Practitioner.address.state | RelatedPerson.address.state</b><br>
2921   * </p>
2922   */
2923  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_STATE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_STATE);
2924
2925 /**
2926   * Search parameter: <b>address-use</b>
2927   * <p>
2928   * Description: <b>Multiple Resources: 
2929
2930* [Patient](patient.html): A use code specified in an address
2931* [Person](person.html): A use code specified in an address
2932* [Practitioner](practitioner.html): A use code specified in an address
2933* [RelatedPerson](relatedperson.html): A use code specified in an address
2934</b><br>
2935   * Type: <b>token</b><br>
2936   * Path: <b>Patient.address.use | Person.address.use | Practitioner.address.use | RelatedPerson.address.use</b><br>
2937   * </p>
2938   */
2939  @SearchParamDefinition(name="address-use", path="Patient.address.use | Person.address.use | Practitioner.address.use | RelatedPerson.address.use", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A use code specified in an address\r\n* [Person](person.html): A use code specified in an address\r\n* [Practitioner](practitioner.html): A use code specified in an address\r\n* [RelatedPerson](relatedperson.html): A use code specified in an address\r\n", type="token" )
2940  public static final String SP_ADDRESS_USE = "address-use";
2941 /**
2942   * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
2943   * <p>
2944   * Description: <b>Multiple Resources: 
2945
2946* [Patient](patient.html): A use code specified in an address
2947* [Person](person.html): A use code specified in an address
2948* [Practitioner](practitioner.html): A use code specified in an address
2949* [RelatedPerson](relatedperson.html): A use code specified in an address
2950</b><br>
2951   * Type: <b>token</b><br>
2952   * Path: <b>Patient.address.use | Person.address.use | Practitioner.address.use | RelatedPerson.address.use</b><br>
2953   * </p>
2954   */
2955  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ADDRESS_USE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ADDRESS_USE);
2956
2957 /**
2958   * Search parameter: <b>address</b>
2959   * <p>
2960   * Description: <b>Multiple Resources: 
2961
2962* [Patient](patient.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text
2963* [Person](person.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text
2964* [Practitioner](practitioner.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text
2965* [RelatedPerson](relatedperson.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text
2966</b><br>
2967   * Type: <b>string</b><br>
2968   * Path: <b>Patient.address | Person.address | Practitioner.address | RelatedPerson.address</b><br>
2969   * </p>
2970   */
2971  @SearchParamDefinition(name="address", path="Patient.address | Person.address | Practitioner.address | RelatedPerson.address", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text\r\n* [Person](person.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text\r\n* [Practitioner](practitioner.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text\r\n* [RelatedPerson](relatedperson.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text\r\n", type="string" )
2972  public static final String SP_ADDRESS = "address";
2973 /**
2974   * <b>Fluent Client</b> search parameter constant for <b>address</b>
2975   * <p>
2976   * Description: <b>Multiple Resources: 
2977
2978* [Patient](patient.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text
2979* [Person](person.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text
2980* [Practitioner](practitioner.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text
2981* [RelatedPerson](relatedperson.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text
2982</b><br>
2983   * Type: <b>string</b><br>
2984   * Path: <b>Patient.address | Person.address | Practitioner.address | RelatedPerson.address</b><br>
2985   * </p>
2986   */
2987  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS);
2988
2989 /**
2990   * Search parameter: <b>birthdate</b>
2991   * <p>
2992   * Description: <b>Multiple Resources: 
2993
2994* [Patient](patient.html): The patient's date of birth
2995* [Person](person.html): The person's date of birth
2996* [RelatedPerson](relatedperson.html): The Related Person's date of birth
2997</b><br>
2998   * Type: <b>date</b><br>
2999   * Path: <b>Patient.birthDate | Person.birthDate | RelatedPerson.birthDate</b><br>
3000   * </p>
3001   */
3002  @SearchParamDefinition(name="birthdate", path="Patient.birthDate | Person.birthDate | RelatedPerson.birthDate", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): The patient's date of birth\r\n* [Person](person.html): The person's date of birth\r\n* [RelatedPerson](relatedperson.html): The Related Person's date of birth\r\n", type="date" )
3003  public static final String SP_BIRTHDATE = "birthdate";
3004 /**
3005   * <b>Fluent Client</b> search parameter constant for <b>birthdate</b>
3006   * <p>
3007   * Description: <b>Multiple Resources: 
3008
3009* [Patient](patient.html): The patient's date of birth
3010* [Person](person.html): The person's date of birth
3011* [RelatedPerson](relatedperson.html): The Related Person's date of birth
3012</b><br>
3013   * Type: <b>date</b><br>
3014   * Path: <b>Patient.birthDate | Person.birthDate | RelatedPerson.birthDate</b><br>
3015   * </p>
3016   */
3017  public static final ca.uhn.fhir.rest.gclient.DateClientParam BIRTHDATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_BIRTHDATE);
3018
3019 /**
3020   * Search parameter: <b>email</b>
3021   * <p>
3022   * Description: <b>Multiple Resources: 
3023
3024* [Patient](patient.html): A value in an email contact
3025* [Person](person.html): A value in an email contact
3026* [Practitioner](practitioner.html): A value in an email contact
3027* [PractitionerRole](practitionerrole.html): A value in an email contact
3028* [RelatedPerson](relatedperson.html): A value in an email contact
3029</b><br>
3030   * Type: <b>token</b><br>
3031   * Path: <b>Patient.telecom.where(system='email') | Person.telecom.where(system='email') | Practitioner.telecom.where(system='email') | PractitionerRole.contact.telecom.where(system='email') | RelatedPerson.telecom.where(system='email')</b><br>
3032   * </p>
3033   */
3034  @SearchParamDefinition(name="email", path="Patient.telecom.where(system='email') | Person.telecom.where(system='email') | Practitioner.telecom.where(system='email') | PractitionerRole.contact.telecom.where(system='email') | RelatedPerson.telecom.where(system='email')", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A value in an email contact\r\n* [Person](person.html): A value in an email contact\r\n* [Practitioner](practitioner.html): A value in an email contact\r\n* [PractitionerRole](practitionerrole.html): A value in an email contact\r\n* [RelatedPerson](relatedperson.html): A value in an email contact\r\n", type="token" )
3035  public static final String SP_EMAIL = "email";
3036 /**
3037   * <b>Fluent Client</b> search parameter constant for <b>email</b>
3038   * <p>
3039   * Description: <b>Multiple Resources: 
3040
3041* [Patient](patient.html): A value in an email contact
3042* [Person](person.html): A value in an email contact
3043* [Practitioner](practitioner.html): A value in an email contact
3044* [PractitionerRole](practitionerrole.html): A value in an email contact
3045* [RelatedPerson](relatedperson.html): A value in an email contact
3046</b><br>
3047   * Type: <b>token</b><br>
3048   * Path: <b>Patient.telecom.where(system='email') | Person.telecom.where(system='email') | Practitioner.telecom.where(system='email') | PractitionerRole.contact.telecom.where(system='email') | RelatedPerson.telecom.where(system='email')</b><br>
3049   * </p>
3050   */
3051  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EMAIL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EMAIL);
3052
3053 /**
3054   * Search parameter: <b>family</b>
3055   * <p>
3056   * Description: <b>Multiple Resources: 
3057
3058* [Patient](patient.html): A portion of the family name of the patient
3059* [Practitioner](practitioner.html): A portion of the family name
3060</b><br>
3061   * Type: <b>string</b><br>
3062   * Path: <b>Patient.name.family | Practitioner.name.family</b><br>
3063   * </p>
3064   */
3065  @SearchParamDefinition(name="family", path="Patient.name.family | Practitioner.name.family", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A portion of the family name of the patient\r\n* [Practitioner](practitioner.html): A portion of the family name\r\n", type="string" )
3066  public static final String SP_FAMILY = "family";
3067 /**
3068   * <b>Fluent Client</b> search parameter constant for <b>family</b>
3069   * <p>
3070   * Description: <b>Multiple Resources: 
3071
3072* [Patient](patient.html): A portion of the family name of the patient
3073* [Practitioner](practitioner.html): A portion of the family name
3074</b><br>
3075   * Type: <b>string</b><br>
3076   * Path: <b>Patient.name.family | Practitioner.name.family</b><br>
3077   * </p>
3078   */
3079  public static final ca.uhn.fhir.rest.gclient.StringClientParam FAMILY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_FAMILY);
3080
3081 /**
3082   * Search parameter: <b>gender</b>
3083   * <p>
3084   * Description: <b>Multiple Resources: 
3085
3086* [Patient](patient.html): Gender of the patient
3087* [Person](person.html): The gender of the person
3088* [Practitioner](practitioner.html): Gender of the practitioner
3089* [RelatedPerson](relatedperson.html): Gender of the related person
3090</b><br>
3091   * Type: <b>token</b><br>
3092   * Path: <b>Patient.gender | Person.gender | Practitioner.gender | RelatedPerson.gender</b><br>
3093   * </p>
3094   */
3095  @SearchParamDefinition(name="gender", path="Patient.gender | Person.gender | Practitioner.gender | RelatedPerson.gender", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): Gender of the patient\r\n* [Person](person.html): The gender of the person\r\n* [Practitioner](practitioner.html): Gender of the practitioner\r\n* [RelatedPerson](relatedperson.html): Gender of the related person\r\n", type="token" )
3096  public static final String SP_GENDER = "gender";
3097 /**
3098   * <b>Fluent Client</b> search parameter constant for <b>gender</b>
3099   * <p>
3100   * Description: <b>Multiple Resources: 
3101
3102* [Patient](patient.html): Gender of the patient
3103* [Person](person.html): The gender of the person
3104* [Practitioner](practitioner.html): Gender of the practitioner
3105* [RelatedPerson](relatedperson.html): Gender of the related person
3106</b><br>
3107   * Type: <b>token</b><br>
3108   * Path: <b>Patient.gender | Person.gender | Practitioner.gender | RelatedPerson.gender</b><br>
3109   * </p>
3110   */
3111  public static final ca.uhn.fhir.rest.gclient.TokenClientParam GENDER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GENDER);
3112
3113 /**
3114   * Search parameter: <b>given</b>
3115   * <p>
3116   * Description: <b>Multiple Resources: 
3117
3118* [Patient](patient.html): A portion of the given name of the patient
3119* [Practitioner](practitioner.html): A portion of the given name
3120</b><br>
3121   * Type: <b>string</b><br>
3122   * Path: <b>Patient.name.given | Practitioner.name.given</b><br>
3123   * </p>
3124   */
3125  @SearchParamDefinition(name="given", path="Patient.name.given | Practitioner.name.given", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A portion of the given name of the patient\r\n* [Practitioner](practitioner.html): A portion of the given name\r\n", type="string" )
3126  public static final String SP_GIVEN = "given";
3127 /**
3128   * <b>Fluent Client</b> search parameter constant for <b>given</b>
3129   * <p>
3130   * Description: <b>Multiple Resources: 
3131
3132* [Patient](patient.html): A portion of the given name of the patient
3133* [Practitioner](practitioner.html): A portion of the given name
3134</b><br>
3135   * Type: <b>string</b><br>
3136   * Path: <b>Patient.name.given | Practitioner.name.given</b><br>
3137   * </p>
3138   */
3139  public static final ca.uhn.fhir.rest.gclient.StringClientParam GIVEN = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_GIVEN);
3140
3141 /**
3142   * Search parameter: <b>phone</b>
3143   * <p>
3144   * Description: <b>Multiple Resources: 
3145
3146* [Patient](patient.html): A value in a phone contact
3147* [Person](person.html): A value in a phone contact
3148* [Practitioner](practitioner.html): A value in a phone contact
3149* [PractitionerRole](practitionerrole.html): A value in a phone contact
3150* [RelatedPerson](relatedperson.html): A value in a phone contact
3151</b><br>
3152   * Type: <b>token</b><br>
3153   * Path: <b>Patient.telecom.where(system='phone') | Person.telecom.where(system='phone') | Practitioner.telecom.where(system='phone') | PractitionerRole.contact.telecom.where(system='phone') | RelatedPerson.telecom.where(system='phone')</b><br>
3154   * </p>
3155   */
3156  @SearchParamDefinition(name="phone", path="Patient.telecom.where(system='phone') | Person.telecom.where(system='phone') | Practitioner.telecom.where(system='phone') | PractitionerRole.contact.telecom.where(system='phone') | RelatedPerson.telecom.where(system='phone')", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A value in a phone contact\r\n* [Person](person.html): A value in a phone contact\r\n* [Practitioner](practitioner.html): A value in a phone contact\r\n* [PractitionerRole](practitionerrole.html): A value in a phone contact\r\n* [RelatedPerson](relatedperson.html): A value in a phone contact\r\n", type="token" )
3157  public static final String SP_PHONE = "phone";
3158 /**
3159   * <b>Fluent Client</b> search parameter constant for <b>phone</b>
3160   * <p>
3161   * Description: <b>Multiple Resources: 
3162
3163* [Patient](patient.html): A value in a phone contact
3164* [Person](person.html): A value in a phone contact
3165* [Practitioner](practitioner.html): A value in a phone contact
3166* [PractitionerRole](practitionerrole.html): A value in a phone contact
3167* [RelatedPerson](relatedperson.html): A value in a phone contact
3168</b><br>
3169   * Type: <b>token</b><br>
3170   * Path: <b>Patient.telecom.where(system='phone') | Person.telecom.where(system='phone') | Practitioner.telecom.where(system='phone') | PractitionerRole.contact.telecom.where(system='phone') | RelatedPerson.telecom.where(system='phone')</b><br>
3171   * </p>
3172   */
3173  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PHONE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PHONE);
3174
3175 /**
3176   * Search parameter: <b>phonetic</b>
3177   * <p>
3178   * Description: <b>Multiple Resources: 
3179
3180* [Patient](patient.html): A portion of either family or given name using some kind of phonetic matching algorithm
3181* [Person](person.html): A portion of name using some kind of phonetic matching algorithm
3182* [Practitioner](practitioner.html): A portion of either family or given name using some kind of phonetic matching algorithm
3183* [RelatedPerson](relatedperson.html): A portion of name using some kind of phonetic matching algorithm
3184</b><br>
3185   * Type: <b>string</b><br>
3186   * Path: <b>Patient.name | Person.name | Practitioner.name | RelatedPerson.name</b><br>
3187   * </p>
3188   */
3189  @SearchParamDefinition(name="phonetic", path="Patient.name | Person.name | Practitioner.name | RelatedPerson.name", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A portion of either family or given name using some kind of phonetic matching algorithm\r\n* [Person](person.html): A portion of name using some kind of phonetic matching algorithm\r\n* [Practitioner](practitioner.html): A portion of either family or given name using some kind of phonetic matching algorithm\r\n* [RelatedPerson](relatedperson.html): A portion of name using some kind of phonetic matching algorithm\r\n", type="string" )
3190  public static final String SP_PHONETIC = "phonetic";
3191 /**
3192   * <b>Fluent Client</b> search parameter constant for <b>phonetic</b>
3193   * <p>
3194   * Description: <b>Multiple Resources: 
3195
3196* [Patient](patient.html): A portion of either family or given name using some kind of phonetic matching algorithm
3197* [Person](person.html): A portion of name using some kind of phonetic matching algorithm
3198* [Practitioner](practitioner.html): A portion of either family or given name using some kind of phonetic matching algorithm
3199* [RelatedPerson](relatedperson.html): A portion of name using some kind of phonetic matching algorithm
3200</b><br>
3201   * Type: <b>string</b><br>
3202   * Path: <b>Patient.name | Person.name | Practitioner.name | RelatedPerson.name</b><br>
3203   * </p>
3204   */
3205  public static final ca.uhn.fhir.rest.gclient.StringClientParam PHONETIC = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PHONETIC);
3206
3207 /**
3208   * Search parameter: <b>telecom</b>
3209   * <p>
3210   * Description: <b>Multiple Resources: 
3211
3212* [Patient](patient.html): The value in any kind of telecom details of the patient
3213* [Person](person.html): The value in any kind of contact
3214* [Practitioner](practitioner.html): The value in any kind of contact
3215* [PractitionerRole](practitionerrole.html): The value in any kind of contact
3216* [RelatedPerson](relatedperson.html): The value in any kind of contact
3217</b><br>
3218   * Type: <b>token</b><br>
3219   * Path: <b>Patient.telecom | Person.telecom | Practitioner.telecom | PractitionerRole.contact.telecom | RelatedPerson.telecom</b><br>
3220   * </p>
3221   */
3222  @SearchParamDefinition(name="telecom", path="Patient.telecom | Person.telecom | Practitioner.telecom | PractitionerRole.contact.telecom | RelatedPerson.telecom", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): The value in any kind of telecom details of the patient\r\n* [Person](person.html): The value in any kind of contact\r\n* [Practitioner](practitioner.html): The value in any kind of contact\r\n* [PractitionerRole](practitionerrole.html): The value in any kind of contact\r\n* [RelatedPerson](relatedperson.html): The value in any kind of contact\r\n", type="token" )
3223  public static final String SP_TELECOM = "telecom";
3224 /**
3225   * <b>Fluent Client</b> search parameter constant for <b>telecom</b>
3226   * <p>
3227   * Description: <b>Multiple Resources: 
3228
3229* [Patient](patient.html): The value in any kind of telecom details of the patient
3230* [Person](person.html): The value in any kind of contact
3231* [Practitioner](practitioner.html): The value in any kind of contact
3232* [PractitionerRole](practitionerrole.html): The value in any kind of contact
3233* [RelatedPerson](relatedperson.html): The value in any kind of contact
3234</b><br>
3235   * Type: <b>token</b><br>
3236   * Path: <b>Patient.telecom | Person.telecom | Practitioner.telecom | PractitionerRole.contact.telecom | RelatedPerson.telecom</b><br>
3237   * </p>
3238   */
3239  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TELECOM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TELECOM);
3240
3241
3242}
3243