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