001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * Representation of a molecular sequence.
052 */
053@ResourceDef(name="MolecularSequence", profile="http://hl7.org/fhir/StructureDefinition/MolecularSequence")
054public class MolecularSequence extends DomainResource {
055
056    public enum OrientationType {
057        /**
058         * Sense orientation of reference sequence.
059         */
060        SENSE, 
061        /**
062         * Antisense orientation of reference sequence.
063         */
064        ANTISENSE, 
065        /**
066         * added to help the parsers with the generic types
067         */
068        NULL;
069        public static OrientationType fromCode(String codeString) throws FHIRException {
070            if (codeString == null || "".equals(codeString))
071                return null;
072        if ("sense".equals(codeString))
073          return SENSE;
074        if ("antisense".equals(codeString))
075          return ANTISENSE;
076        if (Configuration.isAcceptInvalidEnums())
077          return null;
078        else
079          throw new FHIRException("Unknown OrientationType code '"+codeString+"'");
080        }
081        public String toCode() {
082          switch (this) {
083            case SENSE: return "sense";
084            case ANTISENSE: return "antisense";
085            case NULL: return null;
086            default: return "?";
087          }
088        }
089        public String getSystem() {
090          switch (this) {
091            case SENSE: return "http://hl7.org/fhir/orientation-type";
092            case ANTISENSE: return "http://hl7.org/fhir/orientation-type";
093            case NULL: return null;
094            default: return "?";
095          }
096        }
097        public String getDefinition() {
098          switch (this) {
099            case SENSE: return "Sense orientation of reference sequence.";
100            case ANTISENSE: return "Antisense orientation of reference sequence.";
101            case NULL: return null;
102            default: return "?";
103          }
104        }
105        public String getDisplay() {
106          switch (this) {
107            case SENSE: return "Sense orientation of referenceSeq";
108            case ANTISENSE: return "Antisense orientation of referenceSeq";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113    }
114
115  public static class OrientationTypeEnumFactory implements EnumFactory<OrientationType> {
116    public OrientationType fromCode(String codeString) throws IllegalArgumentException {
117      if (codeString == null || "".equals(codeString))
118            if (codeString == null || "".equals(codeString))
119                return null;
120        if ("sense".equals(codeString))
121          return OrientationType.SENSE;
122        if ("antisense".equals(codeString))
123          return OrientationType.ANTISENSE;
124        throw new IllegalArgumentException("Unknown OrientationType code '"+codeString+"'");
125        }
126        public Enumeration<OrientationType> fromType(PrimitiveType<?> code) throws FHIRException {
127          if (code == null)
128            return null;
129          if (code.isEmpty())
130            return new Enumeration<OrientationType>(this, OrientationType.NULL, code);
131          String codeString = ((PrimitiveType) code).asStringValue();
132          if (codeString == null || "".equals(codeString))
133            return new Enumeration<OrientationType>(this, OrientationType.NULL, code);
134        if ("sense".equals(codeString))
135          return new Enumeration<OrientationType>(this, OrientationType.SENSE, code);
136        if ("antisense".equals(codeString))
137          return new Enumeration<OrientationType>(this, OrientationType.ANTISENSE, code);
138        throw new FHIRException("Unknown OrientationType code '"+codeString+"'");
139        }
140    public String toCode(OrientationType code) {
141      if (code == OrientationType.SENSE)
142        return "sense";
143      if (code == OrientationType.ANTISENSE)
144        return "antisense";
145      return "?";
146      }
147    public String toSystem(OrientationType code) {
148      return code.getSystem();
149      }
150    }
151
152    public enum SequenceType {
153        /**
154         * Amino acid sequence.
155         */
156        AA, 
157        /**
158         * DNA Sequence.
159         */
160        DNA, 
161        /**
162         * RNA Sequence.
163         */
164        RNA, 
165        /**
166         * added to help the parsers with the generic types
167         */
168        NULL;
169        public static SequenceType fromCode(String codeString) throws FHIRException {
170            if (codeString == null || "".equals(codeString))
171                return null;
172        if ("aa".equals(codeString))
173          return AA;
174        if ("dna".equals(codeString))
175          return DNA;
176        if ("rna".equals(codeString))
177          return RNA;
178        if (Configuration.isAcceptInvalidEnums())
179          return null;
180        else
181          throw new FHIRException("Unknown SequenceType code '"+codeString+"'");
182        }
183        public String toCode() {
184          switch (this) {
185            case AA: return "aa";
186            case DNA: return "dna";
187            case RNA: return "rna";
188            case NULL: return null;
189            default: return "?";
190          }
191        }
192        public String getSystem() {
193          switch (this) {
194            case AA: return "http://hl7.org/fhir/sequence-type";
195            case DNA: return "http://hl7.org/fhir/sequence-type";
196            case RNA: return "http://hl7.org/fhir/sequence-type";
197            case NULL: return null;
198            default: return "?";
199          }
200        }
201        public String getDefinition() {
202          switch (this) {
203            case AA: return "Amino acid sequence.";
204            case DNA: return "DNA Sequence.";
205            case RNA: return "RNA Sequence.";
206            case NULL: return null;
207            default: return "?";
208          }
209        }
210        public String getDisplay() {
211          switch (this) {
212            case AA: return "AA Sequence";
213            case DNA: return "DNA Sequence";
214            case RNA: return "RNA Sequence";
215            case NULL: return null;
216            default: return "?";
217          }
218        }
219    }
220
221  public static class SequenceTypeEnumFactory implements EnumFactory<SequenceType> {
222    public SequenceType fromCode(String codeString) throws IllegalArgumentException {
223      if (codeString == null || "".equals(codeString))
224            if (codeString == null || "".equals(codeString))
225                return null;
226        if ("aa".equals(codeString))
227          return SequenceType.AA;
228        if ("dna".equals(codeString))
229          return SequenceType.DNA;
230        if ("rna".equals(codeString))
231          return SequenceType.RNA;
232        throw new IllegalArgumentException("Unknown SequenceType code '"+codeString+"'");
233        }
234        public Enumeration<SequenceType> fromType(PrimitiveType<?> code) throws FHIRException {
235          if (code == null)
236            return null;
237          if (code.isEmpty())
238            return new Enumeration<SequenceType>(this, SequenceType.NULL, code);
239          String codeString = ((PrimitiveType) code).asStringValue();
240          if (codeString == null || "".equals(codeString))
241            return new Enumeration<SequenceType>(this, SequenceType.NULL, code);
242        if ("aa".equals(codeString))
243          return new Enumeration<SequenceType>(this, SequenceType.AA, code);
244        if ("dna".equals(codeString))
245          return new Enumeration<SequenceType>(this, SequenceType.DNA, code);
246        if ("rna".equals(codeString))
247          return new Enumeration<SequenceType>(this, SequenceType.RNA, code);
248        throw new FHIRException("Unknown SequenceType code '"+codeString+"'");
249        }
250    public String toCode(SequenceType code) {
251      if (code == SequenceType.AA)
252        return "aa";
253      if (code == SequenceType.DNA)
254        return "dna";
255      if (code == SequenceType.RNA)
256        return "rna";
257      return "?";
258      }
259    public String toSystem(SequenceType code) {
260      return code.getSystem();
261      }
262    }
263
264    public enum StrandType {
265        /**
266         * Watson strand of starting sequence.
267         */
268        WATSON, 
269        /**
270         * Crick strand of starting sequence.
271         */
272        CRICK, 
273        /**
274         * added to help the parsers with the generic types
275         */
276        NULL;
277        public static StrandType fromCode(String codeString) throws FHIRException {
278            if (codeString == null || "".equals(codeString))
279                return null;
280        if ("watson".equals(codeString))
281          return WATSON;
282        if ("crick".equals(codeString))
283          return CRICK;
284        if (Configuration.isAcceptInvalidEnums())
285          return null;
286        else
287          throw new FHIRException("Unknown StrandType code '"+codeString+"'");
288        }
289        public String toCode() {
290          switch (this) {
291            case WATSON: return "watson";
292            case CRICK: return "crick";
293            case NULL: return null;
294            default: return "?";
295          }
296        }
297        public String getSystem() {
298          switch (this) {
299            case WATSON: return "http://hl7.org/fhir/strand-type";
300            case CRICK: return "http://hl7.org/fhir/strand-type";
301            case NULL: return null;
302            default: return "?";
303          }
304        }
305        public String getDefinition() {
306          switch (this) {
307            case WATSON: return "Watson strand of starting sequence.";
308            case CRICK: return "Crick strand of starting sequence.";
309            case NULL: return null;
310            default: return "?";
311          }
312        }
313        public String getDisplay() {
314          switch (this) {
315            case WATSON: return "Watson strand of starting sequence";
316            case CRICK: return "Crick strand of starting sequence";
317            case NULL: return null;
318            default: return "?";
319          }
320        }
321    }
322
323  public static class StrandTypeEnumFactory implements EnumFactory<StrandType> {
324    public StrandType fromCode(String codeString) throws IllegalArgumentException {
325      if (codeString == null || "".equals(codeString))
326            if (codeString == null || "".equals(codeString))
327                return null;
328        if ("watson".equals(codeString))
329          return StrandType.WATSON;
330        if ("crick".equals(codeString))
331          return StrandType.CRICK;
332        throw new IllegalArgumentException("Unknown StrandType code '"+codeString+"'");
333        }
334        public Enumeration<StrandType> fromType(PrimitiveType<?> code) throws FHIRException {
335          if (code == null)
336            return null;
337          if (code.isEmpty())
338            return new Enumeration<StrandType>(this, StrandType.NULL, code);
339          String codeString = ((PrimitiveType) code).asStringValue();
340          if (codeString == null || "".equals(codeString))
341            return new Enumeration<StrandType>(this, StrandType.NULL, code);
342        if ("watson".equals(codeString))
343          return new Enumeration<StrandType>(this, StrandType.WATSON, code);
344        if ("crick".equals(codeString))
345          return new Enumeration<StrandType>(this, StrandType.CRICK, code);
346        throw new FHIRException("Unknown StrandType code '"+codeString+"'");
347        }
348    public String toCode(StrandType code) {
349      if (code == StrandType.WATSON)
350        return "watson";
351      if (code == StrandType.CRICK)
352        return "crick";
353      return "?";
354      }
355    public String toSystem(StrandType code) {
356      return code.getSystem();
357      }
358    }
359
360    @Block()
361    public static class MolecularSequenceRelativeComponent extends BackboneElement implements IBaseBackboneElement {
362        /**
363         * These are different ways of identifying nucleotides or amino acids within a sequence. Different databases and file types may use different systems. For detail definitions, see https://loinc.org/92822-6/ for more detail.
364         */
365        @Child(name = "coordinateSystem", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true)
366        @Description(shortDefinition="Ways of identifying nucleotides or amino acids within a sequence", formalDefinition="These are different ways of identifying nucleotides or amino acids within a sequence. Different databases and file types may use different systems. For detail definitions, see https://loinc.org/92822-6/ for more detail." )
367        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://loinc.org/LL5323-2/")
368        protected CodeableConcept coordinateSystem;
369
370        /**
371         * Indicates the order in which the sequence should be considered when putting multiple 'relative' elements together.
372         */
373        @Child(name = "ordinalPosition", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=false)
374        @Description(shortDefinition="Indicates the order in which the sequence should be considered when putting multiple 'relative' elements together", formalDefinition="Indicates the order in which the sequence should be considered when putting multiple 'relative' elements together." )
375        protected IntegerType ordinalPosition;
376
377        /**
378         * Indicates the nucleotide range in the composed sequence when multiple 'relative' elements are used together.
379         */
380        @Child(name = "sequenceRange", type = {Range.class}, order=3, min=0, max=1, modifier=false, summary=false)
381        @Description(shortDefinition="Indicates the nucleotide range in the composed sequence when multiple 'relative' elements are used together", formalDefinition="Indicates the nucleotide range in the composed sequence when multiple 'relative' elements are used together." )
382        protected Range sequenceRange;
383
384        /**
385         * A sequence that is used as a starting sequence to describe variants that are present in a sequence analyzed.
386         */
387        @Child(name = "startingSequence", type = {}, order=4, min=0, max=1, modifier=false, summary=true)
388        @Description(shortDefinition="A sequence used as starting sequence", formalDefinition="A sequence that is used as a starting sequence to describe variants that are present in a sequence analyzed." )
389        protected MolecularSequenceRelativeStartingSequenceComponent startingSequence;
390
391        /**
392         * Changes in sequence from the starting sequence.
393         */
394        @Child(name = "edit", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
395        @Description(shortDefinition="Changes in sequence from the starting sequence", formalDefinition="Changes in sequence from the starting sequence." )
396        protected List<MolecularSequenceRelativeEditComponent> edit;
397
398        private static final long serialVersionUID = -1455983973L;
399
400    /**
401     * Constructor
402     */
403      public MolecularSequenceRelativeComponent() {
404        super();
405      }
406
407    /**
408     * Constructor
409     */
410      public MolecularSequenceRelativeComponent(CodeableConcept coordinateSystem) {
411        super();
412        this.setCoordinateSystem(coordinateSystem);
413      }
414
415        /**
416         * @return {@link #coordinateSystem} (These are different ways of identifying nucleotides or amino acids within a sequence. Different databases and file types may use different systems. For detail definitions, see https://loinc.org/92822-6/ for more detail.)
417         */
418        public CodeableConcept getCoordinateSystem() { 
419          if (this.coordinateSystem == null)
420            if (Configuration.errorOnAutoCreate())
421              throw new Error("Attempt to auto-create MolecularSequenceRelativeComponent.coordinateSystem");
422            else if (Configuration.doAutoCreate())
423              this.coordinateSystem = new CodeableConcept(); // cc
424          return this.coordinateSystem;
425        }
426
427        public boolean hasCoordinateSystem() { 
428          return this.coordinateSystem != null && !this.coordinateSystem.isEmpty();
429        }
430
431        /**
432         * @param value {@link #coordinateSystem} (These are different ways of identifying nucleotides or amino acids within a sequence. Different databases and file types may use different systems. For detail definitions, see https://loinc.org/92822-6/ for more detail.)
433         */
434        public MolecularSequenceRelativeComponent setCoordinateSystem(CodeableConcept value) { 
435          this.coordinateSystem = value;
436          return this;
437        }
438
439        /**
440         * @return {@link #ordinalPosition} (Indicates the order in which the sequence should be considered when putting multiple 'relative' elements together.). This is the underlying object with id, value and extensions. The accessor "getOrdinalPosition" gives direct access to the value
441         */
442        public IntegerType getOrdinalPositionElement() { 
443          if (this.ordinalPosition == null)
444            if (Configuration.errorOnAutoCreate())
445              throw new Error("Attempt to auto-create MolecularSequenceRelativeComponent.ordinalPosition");
446            else if (Configuration.doAutoCreate())
447              this.ordinalPosition = new IntegerType(); // bb
448          return this.ordinalPosition;
449        }
450
451        public boolean hasOrdinalPositionElement() { 
452          return this.ordinalPosition != null && !this.ordinalPosition.isEmpty();
453        }
454
455        public boolean hasOrdinalPosition() { 
456          return this.ordinalPosition != null && !this.ordinalPosition.isEmpty();
457        }
458
459        /**
460         * @param value {@link #ordinalPosition} (Indicates the order in which the sequence should be considered when putting multiple 'relative' elements together.). This is the underlying object with id, value and extensions. The accessor "getOrdinalPosition" gives direct access to the value
461         */
462        public MolecularSequenceRelativeComponent setOrdinalPositionElement(IntegerType value) { 
463          this.ordinalPosition = value;
464          return this;
465        }
466
467        /**
468         * @return Indicates the order in which the sequence should be considered when putting multiple 'relative' elements together.
469         */
470        public int getOrdinalPosition() { 
471          return this.ordinalPosition == null || this.ordinalPosition.isEmpty() ? 0 : this.ordinalPosition.getValue();
472        }
473
474        /**
475         * @param value Indicates the order in which the sequence should be considered when putting multiple 'relative' elements together.
476         */
477        public MolecularSequenceRelativeComponent setOrdinalPosition(int value) { 
478            if (this.ordinalPosition == null)
479              this.ordinalPosition = new IntegerType();
480            this.ordinalPosition.setValue(value);
481          return this;
482        }
483
484        /**
485         * @return {@link #sequenceRange} (Indicates the nucleotide range in the composed sequence when multiple 'relative' elements are used together.)
486         */
487        public Range getSequenceRange() { 
488          if (this.sequenceRange == null)
489            if (Configuration.errorOnAutoCreate())
490              throw new Error("Attempt to auto-create MolecularSequenceRelativeComponent.sequenceRange");
491            else if (Configuration.doAutoCreate())
492              this.sequenceRange = new Range(); // cc
493          return this.sequenceRange;
494        }
495
496        public boolean hasSequenceRange() { 
497          return this.sequenceRange != null && !this.sequenceRange.isEmpty();
498        }
499
500        /**
501         * @param value {@link #sequenceRange} (Indicates the nucleotide range in the composed sequence when multiple 'relative' elements are used together.)
502         */
503        public MolecularSequenceRelativeComponent setSequenceRange(Range value) { 
504          this.sequenceRange = value;
505          return this;
506        }
507
508        /**
509         * @return {@link #startingSequence} (A sequence that is used as a starting sequence to describe variants that are present in a sequence analyzed.)
510         */
511        public MolecularSequenceRelativeStartingSequenceComponent getStartingSequence() { 
512          if (this.startingSequence == null)
513            if (Configuration.errorOnAutoCreate())
514              throw new Error("Attempt to auto-create MolecularSequenceRelativeComponent.startingSequence");
515            else if (Configuration.doAutoCreate())
516              this.startingSequence = new MolecularSequenceRelativeStartingSequenceComponent(); // cc
517          return this.startingSequence;
518        }
519
520        public boolean hasStartingSequence() { 
521          return this.startingSequence != null && !this.startingSequence.isEmpty();
522        }
523
524        /**
525         * @param value {@link #startingSequence} (A sequence that is used as a starting sequence to describe variants that are present in a sequence analyzed.)
526         */
527        public MolecularSequenceRelativeComponent setStartingSequence(MolecularSequenceRelativeStartingSequenceComponent value) { 
528          this.startingSequence = value;
529          return this;
530        }
531
532        /**
533         * @return {@link #edit} (Changes in sequence from the starting sequence.)
534         */
535        public List<MolecularSequenceRelativeEditComponent> getEdit() { 
536          if (this.edit == null)
537            this.edit = new ArrayList<MolecularSequenceRelativeEditComponent>();
538          return this.edit;
539        }
540
541        /**
542         * @return Returns a reference to <code>this</code> for easy method chaining
543         */
544        public MolecularSequenceRelativeComponent setEdit(List<MolecularSequenceRelativeEditComponent> theEdit) { 
545          this.edit = theEdit;
546          return this;
547        }
548
549        public boolean hasEdit() { 
550          if (this.edit == null)
551            return false;
552          for (MolecularSequenceRelativeEditComponent item : this.edit)
553            if (!item.isEmpty())
554              return true;
555          return false;
556        }
557
558        public MolecularSequenceRelativeEditComponent addEdit() { //3
559          MolecularSequenceRelativeEditComponent t = new MolecularSequenceRelativeEditComponent();
560          if (this.edit == null)
561            this.edit = new ArrayList<MolecularSequenceRelativeEditComponent>();
562          this.edit.add(t);
563          return t;
564        }
565
566        public MolecularSequenceRelativeComponent addEdit(MolecularSequenceRelativeEditComponent t) { //3
567          if (t == null)
568            return this;
569          if (this.edit == null)
570            this.edit = new ArrayList<MolecularSequenceRelativeEditComponent>();
571          this.edit.add(t);
572          return this;
573        }
574
575        /**
576         * @return The first repetition of repeating field {@link #edit}, creating it if it does not already exist {3}
577         */
578        public MolecularSequenceRelativeEditComponent getEditFirstRep() { 
579          if (getEdit().isEmpty()) {
580            addEdit();
581          }
582          return getEdit().get(0);
583        }
584
585        protected void listChildren(List<Property> children) {
586          super.listChildren(children);
587          children.add(new Property("coordinateSystem", "CodeableConcept", "These are different ways of identifying nucleotides or amino acids within a sequence. Different databases and file types may use different systems. For detail definitions, see https://loinc.org/92822-6/ for more detail.", 0, 1, coordinateSystem));
588          children.add(new Property("ordinalPosition", "integer", "Indicates the order in which the sequence should be considered when putting multiple 'relative' elements together.", 0, 1, ordinalPosition));
589          children.add(new Property("sequenceRange", "Range", "Indicates the nucleotide range in the composed sequence when multiple 'relative' elements are used together.", 0, 1, sequenceRange));
590          children.add(new Property("startingSequence", "", "A sequence that is used as a starting sequence to describe variants that are present in a sequence analyzed.", 0, 1, startingSequence));
591          children.add(new Property("edit", "", "Changes in sequence from the starting sequence.", 0, java.lang.Integer.MAX_VALUE, edit));
592        }
593
594        @Override
595        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
596          switch (_hash) {
597          case 354212295: /*coordinateSystem*/  return new Property("coordinateSystem", "CodeableConcept", "These are different ways of identifying nucleotides or amino acids within a sequence. Different databases and file types may use different systems. For detail definitions, see https://loinc.org/92822-6/ for more detail.", 0, 1, coordinateSystem);
598          case 626439866: /*ordinalPosition*/  return new Property("ordinalPosition", "integer", "Indicates the order in which the sequence should be considered when putting multiple 'relative' elements together.", 0, 1, ordinalPosition);
599          case -733314564: /*sequenceRange*/  return new Property("sequenceRange", "Range", "Indicates the nucleotide range in the composed sequence when multiple 'relative' elements are used together.", 0, 1, sequenceRange);
600          case 1493400609: /*startingSequence*/  return new Property("startingSequence", "", "A sequence that is used as a starting sequence to describe variants that are present in a sequence analyzed.", 0, 1, startingSequence);
601          case 3108362: /*edit*/  return new Property("edit", "", "Changes in sequence from the starting sequence.", 0, java.lang.Integer.MAX_VALUE, edit);
602          default: return super.getNamedProperty(_hash, _name, _checkValid);
603          }
604
605        }
606
607      @Override
608      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
609        switch (hash) {
610        case 354212295: /*coordinateSystem*/ return this.coordinateSystem == null ? new Base[0] : new Base[] {this.coordinateSystem}; // CodeableConcept
611        case 626439866: /*ordinalPosition*/ return this.ordinalPosition == null ? new Base[0] : new Base[] {this.ordinalPosition}; // IntegerType
612        case -733314564: /*sequenceRange*/ return this.sequenceRange == null ? new Base[0] : new Base[] {this.sequenceRange}; // Range
613        case 1493400609: /*startingSequence*/ return this.startingSequence == null ? new Base[0] : new Base[] {this.startingSequence}; // MolecularSequenceRelativeStartingSequenceComponent
614        case 3108362: /*edit*/ return this.edit == null ? new Base[0] : this.edit.toArray(new Base[this.edit.size()]); // MolecularSequenceRelativeEditComponent
615        default: return super.getProperty(hash, name, checkValid);
616        }
617
618      }
619
620      @Override
621      public Base setProperty(int hash, String name, Base value) throws FHIRException {
622        switch (hash) {
623        case 354212295: // coordinateSystem
624          this.coordinateSystem = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
625          return value;
626        case 626439866: // ordinalPosition
627          this.ordinalPosition = TypeConvertor.castToInteger(value); // IntegerType
628          return value;
629        case -733314564: // sequenceRange
630          this.sequenceRange = TypeConvertor.castToRange(value); // Range
631          return value;
632        case 1493400609: // startingSequence
633          this.startingSequence = (MolecularSequenceRelativeStartingSequenceComponent) value; // MolecularSequenceRelativeStartingSequenceComponent
634          return value;
635        case 3108362: // edit
636          this.getEdit().add((MolecularSequenceRelativeEditComponent) value); // MolecularSequenceRelativeEditComponent
637          return value;
638        default: return super.setProperty(hash, name, value);
639        }
640
641      }
642
643      @Override
644      public Base setProperty(String name, Base value) throws FHIRException {
645        if (name.equals("coordinateSystem")) {
646          this.coordinateSystem = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
647        } else if (name.equals("ordinalPosition")) {
648          this.ordinalPosition = TypeConvertor.castToInteger(value); // IntegerType
649        } else if (name.equals("sequenceRange")) {
650          this.sequenceRange = TypeConvertor.castToRange(value); // Range
651        } else if (name.equals("startingSequence")) {
652          this.startingSequence = (MolecularSequenceRelativeStartingSequenceComponent) value; // MolecularSequenceRelativeStartingSequenceComponent
653        } else if (name.equals("edit")) {
654          this.getEdit().add((MolecularSequenceRelativeEditComponent) value);
655        } else
656          return super.setProperty(name, value);
657        return value;
658      }
659
660  @Override
661  public void removeChild(String name, Base value) throws FHIRException {
662        if (name.equals("coordinateSystem")) {
663          this.coordinateSystem = null;
664        } else if (name.equals("ordinalPosition")) {
665          this.ordinalPosition = null;
666        } else if (name.equals("sequenceRange")) {
667          this.sequenceRange = null;
668        } else if (name.equals("startingSequence")) {
669          this.startingSequence = (MolecularSequenceRelativeStartingSequenceComponent) value; // MolecularSequenceRelativeStartingSequenceComponent
670        } else if (name.equals("edit")) {
671          this.getEdit().remove((MolecularSequenceRelativeEditComponent) value);
672        } else
673          super.removeChild(name, value);
674        
675      }
676
677      @Override
678      public Base makeProperty(int hash, String name) throws FHIRException {
679        switch (hash) {
680        case 354212295:  return getCoordinateSystem();
681        case 626439866:  return getOrdinalPositionElement();
682        case -733314564:  return getSequenceRange();
683        case 1493400609:  return getStartingSequence();
684        case 3108362:  return addEdit(); 
685        default: return super.makeProperty(hash, name);
686        }
687
688      }
689
690      @Override
691      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
692        switch (hash) {
693        case 354212295: /*coordinateSystem*/ return new String[] {"CodeableConcept"};
694        case 626439866: /*ordinalPosition*/ return new String[] {"integer"};
695        case -733314564: /*sequenceRange*/ return new String[] {"Range"};
696        case 1493400609: /*startingSequence*/ return new String[] {};
697        case 3108362: /*edit*/ return new String[] {};
698        default: return super.getTypesForProperty(hash, name);
699        }
700
701      }
702
703      @Override
704      public Base addChild(String name) throws FHIRException {
705        if (name.equals("coordinateSystem")) {
706          this.coordinateSystem = new CodeableConcept();
707          return this.coordinateSystem;
708        }
709        else if (name.equals("ordinalPosition")) {
710          throw new FHIRException("Cannot call addChild on a singleton property MolecularSequence.relative.ordinalPosition");
711        }
712        else if (name.equals("sequenceRange")) {
713          this.sequenceRange = new Range();
714          return this.sequenceRange;
715        }
716        else if (name.equals("startingSequence")) {
717          this.startingSequence = new MolecularSequenceRelativeStartingSequenceComponent();
718          return this.startingSequence;
719        }
720        else if (name.equals("edit")) {
721          return addEdit();
722        }
723        else
724          return super.addChild(name);
725      }
726
727      public MolecularSequenceRelativeComponent copy() {
728        MolecularSequenceRelativeComponent dst = new MolecularSequenceRelativeComponent();
729        copyValues(dst);
730        return dst;
731      }
732
733      public void copyValues(MolecularSequenceRelativeComponent dst) {
734        super.copyValues(dst);
735        dst.coordinateSystem = coordinateSystem == null ? null : coordinateSystem.copy();
736        dst.ordinalPosition = ordinalPosition == null ? null : ordinalPosition.copy();
737        dst.sequenceRange = sequenceRange == null ? null : sequenceRange.copy();
738        dst.startingSequence = startingSequence == null ? null : startingSequence.copy();
739        if (edit != null) {
740          dst.edit = new ArrayList<MolecularSequenceRelativeEditComponent>();
741          for (MolecularSequenceRelativeEditComponent i : edit)
742            dst.edit.add(i.copy());
743        };
744      }
745
746      @Override
747      public boolean equalsDeep(Base other_) {
748        if (!super.equalsDeep(other_))
749          return false;
750        if (!(other_ instanceof MolecularSequenceRelativeComponent))
751          return false;
752        MolecularSequenceRelativeComponent o = (MolecularSequenceRelativeComponent) other_;
753        return compareDeep(coordinateSystem, o.coordinateSystem, true) && compareDeep(ordinalPosition, o.ordinalPosition, true)
754           && compareDeep(sequenceRange, o.sequenceRange, true) && compareDeep(startingSequence, o.startingSequence, true)
755           && compareDeep(edit, o.edit, true);
756      }
757
758      @Override
759      public boolean equalsShallow(Base other_) {
760        if (!super.equalsShallow(other_))
761          return false;
762        if (!(other_ instanceof MolecularSequenceRelativeComponent))
763          return false;
764        MolecularSequenceRelativeComponent o = (MolecularSequenceRelativeComponent) other_;
765        return compareValues(ordinalPosition, o.ordinalPosition, true);
766      }
767
768      public boolean isEmpty() {
769        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(coordinateSystem, ordinalPosition
770          , sequenceRange, startingSequence, edit);
771      }
772
773  public String fhirType() {
774    return "MolecularSequence.relative";
775
776  }
777
778  }
779
780    @Block()
781    public static class MolecularSequenceRelativeStartingSequenceComponent extends BackboneElement implements IBaseBackboneElement {
782        /**
783         * The genome assembly used for starting sequence, e.g. GRCh38.
784         */
785        @Child(name = "genomeAssembly", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
786        @Description(shortDefinition="The genome assembly used for starting sequence, e.g. GRCh38", formalDefinition="The genome assembly used for starting sequence, e.g. GRCh38." )
787        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://loinc.org/LL1040-6/")
788        protected CodeableConcept genomeAssembly;
789
790        /**
791         * Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).
792         */
793        @Child(name = "chromosome", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
794        @Description(shortDefinition="Chromosome Identifier", formalDefinition="Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340))." )
795        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://loinc.org/LL2938-0/")
796        protected CodeableConcept chromosome;
797
798        /**
799         * The reference sequence that represents the starting sequence.
800         */
801        @Child(name = "sequence", type = {CodeableConcept.class, StringType.class, MolecularSequence.class}, order=3, min=0, max=1, modifier=false, summary=true)
802        @Description(shortDefinition="The reference sequence that represents the starting sequence", formalDefinition="The reference sequence that represents the starting sequence." )
803        protected DataType sequence;
804
805        /**
806         * Start position of the window on the starting sequence. This value should honor the rules of the coordinateSystem.
807         */
808        @Child(name = "windowStart", type = {IntegerType.class}, order=4, min=0, max=1, modifier=false, summary=true)
809        @Description(shortDefinition="Start position of the window on the starting sequence", formalDefinition="Start position of the window on the starting sequence. This value should honor the rules of the coordinateSystem." )
810        protected IntegerType windowStart;
811
812        /**
813         * End position of the window on the starting sequence. This value should honor the rules of the  coordinateSystem.
814         */
815        @Child(name = "windowEnd", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=true)
816        @Description(shortDefinition="End position of the window on the starting sequence", formalDefinition="End position of the window on the starting sequence. This value should honor the rules of the  coordinateSystem." )
817        protected IntegerType windowEnd;
818
819        /**
820         * A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.
821         */
822        @Child(name = "orientation", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=true)
823        @Description(shortDefinition="sense | antisense", formalDefinition="A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the \"sense\" strand, and the opposite complementary strand is the \"antisense\" strand." )
824        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/orientation-type")
825        protected Enumeration<OrientationType> orientation;
826
827        /**
828         * An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.
829         */
830        @Child(name = "strand", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=true)
831        @Description(shortDefinition="watson | crick", formalDefinition="An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm." )
832        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/strand-type")
833        protected Enumeration<StrandType> strand;
834
835        private static final long serialVersionUID = 502438613L;
836
837    /**
838     * Constructor
839     */
840      public MolecularSequenceRelativeStartingSequenceComponent() {
841        super();
842      }
843
844        /**
845         * @return {@link #genomeAssembly} (The genome assembly used for starting sequence, e.g. GRCh38.)
846         */
847        public CodeableConcept getGenomeAssembly() { 
848          if (this.genomeAssembly == null)
849            if (Configuration.errorOnAutoCreate())
850              throw new Error("Attempt to auto-create MolecularSequenceRelativeStartingSequenceComponent.genomeAssembly");
851            else if (Configuration.doAutoCreate())
852              this.genomeAssembly = new CodeableConcept(); // cc
853          return this.genomeAssembly;
854        }
855
856        public boolean hasGenomeAssembly() { 
857          return this.genomeAssembly != null && !this.genomeAssembly.isEmpty();
858        }
859
860        /**
861         * @param value {@link #genomeAssembly} (The genome assembly used for starting sequence, e.g. GRCh38.)
862         */
863        public MolecularSequenceRelativeStartingSequenceComponent setGenomeAssembly(CodeableConcept value) { 
864          this.genomeAssembly = value;
865          return this;
866        }
867
868        /**
869         * @return {@link #chromosome} (Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).)
870         */
871        public CodeableConcept getChromosome() { 
872          if (this.chromosome == null)
873            if (Configuration.errorOnAutoCreate())
874              throw new Error("Attempt to auto-create MolecularSequenceRelativeStartingSequenceComponent.chromosome");
875            else if (Configuration.doAutoCreate())
876              this.chromosome = new CodeableConcept(); // cc
877          return this.chromosome;
878        }
879
880        public boolean hasChromosome() { 
881          return this.chromosome != null && !this.chromosome.isEmpty();
882        }
883
884        /**
885         * @param value {@link #chromosome} (Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).)
886         */
887        public MolecularSequenceRelativeStartingSequenceComponent setChromosome(CodeableConcept value) { 
888          this.chromosome = value;
889          return this;
890        }
891
892        /**
893         * @return {@link #sequence} (The reference sequence that represents the starting sequence.)
894         */
895        public DataType getSequence() { 
896          return this.sequence;
897        }
898
899        /**
900         * @return {@link #sequence} (The reference sequence that represents the starting sequence.)
901         */
902        public CodeableConcept getSequenceCodeableConcept() throws FHIRException { 
903          if (this.sequence == null)
904            this.sequence = new CodeableConcept();
905          if (!(this.sequence instanceof CodeableConcept))
906            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.sequence.getClass().getName()+" was encountered");
907          return (CodeableConcept) this.sequence;
908        }
909
910        public boolean hasSequenceCodeableConcept() { 
911          return this != null && this.sequence instanceof CodeableConcept;
912        }
913
914        /**
915         * @return {@link #sequence} (The reference sequence that represents the starting sequence.)
916         */
917        public StringType getSequenceStringType() throws FHIRException { 
918          if (this.sequence == null)
919            this.sequence = new StringType();
920          if (!(this.sequence instanceof StringType))
921            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.sequence.getClass().getName()+" was encountered");
922          return (StringType) this.sequence;
923        }
924
925        public boolean hasSequenceStringType() { 
926          return this != null && this.sequence instanceof StringType;
927        }
928
929        /**
930         * @return {@link #sequence} (The reference sequence that represents the starting sequence.)
931         */
932        public Reference getSequenceReference() throws FHIRException { 
933          if (this.sequence == null)
934            this.sequence = new Reference();
935          if (!(this.sequence instanceof Reference))
936            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.sequence.getClass().getName()+" was encountered");
937          return (Reference) this.sequence;
938        }
939
940        public boolean hasSequenceReference() { 
941          return this != null && this.sequence instanceof Reference;
942        }
943
944        public boolean hasSequence() { 
945          return this.sequence != null && !this.sequence.isEmpty();
946        }
947
948        /**
949         * @param value {@link #sequence} (The reference sequence that represents the starting sequence.)
950         */
951        public MolecularSequenceRelativeStartingSequenceComponent setSequence(DataType value) { 
952          if (value != null && !(value instanceof CodeableConcept || value instanceof StringType || value instanceof Reference))
953            throw new FHIRException("Not the right type for MolecularSequence.relative.startingSequence.sequence[x]: "+value.fhirType());
954          this.sequence = value;
955          return this;
956        }
957
958        /**
959         * @return {@link #windowStart} (Start position of the window on the starting sequence. This value should honor the rules of the coordinateSystem.). This is the underlying object with id, value and extensions. The accessor "getWindowStart" gives direct access to the value
960         */
961        public IntegerType getWindowStartElement() { 
962          if (this.windowStart == null)
963            if (Configuration.errorOnAutoCreate())
964              throw new Error("Attempt to auto-create MolecularSequenceRelativeStartingSequenceComponent.windowStart");
965            else if (Configuration.doAutoCreate())
966              this.windowStart = new IntegerType(); // bb
967          return this.windowStart;
968        }
969
970        public boolean hasWindowStartElement() { 
971          return this.windowStart != null && !this.windowStart.isEmpty();
972        }
973
974        public boolean hasWindowStart() { 
975          return this.windowStart != null && !this.windowStart.isEmpty();
976        }
977
978        /**
979         * @param value {@link #windowStart} (Start position of the window on the starting sequence. This value should honor the rules of the coordinateSystem.). This is the underlying object with id, value and extensions. The accessor "getWindowStart" gives direct access to the value
980         */
981        public MolecularSequenceRelativeStartingSequenceComponent setWindowStartElement(IntegerType value) { 
982          this.windowStart = value;
983          return this;
984        }
985
986        /**
987         * @return Start position of the window on the starting sequence. This value should honor the rules of the coordinateSystem.
988         */
989        public int getWindowStart() { 
990          return this.windowStart == null || this.windowStart.isEmpty() ? 0 : this.windowStart.getValue();
991        }
992
993        /**
994         * @param value Start position of the window on the starting sequence. This value should honor the rules of the coordinateSystem.
995         */
996        public MolecularSequenceRelativeStartingSequenceComponent setWindowStart(int value) { 
997            if (this.windowStart == null)
998              this.windowStart = new IntegerType();
999            this.windowStart.setValue(value);
1000          return this;
1001        }
1002
1003        /**
1004         * @return {@link #windowEnd} (End position of the window on the starting sequence. This value should honor the rules of the  coordinateSystem.). This is the underlying object with id, value and extensions. The accessor "getWindowEnd" gives direct access to the value
1005         */
1006        public IntegerType getWindowEndElement() { 
1007          if (this.windowEnd == null)
1008            if (Configuration.errorOnAutoCreate())
1009              throw new Error("Attempt to auto-create MolecularSequenceRelativeStartingSequenceComponent.windowEnd");
1010            else if (Configuration.doAutoCreate())
1011              this.windowEnd = new IntegerType(); // bb
1012          return this.windowEnd;
1013        }
1014
1015        public boolean hasWindowEndElement() { 
1016          return this.windowEnd != null && !this.windowEnd.isEmpty();
1017        }
1018
1019        public boolean hasWindowEnd() { 
1020          return this.windowEnd != null && !this.windowEnd.isEmpty();
1021        }
1022
1023        /**
1024         * @param value {@link #windowEnd} (End position of the window on the starting sequence. This value should honor the rules of the  coordinateSystem.). This is the underlying object with id, value and extensions. The accessor "getWindowEnd" gives direct access to the value
1025         */
1026        public MolecularSequenceRelativeStartingSequenceComponent setWindowEndElement(IntegerType value) { 
1027          this.windowEnd = value;
1028          return this;
1029        }
1030
1031        /**
1032         * @return End position of the window on the starting sequence. This value should honor the rules of the  coordinateSystem.
1033         */
1034        public int getWindowEnd() { 
1035          return this.windowEnd == null || this.windowEnd.isEmpty() ? 0 : this.windowEnd.getValue();
1036        }
1037
1038        /**
1039         * @param value End position of the window on the starting sequence. This value should honor the rules of the  coordinateSystem.
1040         */
1041        public MolecularSequenceRelativeStartingSequenceComponent setWindowEnd(int value) { 
1042            if (this.windowEnd == null)
1043              this.windowEnd = new IntegerType();
1044            this.windowEnd.setValue(value);
1045          return this;
1046        }
1047
1048        /**
1049         * @return {@link #orientation} (A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.). This is the underlying object with id, value and extensions. The accessor "getOrientation" gives direct access to the value
1050         */
1051        public Enumeration<OrientationType> getOrientationElement() { 
1052          if (this.orientation == null)
1053            if (Configuration.errorOnAutoCreate())
1054              throw new Error("Attempt to auto-create MolecularSequenceRelativeStartingSequenceComponent.orientation");
1055            else if (Configuration.doAutoCreate())
1056              this.orientation = new Enumeration<OrientationType>(new OrientationTypeEnumFactory()); // bb
1057          return this.orientation;
1058        }
1059
1060        public boolean hasOrientationElement() { 
1061          return this.orientation != null && !this.orientation.isEmpty();
1062        }
1063
1064        public boolean hasOrientation() { 
1065          return this.orientation != null && !this.orientation.isEmpty();
1066        }
1067
1068        /**
1069         * @param value {@link #orientation} (A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.). This is the underlying object with id, value and extensions. The accessor "getOrientation" gives direct access to the value
1070         */
1071        public MolecularSequenceRelativeStartingSequenceComponent setOrientationElement(Enumeration<OrientationType> value) { 
1072          this.orientation = value;
1073          return this;
1074        }
1075
1076        /**
1077         * @return A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.
1078         */
1079        public OrientationType getOrientation() { 
1080          return this.orientation == null ? null : this.orientation.getValue();
1081        }
1082
1083        /**
1084         * @param value A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.
1085         */
1086        public MolecularSequenceRelativeStartingSequenceComponent setOrientation(OrientationType value) { 
1087          if (value == null)
1088            this.orientation = null;
1089          else {
1090            if (this.orientation == null)
1091              this.orientation = new Enumeration<OrientationType>(new OrientationTypeEnumFactory());
1092            this.orientation.setValue(value);
1093          }
1094          return this;
1095        }
1096
1097        /**
1098         * @return {@link #strand} (An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.). This is the underlying object with id, value and extensions. The accessor "getStrand" gives direct access to the value
1099         */
1100        public Enumeration<StrandType> getStrandElement() { 
1101          if (this.strand == null)
1102            if (Configuration.errorOnAutoCreate())
1103              throw new Error("Attempt to auto-create MolecularSequenceRelativeStartingSequenceComponent.strand");
1104            else if (Configuration.doAutoCreate())
1105              this.strand = new Enumeration<StrandType>(new StrandTypeEnumFactory()); // bb
1106          return this.strand;
1107        }
1108
1109        public boolean hasStrandElement() { 
1110          return this.strand != null && !this.strand.isEmpty();
1111        }
1112
1113        public boolean hasStrand() { 
1114          return this.strand != null && !this.strand.isEmpty();
1115        }
1116
1117        /**
1118         * @param value {@link #strand} (An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.). This is the underlying object with id, value and extensions. The accessor "getStrand" gives direct access to the value
1119         */
1120        public MolecularSequenceRelativeStartingSequenceComponent setStrandElement(Enumeration<StrandType> value) { 
1121          this.strand = value;
1122          return this;
1123        }
1124
1125        /**
1126         * @return An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.
1127         */
1128        public StrandType getStrand() { 
1129          return this.strand == null ? null : this.strand.getValue();
1130        }
1131
1132        /**
1133         * @param value An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.
1134         */
1135        public MolecularSequenceRelativeStartingSequenceComponent setStrand(StrandType value) { 
1136          if (value == null)
1137            this.strand = null;
1138          else {
1139            if (this.strand == null)
1140              this.strand = new Enumeration<StrandType>(new StrandTypeEnumFactory());
1141            this.strand.setValue(value);
1142          }
1143          return this;
1144        }
1145
1146        protected void listChildren(List<Property> children) {
1147          super.listChildren(children);
1148          children.add(new Property("genomeAssembly", "CodeableConcept", "The genome assembly used for starting sequence, e.g. GRCh38.", 0, 1, genomeAssembly));
1149          children.add(new Property("chromosome", "CodeableConcept", "Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).", 0, 1, chromosome));
1150          children.add(new Property("sequence[x]", "CodeableConcept|string|Reference(MolecularSequence)", "The reference sequence that represents the starting sequence.", 0, 1, sequence));
1151          children.add(new Property("windowStart", "integer", "Start position of the window on the starting sequence. This value should honor the rules of the coordinateSystem.", 0, 1, windowStart));
1152          children.add(new Property("windowEnd", "integer", "End position of the window on the starting sequence. This value should honor the rules of the  coordinateSystem.", 0, 1, windowEnd));
1153          children.add(new Property("orientation", "code", "A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the \"sense\" strand, and the opposite complementary strand is the \"antisense\" strand.", 0, 1, orientation));
1154          children.add(new Property("strand", "code", "An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.", 0, 1, strand));
1155        }
1156
1157        @Override
1158        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1159          switch (_hash) {
1160          case 1196021757: /*genomeAssembly*/  return new Property("genomeAssembly", "CodeableConcept", "The genome assembly used for starting sequence, e.g. GRCh38.", 0, 1, genomeAssembly);
1161          case -1499470472: /*chromosome*/  return new Property("chromosome", "CodeableConcept", "Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).", 0, 1, chromosome);
1162          case -805222113: /*sequence[x]*/  return new Property("sequence[x]", "CodeableConcept|string|Reference(MolecularSequence)", "The reference sequence that represents the starting sequence.", 0, 1, sequence);
1163          case 1349547969: /*sequence*/  return new Property("sequence[x]", "CodeableConcept|string|Reference(MolecularSequence)", "The reference sequence that represents the starting sequence.", 0, 1, sequence);
1164          case 1508480416: /*sequenceCodeableConcept*/  return new Property("sequence[x]", "CodeableConcept", "The reference sequence that represents the starting sequence.", 0, 1, sequence);
1165          case -1211617486: /*sequenceString*/  return new Property("sequence[x]", "string", "The reference sequence that represents the starting sequence.", 0, 1, sequence);
1166          case -1127149430: /*sequenceReference*/  return new Property("sequence[x]", "Reference(MolecularSequence)", "The reference sequence that represents the starting sequence.", 0, 1, sequence);
1167          case 1903685202: /*windowStart*/  return new Property("windowStart", "integer", "Start position of the window on the starting sequence. This value should honor the rules of the coordinateSystem.", 0, 1, windowStart);
1168          case -217026869: /*windowEnd*/  return new Property("windowEnd", "integer", "End position of the window on the starting sequence. This value should honor the rules of the  coordinateSystem.", 0, 1, windowEnd);
1169          case -1439500848: /*orientation*/  return new Property("orientation", "code", "A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the \"sense\" strand, and the opposite complementary strand is the \"antisense\" strand.", 0, 1, orientation);
1170          case -891993594: /*strand*/  return new Property("strand", "code", "An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.", 0, 1, strand);
1171          default: return super.getNamedProperty(_hash, _name, _checkValid);
1172          }
1173
1174        }
1175
1176      @Override
1177      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1178        switch (hash) {
1179        case 1196021757: /*genomeAssembly*/ return this.genomeAssembly == null ? new Base[0] : new Base[] {this.genomeAssembly}; // CodeableConcept
1180        case -1499470472: /*chromosome*/ return this.chromosome == null ? new Base[0] : new Base[] {this.chromosome}; // CodeableConcept
1181        case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // DataType
1182        case 1903685202: /*windowStart*/ return this.windowStart == null ? new Base[0] : new Base[] {this.windowStart}; // IntegerType
1183        case -217026869: /*windowEnd*/ return this.windowEnd == null ? new Base[0] : new Base[] {this.windowEnd}; // IntegerType
1184        case -1439500848: /*orientation*/ return this.orientation == null ? new Base[0] : new Base[] {this.orientation}; // Enumeration<OrientationType>
1185        case -891993594: /*strand*/ return this.strand == null ? new Base[0] : new Base[] {this.strand}; // Enumeration<StrandType>
1186        default: return super.getProperty(hash, name, checkValid);
1187        }
1188
1189      }
1190
1191      @Override
1192      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1193        switch (hash) {
1194        case 1196021757: // genomeAssembly
1195          this.genomeAssembly = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1196          return value;
1197        case -1499470472: // chromosome
1198          this.chromosome = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1199          return value;
1200        case 1349547969: // sequence
1201          this.sequence = TypeConvertor.castToType(value); // DataType
1202          return value;
1203        case 1903685202: // windowStart
1204          this.windowStart = TypeConvertor.castToInteger(value); // IntegerType
1205          return value;
1206        case -217026869: // windowEnd
1207          this.windowEnd = TypeConvertor.castToInteger(value); // IntegerType
1208          return value;
1209        case -1439500848: // orientation
1210          value = new OrientationTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1211          this.orientation = (Enumeration) value; // Enumeration<OrientationType>
1212          return value;
1213        case -891993594: // strand
1214          value = new StrandTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1215          this.strand = (Enumeration) value; // Enumeration<StrandType>
1216          return value;
1217        default: return super.setProperty(hash, name, value);
1218        }
1219
1220      }
1221
1222      @Override
1223      public Base setProperty(String name, Base value) throws FHIRException {
1224        if (name.equals("genomeAssembly")) {
1225          this.genomeAssembly = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1226        } else if (name.equals("chromosome")) {
1227          this.chromosome = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1228        } else if (name.equals("sequence[x]")) {
1229          this.sequence = TypeConvertor.castToType(value); // DataType
1230        } else if (name.equals("windowStart")) {
1231          this.windowStart = TypeConvertor.castToInteger(value); // IntegerType
1232        } else if (name.equals("windowEnd")) {
1233          this.windowEnd = TypeConvertor.castToInteger(value); // IntegerType
1234        } else if (name.equals("orientation")) {
1235          value = new OrientationTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1236          this.orientation = (Enumeration) value; // Enumeration<OrientationType>
1237        } else if (name.equals("strand")) {
1238          value = new StrandTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1239          this.strand = (Enumeration) value; // Enumeration<StrandType>
1240        } else
1241          return super.setProperty(name, value);
1242        return value;
1243      }
1244
1245  @Override
1246  public void removeChild(String name, Base value) throws FHIRException {
1247        if (name.equals("genomeAssembly")) {
1248          this.genomeAssembly = null;
1249        } else if (name.equals("chromosome")) {
1250          this.chromosome = null;
1251        } else if (name.equals("sequence[x]")) {
1252          this.sequence = null;
1253        } else if (name.equals("windowStart")) {
1254          this.windowStart = null;
1255        } else if (name.equals("windowEnd")) {
1256          this.windowEnd = null;
1257        } else if (name.equals("orientation")) {
1258          value = new OrientationTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1259          this.orientation = (Enumeration) value; // Enumeration<OrientationType>
1260        } else if (name.equals("strand")) {
1261          value = new StrandTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1262          this.strand = (Enumeration) value; // Enumeration<StrandType>
1263        } else
1264          super.removeChild(name, value);
1265        
1266      }
1267
1268      @Override
1269      public Base makeProperty(int hash, String name) throws FHIRException {
1270        switch (hash) {
1271        case 1196021757:  return getGenomeAssembly();
1272        case -1499470472:  return getChromosome();
1273        case -805222113:  return getSequence();
1274        case 1349547969:  return getSequence();
1275        case 1903685202:  return getWindowStartElement();
1276        case -217026869:  return getWindowEndElement();
1277        case -1439500848:  return getOrientationElement();
1278        case -891993594:  return getStrandElement();
1279        default: return super.makeProperty(hash, name);
1280        }
1281
1282      }
1283
1284      @Override
1285      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1286        switch (hash) {
1287        case 1196021757: /*genomeAssembly*/ return new String[] {"CodeableConcept"};
1288        case -1499470472: /*chromosome*/ return new String[] {"CodeableConcept"};
1289        case 1349547969: /*sequence*/ return new String[] {"CodeableConcept", "string", "Reference"};
1290        case 1903685202: /*windowStart*/ return new String[] {"integer"};
1291        case -217026869: /*windowEnd*/ return new String[] {"integer"};
1292        case -1439500848: /*orientation*/ return new String[] {"code"};
1293        case -891993594: /*strand*/ return new String[] {"code"};
1294        default: return super.getTypesForProperty(hash, name);
1295        }
1296
1297      }
1298
1299      @Override
1300      public Base addChild(String name) throws FHIRException {
1301        if (name.equals("genomeAssembly")) {
1302          this.genomeAssembly = new CodeableConcept();
1303          return this.genomeAssembly;
1304        }
1305        else if (name.equals("chromosome")) {
1306          this.chromosome = new CodeableConcept();
1307          return this.chromosome;
1308        }
1309        else if (name.equals("sequenceCodeableConcept")) {
1310          this.sequence = new CodeableConcept();
1311          return this.sequence;
1312        }
1313        else if (name.equals("sequenceString")) {
1314          this.sequence = new StringType();
1315          return this.sequence;
1316        }
1317        else if (name.equals("sequenceReference")) {
1318          this.sequence = new Reference();
1319          return this.sequence;
1320        }
1321        else if (name.equals("windowStart")) {
1322          throw new FHIRException("Cannot call addChild on a singleton property MolecularSequence.relative.startingSequence.windowStart");
1323        }
1324        else if (name.equals("windowEnd")) {
1325          throw new FHIRException("Cannot call addChild on a singleton property MolecularSequence.relative.startingSequence.windowEnd");
1326        }
1327        else if (name.equals("orientation")) {
1328          throw new FHIRException("Cannot call addChild on a singleton property MolecularSequence.relative.startingSequence.orientation");
1329        }
1330        else if (name.equals("strand")) {
1331          throw new FHIRException("Cannot call addChild on a singleton property MolecularSequence.relative.startingSequence.strand");
1332        }
1333        else
1334          return super.addChild(name);
1335      }
1336
1337      public MolecularSequenceRelativeStartingSequenceComponent copy() {
1338        MolecularSequenceRelativeStartingSequenceComponent dst = new MolecularSequenceRelativeStartingSequenceComponent();
1339        copyValues(dst);
1340        return dst;
1341      }
1342
1343      public void copyValues(MolecularSequenceRelativeStartingSequenceComponent dst) {
1344        super.copyValues(dst);
1345        dst.genomeAssembly = genomeAssembly == null ? null : genomeAssembly.copy();
1346        dst.chromosome = chromosome == null ? null : chromosome.copy();
1347        dst.sequence = sequence == null ? null : sequence.copy();
1348        dst.windowStart = windowStart == null ? null : windowStart.copy();
1349        dst.windowEnd = windowEnd == null ? null : windowEnd.copy();
1350        dst.orientation = orientation == null ? null : orientation.copy();
1351        dst.strand = strand == null ? null : strand.copy();
1352      }
1353
1354      @Override
1355      public boolean equalsDeep(Base other_) {
1356        if (!super.equalsDeep(other_))
1357          return false;
1358        if (!(other_ instanceof MolecularSequenceRelativeStartingSequenceComponent))
1359          return false;
1360        MolecularSequenceRelativeStartingSequenceComponent o = (MolecularSequenceRelativeStartingSequenceComponent) other_;
1361        return compareDeep(genomeAssembly, o.genomeAssembly, true) && compareDeep(chromosome, o.chromosome, true)
1362           && compareDeep(sequence, o.sequence, true) && compareDeep(windowStart, o.windowStart, true) && compareDeep(windowEnd, o.windowEnd, true)
1363           && compareDeep(orientation, o.orientation, true) && compareDeep(strand, o.strand, true);
1364      }
1365
1366      @Override
1367      public boolean equalsShallow(Base other_) {
1368        if (!super.equalsShallow(other_))
1369          return false;
1370        if (!(other_ instanceof MolecularSequenceRelativeStartingSequenceComponent))
1371          return false;
1372        MolecularSequenceRelativeStartingSequenceComponent o = (MolecularSequenceRelativeStartingSequenceComponent) other_;
1373        return compareValues(windowStart, o.windowStart, true) && compareValues(windowEnd, o.windowEnd, true)
1374           && compareValues(orientation, o.orientation, true) && compareValues(strand, o.strand, true);
1375      }
1376
1377      public boolean isEmpty() {
1378        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(genomeAssembly, chromosome
1379          , sequence, windowStart, windowEnd, orientation, strand);
1380      }
1381
1382  public String fhirType() {
1383    return "MolecularSequence.relative.startingSequence";
1384
1385  }
1386
1387  }
1388
1389    @Block()
1390    public static class MolecularSequenceRelativeEditComponent extends BackboneElement implements IBaseBackboneElement {
1391        /**
1392         * Start position of the edit on the starting sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
1393         */
1394        @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true)
1395        @Description(shortDefinition="Start position of the edit on the starting sequence", formalDefinition="Start position of the edit on the starting sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive." )
1396        protected IntegerType start;
1397
1398        /**
1399         * End position of the edit on the starting sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
1400         */
1401        @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1402        @Description(shortDefinition="End position of the edit on the starting sequence", formalDefinition="End position of the edit on the starting sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." )
1403        protected IntegerType end;
1404
1405        /**
1406         * Allele that was observed. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
1407         */
1408        @Child(name = "replacementSequence", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1409        @Description(shortDefinition="Allele that was observed", formalDefinition="Allele that was observed. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end." )
1410        protected StringType replacementSequence;
1411
1412        /**
1413         * Allele in the starting sequence. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the starting sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
1414         */
1415        @Child(name = "replacedSequence", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
1416        @Description(shortDefinition="Allele in the starting sequence", formalDefinition="Allele in the starting sequence. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the starting sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end." )
1417        protected StringType replacedSequence;
1418
1419        private static final long serialVersionUID = 550127909L;
1420
1421    /**
1422     * Constructor
1423     */
1424      public MolecularSequenceRelativeEditComponent() {
1425        super();
1426      }
1427
1428        /**
1429         * @return {@link #start} (Start position of the edit on the starting sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
1430         */
1431        public IntegerType getStartElement() { 
1432          if (this.start == null)
1433            if (Configuration.errorOnAutoCreate())
1434              throw new Error("Attempt to auto-create MolecularSequenceRelativeEditComponent.start");
1435            else if (Configuration.doAutoCreate())
1436              this.start = new IntegerType(); // bb
1437          return this.start;
1438        }
1439
1440        public boolean hasStartElement() { 
1441          return this.start != null && !this.start.isEmpty();
1442        }
1443
1444        public boolean hasStart() { 
1445          return this.start != null && !this.start.isEmpty();
1446        }
1447
1448        /**
1449         * @param value {@link #start} (Start position of the edit on the starting sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
1450         */
1451        public MolecularSequenceRelativeEditComponent setStartElement(IntegerType value) { 
1452          this.start = value;
1453          return this;
1454        }
1455
1456        /**
1457         * @return Start position of the edit on the starting sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
1458         */
1459        public int getStart() { 
1460          return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue();
1461        }
1462
1463        /**
1464         * @param value Start position of the edit on the starting sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
1465         */
1466        public MolecularSequenceRelativeEditComponent setStart(int value) { 
1467            if (this.start == null)
1468              this.start = new IntegerType();
1469            this.start.setValue(value);
1470          return this;
1471        }
1472
1473        /**
1474         * @return {@link #end} (End position of the edit on the starting sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
1475         */
1476        public IntegerType getEndElement() { 
1477          if (this.end == null)
1478            if (Configuration.errorOnAutoCreate())
1479              throw new Error("Attempt to auto-create MolecularSequenceRelativeEditComponent.end");
1480            else if (Configuration.doAutoCreate())
1481              this.end = new IntegerType(); // bb
1482          return this.end;
1483        }
1484
1485        public boolean hasEndElement() { 
1486          return this.end != null && !this.end.isEmpty();
1487        }
1488
1489        public boolean hasEnd() { 
1490          return this.end != null && !this.end.isEmpty();
1491        }
1492
1493        /**
1494         * @param value {@link #end} (End position of the edit on the starting sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
1495         */
1496        public MolecularSequenceRelativeEditComponent setEndElement(IntegerType value) { 
1497          this.end = value;
1498          return this;
1499        }
1500
1501        /**
1502         * @return End position of the edit on the starting sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
1503         */
1504        public int getEnd() { 
1505          return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue();
1506        }
1507
1508        /**
1509         * @param value End position of the edit on the starting sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
1510         */
1511        public MolecularSequenceRelativeEditComponent setEnd(int value) { 
1512            if (this.end == null)
1513              this.end = new IntegerType();
1514            this.end.setValue(value);
1515          return this;
1516        }
1517
1518        /**
1519         * @return {@link #replacementSequence} (Allele that was observed. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.). This is the underlying object with id, value and extensions. The accessor "getReplacementSequence" gives direct access to the value
1520         */
1521        public StringType getReplacementSequenceElement() { 
1522          if (this.replacementSequence == null)
1523            if (Configuration.errorOnAutoCreate())
1524              throw new Error("Attempt to auto-create MolecularSequenceRelativeEditComponent.replacementSequence");
1525            else if (Configuration.doAutoCreate())
1526              this.replacementSequence = new StringType(); // bb
1527          return this.replacementSequence;
1528        }
1529
1530        public boolean hasReplacementSequenceElement() { 
1531          return this.replacementSequence != null && !this.replacementSequence.isEmpty();
1532        }
1533
1534        public boolean hasReplacementSequence() { 
1535          return this.replacementSequence != null && !this.replacementSequence.isEmpty();
1536        }
1537
1538        /**
1539         * @param value {@link #replacementSequence} (Allele that was observed. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.). This is the underlying object with id, value and extensions. The accessor "getReplacementSequence" gives direct access to the value
1540         */
1541        public MolecularSequenceRelativeEditComponent setReplacementSequenceElement(StringType value) { 
1542          this.replacementSequence = value;
1543          return this;
1544        }
1545
1546        /**
1547         * @return Allele that was observed. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
1548         */
1549        public String getReplacementSequence() { 
1550          return this.replacementSequence == null ? null : this.replacementSequence.getValue();
1551        }
1552
1553        /**
1554         * @param value Allele that was observed. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
1555         */
1556        public MolecularSequenceRelativeEditComponent setReplacementSequence(String value) { 
1557          if (Utilities.noString(value))
1558            this.replacementSequence = null;
1559          else {
1560            if (this.replacementSequence == null)
1561              this.replacementSequence = new StringType();
1562            this.replacementSequence.setValue(value);
1563          }
1564          return this;
1565        }
1566
1567        /**
1568         * @return {@link #replacedSequence} (Allele in the starting sequence. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the starting sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.). This is the underlying object with id, value and extensions. The accessor "getReplacedSequence" gives direct access to the value
1569         */
1570        public StringType getReplacedSequenceElement() { 
1571          if (this.replacedSequence == null)
1572            if (Configuration.errorOnAutoCreate())
1573              throw new Error("Attempt to auto-create MolecularSequenceRelativeEditComponent.replacedSequence");
1574            else if (Configuration.doAutoCreate())
1575              this.replacedSequence = new StringType(); // bb
1576          return this.replacedSequence;
1577        }
1578
1579        public boolean hasReplacedSequenceElement() { 
1580          return this.replacedSequence != null && !this.replacedSequence.isEmpty();
1581        }
1582
1583        public boolean hasReplacedSequence() { 
1584          return this.replacedSequence != null && !this.replacedSequence.isEmpty();
1585        }
1586
1587        /**
1588         * @param value {@link #replacedSequence} (Allele in the starting sequence. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the starting sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.). This is the underlying object with id, value and extensions. The accessor "getReplacedSequence" gives direct access to the value
1589         */
1590        public MolecularSequenceRelativeEditComponent setReplacedSequenceElement(StringType value) { 
1591          this.replacedSequence = value;
1592          return this;
1593        }
1594
1595        /**
1596         * @return Allele in the starting sequence. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the starting sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
1597         */
1598        public String getReplacedSequence() { 
1599          return this.replacedSequence == null ? null : this.replacedSequence.getValue();
1600        }
1601
1602        /**
1603         * @param value Allele in the starting sequence. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the starting sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
1604         */
1605        public MolecularSequenceRelativeEditComponent setReplacedSequence(String value) { 
1606          if (Utilities.noString(value))
1607            this.replacedSequence = null;
1608          else {
1609            if (this.replacedSequence == null)
1610              this.replacedSequence = new StringType();
1611            this.replacedSequence.setValue(value);
1612          }
1613          return this;
1614        }
1615
1616        protected void listChildren(List<Property> children) {
1617          super.listChildren(children);
1618          children.add(new Property("start", "integer", "Start position of the edit on the starting sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start));
1619          children.add(new Property("end", "integer", "End position of the edit on the starting sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", 0, 1, end));
1620          children.add(new Property("replacementSequence", "string", "Allele that was observed. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.", 0, 1, replacementSequence));
1621          children.add(new Property("replacedSequence", "string", "Allele in the starting sequence. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the starting sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.", 0, 1, replacedSequence));
1622        }
1623
1624        @Override
1625        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1626          switch (_hash) {
1627          case 109757538: /*start*/  return new Property("start", "integer", "Start position of the edit on the starting sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start);
1628          case 100571: /*end*/  return new Property("end", "integer", "End position of the edit on the starting sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", 0, 1, end);
1629          case -1784940557: /*replacementSequence*/  return new Property("replacementSequence", "string", "Allele that was observed. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.", 0, 1, replacementSequence);
1630          case 1972719633: /*replacedSequence*/  return new Property("replacedSequence", "string", "Allele in the starting sequence. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the starting sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.", 0, 1, replacedSequence);
1631          default: return super.getNamedProperty(_hash, _name, _checkValid);
1632          }
1633
1634        }
1635
1636      @Override
1637      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1638        switch (hash) {
1639        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType
1640        case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType
1641        case -1784940557: /*replacementSequence*/ return this.replacementSequence == null ? new Base[0] : new Base[] {this.replacementSequence}; // StringType
1642        case 1972719633: /*replacedSequence*/ return this.replacedSequence == null ? new Base[0] : new Base[] {this.replacedSequence}; // StringType
1643        default: return super.getProperty(hash, name, checkValid);
1644        }
1645
1646      }
1647
1648      @Override
1649      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1650        switch (hash) {
1651        case 109757538: // start
1652          this.start = TypeConvertor.castToInteger(value); // IntegerType
1653          return value;
1654        case 100571: // end
1655          this.end = TypeConvertor.castToInteger(value); // IntegerType
1656          return value;
1657        case -1784940557: // replacementSequence
1658          this.replacementSequence = TypeConvertor.castToString(value); // StringType
1659          return value;
1660        case 1972719633: // replacedSequence
1661          this.replacedSequence = TypeConvertor.castToString(value); // StringType
1662          return value;
1663        default: return super.setProperty(hash, name, value);
1664        }
1665
1666      }
1667
1668      @Override
1669      public Base setProperty(String name, Base value) throws FHIRException {
1670        if (name.equals("start")) {
1671          this.start = TypeConvertor.castToInteger(value); // IntegerType
1672        } else if (name.equals("end")) {
1673          this.end = TypeConvertor.castToInteger(value); // IntegerType
1674        } else if (name.equals("replacementSequence")) {
1675          this.replacementSequence = TypeConvertor.castToString(value); // StringType
1676        } else if (name.equals("replacedSequence")) {
1677          this.replacedSequence = TypeConvertor.castToString(value); // StringType
1678        } else
1679          return super.setProperty(name, value);
1680        return value;
1681      }
1682
1683  @Override
1684  public void removeChild(String name, Base value) throws FHIRException {
1685        if (name.equals("start")) {
1686          this.start = null;
1687        } else if (name.equals("end")) {
1688          this.end = null;
1689        } else if (name.equals("replacementSequence")) {
1690          this.replacementSequence = null;
1691        } else if (name.equals("replacedSequence")) {
1692          this.replacedSequence = null;
1693        } else
1694          super.removeChild(name, value);
1695        
1696      }
1697
1698      @Override
1699      public Base makeProperty(int hash, String name) throws FHIRException {
1700        switch (hash) {
1701        case 109757538:  return getStartElement();
1702        case 100571:  return getEndElement();
1703        case -1784940557:  return getReplacementSequenceElement();
1704        case 1972719633:  return getReplacedSequenceElement();
1705        default: return super.makeProperty(hash, name);
1706        }
1707
1708      }
1709
1710      @Override
1711      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1712        switch (hash) {
1713        case 109757538: /*start*/ return new String[] {"integer"};
1714        case 100571: /*end*/ return new String[] {"integer"};
1715        case -1784940557: /*replacementSequence*/ return new String[] {"string"};
1716        case 1972719633: /*replacedSequence*/ return new String[] {"string"};
1717        default: return super.getTypesForProperty(hash, name);
1718        }
1719
1720      }
1721
1722      @Override
1723      public Base addChild(String name) throws FHIRException {
1724        if (name.equals("start")) {
1725          throw new FHIRException("Cannot call addChild on a singleton property MolecularSequence.relative.edit.start");
1726        }
1727        else if (name.equals("end")) {
1728          throw new FHIRException("Cannot call addChild on a singleton property MolecularSequence.relative.edit.end");
1729        }
1730        else if (name.equals("replacementSequence")) {
1731          throw new FHIRException("Cannot call addChild on a singleton property MolecularSequence.relative.edit.replacementSequence");
1732        }
1733        else if (name.equals("replacedSequence")) {
1734          throw new FHIRException("Cannot call addChild on a singleton property MolecularSequence.relative.edit.replacedSequence");
1735        }
1736        else
1737          return super.addChild(name);
1738      }
1739
1740      public MolecularSequenceRelativeEditComponent copy() {
1741        MolecularSequenceRelativeEditComponent dst = new MolecularSequenceRelativeEditComponent();
1742        copyValues(dst);
1743        return dst;
1744      }
1745
1746      public void copyValues(MolecularSequenceRelativeEditComponent dst) {
1747        super.copyValues(dst);
1748        dst.start = start == null ? null : start.copy();
1749        dst.end = end == null ? null : end.copy();
1750        dst.replacementSequence = replacementSequence == null ? null : replacementSequence.copy();
1751        dst.replacedSequence = replacedSequence == null ? null : replacedSequence.copy();
1752      }
1753
1754      @Override
1755      public boolean equalsDeep(Base other_) {
1756        if (!super.equalsDeep(other_))
1757          return false;
1758        if (!(other_ instanceof MolecularSequenceRelativeEditComponent))
1759          return false;
1760        MolecularSequenceRelativeEditComponent o = (MolecularSequenceRelativeEditComponent) other_;
1761        return compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(replacementSequence, o.replacementSequence, true)
1762           && compareDeep(replacedSequence, o.replacedSequence, true);
1763      }
1764
1765      @Override
1766      public boolean equalsShallow(Base other_) {
1767        if (!super.equalsShallow(other_))
1768          return false;
1769        if (!(other_ instanceof MolecularSequenceRelativeEditComponent))
1770          return false;
1771        MolecularSequenceRelativeEditComponent o = (MolecularSequenceRelativeEditComponent) other_;
1772        return compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(replacementSequence, o.replacementSequence, true)
1773           && compareValues(replacedSequence, o.replacedSequence, true);
1774      }
1775
1776      public boolean isEmpty() {
1777        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(start, end, replacementSequence
1778          , replacedSequence);
1779      }
1780
1781  public String fhirType() {
1782    return "MolecularSequence.relative.edit";
1783
1784  }
1785
1786  }
1787
1788    /**
1789     * A unique identifier for this particular sequence instance.
1790     */
1791    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1792    @Description(shortDefinition="Unique ID for this particular sequence", formalDefinition="A unique identifier for this particular sequence instance." )
1793    protected List<Identifier> identifier;
1794
1795    /**
1796     * Amino Acid Sequence/ DNA Sequence / RNA Sequence.
1797     */
1798    @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=true)
1799    @Description(shortDefinition="aa | dna | rna", formalDefinition="Amino Acid Sequence/ DNA Sequence / RNA Sequence." )
1800    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/sequence-type")
1801    protected Enumeration<SequenceType> type;
1802
1803    /**
1804     * Indicates the subject this sequence is associated too.
1805     */
1806    @Child(name = "subject", type = {Patient.class, Group.class, Substance.class, BiologicallyDerivedProduct.class, NutritionProduct.class}, order=2, min=0, max=1, modifier=false, summary=true)
1807    @Description(shortDefinition="Subject this sequence is associated too", formalDefinition="Indicates the subject this sequence is associated too." )
1808    protected Reference subject;
1809
1810    /**
1811     * The actual focus of a molecular sequence when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, child, or sibling. For example, in trio testing, the subject would be the child (proband) and the focus would be the parent.
1812     */
1813    @Child(name = "focus", type = {Reference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1814    @Description(shortDefinition="What the molecular sequence is about, when it is not about the subject of record", formalDefinition="The actual focus of a molecular sequence when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, child, or sibling. For example, in trio testing, the subject would be the child (proband) and the focus would be the parent." )
1815    protected List<Reference> focus;
1816
1817    /**
1818     * Specimen used for sequencing.
1819     */
1820    @Child(name = "specimen", type = {Specimen.class}, order=4, min=0, max=1, modifier=false, summary=true)
1821    @Description(shortDefinition="Specimen used for sequencing", formalDefinition="Specimen used for sequencing." )
1822    protected Reference specimen;
1823
1824    /**
1825     * The method for sequencing, for example, chip information.
1826     */
1827    @Child(name = "device", type = {Device.class}, order=5, min=0, max=1, modifier=false, summary=true)
1828    @Description(shortDefinition="The method for sequencing", formalDefinition="The method for sequencing, for example, chip information." )
1829    protected Reference device;
1830
1831    /**
1832     * The organization or lab that should be responsible for this result.
1833     */
1834    @Child(name = "performer", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true)
1835    @Description(shortDefinition="Who should be responsible for test result", formalDefinition="The organization or lab that should be responsible for this result." )
1836    protected Reference performer;
1837
1838    /**
1839     * Sequence that was observed.
1840     */
1841    @Child(name = "literal", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true)
1842    @Description(shortDefinition="Sequence that was observed", formalDefinition="Sequence that was observed." )
1843    protected StringType literal;
1844
1845    /**
1846     * Sequence that was observed as file content. Can be an actual file contents, or referenced by a URL to an external system.
1847     */
1848    @Child(name = "formatted", type = {Attachment.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1849    @Description(shortDefinition="Embedded file or a link (URL) which contains content to represent the sequence", formalDefinition="Sequence that was observed as file content. Can be an actual file contents, or referenced by a URL to an external system." )
1850    protected List<Attachment> formatted;
1851
1852    /**
1853     * A sequence defined relative to another sequence.
1854     */
1855    @Child(name = "relative", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1856    @Description(shortDefinition="A sequence defined relative to another sequence", formalDefinition="A sequence defined relative to another sequence." )
1857    protected List<MolecularSequenceRelativeComponent> relative;
1858
1859    private static final long serialVersionUID = 611205496L;
1860
1861  /**
1862   * Constructor
1863   */
1864    public MolecularSequence() {
1865      super();
1866    }
1867
1868    /**
1869     * @return {@link #identifier} (A unique identifier for this particular sequence instance.)
1870     */
1871    public List<Identifier> getIdentifier() { 
1872      if (this.identifier == null)
1873        this.identifier = new ArrayList<Identifier>();
1874      return this.identifier;
1875    }
1876
1877    /**
1878     * @return Returns a reference to <code>this</code> for easy method chaining
1879     */
1880    public MolecularSequence setIdentifier(List<Identifier> theIdentifier) { 
1881      this.identifier = theIdentifier;
1882      return this;
1883    }
1884
1885    public boolean hasIdentifier() { 
1886      if (this.identifier == null)
1887        return false;
1888      for (Identifier item : this.identifier)
1889        if (!item.isEmpty())
1890          return true;
1891      return false;
1892    }
1893
1894    public Identifier addIdentifier() { //3
1895      Identifier t = new Identifier();
1896      if (this.identifier == null)
1897        this.identifier = new ArrayList<Identifier>();
1898      this.identifier.add(t);
1899      return t;
1900    }
1901
1902    public MolecularSequence addIdentifier(Identifier t) { //3
1903      if (t == null)
1904        return this;
1905      if (this.identifier == null)
1906        this.identifier = new ArrayList<Identifier>();
1907      this.identifier.add(t);
1908      return this;
1909    }
1910
1911    /**
1912     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1913     */
1914    public Identifier getIdentifierFirstRep() { 
1915      if (getIdentifier().isEmpty()) {
1916        addIdentifier();
1917      }
1918      return getIdentifier().get(0);
1919    }
1920
1921    /**
1922     * @return {@link #type} (Amino Acid Sequence/ DNA Sequence / RNA Sequence.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1923     */
1924    public Enumeration<SequenceType> getTypeElement() { 
1925      if (this.type == null)
1926        if (Configuration.errorOnAutoCreate())
1927          throw new Error("Attempt to auto-create MolecularSequence.type");
1928        else if (Configuration.doAutoCreate())
1929          this.type = new Enumeration<SequenceType>(new SequenceTypeEnumFactory()); // bb
1930      return this.type;
1931    }
1932
1933    public boolean hasTypeElement() { 
1934      return this.type != null && !this.type.isEmpty();
1935    }
1936
1937    public boolean hasType() { 
1938      return this.type != null && !this.type.isEmpty();
1939    }
1940
1941    /**
1942     * @param value {@link #type} (Amino Acid Sequence/ DNA Sequence / RNA Sequence.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1943     */
1944    public MolecularSequence setTypeElement(Enumeration<SequenceType> value) { 
1945      this.type = value;
1946      return this;
1947    }
1948
1949    /**
1950     * @return Amino Acid Sequence/ DNA Sequence / RNA Sequence.
1951     */
1952    public SequenceType getType() { 
1953      return this.type == null ? null : this.type.getValue();
1954    }
1955
1956    /**
1957     * @param value Amino Acid Sequence/ DNA Sequence / RNA Sequence.
1958     */
1959    public MolecularSequence setType(SequenceType value) { 
1960      if (value == null)
1961        this.type = null;
1962      else {
1963        if (this.type == null)
1964          this.type = new Enumeration<SequenceType>(new SequenceTypeEnumFactory());
1965        this.type.setValue(value);
1966      }
1967      return this;
1968    }
1969
1970    /**
1971     * @return {@link #subject} (Indicates the subject this sequence is associated too.)
1972     */
1973    public Reference getSubject() { 
1974      if (this.subject == null)
1975        if (Configuration.errorOnAutoCreate())
1976          throw new Error("Attempt to auto-create MolecularSequence.subject");
1977        else if (Configuration.doAutoCreate())
1978          this.subject = new Reference(); // cc
1979      return this.subject;
1980    }
1981
1982    public boolean hasSubject() { 
1983      return this.subject != null && !this.subject.isEmpty();
1984    }
1985
1986    /**
1987     * @param value {@link #subject} (Indicates the subject this sequence is associated too.)
1988     */
1989    public MolecularSequence setSubject(Reference value) { 
1990      this.subject = value;
1991      return this;
1992    }
1993
1994    /**
1995     * @return {@link #focus} (The actual focus of a molecular sequence when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, child, or sibling. For example, in trio testing, the subject would be the child (proband) and the focus would be the parent.)
1996     */
1997    public List<Reference> getFocus() { 
1998      if (this.focus == null)
1999        this.focus = new ArrayList<Reference>();
2000      return this.focus;
2001    }
2002
2003    /**
2004     * @return Returns a reference to <code>this</code> for easy method chaining
2005     */
2006    public MolecularSequence setFocus(List<Reference> theFocus) { 
2007      this.focus = theFocus;
2008      return this;
2009    }
2010
2011    public boolean hasFocus() { 
2012      if (this.focus == null)
2013        return false;
2014      for (Reference item : this.focus)
2015        if (!item.isEmpty())
2016          return true;
2017      return false;
2018    }
2019
2020    public Reference addFocus() { //3
2021      Reference t = new Reference();
2022      if (this.focus == null)
2023        this.focus = new ArrayList<Reference>();
2024      this.focus.add(t);
2025      return t;
2026    }
2027
2028    public MolecularSequence addFocus(Reference t) { //3
2029      if (t == null)
2030        return this;
2031      if (this.focus == null)
2032        this.focus = new ArrayList<Reference>();
2033      this.focus.add(t);
2034      return this;
2035    }
2036
2037    /**
2038     * @return The first repetition of repeating field {@link #focus}, creating it if it does not already exist {3}
2039     */
2040    public Reference getFocusFirstRep() { 
2041      if (getFocus().isEmpty()) {
2042        addFocus();
2043      }
2044      return getFocus().get(0);
2045    }
2046
2047    /**
2048     * @return {@link #specimen} (Specimen used for sequencing.)
2049     */
2050    public Reference getSpecimen() { 
2051      if (this.specimen == null)
2052        if (Configuration.errorOnAutoCreate())
2053          throw new Error("Attempt to auto-create MolecularSequence.specimen");
2054        else if (Configuration.doAutoCreate())
2055          this.specimen = new Reference(); // cc
2056      return this.specimen;
2057    }
2058
2059    public boolean hasSpecimen() { 
2060      return this.specimen != null && !this.specimen.isEmpty();
2061    }
2062
2063    /**
2064     * @param value {@link #specimen} (Specimen used for sequencing.)
2065     */
2066    public MolecularSequence setSpecimen(Reference value) { 
2067      this.specimen = value;
2068      return this;
2069    }
2070
2071    /**
2072     * @return {@link #device} (The method for sequencing, for example, chip information.)
2073     */
2074    public Reference getDevice() { 
2075      if (this.device == null)
2076        if (Configuration.errorOnAutoCreate())
2077          throw new Error("Attempt to auto-create MolecularSequence.device");
2078        else if (Configuration.doAutoCreate())
2079          this.device = new Reference(); // cc
2080      return this.device;
2081    }
2082
2083    public boolean hasDevice() { 
2084      return this.device != null && !this.device.isEmpty();
2085    }
2086
2087    /**
2088     * @param value {@link #device} (The method for sequencing, for example, chip information.)
2089     */
2090    public MolecularSequence setDevice(Reference value) { 
2091      this.device = value;
2092      return this;
2093    }
2094
2095    /**
2096     * @return {@link #performer} (The organization or lab that should be responsible for this result.)
2097     */
2098    public Reference getPerformer() { 
2099      if (this.performer == null)
2100        if (Configuration.errorOnAutoCreate())
2101          throw new Error("Attempt to auto-create MolecularSequence.performer");
2102        else if (Configuration.doAutoCreate())
2103          this.performer = new Reference(); // cc
2104      return this.performer;
2105    }
2106
2107    public boolean hasPerformer() { 
2108      return this.performer != null && !this.performer.isEmpty();
2109    }
2110
2111    /**
2112     * @param value {@link #performer} (The organization or lab that should be responsible for this result.)
2113     */
2114    public MolecularSequence setPerformer(Reference value) { 
2115      this.performer = value;
2116      return this;
2117    }
2118
2119    /**
2120     * @return {@link #literal} (Sequence that was observed.). This is the underlying object with id, value and extensions. The accessor "getLiteral" gives direct access to the value
2121     */
2122    public StringType getLiteralElement() { 
2123      if (this.literal == null)
2124        if (Configuration.errorOnAutoCreate())
2125          throw new Error("Attempt to auto-create MolecularSequence.literal");
2126        else if (Configuration.doAutoCreate())
2127          this.literal = new StringType(); // bb
2128      return this.literal;
2129    }
2130
2131    public boolean hasLiteralElement() { 
2132      return this.literal != null && !this.literal.isEmpty();
2133    }
2134
2135    public boolean hasLiteral() { 
2136      return this.literal != null && !this.literal.isEmpty();
2137    }
2138
2139    /**
2140     * @param value {@link #literal} (Sequence that was observed.). This is the underlying object with id, value and extensions. The accessor "getLiteral" gives direct access to the value
2141     */
2142    public MolecularSequence setLiteralElement(StringType value) { 
2143      this.literal = value;
2144      return this;
2145    }
2146
2147    /**
2148     * @return Sequence that was observed.
2149     */
2150    public String getLiteral() { 
2151      return this.literal == null ? null : this.literal.getValue();
2152    }
2153
2154    /**
2155     * @param value Sequence that was observed.
2156     */
2157    public MolecularSequence setLiteral(String value) { 
2158      if (Utilities.noString(value))
2159        this.literal = null;
2160      else {
2161        if (this.literal == null)
2162          this.literal = new StringType();
2163        this.literal.setValue(value);
2164      }
2165      return this;
2166    }
2167
2168    /**
2169     * @return {@link #formatted} (Sequence that was observed as file content. Can be an actual file contents, or referenced by a URL to an external system.)
2170     */
2171    public List<Attachment> getFormatted() { 
2172      if (this.formatted == null)
2173        this.formatted = new ArrayList<Attachment>();
2174      return this.formatted;
2175    }
2176
2177    /**
2178     * @return Returns a reference to <code>this</code> for easy method chaining
2179     */
2180    public MolecularSequence setFormatted(List<Attachment> theFormatted) { 
2181      this.formatted = theFormatted;
2182      return this;
2183    }
2184
2185    public boolean hasFormatted() { 
2186      if (this.formatted == null)
2187        return false;
2188      for (Attachment item : this.formatted)
2189        if (!item.isEmpty())
2190          return true;
2191      return false;
2192    }
2193
2194    public Attachment addFormatted() { //3
2195      Attachment t = new Attachment();
2196      if (this.formatted == null)
2197        this.formatted = new ArrayList<Attachment>();
2198      this.formatted.add(t);
2199      return t;
2200    }
2201
2202    public MolecularSequence addFormatted(Attachment t) { //3
2203      if (t == null)
2204        return this;
2205      if (this.formatted == null)
2206        this.formatted = new ArrayList<Attachment>();
2207      this.formatted.add(t);
2208      return this;
2209    }
2210
2211    /**
2212     * @return The first repetition of repeating field {@link #formatted}, creating it if it does not already exist {3}
2213     */
2214    public Attachment getFormattedFirstRep() { 
2215      if (getFormatted().isEmpty()) {
2216        addFormatted();
2217      }
2218      return getFormatted().get(0);
2219    }
2220
2221    /**
2222     * @return {@link #relative} (A sequence defined relative to another sequence.)
2223     */
2224    public List<MolecularSequenceRelativeComponent> getRelative() { 
2225      if (this.relative == null)
2226        this.relative = new ArrayList<MolecularSequenceRelativeComponent>();
2227      return this.relative;
2228    }
2229
2230    /**
2231     * @return Returns a reference to <code>this</code> for easy method chaining
2232     */
2233    public MolecularSequence setRelative(List<MolecularSequenceRelativeComponent> theRelative) { 
2234      this.relative = theRelative;
2235      return this;
2236    }
2237
2238    public boolean hasRelative() { 
2239      if (this.relative == null)
2240        return false;
2241      for (MolecularSequenceRelativeComponent item : this.relative)
2242        if (!item.isEmpty())
2243          return true;
2244      return false;
2245    }
2246
2247    public MolecularSequenceRelativeComponent addRelative() { //3
2248      MolecularSequenceRelativeComponent t = new MolecularSequenceRelativeComponent();
2249      if (this.relative == null)
2250        this.relative = new ArrayList<MolecularSequenceRelativeComponent>();
2251      this.relative.add(t);
2252      return t;
2253    }
2254
2255    public MolecularSequence addRelative(MolecularSequenceRelativeComponent t) { //3
2256      if (t == null)
2257        return this;
2258      if (this.relative == null)
2259        this.relative = new ArrayList<MolecularSequenceRelativeComponent>();
2260      this.relative.add(t);
2261      return this;
2262    }
2263
2264    /**
2265     * @return The first repetition of repeating field {@link #relative}, creating it if it does not already exist {3}
2266     */
2267    public MolecularSequenceRelativeComponent getRelativeFirstRep() { 
2268      if (getRelative().isEmpty()) {
2269        addRelative();
2270      }
2271      return getRelative().get(0);
2272    }
2273
2274      protected void listChildren(List<Property> children) {
2275        super.listChildren(children);
2276        children.add(new Property("identifier", "Identifier", "A unique identifier for this particular sequence instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
2277        children.add(new Property("type", "code", "Amino Acid Sequence/ DNA Sequence / RNA Sequence.", 0, 1, type));
2278        children.add(new Property("subject", "Reference(Patient|Group|Substance|BiologicallyDerivedProduct|NutritionProduct)", "Indicates the subject this sequence is associated too.", 0, 1, subject));
2279        children.add(new Property("focus", "Reference(Any)", "The actual focus of a molecular sequence when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, child, or sibling. For example, in trio testing, the subject would be the child (proband) and the focus would be the parent.", 0, java.lang.Integer.MAX_VALUE, focus));
2280        children.add(new Property("specimen", "Reference(Specimen)", "Specimen used for sequencing.", 0, 1, specimen));
2281        children.add(new Property("device", "Reference(Device)", "The method for sequencing, for example, chip information.", 0, 1, device));
2282        children.add(new Property("performer", "Reference(Organization)", "The organization or lab that should be responsible for this result.", 0, 1, performer));
2283        children.add(new Property("literal", "string", "Sequence that was observed.", 0, 1, literal));
2284        children.add(new Property("formatted", "Attachment", "Sequence that was observed as file content. Can be an actual file contents, or referenced by a URL to an external system.", 0, java.lang.Integer.MAX_VALUE, formatted));
2285        children.add(new Property("relative", "", "A sequence defined relative to another sequence.", 0, java.lang.Integer.MAX_VALUE, relative));
2286      }
2287
2288      @Override
2289      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2290        switch (_hash) {
2291        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A unique identifier for this particular sequence instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
2292        case 3575610: /*type*/  return new Property("type", "code", "Amino Acid Sequence/ DNA Sequence / RNA Sequence.", 0, 1, type);
2293        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group|Substance|BiologicallyDerivedProduct|NutritionProduct)", "Indicates the subject this sequence is associated too.", 0, 1, subject);
2294        case 97604824: /*focus*/  return new Property("focus", "Reference(Any)", "The actual focus of a molecular sequence when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, child, or sibling. For example, in trio testing, the subject would be the child (proband) and the focus would be the parent.", 0, java.lang.Integer.MAX_VALUE, focus);
2295        case -2132868344: /*specimen*/  return new Property("specimen", "Reference(Specimen)", "Specimen used for sequencing.", 0, 1, specimen);
2296        case -1335157162: /*device*/  return new Property("device", "Reference(Device)", "The method for sequencing, for example, chip information.", 0, 1, device);
2297        case 481140686: /*performer*/  return new Property("performer", "Reference(Organization)", "The organization or lab that should be responsible for this result.", 0, 1, performer);
2298        case 182460591: /*literal*/  return new Property("literal", "string", "Sequence that was observed.", 0, 1, literal);
2299        case 1811591356: /*formatted*/  return new Property("formatted", "Attachment", "Sequence that was observed as file content. Can be an actual file contents, or referenced by a URL to an external system.", 0, java.lang.Integer.MAX_VALUE, formatted);
2300        case -554435892: /*relative*/  return new Property("relative", "", "A sequence defined relative to another sequence.", 0, java.lang.Integer.MAX_VALUE, relative);
2301        default: return super.getNamedProperty(_hash, _name, _checkValid);
2302        }
2303
2304      }
2305
2306      @Override
2307      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2308        switch (hash) {
2309        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2310        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<SequenceType>
2311        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
2312        case 97604824: /*focus*/ return this.focus == null ? new Base[0] : this.focus.toArray(new Base[this.focus.size()]); // Reference
2313        case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : new Base[] {this.specimen}; // Reference
2314        case -1335157162: /*device*/ return this.device == null ? new Base[0] : new Base[] {this.device}; // Reference
2315        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference
2316        case 182460591: /*literal*/ return this.literal == null ? new Base[0] : new Base[] {this.literal}; // StringType
2317        case 1811591356: /*formatted*/ return this.formatted == null ? new Base[0] : this.formatted.toArray(new Base[this.formatted.size()]); // Attachment
2318        case -554435892: /*relative*/ return this.relative == null ? new Base[0] : this.relative.toArray(new Base[this.relative.size()]); // MolecularSequenceRelativeComponent
2319        default: return super.getProperty(hash, name, checkValid);
2320        }
2321
2322      }
2323
2324      @Override
2325      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2326        switch (hash) {
2327        case -1618432855: // identifier
2328          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2329          return value;
2330        case 3575610: // type
2331          value = new SequenceTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
2332          this.type = (Enumeration) value; // Enumeration<SequenceType>
2333          return value;
2334        case -1867885268: // subject
2335          this.subject = TypeConvertor.castToReference(value); // Reference
2336          return value;
2337        case 97604824: // focus
2338          this.getFocus().add(TypeConvertor.castToReference(value)); // Reference
2339          return value;
2340        case -2132868344: // specimen
2341          this.specimen = TypeConvertor.castToReference(value); // Reference
2342          return value;
2343        case -1335157162: // device
2344          this.device = TypeConvertor.castToReference(value); // Reference
2345          return value;
2346        case 481140686: // performer
2347          this.performer = TypeConvertor.castToReference(value); // Reference
2348          return value;
2349        case 182460591: // literal
2350          this.literal = TypeConvertor.castToString(value); // StringType
2351          return value;
2352        case 1811591356: // formatted
2353          this.getFormatted().add(TypeConvertor.castToAttachment(value)); // Attachment
2354          return value;
2355        case -554435892: // relative
2356          this.getRelative().add((MolecularSequenceRelativeComponent) value); // MolecularSequenceRelativeComponent
2357          return value;
2358        default: return super.setProperty(hash, name, value);
2359        }
2360
2361      }
2362
2363      @Override
2364      public Base setProperty(String name, Base value) throws FHIRException {
2365        if (name.equals("identifier")) {
2366          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2367        } else if (name.equals("type")) {
2368          value = new SequenceTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
2369          this.type = (Enumeration) value; // Enumeration<SequenceType>
2370        } else if (name.equals("subject")) {
2371          this.subject = TypeConvertor.castToReference(value); // Reference
2372        } else if (name.equals("focus")) {
2373          this.getFocus().add(TypeConvertor.castToReference(value));
2374        } else if (name.equals("specimen")) {
2375          this.specimen = TypeConvertor.castToReference(value); // Reference
2376        } else if (name.equals("device")) {
2377          this.device = TypeConvertor.castToReference(value); // Reference
2378        } else if (name.equals("performer")) {
2379          this.performer = TypeConvertor.castToReference(value); // Reference
2380        } else if (name.equals("literal")) {
2381          this.literal = TypeConvertor.castToString(value); // StringType
2382        } else if (name.equals("formatted")) {
2383          this.getFormatted().add(TypeConvertor.castToAttachment(value));
2384        } else if (name.equals("relative")) {
2385          this.getRelative().add((MolecularSequenceRelativeComponent) value);
2386        } else
2387          return super.setProperty(name, value);
2388        return value;
2389      }
2390
2391  @Override
2392  public void removeChild(String name, Base value) throws FHIRException {
2393        if (name.equals("identifier")) {
2394          this.getIdentifier().remove(value);
2395        } else if (name.equals("type")) {
2396          value = new SequenceTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
2397          this.type = (Enumeration) value; // Enumeration<SequenceType>
2398        } else if (name.equals("subject")) {
2399          this.subject = null;
2400        } else if (name.equals("focus")) {
2401          this.getFocus().remove(value);
2402        } else if (name.equals("specimen")) {
2403          this.specimen = null;
2404        } else if (name.equals("device")) {
2405          this.device = null;
2406        } else if (name.equals("performer")) {
2407          this.performer = null;
2408        } else if (name.equals("literal")) {
2409          this.literal = null;
2410        } else if (name.equals("formatted")) {
2411          this.getFormatted().remove(value);
2412        } else if (name.equals("relative")) {
2413          this.getRelative().remove((MolecularSequenceRelativeComponent) value);
2414        } else
2415          super.removeChild(name, value);
2416        
2417      }
2418
2419      @Override
2420      public Base makeProperty(int hash, String name) throws FHIRException {
2421        switch (hash) {
2422        case -1618432855:  return addIdentifier(); 
2423        case 3575610:  return getTypeElement();
2424        case -1867885268:  return getSubject();
2425        case 97604824:  return addFocus(); 
2426        case -2132868344:  return getSpecimen();
2427        case -1335157162:  return getDevice();
2428        case 481140686:  return getPerformer();
2429        case 182460591:  return getLiteralElement();
2430        case 1811591356:  return addFormatted(); 
2431        case -554435892:  return addRelative(); 
2432        default: return super.makeProperty(hash, name);
2433        }
2434
2435      }
2436
2437      @Override
2438      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2439        switch (hash) {
2440        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2441        case 3575610: /*type*/ return new String[] {"code"};
2442        case -1867885268: /*subject*/ return new String[] {"Reference"};
2443        case 97604824: /*focus*/ return new String[] {"Reference"};
2444        case -2132868344: /*specimen*/ return new String[] {"Reference"};
2445        case -1335157162: /*device*/ return new String[] {"Reference"};
2446        case 481140686: /*performer*/ return new String[] {"Reference"};
2447        case 182460591: /*literal*/ return new String[] {"string"};
2448        case 1811591356: /*formatted*/ return new String[] {"Attachment"};
2449        case -554435892: /*relative*/ return new String[] {};
2450        default: return super.getTypesForProperty(hash, name);
2451        }
2452
2453      }
2454
2455      @Override
2456      public Base addChild(String name) throws FHIRException {
2457        if (name.equals("identifier")) {
2458          return addIdentifier();
2459        }
2460        else if (name.equals("type")) {
2461          throw new FHIRException("Cannot call addChild on a singleton property MolecularSequence.type");
2462        }
2463        else if (name.equals("subject")) {
2464          this.subject = new Reference();
2465          return this.subject;
2466        }
2467        else if (name.equals("focus")) {
2468          return addFocus();
2469        }
2470        else if (name.equals("specimen")) {
2471          this.specimen = new Reference();
2472          return this.specimen;
2473        }
2474        else if (name.equals("device")) {
2475          this.device = new Reference();
2476          return this.device;
2477        }
2478        else if (name.equals("performer")) {
2479          this.performer = new Reference();
2480          return this.performer;
2481        }
2482        else if (name.equals("literal")) {
2483          throw new FHIRException("Cannot call addChild on a singleton property MolecularSequence.literal");
2484        }
2485        else if (name.equals("formatted")) {
2486          return addFormatted();
2487        }
2488        else if (name.equals("relative")) {
2489          return addRelative();
2490        }
2491        else
2492          return super.addChild(name);
2493      }
2494
2495  public String fhirType() {
2496    return "MolecularSequence";
2497
2498  }
2499
2500      public MolecularSequence copy() {
2501        MolecularSequence dst = new MolecularSequence();
2502        copyValues(dst);
2503        return dst;
2504      }
2505
2506      public void copyValues(MolecularSequence dst) {
2507        super.copyValues(dst);
2508        if (identifier != null) {
2509          dst.identifier = new ArrayList<Identifier>();
2510          for (Identifier i : identifier)
2511            dst.identifier.add(i.copy());
2512        };
2513        dst.type = type == null ? null : type.copy();
2514        dst.subject = subject == null ? null : subject.copy();
2515        if (focus != null) {
2516          dst.focus = new ArrayList<Reference>();
2517          for (Reference i : focus)
2518            dst.focus.add(i.copy());
2519        };
2520        dst.specimen = specimen == null ? null : specimen.copy();
2521        dst.device = device == null ? null : device.copy();
2522        dst.performer = performer == null ? null : performer.copy();
2523        dst.literal = literal == null ? null : literal.copy();
2524        if (formatted != null) {
2525          dst.formatted = new ArrayList<Attachment>();
2526          for (Attachment i : formatted)
2527            dst.formatted.add(i.copy());
2528        };
2529        if (relative != null) {
2530          dst.relative = new ArrayList<MolecularSequenceRelativeComponent>();
2531          for (MolecularSequenceRelativeComponent i : relative)
2532            dst.relative.add(i.copy());
2533        };
2534      }
2535
2536      protected MolecularSequence typedCopy() {
2537        return copy();
2538      }
2539
2540      @Override
2541      public boolean equalsDeep(Base other_) {
2542        if (!super.equalsDeep(other_))
2543          return false;
2544        if (!(other_ instanceof MolecularSequence))
2545          return false;
2546        MolecularSequence o = (MolecularSequence) other_;
2547        return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(subject, o.subject, true)
2548           && compareDeep(focus, o.focus, true) && compareDeep(specimen, o.specimen, true) && compareDeep(device, o.device, true)
2549           && compareDeep(performer, o.performer, true) && compareDeep(literal, o.literal, true) && compareDeep(formatted, o.formatted, true)
2550           && compareDeep(relative, o.relative, true);
2551      }
2552
2553      @Override
2554      public boolean equalsShallow(Base other_) {
2555        if (!super.equalsShallow(other_))
2556          return false;
2557        if (!(other_ instanceof MolecularSequence))
2558          return false;
2559        MolecularSequence o = (MolecularSequence) other_;
2560        return compareValues(type, o.type, true) && compareValues(literal, o.literal, true);
2561      }
2562
2563      public boolean isEmpty() {
2564        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, subject
2565          , focus, specimen, device, performer, literal, formatted, relative);
2566      }
2567
2568  @Override
2569  public ResourceType getResourceType() {
2570    return ResourceType.MolecularSequence;
2571   }
2572
2573 /**
2574   * Search parameter: <b>focus</b>
2575   * <p>
2576   * Description: <b>What the molecular sequence is about, when it is not about the subject of record</b><br>
2577   * Type: <b>reference</b><br>
2578   * Path: <b>MolecularSequence.focus</b><br>
2579   * </p>
2580   */
2581  @SearchParamDefinition(name="focus", path="MolecularSequence.focus", description="What the molecular sequence is about, when it is not about the subject of record", type="reference", target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BiologicallyDerivedProductDispense.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceAssociation.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentReference.class, Encounter.class, EncounterHistory.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryItem.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Parameters.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestPlan.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
2582  public static final String SP_FOCUS = "focus";
2583 /**
2584   * <b>Fluent Client</b> search parameter constant for <b>focus</b>
2585   * <p>
2586   * Description: <b>What the molecular sequence is about, when it is not about the subject of record</b><br>
2587   * Type: <b>reference</b><br>
2588   * Path: <b>MolecularSequence.focus</b><br>
2589   * </p>
2590   */
2591  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FOCUS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FOCUS);
2592
2593/**
2594   * Constant for fluent queries to be used to add include statements. Specifies
2595   * the path value of "<b>MolecularSequence:focus</b>".
2596   */
2597  public static final ca.uhn.fhir.model.api.Include INCLUDE_FOCUS = new ca.uhn.fhir.model.api.Include("MolecularSequence:focus").toLocked();
2598
2599 /**
2600   * Search parameter: <b>subject</b>
2601   * <p>
2602   * Description: <b>The subject that the sequence is about</b><br>
2603   * Type: <b>reference</b><br>
2604   * Path: <b>MolecularSequence.subject</b><br>
2605   * </p>
2606   */
2607  @SearchParamDefinition(name="subject", path="MolecularSequence.subject", description="The subject that the sequence is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={BiologicallyDerivedProduct.class, Group.class, NutritionProduct.class, Patient.class, Substance.class } )
2608  public static final String SP_SUBJECT = "subject";
2609 /**
2610   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2611   * <p>
2612   * Description: <b>The subject that the sequence is about</b><br>
2613   * Type: <b>reference</b><br>
2614   * Path: <b>MolecularSequence.subject</b><br>
2615   * </p>
2616   */
2617  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2618
2619/**
2620   * Constant for fluent queries to be used to add include statements. Specifies
2621   * the path value of "<b>MolecularSequence:subject</b>".
2622   */
2623  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("MolecularSequence:subject").toLocked();
2624
2625 /**
2626   * Search parameter: <b>identifier</b>
2627   * <p>
2628   * Description: <b>Multiple Resources: 
2629
2630* [Account](account.html): Account number
2631* [AdverseEvent](adverseevent.html): Business identifier for the event
2632* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2633* [Appointment](appointment.html): An Identifier of the Appointment
2634* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2635* [Basic](basic.html): Business identifier
2636* [BodyStructure](bodystructure.html): Bodystructure identifier
2637* [CarePlan](careplan.html): External Ids for this plan
2638* [CareTeam](careteam.html): External Ids for this team
2639* [ChargeItem](chargeitem.html): Business Identifier for item
2640* [Claim](claim.html): The primary identifier of the financial resource
2641* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2642* [ClinicalImpression](clinicalimpression.html): Business identifier
2643* [Communication](communication.html): Unique identifier
2644* [CommunicationRequest](communicationrequest.html): Unique identifier
2645* [Composition](composition.html): Version-independent identifier for the Composition
2646* [Condition](condition.html): A unique identifier of the condition record
2647* [Consent](consent.html): Identifier for this record (external references)
2648* [Contract](contract.html): The identity of the contract
2649* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2650* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2651* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2652* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2653* [DeviceRequest](devicerequest.html): Business identifier for request/order
2654* [DeviceUsage](deviceusage.html): Search by identifier
2655* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2656* [DocumentReference](documentreference.html): Identifier of the attachment binary
2657* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2658* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2659* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2660* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2661* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2662* [Flag](flag.html): Business identifier
2663* [Goal](goal.html): External Ids for this goal
2664* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2665* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2666* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2667* [Immunization](immunization.html): Business identifier
2668* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2669* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2670* [Invoice](invoice.html): Business Identifier for item
2671* [List](list.html): Business identifier
2672* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2673* [Medication](medication.html): Returns medications with this external identifier
2674* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2675* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2676* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2677* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2678* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2679* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2680* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2681* [Observation](observation.html): The unique id for a particular observation
2682* [Person](person.html): A person Identifier
2683* [Procedure](procedure.html): A unique identifier for a procedure
2684* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2685* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2686* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2687* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2688* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2689* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2690* [Specimen](specimen.html): The unique identifier associated with the specimen
2691* [SupplyDelivery](supplydelivery.html): External identifier
2692* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2693* [Task](task.html): Search for a task instance by its business identifier
2694* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2695</b><br>
2696   * Type: <b>token</b><br>
2697   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
2698   * </p>
2699   */
2700  @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
2701  public static final String SP_IDENTIFIER = "identifier";
2702 /**
2703   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2704   * <p>
2705   * Description: <b>Multiple Resources: 
2706
2707* [Account](account.html): Account number
2708* [AdverseEvent](adverseevent.html): Business identifier for the event
2709* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2710* [Appointment](appointment.html): An Identifier of the Appointment
2711* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2712* [Basic](basic.html): Business identifier
2713* [BodyStructure](bodystructure.html): Bodystructure identifier
2714* [CarePlan](careplan.html): External Ids for this plan
2715* [CareTeam](careteam.html): External Ids for this team
2716* [ChargeItem](chargeitem.html): Business Identifier for item
2717* [Claim](claim.html): The primary identifier of the financial resource
2718* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2719* [ClinicalImpression](clinicalimpression.html): Business identifier
2720* [Communication](communication.html): Unique identifier
2721* [CommunicationRequest](communicationrequest.html): Unique identifier
2722* [Composition](composition.html): Version-independent identifier for the Composition
2723* [Condition](condition.html): A unique identifier of the condition record
2724* [Consent](consent.html): Identifier for this record (external references)
2725* [Contract](contract.html): The identity of the contract
2726* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2727* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2728* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2729* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2730* [DeviceRequest](devicerequest.html): Business identifier for request/order
2731* [DeviceUsage](deviceusage.html): Search by identifier
2732* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2733* [DocumentReference](documentreference.html): Identifier of the attachment binary
2734* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2735* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2736* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2737* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2738* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2739* [Flag](flag.html): Business identifier
2740* [Goal](goal.html): External Ids for this goal
2741* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2742* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2743* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2744* [Immunization](immunization.html): Business identifier
2745* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2746* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2747* [Invoice](invoice.html): Business Identifier for item
2748* [List](list.html): Business identifier
2749* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2750* [Medication](medication.html): Returns medications with this external identifier
2751* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2752* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2753* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2754* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2755* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2756* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2757* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2758* [Observation](observation.html): The unique id for a particular observation
2759* [Person](person.html): A person Identifier
2760* [Procedure](procedure.html): A unique identifier for a procedure
2761* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2762* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2763* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2764* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2765* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2766* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2767* [Specimen](specimen.html): The unique identifier associated with the specimen
2768* [SupplyDelivery](supplydelivery.html): External identifier
2769* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2770* [Task](task.html): Search for a task instance by its business identifier
2771* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2772</b><br>
2773   * Type: <b>token</b><br>
2774   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
2775   * </p>
2776   */
2777  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2778
2779 /**
2780   * Search parameter: <b>patient</b>
2781   * <p>
2782   * Description: <b>Multiple Resources: 
2783
2784* [Account](account.html): The entity that caused the expenses
2785* [AdverseEvent](adverseevent.html): Subject impacted by event
2786* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2787* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2788* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2789* [AuditEvent](auditevent.html): Where the activity involved patient data
2790* [Basic](basic.html): Identifies the focus of this resource
2791* [BodyStructure](bodystructure.html): Who this is about
2792* [CarePlan](careplan.html): Who the care plan is for
2793* [CareTeam](careteam.html): Who care team is for
2794* [ChargeItem](chargeitem.html): Individual service was done for/to
2795* [Claim](claim.html): Patient receiving the products or services
2796* [ClaimResponse](claimresponse.html): The subject of care
2797* [ClinicalImpression](clinicalimpression.html): Patient assessed
2798* [Communication](communication.html): Focus of message
2799* [CommunicationRequest](communicationrequest.html): Focus of message
2800* [Composition](composition.html): Who and/or what the composition is about
2801* [Condition](condition.html): Who has the condition?
2802* [Consent](consent.html): Who the consent applies to
2803* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2804* [Coverage](coverage.html): Retrieve coverages for a patient
2805* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2806* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2807* [DetectedIssue](detectedissue.html): Associated patient
2808* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2809* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2810* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2811* [DocumentReference](documentreference.html): Who/what is the subject of the document
2812* [Encounter](encounter.html): The patient present at the encounter
2813* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2814* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2815* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2816* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2817* [Flag](flag.html): The identity of a subject to list flags for
2818* [Goal](goal.html): Who this goal is intended for
2819* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2820* [ImagingSelection](imagingselection.html): Who the study is about
2821* [ImagingStudy](imagingstudy.html): Who the study is about
2822* [Immunization](immunization.html): The patient for the vaccination record
2823* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2824* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2825* [Invoice](invoice.html): Recipient(s) of goods and services
2826* [List](list.html): If all resources have the same subject
2827* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2828* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2829* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2830* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2831* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2832* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2833* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2834* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2835* [Observation](observation.html): The subject that the observation is about (if patient)
2836* [Person](person.html): The Person links to this Patient
2837* [Procedure](procedure.html): Search by subject - a patient
2838* [Provenance](provenance.html): Where the activity involved patient data
2839* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2840* [RelatedPerson](relatedperson.html): The patient this related person is related to
2841* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2842* [ResearchSubject](researchsubject.html): Who or what is part of study
2843* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2844* [ServiceRequest](servicerequest.html): Search by subject - a patient
2845* [Specimen](specimen.html): The patient the specimen comes from
2846* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2847* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2848* [Task](task.html): Search by patient
2849* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2850</b><br>
2851   * Type: <b>reference</b><br>
2852   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
2853   * </p>
2854   */
2855  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", target={Patient.class } )
2856  public static final String SP_PATIENT = "patient";
2857 /**
2858   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2859   * <p>
2860   * Description: <b>Multiple Resources: 
2861
2862* [Account](account.html): The entity that caused the expenses
2863* [AdverseEvent](adverseevent.html): Subject impacted by event
2864* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2865* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2866* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2867* [AuditEvent](auditevent.html): Where the activity involved patient data
2868* [Basic](basic.html): Identifies the focus of this resource
2869* [BodyStructure](bodystructure.html): Who this is about
2870* [CarePlan](careplan.html): Who the care plan is for
2871* [CareTeam](careteam.html): Who care team is for
2872* [ChargeItem](chargeitem.html): Individual service was done for/to
2873* [Claim](claim.html): Patient receiving the products or services
2874* [ClaimResponse](claimresponse.html): The subject of care
2875* [ClinicalImpression](clinicalimpression.html): Patient assessed
2876* [Communication](communication.html): Focus of message
2877* [CommunicationRequest](communicationrequest.html): Focus of message
2878* [Composition](composition.html): Who and/or what the composition is about
2879* [Condition](condition.html): Who has the condition?
2880* [Consent](consent.html): Who the consent applies to
2881* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2882* [Coverage](coverage.html): Retrieve coverages for a patient
2883* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2884* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2885* [DetectedIssue](detectedissue.html): Associated patient
2886* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2887* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2888* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2889* [DocumentReference](documentreference.html): Who/what is the subject of the document
2890* [Encounter](encounter.html): The patient present at the encounter
2891* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2892* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2893* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2894* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2895* [Flag](flag.html): The identity of a subject to list flags for
2896* [Goal](goal.html): Who this goal is intended for
2897* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2898* [ImagingSelection](imagingselection.html): Who the study is about
2899* [ImagingStudy](imagingstudy.html): Who the study is about
2900* [Immunization](immunization.html): The patient for the vaccination record
2901* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2902* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2903* [Invoice](invoice.html): Recipient(s) of goods and services
2904* [List](list.html): If all resources have the same subject
2905* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2906* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2907* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2908* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2909* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2910* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2911* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2912* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2913* [Observation](observation.html): The subject that the observation is about (if patient)
2914* [Person](person.html): The Person links to this Patient
2915* [Procedure](procedure.html): Search by subject - a patient
2916* [Provenance](provenance.html): Where the activity involved patient data
2917* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2918* [RelatedPerson](relatedperson.html): The patient this related person is related to
2919* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2920* [ResearchSubject](researchsubject.html): Who or what is part of study
2921* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2922* [ServiceRequest](servicerequest.html): Search by subject - a patient
2923* [Specimen](specimen.html): The patient the specimen comes from
2924* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2925* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2926* [Task](task.html): Search by patient
2927* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2928</b><br>
2929   * Type: <b>reference</b><br>
2930   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
2931   * </p>
2932   */
2933  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2934
2935/**
2936   * Constant for fluent queries to be used to add include statements. Specifies
2937   * the path value of "<b>MolecularSequence:patient</b>".
2938   */
2939  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("MolecularSequence:patient").toLocked();
2940
2941 /**
2942   * Search parameter: <b>type</b>
2943   * <p>
2944   * Description: <b>Multiple Resources: 
2945
2946* [Account](account.html): E.g. patient, expense, depreciation
2947* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)
2948* [Composition](composition.html): Kind of composition (LOINC if possible)
2949* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)
2950* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)
2951* [Encounter](encounter.html): Specific type of encounter
2952* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management
2953* [Invoice](invoice.html): Type of Invoice
2954* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type
2955* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence
2956* [Specimen](specimen.html): The specimen type
2957</b><br>
2958   * Type: <b>token</b><br>
2959   * Path: <b>Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type</b><br>
2960   * </p>
2961   */
2962  @SearchParamDefinition(name="type", path="Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type", description="Multiple Resources: \r\n\r\n* [Account](account.html): E.g. patient, expense, depreciation\r\n* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)\r\n* [Composition](composition.html): Kind of composition (LOINC if possible)\r\n* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)\r\n* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)\r\n* [Encounter](encounter.html): Specific type of encounter\r\n* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management\r\n* [Invoice](invoice.html): Type of Invoice\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type\r\n* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence\r\n* [Specimen](specimen.html): The specimen type\r\n", type="token" )
2963  public static final String SP_TYPE = "type";
2964 /**
2965   * <b>Fluent Client</b> search parameter constant for <b>type</b>
2966   * <p>
2967   * Description: <b>Multiple Resources: 
2968
2969* [Account](account.html): E.g. patient, expense, depreciation
2970* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)
2971* [Composition](composition.html): Kind of composition (LOINC if possible)
2972* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)
2973* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)
2974* [Encounter](encounter.html): Specific type of encounter
2975* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management
2976* [Invoice](invoice.html): Type of Invoice
2977* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type
2978* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence
2979* [Specimen](specimen.html): The specimen type
2980</b><br>
2981   * Type: <b>token</b><br>
2982   * Path: <b>Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type</b><br>
2983   * </p>
2984   */
2985  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
2986
2987
2988}
2989