001package org.hl7.fhir.dstu3.model;
002
003import java.math.BigDecimal;
004
005
006
007/*
008  Copyright (c) 2011+, HL7, Inc.
009  All rights reserved.
010  
011  Redistribution and use in source and binary forms, with or without modification, 
012  are permitted provided that the following conditions are met:
013  
014   * Redistributions of source code must retain the above copyright notice, this 
015     list of conditions and the following disclaimer.
016   * Redistributions in binary form must reproduce the above copyright notice, 
017     this list of conditions and the following disclaimer in the documentation 
018     and/or other materials provided with the distribution.
019   * Neither the name of HL7 nor the names of its contributors may be used to 
020     endorse or promote products derived from this software without specific 
021     prior written permission.
022  
023  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
024  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
025  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
026  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
027  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
028  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
029  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
030  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
031  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
032  POSSIBILITY OF SUCH DAMAGE.
033  
034*/
035
036// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x
037import java.util.ArrayList;
038import java.util.List;
039
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
042import org.hl7.fhir.utilities.Utilities;
043
044import ca.uhn.fhir.model.api.annotation.Block;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.Description;
047import ca.uhn.fhir.model.api.annotation.ResourceDef;
048import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
049/**
050 * Raw data describing a biological sequence.
051 */
052@ResourceDef(name="Sequence", profile="http://hl7.org/fhir/Profile/Sequence")
053public class Sequence extends DomainResource {
054
055    public enum SequenceType {
056        /**
057         * Amino acid sequence
058         */
059        AA, 
060        /**
061         * DNA Sequence
062         */
063        DNA, 
064        /**
065         * RNA Sequence
066         */
067        RNA, 
068        /**
069         * added to help the parsers with the generic types
070         */
071        NULL;
072        public static SequenceType fromCode(String codeString) throws FHIRException {
073            if (codeString == null || "".equals(codeString))
074                return null;
075        if ("aa".equals(codeString))
076          return AA;
077        if ("dna".equals(codeString))
078          return DNA;
079        if ("rna".equals(codeString))
080          return RNA;
081        if (Configuration.isAcceptInvalidEnums())
082          return null;
083        else
084          throw new FHIRException("Unknown SequenceType code '"+codeString+"'");
085        }
086        public String toCode() {
087          switch (this) {
088            case AA: return "aa";
089            case DNA: return "dna";
090            case RNA: return "rna";
091            case NULL: return null;
092            default: return "?";
093          }
094        }
095        public String getSystem() {
096          switch (this) {
097            case AA: return "http://hl7.org/fhir/sequence-type";
098            case DNA: return "http://hl7.org/fhir/sequence-type";
099            case RNA: return "http://hl7.org/fhir/sequence-type";
100            case NULL: return null;
101            default: return "?";
102          }
103        }
104        public String getDefinition() {
105          switch (this) {
106            case AA: return "Amino acid sequence";
107            case DNA: return "DNA Sequence";
108            case RNA: return "RNA Sequence";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113        public String getDisplay() {
114          switch (this) {
115            case AA: return "AA Sequence";
116            case DNA: return "DNA Sequence";
117            case RNA: return "RNA Sequence";
118            case NULL: return null;
119            default: return "?";
120          }
121        }
122    }
123
124  public static class SequenceTypeEnumFactory implements EnumFactory<SequenceType> {
125    public SequenceType fromCode(String codeString) throws IllegalArgumentException {
126      if (codeString == null || "".equals(codeString))
127            if (codeString == null || "".equals(codeString))
128                return null;
129        if ("aa".equals(codeString))
130          return SequenceType.AA;
131        if ("dna".equals(codeString))
132          return SequenceType.DNA;
133        if ("rna".equals(codeString))
134          return SequenceType.RNA;
135        throw new IllegalArgumentException("Unknown SequenceType code '"+codeString+"'");
136        }
137        public Enumeration<SequenceType> fromType(Base code) throws FHIRException {
138          if (code == null)
139            return null;
140          if (code.isEmpty())
141            return new Enumeration<SequenceType>(this);
142          String codeString = ((PrimitiveType) code).asStringValue();
143          if (codeString == null || "".equals(codeString))
144            return null;
145        if ("aa".equals(codeString))
146          return new Enumeration<SequenceType>(this, SequenceType.AA);
147        if ("dna".equals(codeString))
148          return new Enumeration<SequenceType>(this, SequenceType.DNA);
149        if ("rna".equals(codeString))
150          return new Enumeration<SequenceType>(this, SequenceType.RNA);
151        throw new FHIRException("Unknown SequenceType code '"+codeString+"'");
152        }
153    public String toCode(SequenceType code) {
154      if (code == SequenceType.AA)
155        return "aa";
156      if (code == SequenceType.DNA)
157        return "dna";
158      if (code == SequenceType.RNA)
159        return "rna";
160      return "?";
161      }
162    public String toSystem(SequenceType code) {
163      return code.getSystem();
164      }
165    }
166
167    public enum QualityType {
168        /**
169         * INDEL Comparison
170         */
171        INDEL, 
172        /**
173         * SNP Comparison
174         */
175        SNP, 
176        /**
177         * UNKNOWN Comparison
178         */
179        UNKNOWN, 
180        /**
181         * added to help the parsers with the generic types
182         */
183        NULL;
184        public static QualityType fromCode(String codeString) throws FHIRException {
185            if (codeString == null || "".equals(codeString))
186                return null;
187        if ("indel".equals(codeString))
188          return INDEL;
189        if ("snp".equals(codeString))
190          return SNP;
191        if ("unknown".equals(codeString))
192          return UNKNOWN;
193        if (Configuration.isAcceptInvalidEnums())
194          return null;
195        else
196          throw new FHIRException("Unknown QualityType code '"+codeString+"'");
197        }
198        public String toCode() {
199          switch (this) {
200            case INDEL: return "indel";
201            case SNP: return "snp";
202            case UNKNOWN: return "unknown";
203            case NULL: return null;
204            default: return "?";
205          }
206        }
207        public String getSystem() {
208          switch (this) {
209            case INDEL: return "http://hl7.org/fhir/quality-type";
210            case SNP: return "http://hl7.org/fhir/quality-type";
211            case UNKNOWN: return "http://hl7.org/fhir/quality-type";
212            case NULL: return null;
213            default: return "?";
214          }
215        }
216        public String getDefinition() {
217          switch (this) {
218            case INDEL: return "INDEL Comparison";
219            case SNP: return "SNP Comparison";
220            case UNKNOWN: return "UNKNOWN Comparison";
221            case NULL: return null;
222            default: return "?";
223          }
224        }
225        public String getDisplay() {
226          switch (this) {
227            case INDEL: return "INDEL Comparison";
228            case SNP: return "SNP Comparison";
229            case UNKNOWN: return "UNKNOWN Comparison";
230            case NULL: return null;
231            default: return "?";
232          }
233        }
234    }
235
236  public static class QualityTypeEnumFactory implements EnumFactory<QualityType> {
237    public QualityType fromCode(String codeString) throws IllegalArgumentException {
238      if (codeString == null || "".equals(codeString))
239            if (codeString == null || "".equals(codeString))
240                return null;
241        if ("indel".equals(codeString))
242          return QualityType.INDEL;
243        if ("snp".equals(codeString))
244          return QualityType.SNP;
245        if ("unknown".equals(codeString))
246          return QualityType.UNKNOWN;
247        throw new IllegalArgumentException("Unknown QualityType code '"+codeString+"'");
248        }
249        public Enumeration<QualityType> fromType(Base code) throws FHIRException {
250          if (code == null)
251            return null;
252          if (code.isEmpty())
253            return new Enumeration<QualityType>(this);
254          String codeString = ((PrimitiveType) code).asStringValue();
255          if (codeString == null || "".equals(codeString))
256            return null;
257        if ("indel".equals(codeString))
258          return new Enumeration<QualityType>(this, QualityType.INDEL);
259        if ("snp".equals(codeString))
260          return new Enumeration<QualityType>(this, QualityType.SNP);
261        if ("unknown".equals(codeString))
262          return new Enumeration<QualityType>(this, QualityType.UNKNOWN);
263        throw new FHIRException("Unknown QualityType code '"+codeString+"'");
264        }
265    public String toCode(QualityType code) {
266      if (code == QualityType.INDEL)
267        return "indel";
268      if (code == QualityType.SNP)
269        return "snp";
270      if (code == QualityType.UNKNOWN)
271        return "unknown";
272      return "?";
273      }
274    public String toSystem(QualityType code) {
275      return code.getSystem();
276      }
277    }
278
279    public enum RepositoryType {
280        /**
281         * When URL is clicked, the resource can be seen directly (by webpage or by download link format)
282         */
283        DIRECTLINK, 
284        /**
285         * When the API method (e.g. [base_url]/[parameter]) related with the URL of the website is executed, the resource can be seen directly (usually in JSON or XML format)
286         */
287        OPENAPI, 
288        /**
289         * When logged into the website, the resource can be seen.
290         */
291        LOGIN, 
292        /**
293         * When logged in and  follow the API in the website related with URL, the resource can be seen.
294         */
295        OAUTH, 
296        /**
297         * Some other complicated or particular way to get resource from URL.
298         */
299        OTHER, 
300        /**
301         * added to help the parsers with the generic types
302         */
303        NULL;
304        public static RepositoryType fromCode(String codeString) throws FHIRException {
305            if (codeString == null || "".equals(codeString))
306                return null;
307        if ("directlink".equals(codeString))
308          return DIRECTLINK;
309        if ("openapi".equals(codeString))
310          return OPENAPI;
311        if ("login".equals(codeString))
312          return LOGIN;
313        if ("oauth".equals(codeString))
314          return OAUTH;
315        if ("other".equals(codeString))
316          return OTHER;
317        if (Configuration.isAcceptInvalidEnums())
318          return null;
319        else
320          throw new FHIRException("Unknown RepositoryType code '"+codeString+"'");
321        }
322        public String toCode() {
323          switch (this) {
324            case DIRECTLINK: return "directlink";
325            case OPENAPI: return "openapi";
326            case LOGIN: return "login";
327            case OAUTH: return "oauth";
328            case OTHER: return "other";
329            case NULL: return null;
330            default: return "?";
331          }
332        }
333        public String getSystem() {
334          switch (this) {
335            case DIRECTLINK: return "http://hl7.org/fhir/repository-type";
336            case OPENAPI: return "http://hl7.org/fhir/repository-type";
337            case LOGIN: return "http://hl7.org/fhir/repository-type";
338            case OAUTH: return "http://hl7.org/fhir/repository-type";
339            case OTHER: return "http://hl7.org/fhir/repository-type";
340            case NULL: return null;
341            default: return "?";
342          }
343        }
344        public String getDefinition() {
345          switch (this) {
346            case DIRECTLINK: return "When URL is clicked, the resource can be seen directly (by webpage or by download link format)";
347            case OPENAPI: return "When the API method (e.g. [base_url]/[parameter]) related with the URL of the website is executed, the resource can be seen directly (usually in JSON or XML format)";
348            case LOGIN: return "When logged into the website, the resource can be seen.";
349            case OAUTH: return "When logged in and  follow the API in the website related with URL, the resource can be seen.";
350            case OTHER: return "Some other complicated or particular way to get resource from URL.";
351            case NULL: return null;
352            default: return "?";
353          }
354        }
355        public String getDisplay() {
356          switch (this) {
357            case DIRECTLINK: return "Click and see";
358            case OPENAPI: return "The URL is the RESTful or other kind of API that can access to the result.";
359            case LOGIN: return "Result cannot be access unless an account is logged in";
360            case OAUTH: return "Result need to be fetched with API and need LOGIN( or cookies are required when visiting the link of resource)";
361            case OTHER: return "Some other complicated or particular way to get resource from URL.";
362            case NULL: return null;
363            default: return "?";
364          }
365        }
366    }
367
368  public static class RepositoryTypeEnumFactory implements EnumFactory<RepositoryType> {
369    public RepositoryType fromCode(String codeString) throws IllegalArgumentException {
370      if (codeString == null || "".equals(codeString))
371            if (codeString == null || "".equals(codeString))
372                return null;
373        if ("directlink".equals(codeString))
374          return RepositoryType.DIRECTLINK;
375        if ("openapi".equals(codeString))
376          return RepositoryType.OPENAPI;
377        if ("login".equals(codeString))
378          return RepositoryType.LOGIN;
379        if ("oauth".equals(codeString))
380          return RepositoryType.OAUTH;
381        if ("other".equals(codeString))
382          return RepositoryType.OTHER;
383        throw new IllegalArgumentException("Unknown RepositoryType code '"+codeString+"'");
384        }
385        public Enumeration<RepositoryType> fromType(Base code) throws FHIRException {
386          if (code == null)
387            return null;
388          if (code.isEmpty())
389            return new Enumeration<RepositoryType>(this);
390          String codeString = ((PrimitiveType) code).asStringValue();
391          if (codeString == null || "".equals(codeString))
392            return null;
393        if ("directlink".equals(codeString))
394          return new Enumeration<RepositoryType>(this, RepositoryType.DIRECTLINK);
395        if ("openapi".equals(codeString))
396          return new Enumeration<RepositoryType>(this, RepositoryType.OPENAPI);
397        if ("login".equals(codeString))
398          return new Enumeration<RepositoryType>(this, RepositoryType.LOGIN);
399        if ("oauth".equals(codeString))
400          return new Enumeration<RepositoryType>(this, RepositoryType.OAUTH);
401        if ("other".equals(codeString))
402          return new Enumeration<RepositoryType>(this, RepositoryType.OTHER);
403        throw new FHIRException("Unknown RepositoryType code '"+codeString+"'");
404        }
405    public String toCode(RepositoryType code) {
406      if (code == RepositoryType.DIRECTLINK)
407        return "directlink";
408      if (code == RepositoryType.OPENAPI)
409        return "openapi";
410      if (code == RepositoryType.LOGIN)
411        return "login";
412      if (code == RepositoryType.OAUTH)
413        return "oauth";
414      if (code == RepositoryType.OTHER)
415        return "other";
416      return "?";
417      }
418    public String toSystem(RepositoryType code) {
419      return code.getSystem();
420      }
421    }
422
423    @Block()
424    public static class SequenceReferenceSeqComponent extends BackboneElement implements IBaseBackboneElement {
425        /**
426         * 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)).
427         */
428        @Child(name = "chromosome", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
429        @Description(shortDefinition="Chromosome containing genetic finding", 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))." )
430        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/chromosome-human")
431        protected CodeableConcept chromosome;
432
433        /**
434         * The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.
435         */
436        @Child(name = "genomeBuild", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
437        @Description(shortDefinition="The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'", formalDefinition="The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used." )
438        protected StringType genomeBuild;
439
440        /**
441         * Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, ?NG_? identifies reference sequence for genes, ?NM_? for messenger RNA transcripts, and ?NP_? for amino acid sequences.
442         */
443        @Child(name = "referenceSeqId", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true)
444        @Description(shortDefinition="Reference identifier", formalDefinition="Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, ?NG_? identifies reference sequence for genes, ?NM_? for messenger RNA transcripts, and ?NP_? for amino acid sequences." )
445        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/sequence-referenceSeq")
446        protected CodeableConcept referenceSeqId;
447
448        /**
449         * A Pointer to another Sequence entity as reference sequence.
450         */
451        @Child(name = "referenceSeqPointer", type = {Sequence.class}, order=4, min=0, max=1, modifier=false, summary=true)
452        @Description(shortDefinition="A Pointer to another Sequence entity as reference sequence", formalDefinition="A Pointer to another Sequence entity as reference sequence." )
453        protected Reference referenceSeqPointer;
454
455        /**
456         * The actual object that is the target of the reference (A Pointer to another Sequence entity as reference sequence.)
457         */
458        protected Sequence referenceSeqPointerTarget;
459
460        /**
461         * A string like "ACGT".
462         */
463        @Child(name = "referenceSeqString", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
464        @Description(shortDefinition="A string to represent reference sequence", formalDefinition="A string like \"ACGT\"." )
465        protected StringType referenceSeqString;
466
467        /**
468         * Directionality of DNA sequence. Available values are "1" for the plus strand (5' to 3')/Watson/Sense/positive  and "-1" for the minus strand(3' to 5')/Crick/Antisense/negative.
469         */
470        @Child(name = "strand", type = {IntegerType.class}, order=6, min=0, max=1, modifier=false, summary=true)
471        @Description(shortDefinition="Directionality of DNA ( +1/-1)", formalDefinition="Directionality of DNA sequence. Available values are \"1\" for the plus strand (5' to 3')/Watson/Sense/positive  and \"-1\" for the minus strand(3' to 5')/Crick/Antisense/negative." )
472        protected IntegerType strand;
473
474        /**
475         * Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
476         */
477        @Child(name = "windowStart", type = {IntegerType.class}, order=7, min=1, max=1, modifier=false, summary=true)
478        @Description(shortDefinition="Start position of the window on the  reference sequence", formalDefinition="Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive." )
479        protected IntegerType windowStart;
480
481        /**
482         * End position of the window on the reference sequence. If the coordinate system is 0-based then end is 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.
483         */
484        @Child(name = "windowEnd", type = {IntegerType.class}, order=8, min=1, max=1, modifier=false, summary=true)
485        @Description(shortDefinition="End position of the window on the reference sequence", formalDefinition="End position of the window on the reference sequence. If the coordinate system is 0-based then end is 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." )
486        protected IntegerType windowEnd;
487
488        private static final long serialVersionUID = -1675617731L;
489
490    /**
491     * Constructor
492     */
493      public SequenceReferenceSeqComponent() {
494        super();
495      }
496
497    /**
498     * Constructor
499     */
500      public SequenceReferenceSeqComponent(IntegerType windowStart, IntegerType windowEnd) {
501        super();
502        this.windowStart = windowStart;
503        this.windowEnd = windowEnd;
504      }
505
506        /**
507         * @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)).)
508         */
509        public CodeableConcept getChromosome() { 
510          if (this.chromosome == null)
511            if (Configuration.errorOnAutoCreate())
512              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.chromosome");
513            else if (Configuration.doAutoCreate())
514              this.chromosome = new CodeableConcept(); // cc
515          return this.chromosome;
516        }
517
518        public boolean hasChromosome() { 
519          return this.chromosome != null && !this.chromosome.isEmpty();
520        }
521
522        /**
523         * @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)).)
524         */
525        public SequenceReferenceSeqComponent setChromosome(CodeableConcept value)  { 
526          this.chromosome = value;
527          return this;
528        }
529
530        /**
531         * @return {@link #genomeBuild} (The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.). This is the underlying object with id, value and extensions. The accessor "getGenomeBuild" gives direct access to the value
532         */
533        public StringType getGenomeBuildElement() { 
534          if (this.genomeBuild == null)
535            if (Configuration.errorOnAutoCreate())
536              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.genomeBuild");
537            else if (Configuration.doAutoCreate())
538              this.genomeBuild = new StringType(); // bb
539          return this.genomeBuild;
540        }
541
542        public boolean hasGenomeBuildElement() { 
543          return this.genomeBuild != null && !this.genomeBuild.isEmpty();
544        }
545
546        public boolean hasGenomeBuild() { 
547          return this.genomeBuild != null && !this.genomeBuild.isEmpty();
548        }
549
550        /**
551         * @param value {@link #genomeBuild} (The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.). This is the underlying object with id, value and extensions. The accessor "getGenomeBuild" gives direct access to the value
552         */
553        public SequenceReferenceSeqComponent setGenomeBuildElement(StringType value) { 
554          this.genomeBuild = value;
555          return this;
556        }
557
558        /**
559         * @return The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.
560         */
561        public String getGenomeBuild() { 
562          return this.genomeBuild == null ? null : this.genomeBuild.getValue();
563        }
564
565        /**
566         * @param value The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.
567         */
568        public SequenceReferenceSeqComponent setGenomeBuild(String value) { 
569          if (Utilities.noString(value))
570            this.genomeBuild = null;
571          else {
572            if (this.genomeBuild == null)
573              this.genomeBuild = new StringType();
574            this.genomeBuild.setValue(value);
575          }
576          return this;
577        }
578
579        /**
580         * @return {@link #referenceSeqId} (Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, ?NG_? identifies reference sequence for genes, ?NM_? for messenger RNA transcripts, and ?NP_? for amino acid sequences.)
581         */
582        public CodeableConcept getReferenceSeqId() { 
583          if (this.referenceSeqId == null)
584            if (Configuration.errorOnAutoCreate())
585              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.referenceSeqId");
586            else if (Configuration.doAutoCreate())
587              this.referenceSeqId = new CodeableConcept(); // cc
588          return this.referenceSeqId;
589        }
590
591        public boolean hasReferenceSeqId() { 
592          return this.referenceSeqId != null && !this.referenceSeqId.isEmpty();
593        }
594
595        /**
596         * @param value {@link #referenceSeqId} (Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, ?NG_? identifies reference sequence for genes, ?NM_? for messenger RNA transcripts, and ?NP_? for amino acid sequences.)
597         */
598        public SequenceReferenceSeqComponent setReferenceSeqId(CodeableConcept value)  { 
599          this.referenceSeqId = value;
600          return this;
601        }
602
603        /**
604         * @return {@link #referenceSeqPointer} (A Pointer to another Sequence entity as reference sequence.)
605         */
606        public Reference getReferenceSeqPointer() { 
607          if (this.referenceSeqPointer == null)
608            if (Configuration.errorOnAutoCreate())
609              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.referenceSeqPointer");
610            else if (Configuration.doAutoCreate())
611              this.referenceSeqPointer = new Reference(); // cc
612          return this.referenceSeqPointer;
613        }
614
615        public boolean hasReferenceSeqPointer() { 
616          return this.referenceSeqPointer != null && !this.referenceSeqPointer.isEmpty();
617        }
618
619        /**
620         * @param value {@link #referenceSeqPointer} (A Pointer to another Sequence entity as reference sequence.)
621         */
622        public SequenceReferenceSeqComponent setReferenceSeqPointer(Reference value)  { 
623          this.referenceSeqPointer = value;
624          return this;
625        }
626
627        /**
628         * @return {@link #referenceSeqPointer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A Pointer to another Sequence entity as reference sequence.)
629         */
630        public Sequence getReferenceSeqPointerTarget() { 
631          if (this.referenceSeqPointerTarget == null)
632            if (Configuration.errorOnAutoCreate())
633              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.referenceSeqPointer");
634            else if (Configuration.doAutoCreate())
635              this.referenceSeqPointerTarget = new Sequence(); // aa
636          return this.referenceSeqPointerTarget;
637        }
638
639        /**
640         * @param value {@link #referenceSeqPointer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A Pointer to another Sequence entity as reference sequence.)
641         */
642        public SequenceReferenceSeqComponent setReferenceSeqPointerTarget(Sequence value) { 
643          this.referenceSeqPointerTarget = value;
644          return this;
645        }
646
647        /**
648         * @return {@link #referenceSeqString} (A string like "ACGT".). This is the underlying object with id, value and extensions. The accessor "getReferenceSeqString" gives direct access to the value
649         */
650        public StringType getReferenceSeqStringElement() { 
651          if (this.referenceSeqString == null)
652            if (Configuration.errorOnAutoCreate())
653              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.referenceSeqString");
654            else if (Configuration.doAutoCreate())
655              this.referenceSeqString = new StringType(); // bb
656          return this.referenceSeqString;
657        }
658
659        public boolean hasReferenceSeqStringElement() { 
660          return this.referenceSeqString != null && !this.referenceSeqString.isEmpty();
661        }
662
663        public boolean hasReferenceSeqString() { 
664          return this.referenceSeqString != null && !this.referenceSeqString.isEmpty();
665        }
666
667        /**
668         * @param value {@link #referenceSeqString} (A string like "ACGT".). This is the underlying object with id, value and extensions. The accessor "getReferenceSeqString" gives direct access to the value
669         */
670        public SequenceReferenceSeqComponent setReferenceSeqStringElement(StringType value) { 
671          this.referenceSeqString = value;
672          return this;
673        }
674
675        /**
676         * @return A string like "ACGT".
677         */
678        public String getReferenceSeqString() { 
679          return this.referenceSeqString == null ? null : this.referenceSeqString.getValue();
680        }
681
682        /**
683         * @param value A string like "ACGT".
684         */
685        public SequenceReferenceSeqComponent setReferenceSeqString(String value) { 
686          if (Utilities.noString(value))
687            this.referenceSeqString = null;
688          else {
689            if (this.referenceSeqString == null)
690              this.referenceSeqString = new StringType();
691            this.referenceSeqString.setValue(value);
692          }
693          return this;
694        }
695
696        /**
697         * @return {@link #strand} (Directionality of DNA sequence. Available values are "1" for the plus strand (5' to 3')/Watson/Sense/positive  and "-1" for the minus strand(3' to 5')/Crick/Antisense/negative.). This is the underlying object with id, value and extensions. The accessor "getStrand" gives direct access to the value
698         */
699        public IntegerType getStrandElement() { 
700          if (this.strand == null)
701            if (Configuration.errorOnAutoCreate())
702              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.strand");
703            else if (Configuration.doAutoCreate())
704              this.strand = new IntegerType(); // bb
705          return this.strand;
706        }
707
708        public boolean hasStrandElement() { 
709          return this.strand != null && !this.strand.isEmpty();
710        }
711
712        public boolean hasStrand() { 
713          return this.strand != null && !this.strand.isEmpty();
714        }
715
716        /**
717         * @param value {@link #strand} (Directionality of DNA sequence. Available values are "1" for the plus strand (5' to 3')/Watson/Sense/positive  and "-1" for the minus strand(3' to 5')/Crick/Antisense/negative.). This is the underlying object with id, value and extensions. The accessor "getStrand" gives direct access to the value
718         */
719        public SequenceReferenceSeqComponent setStrandElement(IntegerType value) { 
720          this.strand = value;
721          return this;
722        }
723
724        /**
725         * @return Directionality of DNA sequence. Available values are "1" for the plus strand (5' to 3')/Watson/Sense/positive  and "-1" for the minus strand(3' to 5')/Crick/Antisense/negative.
726         */
727        public int getStrand() { 
728          return this.strand == null || this.strand.isEmpty() ? 0 : this.strand.getValue();
729        }
730
731        /**
732         * @param value Directionality of DNA sequence. Available values are "1" for the plus strand (5' to 3')/Watson/Sense/positive  and "-1" for the minus strand(3' to 5')/Crick/Antisense/negative.
733         */
734        public SequenceReferenceSeqComponent setStrand(int value) { 
735            if (this.strand == null)
736              this.strand = new IntegerType();
737            this.strand.setValue(value);
738          return this;
739        }
740
741        /**
742         * @return {@link #windowStart} (Start position of the window on the reference 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 "getWindowStart" gives direct access to the value
743         */
744        public IntegerType getWindowStartElement() { 
745          if (this.windowStart == null)
746            if (Configuration.errorOnAutoCreate())
747              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.windowStart");
748            else if (Configuration.doAutoCreate())
749              this.windowStart = new IntegerType(); // bb
750          return this.windowStart;
751        }
752
753        public boolean hasWindowStartElement() { 
754          return this.windowStart != null && !this.windowStart.isEmpty();
755        }
756
757        public boolean hasWindowStart() { 
758          return this.windowStart != null && !this.windowStart.isEmpty();
759        }
760
761        /**
762         * @param value {@link #windowStart} (Start position of the window on the reference 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 "getWindowStart" gives direct access to the value
763         */
764        public SequenceReferenceSeqComponent setWindowStartElement(IntegerType value) { 
765          this.windowStart = value;
766          return this;
767        }
768
769        /**
770         * @return Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
771         */
772        public int getWindowStart() { 
773          return this.windowStart == null || this.windowStart.isEmpty() ? 0 : this.windowStart.getValue();
774        }
775
776        /**
777         * @param value Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
778         */
779        public SequenceReferenceSeqComponent setWindowStart(int value) { 
780            if (this.windowStart == null)
781              this.windowStart = new IntegerType();
782            this.windowStart.setValue(value);
783          return this;
784        }
785
786        /**
787         * @return {@link #windowEnd} (End position of the window on the reference sequence. If the coordinate system is 0-based then end is 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 "getWindowEnd" gives direct access to the value
788         */
789        public IntegerType getWindowEndElement() { 
790          if (this.windowEnd == null)
791            if (Configuration.errorOnAutoCreate())
792              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.windowEnd");
793            else if (Configuration.doAutoCreate())
794              this.windowEnd = new IntegerType(); // bb
795          return this.windowEnd;
796        }
797
798        public boolean hasWindowEndElement() { 
799          return this.windowEnd != null && !this.windowEnd.isEmpty();
800        }
801
802        public boolean hasWindowEnd() { 
803          return this.windowEnd != null && !this.windowEnd.isEmpty();
804        }
805
806        /**
807         * @param value {@link #windowEnd} (End position of the window on the reference sequence. If the coordinate system is 0-based then end is 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 "getWindowEnd" gives direct access to the value
808         */
809        public SequenceReferenceSeqComponent setWindowEndElement(IntegerType value) { 
810          this.windowEnd = value;
811          return this;
812        }
813
814        /**
815         * @return End position of the window on the reference sequence. If the coordinate system is 0-based then end is 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.
816         */
817        public int getWindowEnd() { 
818          return this.windowEnd == null || this.windowEnd.isEmpty() ? 0 : this.windowEnd.getValue();
819        }
820
821        /**
822         * @param value End position of the window on the reference sequence. If the coordinate system is 0-based then end is 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.
823         */
824        public SequenceReferenceSeqComponent setWindowEnd(int value) { 
825            if (this.windowEnd == null)
826              this.windowEnd = new IntegerType();
827            this.windowEnd.setValue(value);
828          return this;
829        }
830
831        protected void listChildren(List<Property> children) {
832          super.listChildren(children);
833          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));
834          children.add(new Property("genomeBuild", "string", "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.", 0, 1, genomeBuild));
835          children.add(new Property("referenceSeqId", "CodeableConcept", "Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, ?NG_? identifies reference sequence for genes, ?NM_? for messenger RNA transcripts, and ?NP_? for amino acid sequences.", 0, 1, referenceSeqId));
836          children.add(new Property("referenceSeqPointer", "Reference(Sequence)", "A Pointer to another Sequence entity as reference sequence.", 0, 1, referenceSeqPointer));
837          children.add(new Property("referenceSeqString", "string", "A string like \"ACGT\".", 0, 1, referenceSeqString));
838          children.add(new Property("strand", "integer", "Directionality of DNA sequence. Available values are \"1\" for the plus strand (5' to 3')/Watson/Sense/positive  and \"-1\" for the minus strand(3' to 5')/Crick/Antisense/negative.", 0, 1, strand));
839          children.add(new Property("windowStart", "integer", "Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, windowStart));
840          children.add(new Property("windowEnd", "integer", "End position of the window on the reference sequence. If the coordinate system is 0-based then end is 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, windowEnd));
841        }
842
843        @Override
844        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
845          switch (_hash) {
846          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);
847          case 1061239735: /*genomeBuild*/  return new Property("genomeBuild", "string", "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.", 0, 1, genomeBuild);
848          case -1911500465: /*referenceSeqId*/  return new Property("referenceSeqId", "CodeableConcept", "Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, ?NG_? identifies reference sequence for genes, ?NM_? for messenger RNA transcripts, and ?NP_? for amino acid sequences.", 0, 1, referenceSeqId);
849          case 1923414665: /*referenceSeqPointer*/  return new Property("referenceSeqPointer", "Reference(Sequence)", "A Pointer to another Sequence entity as reference sequence.", 0, 1, referenceSeqPointer);
850          case -1648301499: /*referenceSeqString*/  return new Property("referenceSeqString", "string", "A string like \"ACGT\".", 0, 1, referenceSeqString);
851          case -891993594: /*strand*/  return new Property("strand", "integer", "Directionality of DNA sequence. Available values are \"1\" for the plus strand (5' to 3')/Watson/Sense/positive  and \"-1\" for the minus strand(3' to 5')/Crick/Antisense/negative.", 0, 1, strand);
852          case 1903685202: /*windowStart*/  return new Property("windowStart", "integer", "Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, windowStart);
853          case -217026869: /*windowEnd*/  return new Property("windowEnd", "integer", "End position of the window on the reference sequence. If the coordinate system is 0-based then end is 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, windowEnd);
854          default: return super.getNamedProperty(_hash, _name, _checkValid);
855          }
856
857        }
858
859      @Override
860      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
861        switch (hash) {
862        case -1499470472: /*chromosome*/ return this.chromosome == null ? new Base[0] : new Base[] {this.chromosome}; // CodeableConcept
863        case 1061239735: /*genomeBuild*/ return this.genomeBuild == null ? new Base[0] : new Base[] {this.genomeBuild}; // StringType
864        case -1911500465: /*referenceSeqId*/ return this.referenceSeqId == null ? new Base[0] : new Base[] {this.referenceSeqId}; // CodeableConcept
865        case 1923414665: /*referenceSeqPointer*/ return this.referenceSeqPointer == null ? new Base[0] : new Base[] {this.referenceSeqPointer}; // Reference
866        case -1648301499: /*referenceSeqString*/ return this.referenceSeqString == null ? new Base[0] : new Base[] {this.referenceSeqString}; // StringType
867        case -891993594: /*strand*/ return this.strand == null ? new Base[0] : new Base[] {this.strand}; // IntegerType
868        case 1903685202: /*windowStart*/ return this.windowStart == null ? new Base[0] : new Base[] {this.windowStart}; // IntegerType
869        case -217026869: /*windowEnd*/ return this.windowEnd == null ? new Base[0] : new Base[] {this.windowEnd}; // IntegerType
870        default: return super.getProperty(hash, name, checkValid);
871        }
872
873      }
874
875      @Override
876      public Base setProperty(int hash, String name, Base value) throws FHIRException {
877        switch (hash) {
878        case -1499470472: // chromosome
879          this.chromosome = castToCodeableConcept(value); // CodeableConcept
880          return value;
881        case 1061239735: // genomeBuild
882          this.genomeBuild = castToString(value); // StringType
883          return value;
884        case -1911500465: // referenceSeqId
885          this.referenceSeqId = castToCodeableConcept(value); // CodeableConcept
886          return value;
887        case 1923414665: // referenceSeqPointer
888          this.referenceSeqPointer = castToReference(value); // Reference
889          return value;
890        case -1648301499: // referenceSeqString
891          this.referenceSeqString = castToString(value); // StringType
892          return value;
893        case -891993594: // strand
894          this.strand = castToInteger(value); // IntegerType
895          return value;
896        case 1903685202: // windowStart
897          this.windowStart = castToInteger(value); // IntegerType
898          return value;
899        case -217026869: // windowEnd
900          this.windowEnd = castToInteger(value); // IntegerType
901          return value;
902        default: return super.setProperty(hash, name, value);
903        }
904
905      }
906
907      @Override
908      public Base setProperty(String name, Base value) throws FHIRException {
909        if (name.equals("chromosome")) {
910          this.chromosome = castToCodeableConcept(value); // CodeableConcept
911        } else if (name.equals("genomeBuild")) {
912          this.genomeBuild = castToString(value); // StringType
913        } else if (name.equals("referenceSeqId")) {
914          this.referenceSeqId = castToCodeableConcept(value); // CodeableConcept
915        } else if (name.equals("referenceSeqPointer")) {
916          this.referenceSeqPointer = castToReference(value); // Reference
917        } else if (name.equals("referenceSeqString")) {
918          this.referenceSeqString = castToString(value); // StringType
919        } else if (name.equals("strand")) {
920          this.strand = castToInteger(value); // IntegerType
921        } else if (name.equals("windowStart")) {
922          this.windowStart = castToInteger(value); // IntegerType
923        } else if (name.equals("windowEnd")) {
924          this.windowEnd = castToInteger(value); // IntegerType
925        } else
926          return super.setProperty(name, value);
927        return value;
928      }
929
930      @Override
931      public Base makeProperty(int hash, String name) throws FHIRException {
932        switch (hash) {
933        case -1499470472:  return getChromosome(); 
934        case 1061239735:  return getGenomeBuildElement();
935        case -1911500465:  return getReferenceSeqId(); 
936        case 1923414665:  return getReferenceSeqPointer(); 
937        case -1648301499:  return getReferenceSeqStringElement();
938        case -891993594:  return getStrandElement();
939        case 1903685202:  return getWindowStartElement();
940        case -217026869:  return getWindowEndElement();
941        default: return super.makeProperty(hash, name);
942        }
943
944      }
945
946      @Override
947      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
948        switch (hash) {
949        case -1499470472: /*chromosome*/ return new String[] {"CodeableConcept"};
950        case 1061239735: /*genomeBuild*/ return new String[] {"string"};
951        case -1911500465: /*referenceSeqId*/ return new String[] {"CodeableConcept"};
952        case 1923414665: /*referenceSeqPointer*/ return new String[] {"Reference"};
953        case -1648301499: /*referenceSeqString*/ return new String[] {"string"};
954        case -891993594: /*strand*/ return new String[] {"integer"};
955        case 1903685202: /*windowStart*/ return new String[] {"integer"};
956        case -217026869: /*windowEnd*/ return new String[] {"integer"};
957        default: return super.getTypesForProperty(hash, name);
958        }
959
960      }
961
962      @Override
963      public Base addChild(String name) throws FHIRException {
964        if (name.equals("chromosome")) {
965          this.chromosome = new CodeableConcept();
966          return this.chromosome;
967        }
968        else if (name.equals("genomeBuild")) {
969          throw new FHIRException("Cannot call addChild on a primitive type Sequence.genomeBuild");
970        }
971        else if (name.equals("referenceSeqId")) {
972          this.referenceSeqId = new CodeableConcept();
973          return this.referenceSeqId;
974        }
975        else if (name.equals("referenceSeqPointer")) {
976          this.referenceSeqPointer = new Reference();
977          return this.referenceSeqPointer;
978        }
979        else if (name.equals("referenceSeqString")) {
980          throw new FHIRException("Cannot call addChild on a primitive type Sequence.referenceSeqString");
981        }
982        else if (name.equals("strand")) {
983          throw new FHIRException("Cannot call addChild on a primitive type Sequence.strand");
984        }
985        else if (name.equals("windowStart")) {
986          throw new FHIRException("Cannot call addChild on a primitive type Sequence.windowStart");
987        }
988        else if (name.equals("windowEnd")) {
989          throw new FHIRException("Cannot call addChild on a primitive type Sequence.windowEnd");
990        }
991        else
992          return super.addChild(name);
993      }
994
995      public SequenceReferenceSeqComponent copy() {
996        SequenceReferenceSeqComponent dst = new SequenceReferenceSeqComponent();
997        copyValues(dst);
998        dst.chromosome = chromosome == null ? null : chromosome.copy();
999        dst.genomeBuild = genomeBuild == null ? null : genomeBuild.copy();
1000        dst.referenceSeqId = referenceSeqId == null ? null : referenceSeqId.copy();
1001        dst.referenceSeqPointer = referenceSeqPointer == null ? null : referenceSeqPointer.copy();
1002        dst.referenceSeqString = referenceSeqString == null ? null : referenceSeqString.copy();
1003        dst.strand = strand == null ? null : strand.copy();
1004        dst.windowStart = windowStart == null ? null : windowStart.copy();
1005        dst.windowEnd = windowEnd == null ? null : windowEnd.copy();
1006        return dst;
1007      }
1008
1009      @Override
1010      public boolean equalsDeep(Base other_) {
1011        if (!super.equalsDeep(other_))
1012          return false;
1013        if (!(other_ instanceof SequenceReferenceSeqComponent))
1014          return false;
1015        SequenceReferenceSeqComponent o = (SequenceReferenceSeqComponent) other_;
1016        return compareDeep(chromosome, o.chromosome, true) && compareDeep(genomeBuild, o.genomeBuild, true)
1017           && compareDeep(referenceSeqId, o.referenceSeqId, true) && compareDeep(referenceSeqPointer, o.referenceSeqPointer, true)
1018           && compareDeep(referenceSeqString, o.referenceSeqString, true) && compareDeep(strand, o.strand, true)
1019           && compareDeep(windowStart, o.windowStart, true) && compareDeep(windowEnd, o.windowEnd, true);
1020      }
1021
1022      @Override
1023      public boolean equalsShallow(Base other_) {
1024        if (!super.equalsShallow(other_))
1025          return false;
1026        if (!(other_ instanceof SequenceReferenceSeqComponent))
1027          return false;
1028        SequenceReferenceSeqComponent o = (SequenceReferenceSeqComponent) other_;
1029        return compareValues(genomeBuild, o.genomeBuild, true) && compareValues(referenceSeqString, o.referenceSeqString, true)
1030           && compareValues(strand, o.strand, true) && compareValues(windowStart, o.windowStart, true) && compareValues(windowEnd, o.windowEnd, true)
1031          ;
1032      }
1033
1034      public boolean isEmpty() {
1035        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(chromosome, genomeBuild, referenceSeqId
1036          , referenceSeqPointer, referenceSeqString, strand, windowStart, windowEnd);
1037      }
1038
1039  public String fhirType() {
1040    return "Sequence.referenceSeq";
1041
1042  }
1043
1044  }
1045
1046    @Block()
1047    public static class SequenceVariantComponent extends BackboneElement implements IBaseBackboneElement {
1048        /**
1049         * Start position of the variant on the  reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.
1050         */
1051        @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true)
1052        @Description(shortDefinition="Start position of the variant on the  reference sequence", formalDefinition="Start position of the variant on the  reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive." )
1053        protected IntegerType start;
1054
1055        /**
1056         * End position of the variant on the reference sequence.If the coordinate system is 0-based then end is 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.
1057         */
1058        @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1059        @Description(shortDefinition="End position of the variant on the reference sequence", formalDefinition="End position of the variant on the reference sequence.If the coordinate system is 0-based then end is 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." )
1060        protected IntegerType end;
1061
1062        /**
1063         * An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)).  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.
1064         */
1065        @Child(name = "observedAllele", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1066        @Description(shortDefinition="Allele that was observed", formalDefinition="An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)).  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." )
1067        protected StringType observedAllele;
1068
1069        /**
1070         * An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference 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.
1071         */
1072        @Child(name = "referenceAllele", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
1073        @Description(shortDefinition="Allele in the reference sequence", formalDefinition="An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference 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." )
1074        protected StringType referenceAllele;
1075
1076        /**
1077         * Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).
1078         */
1079        @Child(name = "cigar", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1080        @Description(shortDefinition="Extended CIGAR string for aligning the sequence with reference bases", formalDefinition="Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm)." )
1081        protected StringType cigar;
1082
1083        /**
1084         * A pointer to an Observation containing variant information.
1085         */
1086        @Child(name = "variantPointer", type = {Observation.class}, order=6, min=0, max=1, modifier=false, summary=true)
1087        @Description(shortDefinition="Pointer to observed variant information", formalDefinition="A pointer to an Observation containing variant information." )
1088        protected Reference variantPointer;
1089
1090        /**
1091         * The actual object that is the target of the reference (A pointer to an Observation containing variant information.)
1092         */
1093        protected Observation variantPointerTarget;
1094
1095        private static final long serialVersionUID = 105611837L;
1096
1097    /**
1098     * Constructor
1099     */
1100      public SequenceVariantComponent() {
1101        super();
1102      }
1103
1104        /**
1105         * @return {@link #start} (Start position of the variant on the  reference 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
1106         */
1107        public IntegerType getStartElement() { 
1108          if (this.start == null)
1109            if (Configuration.errorOnAutoCreate())
1110              throw new Error("Attempt to auto-create SequenceVariantComponent.start");
1111            else if (Configuration.doAutoCreate())
1112              this.start = new IntegerType(); // bb
1113          return this.start;
1114        }
1115
1116        public boolean hasStartElement() { 
1117          return this.start != null && !this.start.isEmpty();
1118        }
1119
1120        public boolean hasStart() { 
1121          return this.start != null && !this.start.isEmpty();
1122        }
1123
1124        /**
1125         * @param value {@link #start} (Start position of the variant on the  reference 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
1126         */
1127        public SequenceVariantComponent setStartElement(IntegerType value) { 
1128          this.start = value;
1129          return this;
1130        }
1131
1132        /**
1133         * @return Start position of the variant on the  reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.
1134         */
1135        public int getStart() { 
1136          return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue();
1137        }
1138
1139        /**
1140         * @param value Start position of the variant on the  reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.
1141         */
1142        public SequenceVariantComponent setStart(int value) { 
1143            if (this.start == null)
1144              this.start = new IntegerType();
1145            this.start.setValue(value);
1146          return this;
1147        }
1148
1149        /**
1150         * @return {@link #end} (End position of the variant on the reference sequence.If the coordinate system is 0-based then end is 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
1151         */
1152        public IntegerType getEndElement() { 
1153          if (this.end == null)
1154            if (Configuration.errorOnAutoCreate())
1155              throw new Error("Attempt to auto-create SequenceVariantComponent.end");
1156            else if (Configuration.doAutoCreate())
1157              this.end = new IntegerType(); // bb
1158          return this.end;
1159        }
1160
1161        public boolean hasEndElement() { 
1162          return this.end != null && !this.end.isEmpty();
1163        }
1164
1165        public boolean hasEnd() { 
1166          return this.end != null && !this.end.isEmpty();
1167        }
1168
1169        /**
1170         * @param value {@link #end} (End position of the variant on the reference sequence.If the coordinate system is 0-based then end is 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
1171         */
1172        public SequenceVariantComponent setEndElement(IntegerType value) { 
1173          this.end = value;
1174          return this;
1175        }
1176
1177        /**
1178         * @return End position of the variant on the reference sequence.If the coordinate system is 0-based then end is 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.
1179         */
1180        public int getEnd() { 
1181          return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue();
1182        }
1183
1184        /**
1185         * @param value End position of the variant on the reference sequence.If the coordinate system is 0-based then end is 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.
1186         */
1187        public SequenceVariantComponent setEnd(int value) { 
1188            if (this.end == null)
1189              this.end = new IntegerType();
1190            this.end.setValue(value);
1191          return this;
1192        }
1193
1194        /**
1195         * @return {@link #observedAllele} (An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)).  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 "getObservedAllele" gives direct access to the value
1196         */
1197        public StringType getObservedAlleleElement() { 
1198          if (this.observedAllele == null)
1199            if (Configuration.errorOnAutoCreate())
1200              throw new Error("Attempt to auto-create SequenceVariantComponent.observedAllele");
1201            else if (Configuration.doAutoCreate())
1202              this.observedAllele = new StringType(); // bb
1203          return this.observedAllele;
1204        }
1205
1206        public boolean hasObservedAlleleElement() { 
1207          return this.observedAllele != null && !this.observedAllele.isEmpty();
1208        }
1209
1210        public boolean hasObservedAllele() { 
1211          return this.observedAllele != null && !this.observedAllele.isEmpty();
1212        }
1213
1214        /**
1215         * @param value {@link #observedAllele} (An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)).  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 "getObservedAllele" gives direct access to the value
1216         */
1217        public SequenceVariantComponent setObservedAlleleElement(StringType value) { 
1218          this.observedAllele = value;
1219          return this;
1220        }
1221
1222        /**
1223         * @return An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)).  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.
1224         */
1225        public String getObservedAllele() { 
1226          return this.observedAllele == null ? null : this.observedAllele.getValue();
1227        }
1228
1229        /**
1230         * @param value An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)).  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.
1231         */
1232        public SequenceVariantComponent setObservedAllele(String value) { 
1233          if (Utilities.noString(value))
1234            this.observedAllele = null;
1235          else {
1236            if (this.observedAllele == null)
1237              this.observedAllele = new StringType();
1238            this.observedAllele.setValue(value);
1239          }
1240          return this;
1241        }
1242
1243        /**
1244         * @return {@link #referenceAllele} (An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference 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 "getReferenceAllele" gives direct access to the value
1245         */
1246        public StringType getReferenceAlleleElement() { 
1247          if (this.referenceAllele == null)
1248            if (Configuration.errorOnAutoCreate())
1249              throw new Error("Attempt to auto-create SequenceVariantComponent.referenceAllele");
1250            else if (Configuration.doAutoCreate())
1251              this.referenceAllele = new StringType(); // bb
1252          return this.referenceAllele;
1253        }
1254
1255        public boolean hasReferenceAlleleElement() { 
1256          return this.referenceAllele != null && !this.referenceAllele.isEmpty();
1257        }
1258
1259        public boolean hasReferenceAllele() { 
1260          return this.referenceAllele != null && !this.referenceAllele.isEmpty();
1261        }
1262
1263        /**
1264         * @param value {@link #referenceAllele} (An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference 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 "getReferenceAllele" gives direct access to the value
1265         */
1266        public SequenceVariantComponent setReferenceAlleleElement(StringType value) { 
1267          this.referenceAllele = value;
1268          return this;
1269        }
1270
1271        /**
1272         * @return An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference 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.
1273         */
1274        public String getReferenceAllele() { 
1275          return this.referenceAllele == null ? null : this.referenceAllele.getValue();
1276        }
1277
1278        /**
1279         * @param value An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference 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.
1280         */
1281        public SequenceVariantComponent setReferenceAllele(String value) { 
1282          if (Utilities.noString(value))
1283            this.referenceAllele = null;
1284          else {
1285            if (this.referenceAllele == null)
1286              this.referenceAllele = new StringType();
1287            this.referenceAllele.setValue(value);
1288          }
1289          return this;
1290        }
1291
1292        /**
1293         * @return {@link #cigar} (Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).). This is the underlying object with id, value and extensions. The accessor "getCigar" gives direct access to the value
1294         */
1295        public StringType getCigarElement() { 
1296          if (this.cigar == null)
1297            if (Configuration.errorOnAutoCreate())
1298              throw new Error("Attempt to auto-create SequenceVariantComponent.cigar");
1299            else if (Configuration.doAutoCreate())
1300              this.cigar = new StringType(); // bb
1301          return this.cigar;
1302        }
1303
1304        public boolean hasCigarElement() { 
1305          return this.cigar != null && !this.cigar.isEmpty();
1306        }
1307
1308        public boolean hasCigar() { 
1309          return this.cigar != null && !this.cigar.isEmpty();
1310        }
1311
1312        /**
1313         * @param value {@link #cigar} (Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).). This is the underlying object with id, value and extensions. The accessor "getCigar" gives direct access to the value
1314         */
1315        public SequenceVariantComponent setCigarElement(StringType value) { 
1316          this.cigar = value;
1317          return this;
1318        }
1319
1320        /**
1321         * @return Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).
1322         */
1323        public String getCigar() { 
1324          return this.cigar == null ? null : this.cigar.getValue();
1325        }
1326
1327        /**
1328         * @param value Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).
1329         */
1330        public SequenceVariantComponent setCigar(String value) { 
1331          if (Utilities.noString(value))
1332            this.cigar = null;
1333          else {
1334            if (this.cigar == null)
1335              this.cigar = new StringType();
1336            this.cigar.setValue(value);
1337          }
1338          return this;
1339        }
1340
1341        /**
1342         * @return {@link #variantPointer} (A pointer to an Observation containing variant information.)
1343         */
1344        public Reference getVariantPointer() { 
1345          if (this.variantPointer == null)
1346            if (Configuration.errorOnAutoCreate())
1347              throw new Error("Attempt to auto-create SequenceVariantComponent.variantPointer");
1348            else if (Configuration.doAutoCreate())
1349              this.variantPointer = new Reference(); // cc
1350          return this.variantPointer;
1351        }
1352
1353        public boolean hasVariantPointer() { 
1354          return this.variantPointer != null && !this.variantPointer.isEmpty();
1355        }
1356
1357        /**
1358         * @param value {@link #variantPointer} (A pointer to an Observation containing variant information.)
1359         */
1360        public SequenceVariantComponent setVariantPointer(Reference value)  { 
1361          this.variantPointer = value;
1362          return this;
1363        }
1364
1365        /**
1366         * @return {@link #variantPointer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A pointer to an Observation containing variant information.)
1367         */
1368        public Observation getVariantPointerTarget() { 
1369          if (this.variantPointerTarget == null)
1370            if (Configuration.errorOnAutoCreate())
1371              throw new Error("Attempt to auto-create SequenceVariantComponent.variantPointer");
1372            else if (Configuration.doAutoCreate())
1373              this.variantPointerTarget = new Observation(); // aa
1374          return this.variantPointerTarget;
1375        }
1376
1377        /**
1378         * @param value {@link #variantPointer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A pointer to an Observation containing variant information.)
1379         */
1380        public SequenceVariantComponent setVariantPointerTarget(Observation value) { 
1381          this.variantPointerTarget = value;
1382          return this;
1383        }
1384
1385        protected void listChildren(List<Property> children) {
1386          super.listChildren(children);
1387          children.add(new Property("start", "integer", "Start position of the variant on the  reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start));
1388          children.add(new Property("end", "integer", "End position of the variant on the reference sequence.If the coordinate system is 0-based then end is 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));
1389          children.add(new Property("observedAllele", "string", "An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)).  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, observedAllele));
1390          children.add(new Property("referenceAllele", "string", "An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference 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, referenceAllele));
1391          children.add(new Property("cigar", "string", "Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).", 0, 1, cigar));
1392          children.add(new Property("variantPointer", "Reference(Observation)", "A pointer to an Observation containing variant information.", 0, 1, variantPointer));
1393        }
1394
1395        @Override
1396        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1397          switch (_hash) {
1398          case 109757538: /*start*/  return new Property("start", "integer", "Start position of the variant on the  reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start);
1399          case 100571: /*end*/  return new Property("end", "integer", "End position of the variant on the reference sequence.If the coordinate system is 0-based then end is 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);
1400          case -1418745787: /*observedAllele*/  return new Property("observedAllele", "string", "An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)).  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, observedAllele);
1401          case 364045960: /*referenceAllele*/  return new Property("referenceAllele", "string", "An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference 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, referenceAllele);
1402          case 94658738: /*cigar*/  return new Property("cigar", "string", "Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).", 0, 1, cigar);
1403          case -1654319624: /*variantPointer*/  return new Property("variantPointer", "Reference(Observation)", "A pointer to an Observation containing variant information.", 0, 1, variantPointer);
1404          default: return super.getNamedProperty(_hash, _name, _checkValid);
1405          }
1406
1407        }
1408
1409      @Override
1410      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1411        switch (hash) {
1412        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType
1413        case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType
1414        case -1418745787: /*observedAllele*/ return this.observedAllele == null ? new Base[0] : new Base[] {this.observedAllele}; // StringType
1415        case 364045960: /*referenceAllele*/ return this.referenceAllele == null ? new Base[0] : new Base[] {this.referenceAllele}; // StringType
1416        case 94658738: /*cigar*/ return this.cigar == null ? new Base[0] : new Base[] {this.cigar}; // StringType
1417        case -1654319624: /*variantPointer*/ return this.variantPointer == null ? new Base[0] : new Base[] {this.variantPointer}; // Reference
1418        default: return super.getProperty(hash, name, checkValid);
1419        }
1420
1421      }
1422
1423      @Override
1424      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1425        switch (hash) {
1426        case 109757538: // start
1427          this.start = castToInteger(value); // IntegerType
1428          return value;
1429        case 100571: // end
1430          this.end = castToInteger(value); // IntegerType
1431          return value;
1432        case -1418745787: // observedAllele
1433          this.observedAllele = castToString(value); // StringType
1434          return value;
1435        case 364045960: // referenceAllele
1436          this.referenceAllele = castToString(value); // StringType
1437          return value;
1438        case 94658738: // cigar
1439          this.cigar = castToString(value); // StringType
1440          return value;
1441        case -1654319624: // variantPointer
1442          this.variantPointer = castToReference(value); // Reference
1443          return value;
1444        default: return super.setProperty(hash, name, value);
1445        }
1446
1447      }
1448
1449      @Override
1450      public Base setProperty(String name, Base value) throws FHIRException {
1451        if (name.equals("start")) {
1452          this.start = castToInteger(value); // IntegerType
1453        } else if (name.equals("end")) {
1454          this.end = castToInteger(value); // IntegerType
1455        } else if (name.equals("observedAllele")) {
1456          this.observedAllele = castToString(value); // StringType
1457        } else if (name.equals("referenceAllele")) {
1458          this.referenceAllele = castToString(value); // StringType
1459        } else if (name.equals("cigar")) {
1460          this.cigar = castToString(value); // StringType
1461        } else if (name.equals("variantPointer")) {
1462          this.variantPointer = castToReference(value); // Reference
1463        } else
1464          return super.setProperty(name, value);
1465        return value;
1466      }
1467
1468      @Override
1469      public Base makeProperty(int hash, String name) throws FHIRException {
1470        switch (hash) {
1471        case 109757538:  return getStartElement();
1472        case 100571:  return getEndElement();
1473        case -1418745787:  return getObservedAlleleElement();
1474        case 364045960:  return getReferenceAlleleElement();
1475        case 94658738:  return getCigarElement();
1476        case -1654319624:  return getVariantPointer(); 
1477        default: return super.makeProperty(hash, name);
1478        }
1479
1480      }
1481
1482      @Override
1483      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1484        switch (hash) {
1485        case 109757538: /*start*/ return new String[] {"integer"};
1486        case 100571: /*end*/ return new String[] {"integer"};
1487        case -1418745787: /*observedAllele*/ return new String[] {"string"};
1488        case 364045960: /*referenceAllele*/ return new String[] {"string"};
1489        case 94658738: /*cigar*/ return new String[] {"string"};
1490        case -1654319624: /*variantPointer*/ return new String[] {"Reference"};
1491        default: return super.getTypesForProperty(hash, name);
1492        }
1493
1494      }
1495
1496      @Override
1497      public Base addChild(String name) throws FHIRException {
1498        if (name.equals("start")) {
1499          throw new FHIRException("Cannot call addChild on a primitive type Sequence.start");
1500        }
1501        else if (name.equals("end")) {
1502          throw new FHIRException("Cannot call addChild on a primitive type Sequence.end");
1503        }
1504        else if (name.equals("observedAllele")) {
1505          throw new FHIRException("Cannot call addChild on a primitive type Sequence.observedAllele");
1506        }
1507        else if (name.equals("referenceAllele")) {
1508          throw new FHIRException("Cannot call addChild on a primitive type Sequence.referenceAllele");
1509        }
1510        else if (name.equals("cigar")) {
1511          throw new FHIRException("Cannot call addChild on a primitive type Sequence.cigar");
1512        }
1513        else if (name.equals("variantPointer")) {
1514          this.variantPointer = new Reference();
1515          return this.variantPointer;
1516        }
1517        else
1518          return super.addChild(name);
1519      }
1520
1521      public SequenceVariantComponent copy() {
1522        SequenceVariantComponent dst = new SequenceVariantComponent();
1523        copyValues(dst);
1524        dst.start = start == null ? null : start.copy();
1525        dst.end = end == null ? null : end.copy();
1526        dst.observedAllele = observedAllele == null ? null : observedAllele.copy();
1527        dst.referenceAllele = referenceAllele == null ? null : referenceAllele.copy();
1528        dst.cigar = cigar == null ? null : cigar.copy();
1529        dst.variantPointer = variantPointer == null ? null : variantPointer.copy();
1530        return dst;
1531      }
1532
1533      @Override
1534      public boolean equalsDeep(Base other_) {
1535        if (!super.equalsDeep(other_))
1536          return false;
1537        if (!(other_ instanceof SequenceVariantComponent))
1538          return false;
1539        SequenceVariantComponent o = (SequenceVariantComponent) other_;
1540        return compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(observedAllele, o.observedAllele, true)
1541           && compareDeep(referenceAllele, o.referenceAllele, true) && compareDeep(cigar, o.cigar, true) && compareDeep(variantPointer, o.variantPointer, true)
1542          ;
1543      }
1544
1545      @Override
1546      public boolean equalsShallow(Base other_) {
1547        if (!super.equalsShallow(other_))
1548          return false;
1549        if (!(other_ instanceof SequenceVariantComponent))
1550          return false;
1551        SequenceVariantComponent o = (SequenceVariantComponent) other_;
1552        return compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(observedAllele, o.observedAllele, true)
1553           && compareValues(referenceAllele, o.referenceAllele, true) && compareValues(cigar, o.cigar, true);
1554      }
1555
1556      public boolean isEmpty() {
1557        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(start, end, observedAllele
1558          , referenceAllele, cigar, variantPointer);
1559      }
1560
1561  public String fhirType() {
1562    return "Sequence.variant";
1563
1564  }
1565
1566  }
1567
1568    @Block()
1569    public static class SequenceQualityComponent extends BackboneElement implements IBaseBackboneElement {
1570        /**
1571         * INDEL / SNP / Undefined variant.
1572         */
1573        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1574        @Description(shortDefinition="indel | snp | unknown", formalDefinition="INDEL / SNP / Undefined variant." )
1575        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/quality-type")
1576        protected Enumeration<QualityType> type;
1577
1578        /**
1579         * Gold standard sequence used for comparing against.
1580         */
1581        @Child(name = "standardSequence", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
1582        @Description(shortDefinition="Standard sequence for comparison", formalDefinition="Gold standard sequence used for comparing against." )
1583        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/sequence-quality-standardSequence")
1584        protected CodeableConcept standardSequence;
1585
1586        /**
1587         * Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
1588         */
1589        @Child(name = "start", type = {IntegerType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1590        @Description(shortDefinition="Start position of the sequence", formalDefinition="Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive." )
1591        protected IntegerType start;
1592
1593        /**
1594         * End position of the sequence.If the coordinate system is 0-based then end is 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.
1595         */
1596        @Child(name = "end", type = {IntegerType.class}, order=4, min=0, max=1, modifier=false, summary=true)
1597        @Description(shortDefinition="End position of the sequence", formalDefinition="End position of the sequence.If the coordinate system is 0-based then end is 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." )
1598        protected IntegerType end;
1599
1600        /**
1601         * The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).
1602         */
1603        @Child(name = "score", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=true)
1604        @Description(shortDefinition="Quality score for the comparison", formalDefinition="The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685))." )
1605        protected Quantity score;
1606
1607        /**
1608         * Which method is used to get sequence quality.
1609         */
1610        @Child(name = "method", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true)
1611        @Description(shortDefinition="Method to get quality", formalDefinition="Which method is used to get sequence quality." )
1612        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/sequence-quality-method")
1613        protected CodeableConcept method;
1614
1615        /**
1616         * True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.
1617         */
1618        @Child(name = "truthTP", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true)
1619        @Description(shortDefinition="True positives from the perspective of the truth data", formalDefinition="True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event." )
1620        protected DecimalType truthTP;
1621
1622        /**
1623         * True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.
1624         */
1625        @Child(name = "queryTP", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=true)
1626        @Description(shortDefinition="True positives from the perspective of the query data", formalDefinition="True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event." )
1627        protected DecimalType queryTP;
1628
1629        /**
1630         * False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.
1631         */
1632        @Child(name = "truthFN", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=true)
1633        @Description(shortDefinition="False negatives", formalDefinition="False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here." )
1634        protected DecimalType truthFN;
1635
1636        /**
1637         * False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.
1638         */
1639        @Child(name = "queryFP", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=true)
1640        @Description(shortDefinition="False positives", formalDefinition="False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here." )
1641        protected DecimalType queryFP;
1642
1643        /**
1644         * The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).
1645         */
1646        @Child(name = "gtFP", type = {DecimalType.class}, order=11, min=0, max=1, modifier=false, summary=true)
1647        @Description(shortDefinition="False positives where the non-REF alleles in the Truth and Query Call Sets match", formalDefinition="The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar)." )
1648        protected DecimalType gtFP;
1649
1650        /**
1651         * QUERY.TP / (QUERY.TP + QUERY.FP).
1652         */
1653        @Child(name = "precision", type = {DecimalType.class}, order=12, min=0, max=1, modifier=false, summary=true)
1654        @Description(shortDefinition="Precision of comparison", formalDefinition="QUERY.TP / (QUERY.TP + QUERY.FP)." )
1655        protected DecimalType precision;
1656
1657        /**
1658         * TRUTH.TP / (TRUTH.TP + TRUTH.FN).
1659         */
1660        @Child(name = "recall", type = {DecimalType.class}, order=13, min=0, max=1, modifier=false, summary=true)
1661        @Description(shortDefinition="Recall of comparison", formalDefinition="TRUTH.TP / (TRUTH.TP + TRUTH.FN)." )
1662        protected DecimalType recall;
1663
1664        /**
1665         * Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).
1666         */
1667        @Child(name = "fScore", type = {DecimalType.class}, order=14, min=0, max=1, modifier=false, summary=true)
1668        @Description(shortDefinition="F-score", formalDefinition="Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall)." )
1669        protected DecimalType fScore;
1670
1671        private static final long serialVersionUID = -383644463L;
1672
1673    /**
1674     * Constructor
1675     */
1676      public SequenceQualityComponent() {
1677        super();
1678      }
1679
1680    /**
1681     * Constructor
1682     */
1683      public SequenceQualityComponent(Enumeration<QualityType> type) {
1684        super();
1685        this.type = type;
1686      }
1687
1688        /**
1689         * @return {@link #type} (INDEL / SNP / Undefined variant.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1690         */
1691        public Enumeration<QualityType> getTypeElement() { 
1692          if (this.type == null)
1693            if (Configuration.errorOnAutoCreate())
1694              throw new Error("Attempt to auto-create SequenceQualityComponent.type");
1695            else if (Configuration.doAutoCreate())
1696              this.type = new Enumeration<QualityType>(new QualityTypeEnumFactory()); // bb
1697          return this.type;
1698        }
1699
1700        public boolean hasTypeElement() { 
1701          return this.type != null && !this.type.isEmpty();
1702        }
1703
1704        public boolean hasType() { 
1705          return this.type != null && !this.type.isEmpty();
1706        }
1707
1708        /**
1709         * @param value {@link #type} (INDEL / SNP / Undefined variant.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1710         */
1711        public SequenceQualityComponent setTypeElement(Enumeration<QualityType> value) { 
1712          this.type = value;
1713          return this;
1714        }
1715
1716        /**
1717         * @return INDEL / SNP / Undefined variant.
1718         */
1719        public QualityType getType() { 
1720          return this.type == null ? null : this.type.getValue();
1721        }
1722
1723        /**
1724         * @param value INDEL / SNP / Undefined variant.
1725         */
1726        public SequenceQualityComponent setType(QualityType value) { 
1727            if (this.type == null)
1728              this.type = new Enumeration<QualityType>(new QualityTypeEnumFactory());
1729            this.type.setValue(value);
1730          return this;
1731        }
1732
1733        /**
1734         * @return {@link #standardSequence} (Gold standard sequence used for comparing against.)
1735         */
1736        public CodeableConcept getStandardSequence() { 
1737          if (this.standardSequence == null)
1738            if (Configuration.errorOnAutoCreate())
1739              throw new Error("Attempt to auto-create SequenceQualityComponent.standardSequence");
1740            else if (Configuration.doAutoCreate())
1741              this.standardSequence = new CodeableConcept(); // cc
1742          return this.standardSequence;
1743        }
1744
1745        public boolean hasStandardSequence() { 
1746          return this.standardSequence != null && !this.standardSequence.isEmpty();
1747        }
1748
1749        /**
1750         * @param value {@link #standardSequence} (Gold standard sequence used for comparing against.)
1751         */
1752        public SequenceQualityComponent setStandardSequence(CodeableConcept value)  { 
1753          this.standardSequence = value;
1754          return this;
1755        }
1756
1757        /**
1758         * @return {@link #start} (Start position of the 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
1759         */
1760        public IntegerType getStartElement() { 
1761          if (this.start == null)
1762            if (Configuration.errorOnAutoCreate())
1763              throw new Error("Attempt to auto-create SequenceQualityComponent.start");
1764            else if (Configuration.doAutoCreate())
1765              this.start = new IntegerType(); // bb
1766          return this.start;
1767        }
1768
1769        public boolean hasStartElement() { 
1770          return this.start != null && !this.start.isEmpty();
1771        }
1772
1773        public boolean hasStart() { 
1774          return this.start != null && !this.start.isEmpty();
1775        }
1776
1777        /**
1778         * @param value {@link #start} (Start position of the 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
1779         */
1780        public SequenceQualityComponent setStartElement(IntegerType value) { 
1781          this.start = value;
1782          return this;
1783        }
1784
1785        /**
1786         * @return Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
1787         */
1788        public int getStart() { 
1789          return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue();
1790        }
1791
1792        /**
1793         * @param value Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
1794         */
1795        public SequenceQualityComponent setStart(int value) { 
1796            if (this.start == null)
1797              this.start = new IntegerType();
1798            this.start.setValue(value);
1799          return this;
1800        }
1801
1802        /**
1803         * @return {@link #end} (End position of the sequence.If the coordinate system is 0-based then end is 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
1804         */
1805        public IntegerType getEndElement() { 
1806          if (this.end == null)
1807            if (Configuration.errorOnAutoCreate())
1808              throw new Error("Attempt to auto-create SequenceQualityComponent.end");
1809            else if (Configuration.doAutoCreate())
1810              this.end = new IntegerType(); // bb
1811          return this.end;
1812        }
1813
1814        public boolean hasEndElement() { 
1815          return this.end != null && !this.end.isEmpty();
1816        }
1817
1818        public boolean hasEnd() { 
1819          return this.end != null && !this.end.isEmpty();
1820        }
1821
1822        /**
1823         * @param value {@link #end} (End position of the sequence.If the coordinate system is 0-based then end is 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
1824         */
1825        public SequenceQualityComponent setEndElement(IntegerType value) { 
1826          this.end = value;
1827          return this;
1828        }
1829
1830        /**
1831         * @return End position of the sequence.If the coordinate system is 0-based then end is 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.
1832         */
1833        public int getEnd() { 
1834          return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue();
1835        }
1836
1837        /**
1838         * @param value End position of the sequence.If the coordinate system is 0-based then end is 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.
1839         */
1840        public SequenceQualityComponent setEnd(int value) { 
1841            if (this.end == null)
1842              this.end = new IntegerType();
1843            this.end.setValue(value);
1844          return this;
1845        }
1846
1847        /**
1848         * @return {@link #score} (The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).)
1849         */
1850        public Quantity getScore() { 
1851          if (this.score == null)
1852            if (Configuration.errorOnAutoCreate())
1853              throw new Error("Attempt to auto-create SequenceQualityComponent.score");
1854            else if (Configuration.doAutoCreate())
1855              this.score = new Quantity(); // cc
1856          return this.score;
1857        }
1858
1859        public boolean hasScore() { 
1860          return this.score != null && !this.score.isEmpty();
1861        }
1862
1863        /**
1864         * @param value {@link #score} (The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).)
1865         */
1866        public SequenceQualityComponent setScore(Quantity value)  { 
1867          this.score = value;
1868          return this;
1869        }
1870
1871        /**
1872         * @return {@link #method} (Which method is used to get sequence quality.)
1873         */
1874        public CodeableConcept getMethod() { 
1875          if (this.method == null)
1876            if (Configuration.errorOnAutoCreate())
1877              throw new Error("Attempt to auto-create SequenceQualityComponent.method");
1878            else if (Configuration.doAutoCreate())
1879              this.method = new CodeableConcept(); // cc
1880          return this.method;
1881        }
1882
1883        public boolean hasMethod() { 
1884          return this.method != null && !this.method.isEmpty();
1885        }
1886
1887        /**
1888         * @param value {@link #method} (Which method is used to get sequence quality.)
1889         */
1890        public SequenceQualityComponent setMethod(CodeableConcept value)  { 
1891          this.method = value;
1892          return this;
1893        }
1894
1895        /**
1896         * @return {@link #truthTP} (True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.). This is the underlying object with id, value and extensions. The accessor "getTruthTP" gives direct access to the value
1897         */
1898        public DecimalType getTruthTPElement() { 
1899          if (this.truthTP == null)
1900            if (Configuration.errorOnAutoCreate())
1901              throw new Error("Attempt to auto-create SequenceQualityComponent.truthTP");
1902            else if (Configuration.doAutoCreate())
1903              this.truthTP = new DecimalType(); // bb
1904          return this.truthTP;
1905        }
1906
1907        public boolean hasTruthTPElement() { 
1908          return this.truthTP != null && !this.truthTP.isEmpty();
1909        }
1910
1911        public boolean hasTruthTP() { 
1912          return this.truthTP != null && !this.truthTP.isEmpty();
1913        }
1914
1915        /**
1916         * @param value {@link #truthTP} (True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.). This is the underlying object with id, value and extensions. The accessor "getTruthTP" gives direct access to the value
1917         */
1918        public SequenceQualityComponent setTruthTPElement(DecimalType value) { 
1919          this.truthTP = value;
1920          return this;
1921        }
1922
1923        /**
1924         * @return True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.
1925         */
1926        public BigDecimal getTruthTP() { 
1927          return this.truthTP == null ? null : this.truthTP.getValue();
1928        }
1929
1930        /**
1931         * @param value True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.
1932         */
1933        public SequenceQualityComponent setTruthTP(BigDecimal value) { 
1934          if (value == null)
1935            this.truthTP = null;
1936          else {
1937            if (this.truthTP == null)
1938              this.truthTP = new DecimalType();
1939            this.truthTP.setValue(value);
1940          }
1941          return this;
1942        }
1943
1944        /**
1945         * @param value True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.
1946         */
1947        public SequenceQualityComponent setTruthTP(long value) { 
1948              this.truthTP = new DecimalType();
1949            this.truthTP.setValue(value);
1950          return this;
1951        }
1952
1953        /**
1954         * @param value True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.
1955         */
1956        public SequenceQualityComponent setTruthTP(double value) { 
1957              this.truthTP = new DecimalType();
1958            this.truthTP.setValue(value);
1959          return this;
1960        }
1961
1962        /**
1963         * @return {@link #queryTP} (True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.). This is the underlying object with id, value and extensions. The accessor "getQueryTP" gives direct access to the value
1964         */
1965        public DecimalType getQueryTPElement() { 
1966          if (this.queryTP == null)
1967            if (Configuration.errorOnAutoCreate())
1968              throw new Error("Attempt to auto-create SequenceQualityComponent.queryTP");
1969            else if (Configuration.doAutoCreate())
1970              this.queryTP = new DecimalType(); // bb
1971          return this.queryTP;
1972        }
1973
1974        public boolean hasQueryTPElement() { 
1975          return this.queryTP != null && !this.queryTP.isEmpty();
1976        }
1977
1978        public boolean hasQueryTP() { 
1979          return this.queryTP != null && !this.queryTP.isEmpty();
1980        }
1981
1982        /**
1983         * @param value {@link #queryTP} (True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.). This is the underlying object with id, value and extensions. The accessor "getQueryTP" gives direct access to the value
1984         */
1985        public SequenceQualityComponent setQueryTPElement(DecimalType value) { 
1986          this.queryTP = value;
1987          return this;
1988        }
1989
1990        /**
1991         * @return True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.
1992         */
1993        public BigDecimal getQueryTP() { 
1994          return this.queryTP == null ? null : this.queryTP.getValue();
1995        }
1996
1997        /**
1998         * @param value True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.
1999         */
2000        public SequenceQualityComponent setQueryTP(BigDecimal value) { 
2001          if (value == null)
2002            this.queryTP = null;
2003          else {
2004            if (this.queryTP == null)
2005              this.queryTP = new DecimalType();
2006            this.queryTP.setValue(value);
2007          }
2008          return this;
2009        }
2010
2011        /**
2012         * @param value True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.
2013         */
2014        public SequenceQualityComponent setQueryTP(long value) { 
2015              this.queryTP = new DecimalType();
2016            this.queryTP.setValue(value);
2017          return this;
2018        }
2019
2020        /**
2021         * @param value True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.
2022         */
2023        public SequenceQualityComponent setQueryTP(double value) { 
2024              this.queryTP = new DecimalType();
2025            this.queryTP.setValue(value);
2026          return this;
2027        }
2028
2029        /**
2030         * @return {@link #truthFN} (False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.). This is the underlying object with id, value and extensions. The accessor "getTruthFN" gives direct access to the value
2031         */
2032        public DecimalType getTruthFNElement() { 
2033          if (this.truthFN == null)
2034            if (Configuration.errorOnAutoCreate())
2035              throw new Error("Attempt to auto-create SequenceQualityComponent.truthFN");
2036            else if (Configuration.doAutoCreate())
2037              this.truthFN = new DecimalType(); // bb
2038          return this.truthFN;
2039        }
2040
2041        public boolean hasTruthFNElement() { 
2042          return this.truthFN != null && !this.truthFN.isEmpty();
2043        }
2044
2045        public boolean hasTruthFN() { 
2046          return this.truthFN != null && !this.truthFN.isEmpty();
2047        }
2048
2049        /**
2050         * @param value {@link #truthFN} (False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.). This is the underlying object with id, value and extensions. The accessor "getTruthFN" gives direct access to the value
2051         */
2052        public SequenceQualityComponent setTruthFNElement(DecimalType value) { 
2053          this.truthFN = value;
2054          return this;
2055        }
2056
2057        /**
2058         * @return False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.
2059         */
2060        public BigDecimal getTruthFN() { 
2061          return this.truthFN == null ? null : this.truthFN.getValue();
2062        }
2063
2064        /**
2065         * @param value False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.
2066         */
2067        public SequenceQualityComponent setTruthFN(BigDecimal value) { 
2068          if (value == null)
2069            this.truthFN = null;
2070          else {
2071            if (this.truthFN == null)
2072              this.truthFN = new DecimalType();
2073            this.truthFN.setValue(value);
2074          }
2075          return this;
2076        }
2077
2078        /**
2079         * @param value False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.
2080         */
2081        public SequenceQualityComponent setTruthFN(long value) { 
2082              this.truthFN = new DecimalType();
2083            this.truthFN.setValue(value);
2084          return this;
2085        }
2086
2087        /**
2088         * @param value False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.
2089         */
2090        public SequenceQualityComponent setTruthFN(double value) { 
2091              this.truthFN = new DecimalType();
2092            this.truthFN.setValue(value);
2093          return this;
2094        }
2095
2096        /**
2097         * @return {@link #queryFP} (False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.). This is the underlying object with id, value and extensions. The accessor "getQueryFP" gives direct access to the value
2098         */
2099        public DecimalType getQueryFPElement() { 
2100          if (this.queryFP == null)
2101            if (Configuration.errorOnAutoCreate())
2102              throw new Error("Attempt to auto-create SequenceQualityComponent.queryFP");
2103            else if (Configuration.doAutoCreate())
2104              this.queryFP = new DecimalType(); // bb
2105          return this.queryFP;
2106        }
2107
2108        public boolean hasQueryFPElement() { 
2109          return this.queryFP != null && !this.queryFP.isEmpty();
2110        }
2111
2112        public boolean hasQueryFP() { 
2113          return this.queryFP != null && !this.queryFP.isEmpty();
2114        }
2115
2116        /**
2117         * @param value {@link #queryFP} (False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.). This is the underlying object with id, value and extensions. The accessor "getQueryFP" gives direct access to the value
2118         */
2119        public SequenceQualityComponent setQueryFPElement(DecimalType value) { 
2120          this.queryFP = value;
2121          return this;
2122        }
2123
2124        /**
2125         * @return False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.
2126         */
2127        public BigDecimal getQueryFP() { 
2128          return this.queryFP == null ? null : this.queryFP.getValue();
2129        }
2130
2131        /**
2132         * @param value False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.
2133         */
2134        public SequenceQualityComponent setQueryFP(BigDecimal value) { 
2135          if (value == null)
2136            this.queryFP = null;
2137          else {
2138            if (this.queryFP == null)
2139              this.queryFP = new DecimalType();
2140            this.queryFP.setValue(value);
2141          }
2142          return this;
2143        }
2144
2145        /**
2146         * @param value False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.
2147         */
2148        public SequenceQualityComponent setQueryFP(long value) { 
2149              this.queryFP = new DecimalType();
2150            this.queryFP.setValue(value);
2151          return this;
2152        }
2153
2154        /**
2155         * @param value False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.
2156         */
2157        public SequenceQualityComponent setQueryFP(double value) { 
2158              this.queryFP = new DecimalType();
2159            this.queryFP.setValue(value);
2160          return this;
2161        }
2162
2163        /**
2164         * @return {@link #gtFP} (The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).). This is the underlying object with id, value and extensions. The accessor "getGtFP" gives direct access to the value
2165         */
2166        public DecimalType getGtFPElement() { 
2167          if (this.gtFP == null)
2168            if (Configuration.errorOnAutoCreate())
2169              throw new Error("Attempt to auto-create SequenceQualityComponent.gtFP");
2170            else if (Configuration.doAutoCreate())
2171              this.gtFP = new DecimalType(); // bb
2172          return this.gtFP;
2173        }
2174
2175        public boolean hasGtFPElement() { 
2176          return this.gtFP != null && !this.gtFP.isEmpty();
2177        }
2178
2179        public boolean hasGtFP() { 
2180          return this.gtFP != null && !this.gtFP.isEmpty();
2181        }
2182
2183        /**
2184         * @param value {@link #gtFP} (The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).). This is the underlying object with id, value and extensions. The accessor "getGtFP" gives direct access to the value
2185         */
2186        public SequenceQualityComponent setGtFPElement(DecimalType value) { 
2187          this.gtFP = value;
2188          return this;
2189        }
2190
2191        /**
2192         * @return The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).
2193         */
2194        public BigDecimal getGtFP() { 
2195          return this.gtFP == null ? null : this.gtFP.getValue();
2196        }
2197
2198        /**
2199         * @param value The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).
2200         */
2201        public SequenceQualityComponent setGtFP(BigDecimal value) { 
2202          if (value == null)
2203            this.gtFP = null;
2204          else {
2205            if (this.gtFP == null)
2206              this.gtFP = new DecimalType();
2207            this.gtFP.setValue(value);
2208          }
2209          return this;
2210        }
2211
2212        /**
2213         * @param value The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).
2214         */
2215        public SequenceQualityComponent setGtFP(long value) { 
2216              this.gtFP = new DecimalType();
2217            this.gtFP.setValue(value);
2218          return this;
2219        }
2220
2221        /**
2222         * @param value The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).
2223         */
2224        public SequenceQualityComponent setGtFP(double value) { 
2225              this.gtFP = new DecimalType();
2226            this.gtFP.setValue(value);
2227          return this;
2228        }
2229
2230        /**
2231         * @return {@link #precision} (QUERY.TP / (QUERY.TP + QUERY.FP).). This is the underlying object with id, value and extensions. The accessor "getPrecision" gives direct access to the value
2232         */
2233        public DecimalType getPrecisionElement() { 
2234          if (this.precision == null)
2235            if (Configuration.errorOnAutoCreate())
2236              throw new Error("Attempt to auto-create SequenceQualityComponent.precision");
2237            else if (Configuration.doAutoCreate())
2238              this.precision = new DecimalType(); // bb
2239          return this.precision;
2240        }
2241
2242        public boolean hasPrecisionElement() { 
2243          return this.precision != null && !this.precision.isEmpty();
2244        }
2245
2246        public boolean hasPrecision() { 
2247          return this.precision != null && !this.precision.isEmpty();
2248        }
2249
2250        /**
2251         * @param value {@link #precision} (QUERY.TP / (QUERY.TP + QUERY.FP).). This is the underlying object with id, value and extensions. The accessor "getPrecision" gives direct access to the value
2252         */
2253        public SequenceQualityComponent setPrecisionElement(DecimalType value) { 
2254          this.precision = value;
2255          return this;
2256        }
2257
2258        /**
2259         * @return QUERY.TP / (QUERY.TP + QUERY.FP).
2260         */
2261        public BigDecimal getPrecision() { 
2262          return this.precision == null ? null : this.precision.getValue();
2263        }
2264
2265        /**
2266         * @param value QUERY.TP / (QUERY.TP + QUERY.FP).
2267         */
2268        public SequenceQualityComponent setPrecision(BigDecimal value) { 
2269          if (value == null)
2270            this.precision = null;
2271          else {
2272            if (this.precision == null)
2273              this.precision = new DecimalType();
2274            this.precision.setValue(value);
2275          }
2276          return this;
2277        }
2278
2279        /**
2280         * @param value QUERY.TP / (QUERY.TP + QUERY.FP).
2281         */
2282        public SequenceQualityComponent setPrecision(long value) { 
2283              this.precision = new DecimalType();
2284            this.precision.setValue(value);
2285          return this;
2286        }
2287
2288        /**
2289         * @param value QUERY.TP / (QUERY.TP + QUERY.FP).
2290         */
2291        public SequenceQualityComponent setPrecision(double value) { 
2292              this.precision = new DecimalType();
2293            this.precision.setValue(value);
2294          return this;
2295        }
2296
2297        /**
2298         * @return {@link #recall} (TRUTH.TP / (TRUTH.TP + TRUTH.FN).). This is the underlying object with id, value and extensions. The accessor "getRecall" gives direct access to the value
2299         */
2300        public DecimalType getRecallElement() { 
2301          if (this.recall == null)
2302            if (Configuration.errorOnAutoCreate())
2303              throw new Error("Attempt to auto-create SequenceQualityComponent.recall");
2304            else if (Configuration.doAutoCreate())
2305              this.recall = new DecimalType(); // bb
2306          return this.recall;
2307        }
2308
2309        public boolean hasRecallElement() { 
2310          return this.recall != null && !this.recall.isEmpty();
2311        }
2312
2313        public boolean hasRecall() { 
2314          return this.recall != null && !this.recall.isEmpty();
2315        }
2316
2317        /**
2318         * @param value {@link #recall} (TRUTH.TP / (TRUTH.TP + TRUTH.FN).). This is the underlying object with id, value and extensions. The accessor "getRecall" gives direct access to the value
2319         */
2320        public SequenceQualityComponent setRecallElement(DecimalType value) { 
2321          this.recall = value;
2322          return this;
2323        }
2324
2325        /**
2326         * @return TRUTH.TP / (TRUTH.TP + TRUTH.FN).
2327         */
2328        public BigDecimal getRecall() { 
2329          return this.recall == null ? null : this.recall.getValue();
2330        }
2331
2332        /**
2333         * @param value TRUTH.TP / (TRUTH.TP + TRUTH.FN).
2334         */
2335        public SequenceQualityComponent setRecall(BigDecimal value) { 
2336          if (value == null)
2337            this.recall = null;
2338          else {
2339            if (this.recall == null)
2340              this.recall = new DecimalType();
2341            this.recall.setValue(value);
2342          }
2343          return this;
2344        }
2345
2346        /**
2347         * @param value TRUTH.TP / (TRUTH.TP + TRUTH.FN).
2348         */
2349        public SequenceQualityComponent setRecall(long value) { 
2350              this.recall = new DecimalType();
2351            this.recall.setValue(value);
2352          return this;
2353        }
2354
2355        /**
2356         * @param value TRUTH.TP / (TRUTH.TP + TRUTH.FN).
2357         */
2358        public SequenceQualityComponent setRecall(double value) { 
2359              this.recall = new DecimalType();
2360            this.recall.setValue(value);
2361          return this;
2362        }
2363
2364        /**
2365         * @return {@link #fScore} (Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).). This is the underlying object with id, value and extensions. The accessor "getFScore" gives direct access to the value
2366         */
2367        public DecimalType getFScoreElement() { 
2368          if (this.fScore == null)
2369            if (Configuration.errorOnAutoCreate())
2370              throw new Error("Attempt to auto-create SequenceQualityComponent.fScore");
2371            else if (Configuration.doAutoCreate())
2372              this.fScore = new DecimalType(); // bb
2373          return this.fScore;
2374        }
2375
2376        public boolean hasFScoreElement() { 
2377          return this.fScore != null && !this.fScore.isEmpty();
2378        }
2379
2380        public boolean hasFScore() { 
2381          return this.fScore != null && !this.fScore.isEmpty();
2382        }
2383
2384        /**
2385         * @param value {@link #fScore} (Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).). This is the underlying object with id, value and extensions. The accessor "getFScore" gives direct access to the value
2386         */
2387        public SequenceQualityComponent setFScoreElement(DecimalType value) { 
2388          this.fScore = value;
2389          return this;
2390        }
2391
2392        /**
2393         * @return Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).
2394         */
2395        public BigDecimal getFScore() { 
2396          return this.fScore == null ? null : this.fScore.getValue();
2397        }
2398
2399        /**
2400         * @param value Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).
2401         */
2402        public SequenceQualityComponent setFScore(BigDecimal value) { 
2403          if (value == null)
2404            this.fScore = null;
2405          else {
2406            if (this.fScore == null)
2407              this.fScore = new DecimalType();
2408            this.fScore.setValue(value);
2409          }
2410          return this;
2411        }
2412
2413        /**
2414         * @param value Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).
2415         */
2416        public SequenceQualityComponent setFScore(long value) { 
2417              this.fScore = new DecimalType();
2418            this.fScore.setValue(value);
2419          return this;
2420        }
2421
2422        /**
2423         * @param value Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).
2424         */
2425        public SequenceQualityComponent setFScore(double value) { 
2426              this.fScore = new DecimalType();
2427            this.fScore.setValue(value);
2428          return this;
2429        }
2430
2431        protected void listChildren(List<Property> children) {
2432          super.listChildren(children);
2433          children.add(new Property("type", "code", "INDEL / SNP / Undefined variant.", 0, 1, type));
2434          children.add(new Property("standardSequence", "CodeableConcept", "Gold standard sequence used for comparing against.", 0, 1, standardSequence));
2435          children.add(new Property("start", "integer", "Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start));
2436          children.add(new Property("end", "integer", "End position of the sequence.If the coordinate system is 0-based then end is 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));
2437          children.add(new Property("score", "Quantity", "The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).", 0, 1, score));
2438          children.add(new Property("method", "CodeableConcept", "Which method is used to get sequence quality.", 0, 1, method));
2439          children.add(new Property("truthTP", "decimal", "True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.", 0, 1, truthTP));
2440          children.add(new Property("queryTP", "decimal", "True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.", 0, 1, queryTP));
2441          children.add(new Property("truthFN", "decimal", "False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.", 0, 1, truthFN));
2442          children.add(new Property("queryFP", "decimal", "False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.", 0, 1, queryFP));
2443          children.add(new Property("gtFP", "decimal", "The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).", 0, 1, gtFP));
2444          children.add(new Property("precision", "decimal", "QUERY.TP / (QUERY.TP + QUERY.FP).", 0, 1, precision));
2445          children.add(new Property("recall", "decimal", "TRUTH.TP / (TRUTH.TP + TRUTH.FN).", 0, 1, recall));
2446          children.add(new Property("fScore", "decimal", "Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).", 0, 1, fScore));
2447        }
2448
2449        @Override
2450        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2451          switch (_hash) {
2452          case 3575610: /*type*/  return new Property("type", "code", "INDEL / SNP / Undefined variant.", 0, 1, type);
2453          case -1861227106: /*standardSequence*/  return new Property("standardSequence", "CodeableConcept", "Gold standard sequence used for comparing against.", 0, 1, standardSequence);
2454          case 109757538: /*start*/  return new Property("start", "integer", "Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start);
2455          case 100571: /*end*/  return new Property("end", "integer", "End position of the sequence.If the coordinate system is 0-based then end is 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);
2456          case 109264530: /*score*/  return new Property("score", "Quantity", "The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).", 0, 1, score);
2457          case -1077554975: /*method*/  return new Property("method", "CodeableConcept", "Which method is used to get sequence quality.", 0, 1, method);
2458          case -1048421849: /*truthTP*/  return new Property("truthTP", "decimal", "True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.", 0, 1, truthTP);
2459          case 655102276: /*queryTP*/  return new Property("queryTP", "decimal", "True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.", 0, 1, queryTP);
2460          case -1048422285: /*truthFN*/  return new Property("truthFN", "decimal", "False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.", 0, 1, truthFN);
2461          case 655101842: /*queryFP*/  return new Property("queryFP", "decimal", "False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.", 0, 1, queryFP);
2462          case 3182199: /*gtFP*/  return new Property("gtFP", "decimal", "The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).", 0, 1, gtFP);
2463          case -1376177026: /*precision*/  return new Property("precision", "decimal", "QUERY.TP / (QUERY.TP + QUERY.FP).", 0, 1, precision);
2464          case -934922479: /*recall*/  return new Property("recall", "decimal", "TRUTH.TP / (TRUTH.TP + TRUTH.FN).", 0, 1, recall);
2465          case -1295082036: /*fScore*/  return new Property("fScore", "decimal", "Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).", 0, 1, fScore);
2466          default: return super.getNamedProperty(_hash, _name, _checkValid);
2467          }
2468
2469        }
2470
2471      @Override
2472      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2473        switch (hash) {
2474        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<QualityType>
2475        case -1861227106: /*standardSequence*/ return this.standardSequence == null ? new Base[0] : new Base[] {this.standardSequence}; // CodeableConcept
2476        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType
2477        case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType
2478        case 109264530: /*score*/ return this.score == null ? new Base[0] : new Base[] {this.score}; // Quantity
2479        case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept
2480        case -1048421849: /*truthTP*/ return this.truthTP == null ? new Base[0] : new Base[] {this.truthTP}; // DecimalType
2481        case 655102276: /*queryTP*/ return this.queryTP == null ? new Base[0] : new Base[] {this.queryTP}; // DecimalType
2482        case -1048422285: /*truthFN*/ return this.truthFN == null ? new Base[0] : new Base[] {this.truthFN}; // DecimalType
2483        case 655101842: /*queryFP*/ return this.queryFP == null ? new Base[0] : new Base[] {this.queryFP}; // DecimalType
2484        case 3182199: /*gtFP*/ return this.gtFP == null ? new Base[0] : new Base[] {this.gtFP}; // DecimalType
2485        case -1376177026: /*precision*/ return this.precision == null ? new Base[0] : new Base[] {this.precision}; // DecimalType
2486        case -934922479: /*recall*/ return this.recall == null ? new Base[0] : new Base[] {this.recall}; // DecimalType
2487        case -1295082036: /*fScore*/ return this.fScore == null ? new Base[0] : new Base[] {this.fScore}; // DecimalType
2488        default: return super.getProperty(hash, name, checkValid);
2489        }
2490
2491      }
2492
2493      @Override
2494      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2495        switch (hash) {
2496        case 3575610: // type
2497          value = new QualityTypeEnumFactory().fromType(castToCode(value));
2498          this.type = (Enumeration) value; // Enumeration<QualityType>
2499          return value;
2500        case -1861227106: // standardSequence
2501          this.standardSequence = castToCodeableConcept(value); // CodeableConcept
2502          return value;
2503        case 109757538: // start
2504          this.start = castToInteger(value); // IntegerType
2505          return value;
2506        case 100571: // end
2507          this.end = castToInteger(value); // IntegerType
2508          return value;
2509        case 109264530: // score
2510          this.score = castToQuantity(value); // Quantity
2511          return value;
2512        case -1077554975: // method
2513          this.method = castToCodeableConcept(value); // CodeableConcept
2514          return value;
2515        case -1048421849: // truthTP
2516          this.truthTP = castToDecimal(value); // DecimalType
2517          return value;
2518        case 655102276: // queryTP
2519          this.queryTP = castToDecimal(value); // DecimalType
2520          return value;
2521        case -1048422285: // truthFN
2522          this.truthFN = castToDecimal(value); // DecimalType
2523          return value;
2524        case 655101842: // queryFP
2525          this.queryFP = castToDecimal(value); // DecimalType
2526          return value;
2527        case 3182199: // gtFP
2528          this.gtFP = castToDecimal(value); // DecimalType
2529          return value;
2530        case -1376177026: // precision
2531          this.precision = castToDecimal(value); // DecimalType
2532          return value;
2533        case -934922479: // recall
2534          this.recall = castToDecimal(value); // DecimalType
2535          return value;
2536        case -1295082036: // fScore
2537          this.fScore = castToDecimal(value); // DecimalType
2538          return value;
2539        default: return super.setProperty(hash, name, value);
2540        }
2541
2542      }
2543
2544      @Override
2545      public Base setProperty(String name, Base value) throws FHIRException {
2546        if (name.equals("type")) {
2547          value = new QualityTypeEnumFactory().fromType(castToCode(value));
2548          this.type = (Enumeration) value; // Enumeration<QualityType>
2549        } else if (name.equals("standardSequence")) {
2550          this.standardSequence = castToCodeableConcept(value); // CodeableConcept
2551        } else if (name.equals("start")) {
2552          this.start = castToInteger(value); // IntegerType
2553        } else if (name.equals("end")) {
2554          this.end = castToInteger(value); // IntegerType
2555        } else if (name.equals("score")) {
2556          this.score = castToQuantity(value); // Quantity
2557        } else if (name.equals("method")) {
2558          this.method = castToCodeableConcept(value); // CodeableConcept
2559        } else if (name.equals("truthTP")) {
2560          this.truthTP = castToDecimal(value); // DecimalType
2561        } else if (name.equals("queryTP")) {
2562          this.queryTP = castToDecimal(value); // DecimalType
2563        } else if (name.equals("truthFN")) {
2564          this.truthFN = castToDecimal(value); // DecimalType
2565        } else if (name.equals("queryFP")) {
2566          this.queryFP = castToDecimal(value); // DecimalType
2567        } else if (name.equals("gtFP")) {
2568          this.gtFP = castToDecimal(value); // DecimalType
2569        } else if (name.equals("precision")) {
2570          this.precision = castToDecimal(value); // DecimalType
2571        } else if (name.equals("recall")) {
2572          this.recall = castToDecimal(value); // DecimalType
2573        } else if (name.equals("fScore")) {
2574          this.fScore = castToDecimal(value); // DecimalType
2575        } else
2576          return super.setProperty(name, value);
2577        return value;
2578      }
2579
2580      @Override
2581      public Base makeProperty(int hash, String name) throws FHIRException {
2582        switch (hash) {
2583        case 3575610:  return getTypeElement();
2584        case -1861227106:  return getStandardSequence(); 
2585        case 109757538:  return getStartElement();
2586        case 100571:  return getEndElement();
2587        case 109264530:  return getScore(); 
2588        case -1077554975:  return getMethod(); 
2589        case -1048421849:  return getTruthTPElement();
2590        case 655102276:  return getQueryTPElement();
2591        case -1048422285:  return getTruthFNElement();
2592        case 655101842:  return getQueryFPElement();
2593        case 3182199:  return getGtFPElement();
2594        case -1376177026:  return getPrecisionElement();
2595        case -934922479:  return getRecallElement();
2596        case -1295082036:  return getFScoreElement();
2597        default: return super.makeProperty(hash, name);
2598        }
2599
2600      }
2601
2602      @Override
2603      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2604        switch (hash) {
2605        case 3575610: /*type*/ return new String[] {"code"};
2606        case -1861227106: /*standardSequence*/ return new String[] {"CodeableConcept"};
2607        case 109757538: /*start*/ return new String[] {"integer"};
2608        case 100571: /*end*/ return new String[] {"integer"};
2609        case 109264530: /*score*/ return new String[] {"Quantity"};
2610        case -1077554975: /*method*/ return new String[] {"CodeableConcept"};
2611        case -1048421849: /*truthTP*/ return new String[] {"decimal"};
2612        case 655102276: /*queryTP*/ return new String[] {"decimal"};
2613        case -1048422285: /*truthFN*/ return new String[] {"decimal"};
2614        case 655101842: /*queryFP*/ return new String[] {"decimal"};
2615        case 3182199: /*gtFP*/ return new String[] {"decimal"};
2616        case -1376177026: /*precision*/ return new String[] {"decimal"};
2617        case -934922479: /*recall*/ return new String[] {"decimal"};
2618        case -1295082036: /*fScore*/ return new String[] {"decimal"};
2619        default: return super.getTypesForProperty(hash, name);
2620        }
2621
2622      }
2623
2624      @Override
2625      public Base addChild(String name) throws FHIRException {
2626        if (name.equals("type")) {
2627          throw new FHIRException("Cannot call addChild on a primitive type Sequence.type");
2628        }
2629        else if (name.equals("standardSequence")) {
2630          this.standardSequence = new CodeableConcept();
2631          return this.standardSequence;
2632        }
2633        else if (name.equals("start")) {
2634          throw new FHIRException("Cannot call addChild on a primitive type Sequence.start");
2635        }
2636        else if (name.equals("end")) {
2637          throw new FHIRException("Cannot call addChild on a primitive type Sequence.end");
2638        }
2639        else if (name.equals("score")) {
2640          this.score = new Quantity();
2641          return this.score;
2642        }
2643        else if (name.equals("method")) {
2644          this.method = new CodeableConcept();
2645          return this.method;
2646        }
2647        else if (name.equals("truthTP")) {
2648          throw new FHIRException("Cannot call addChild on a primitive type Sequence.truthTP");
2649        }
2650        else if (name.equals("queryTP")) {
2651          throw new FHIRException("Cannot call addChild on a primitive type Sequence.queryTP");
2652        }
2653        else if (name.equals("truthFN")) {
2654          throw new FHIRException("Cannot call addChild on a primitive type Sequence.truthFN");
2655        }
2656        else if (name.equals("queryFP")) {
2657          throw new FHIRException("Cannot call addChild on a primitive type Sequence.queryFP");
2658        }
2659        else if (name.equals("gtFP")) {
2660          throw new FHIRException("Cannot call addChild on a primitive type Sequence.gtFP");
2661        }
2662        else if (name.equals("precision")) {
2663          throw new FHIRException("Cannot call addChild on a primitive type Sequence.precision");
2664        }
2665        else if (name.equals("recall")) {
2666          throw new FHIRException("Cannot call addChild on a primitive type Sequence.recall");
2667        }
2668        else if (name.equals("fScore")) {
2669          throw new FHIRException("Cannot call addChild on a primitive type Sequence.fScore");
2670        }
2671        else
2672          return super.addChild(name);
2673      }
2674
2675      public SequenceQualityComponent copy() {
2676        SequenceQualityComponent dst = new SequenceQualityComponent();
2677        copyValues(dst);
2678        dst.type = type == null ? null : type.copy();
2679        dst.standardSequence = standardSequence == null ? null : standardSequence.copy();
2680        dst.start = start == null ? null : start.copy();
2681        dst.end = end == null ? null : end.copy();
2682        dst.score = score == null ? null : score.copy();
2683        dst.method = method == null ? null : method.copy();
2684        dst.truthTP = truthTP == null ? null : truthTP.copy();
2685        dst.queryTP = queryTP == null ? null : queryTP.copy();
2686        dst.truthFN = truthFN == null ? null : truthFN.copy();
2687        dst.queryFP = queryFP == null ? null : queryFP.copy();
2688        dst.gtFP = gtFP == null ? null : gtFP.copy();
2689        dst.precision = precision == null ? null : precision.copy();
2690        dst.recall = recall == null ? null : recall.copy();
2691        dst.fScore = fScore == null ? null : fScore.copy();
2692        return dst;
2693      }
2694
2695      @Override
2696      public boolean equalsDeep(Base other_) {
2697        if (!super.equalsDeep(other_))
2698          return false;
2699        if (!(other_ instanceof SequenceQualityComponent))
2700          return false;
2701        SequenceQualityComponent o = (SequenceQualityComponent) other_;
2702        return compareDeep(type, o.type, true) && compareDeep(standardSequence, o.standardSequence, true)
2703           && compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(score, o.score, true)
2704           && compareDeep(method, o.method, true) && compareDeep(truthTP, o.truthTP, true) && compareDeep(queryTP, o.queryTP, true)
2705           && compareDeep(truthFN, o.truthFN, true) && compareDeep(queryFP, o.queryFP, true) && compareDeep(gtFP, o.gtFP, true)
2706           && compareDeep(precision, o.precision, true) && compareDeep(recall, o.recall, true) && compareDeep(fScore, o.fScore, true)
2707          ;
2708      }
2709
2710      @Override
2711      public boolean equalsShallow(Base other_) {
2712        if (!super.equalsShallow(other_))
2713          return false;
2714        if (!(other_ instanceof SequenceQualityComponent))
2715          return false;
2716        SequenceQualityComponent o = (SequenceQualityComponent) other_;
2717        return compareValues(type, o.type, true) && compareValues(start, o.start, true) && compareValues(end, o.end, true)
2718           && compareValues(truthTP, o.truthTP, true) && compareValues(queryTP, o.queryTP, true) && compareValues(truthFN, o.truthFN, true)
2719           && compareValues(queryFP, o.queryFP, true) && compareValues(gtFP, o.gtFP, true) && compareValues(precision, o.precision, true)
2720           && compareValues(recall, o.recall, true) && compareValues(fScore, o.fScore, true);
2721      }
2722
2723      public boolean isEmpty() {
2724        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, standardSequence, start
2725          , end, score, method, truthTP, queryTP, truthFN, queryFP, gtFP, precision
2726          , recall, fScore);
2727      }
2728
2729  public String fhirType() {
2730    return "Sequence.quality";
2731
2732  }
2733
2734  }
2735
2736    @Block()
2737    public static class SequenceRepositoryComponent extends BackboneElement implements IBaseBackboneElement {
2738        /**
2739         * Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.
2740         */
2741        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
2742        @Description(shortDefinition="directlink | openapi | login | oauth | other", formalDefinition="Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource." )
2743        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/repository-type")
2744        protected Enumeration<RepositoryType> type;
2745
2746        /**
2747         * URI of an external repository which contains further details about the genetics data.
2748         */
2749        @Child(name = "url", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true)
2750        @Description(shortDefinition="URI of the repository", formalDefinition="URI of an external repository which contains further details about the genetics data." )
2751        protected UriType url;
2752
2753        /**
2754         * URI of an external repository which contains further details about the genetics data.
2755         */
2756        @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
2757        @Description(shortDefinition="Repository's name", formalDefinition="URI of an external repository which contains further details about the genetics data." )
2758        protected StringType name;
2759
2760        /**
2761         * Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.
2762         */
2763        @Child(name = "datasetId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
2764        @Description(shortDefinition="Id of the dataset that used to call for dataset in repository", formalDefinition="Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository." )
2765        protected StringType datasetId;
2766
2767        /**
2768         * Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.
2769         */
2770        @Child(name = "variantsetId", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
2771        @Description(shortDefinition="Id of the variantset that used to call for variantset in repository", formalDefinition="Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository." )
2772        protected StringType variantsetId;
2773
2774        /**
2775         * Id of the read in this external repository.
2776         */
2777        @Child(name = "readsetId", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true)
2778        @Description(shortDefinition="Id of the read", formalDefinition="Id of the read in this external repository." )
2779        protected StringType readsetId;
2780
2781        private static final long serialVersionUID = -899243265L;
2782
2783    /**
2784     * Constructor
2785     */
2786      public SequenceRepositoryComponent() {
2787        super();
2788      }
2789
2790    /**
2791     * Constructor
2792     */
2793      public SequenceRepositoryComponent(Enumeration<RepositoryType> type) {
2794        super();
2795        this.type = type;
2796      }
2797
2798        /**
2799         * @return {@link #type} (Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2800         */
2801        public Enumeration<RepositoryType> getTypeElement() { 
2802          if (this.type == null)
2803            if (Configuration.errorOnAutoCreate())
2804              throw new Error("Attempt to auto-create SequenceRepositoryComponent.type");
2805            else if (Configuration.doAutoCreate())
2806              this.type = new Enumeration<RepositoryType>(new RepositoryTypeEnumFactory()); // bb
2807          return this.type;
2808        }
2809
2810        public boolean hasTypeElement() { 
2811          return this.type != null && !this.type.isEmpty();
2812        }
2813
2814        public boolean hasType() { 
2815          return this.type != null && !this.type.isEmpty();
2816        }
2817
2818        /**
2819         * @param value {@link #type} (Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2820         */
2821        public SequenceRepositoryComponent setTypeElement(Enumeration<RepositoryType> value) { 
2822          this.type = value;
2823          return this;
2824        }
2825
2826        /**
2827         * @return Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.
2828         */
2829        public RepositoryType getType() { 
2830          return this.type == null ? null : this.type.getValue();
2831        }
2832
2833        /**
2834         * @param value Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.
2835         */
2836        public SequenceRepositoryComponent setType(RepositoryType value) { 
2837            if (this.type == null)
2838              this.type = new Enumeration<RepositoryType>(new RepositoryTypeEnumFactory());
2839            this.type.setValue(value);
2840          return this;
2841        }
2842
2843        /**
2844         * @return {@link #url} (URI of an external repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2845         */
2846        public UriType getUrlElement() { 
2847          if (this.url == null)
2848            if (Configuration.errorOnAutoCreate())
2849              throw new Error("Attempt to auto-create SequenceRepositoryComponent.url");
2850            else if (Configuration.doAutoCreate())
2851              this.url = new UriType(); // bb
2852          return this.url;
2853        }
2854
2855        public boolean hasUrlElement() { 
2856          return this.url != null && !this.url.isEmpty();
2857        }
2858
2859        public boolean hasUrl() { 
2860          return this.url != null && !this.url.isEmpty();
2861        }
2862
2863        /**
2864         * @param value {@link #url} (URI of an external repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2865         */
2866        public SequenceRepositoryComponent setUrlElement(UriType value) { 
2867          this.url = value;
2868          return this;
2869        }
2870
2871        /**
2872         * @return URI of an external repository which contains further details about the genetics data.
2873         */
2874        public String getUrl() { 
2875          return this.url == null ? null : this.url.getValue();
2876        }
2877
2878        /**
2879         * @param value URI of an external repository which contains further details about the genetics data.
2880         */
2881        public SequenceRepositoryComponent setUrl(String value) { 
2882          if (Utilities.noString(value))
2883            this.url = null;
2884          else {
2885            if (this.url == null)
2886              this.url = new UriType();
2887            this.url.setValue(value);
2888          }
2889          return this;
2890        }
2891
2892        /**
2893         * @return {@link #name} (URI of an external repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2894         */
2895        public StringType getNameElement() { 
2896          if (this.name == null)
2897            if (Configuration.errorOnAutoCreate())
2898              throw new Error("Attempt to auto-create SequenceRepositoryComponent.name");
2899            else if (Configuration.doAutoCreate())
2900              this.name = new StringType(); // bb
2901          return this.name;
2902        }
2903
2904        public boolean hasNameElement() { 
2905          return this.name != null && !this.name.isEmpty();
2906        }
2907
2908        public boolean hasName() { 
2909          return this.name != null && !this.name.isEmpty();
2910        }
2911
2912        /**
2913         * @param value {@link #name} (URI of an external repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2914         */
2915        public SequenceRepositoryComponent setNameElement(StringType value) { 
2916          this.name = value;
2917          return this;
2918        }
2919
2920        /**
2921         * @return URI of an external repository which contains further details about the genetics data.
2922         */
2923        public String getName() { 
2924          return this.name == null ? null : this.name.getValue();
2925        }
2926
2927        /**
2928         * @param value URI of an external repository which contains further details about the genetics data.
2929         */
2930        public SequenceRepositoryComponent setName(String value) { 
2931          if (Utilities.noString(value))
2932            this.name = null;
2933          else {
2934            if (this.name == null)
2935              this.name = new StringType();
2936            this.name.setValue(value);
2937          }
2938          return this;
2939        }
2940
2941        /**
2942         * @return {@link #datasetId} (Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.). This is the underlying object with id, value and extensions. The accessor "getDatasetId" gives direct access to the value
2943         */
2944        public StringType getDatasetIdElement() { 
2945          if (this.datasetId == null)
2946            if (Configuration.errorOnAutoCreate())
2947              throw new Error("Attempt to auto-create SequenceRepositoryComponent.datasetId");
2948            else if (Configuration.doAutoCreate())
2949              this.datasetId = new StringType(); // bb
2950          return this.datasetId;
2951        }
2952
2953        public boolean hasDatasetIdElement() { 
2954          return this.datasetId != null && !this.datasetId.isEmpty();
2955        }
2956
2957        public boolean hasDatasetId() { 
2958          return this.datasetId != null && !this.datasetId.isEmpty();
2959        }
2960
2961        /**
2962         * @param value {@link #datasetId} (Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.). This is the underlying object with id, value and extensions. The accessor "getDatasetId" gives direct access to the value
2963         */
2964        public SequenceRepositoryComponent setDatasetIdElement(StringType value) { 
2965          this.datasetId = value;
2966          return this;
2967        }
2968
2969        /**
2970         * @return Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.
2971         */
2972        public String getDatasetId() { 
2973          return this.datasetId == null ? null : this.datasetId.getValue();
2974        }
2975
2976        /**
2977         * @param value Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.
2978         */
2979        public SequenceRepositoryComponent setDatasetId(String value) { 
2980          if (Utilities.noString(value))
2981            this.datasetId = null;
2982          else {
2983            if (this.datasetId == null)
2984              this.datasetId = new StringType();
2985            this.datasetId.setValue(value);
2986          }
2987          return this;
2988        }
2989
2990        /**
2991         * @return {@link #variantsetId} (Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.). This is the underlying object with id, value and extensions. The accessor "getVariantsetId" gives direct access to the value
2992         */
2993        public StringType getVariantsetIdElement() { 
2994          if (this.variantsetId == null)
2995            if (Configuration.errorOnAutoCreate())
2996              throw new Error("Attempt to auto-create SequenceRepositoryComponent.variantsetId");
2997            else if (Configuration.doAutoCreate())
2998              this.variantsetId = new StringType(); // bb
2999          return this.variantsetId;
3000        }
3001
3002        public boolean hasVariantsetIdElement() { 
3003          return this.variantsetId != null && !this.variantsetId.isEmpty();
3004        }
3005
3006        public boolean hasVariantsetId() { 
3007          return this.variantsetId != null && !this.variantsetId.isEmpty();
3008        }
3009
3010        /**
3011         * @param value {@link #variantsetId} (Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.). This is the underlying object with id, value and extensions. The accessor "getVariantsetId" gives direct access to the value
3012         */
3013        public SequenceRepositoryComponent setVariantsetIdElement(StringType value) { 
3014          this.variantsetId = value;
3015          return this;
3016        }
3017
3018        /**
3019         * @return Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.
3020         */
3021        public String getVariantsetId() { 
3022          return this.variantsetId == null ? null : this.variantsetId.getValue();
3023        }
3024
3025        /**
3026         * @param value Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.
3027         */
3028        public SequenceRepositoryComponent setVariantsetId(String value) { 
3029          if (Utilities.noString(value))
3030            this.variantsetId = null;
3031          else {
3032            if (this.variantsetId == null)
3033              this.variantsetId = new StringType();
3034            this.variantsetId.setValue(value);
3035          }
3036          return this;
3037        }
3038
3039        /**
3040         * @return {@link #readsetId} (Id of the read in this external repository.). This is the underlying object with id, value and extensions. The accessor "getReadsetId" gives direct access to the value
3041         */
3042        public StringType getReadsetIdElement() { 
3043          if (this.readsetId == null)
3044            if (Configuration.errorOnAutoCreate())
3045              throw new Error("Attempt to auto-create SequenceRepositoryComponent.readsetId");
3046            else if (Configuration.doAutoCreate())
3047              this.readsetId = new StringType(); // bb
3048          return this.readsetId;
3049        }
3050
3051        public boolean hasReadsetIdElement() { 
3052          return this.readsetId != null && !this.readsetId.isEmpty();
3053        }
3054
3055        public boolean hasReadsetId() { 
3056          return this.readsetId != null && !this.readsetId.isEmpty();
3057        }
3058
3059        /**
3060         * @param value {@link #readsetId} (Id of the read in this external repository.). This is the underlying object with id, value and extensions. The accessor "getReadsetId" gives direct access to the value
3061         */
3062        public SequenceRepositoryComponent setReadsetIdElement(StringType value) { 
3063          this.readsetId = value;
3064          return this;
3065        }
3066
3067        /**
3068         * @return Id of the read in this external repository.
3069         */
3070        public String getReadsetId() { 
3071          return this.readsetId == null ? null : this.readsetId.getValue();
3072        }
3073
3074        /**
3075         * @param value Id of the read in this external repository.
3076         */
3077        public SequenceRepositoryComponent setReadsetId(String value) { 
3078          if (Utilities.noString(value))
3079            this.readsetId = null;
3080          else {
3081            if (this.readsetId == null)
3082              this.readsetId = new StringType();
3083            this.readsetId.setValue(value);
3084          }
3085          return this;
3086        }
3087
3088        protected void listChildren(List<Property> children) {
3089          super.listChildren(children);
3090          children.add(new Property("type", "code", "Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.", 0, 1, type));
3091          children.add(new Property("url", "uri", "URI of an external repository which contains further details about the genetics data.", 0, 1, url));
3092          children.add(new Property("name", "string", "URI of an external repository which contains further details about the genetics data.", 0, 1, name));
3093          children.add(new Property("datasetId", "string", "Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.", 0, 1, datasetId));
3094          children.add(new Property("variantsetId", "string", "Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.", 0, 1, variantsetId));
3095          children.add(new Property("readsetId", "string", "Id of the read in this external repository.", 0, 1, readsetId));
3096        }
3097
3098        @Override
3099        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3100          switch (_hash) {
3101          case 3575610: /*type*/  return new Property("type", "code", "Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.", 0, 1, type);
3102          case 116079: /*url*/  return new Property("url", "uri", "URI of an external repository which contains further details about the genetics data.", 0, 1, url);
3103          case 3373707: /*name*/  return new Property("name", "string", "URI of an external repository which contains further details about the genetics data.", 0, 1, name);
3104          case -345342029: /*datasetId*/  return new Property("datasetId", "string", "Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.", 0, 1, datasetId);
3105          case 1929752504: /*variantsetId*/  return new Property("variantsetId", "string", "Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.", 0, 1, variantsetId);
3106          case -1095407289: /*readsetId*/  return new Property("readsetId", "string", "Id of the read in this external repository.", 0, 1, readsetId);
3107          default: return super.getNamedProperty(_hash, _name, _checkValid);
3108          }
3109
3110        }
3111
3112      @Override
3113      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3114        switch (hash) {
3115        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<RepositoryType>
3116        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
3117        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3118        case -345342029: /*datasetId*/ return this.datasetId == null ? new Base[0] : new Base[] {this.datasetId}; // StringType
3119        case 1929752504: /*variantsetId*/ return this.variantsetId == null ? new Base[0] : new Base[] {this.variantsetId}; // StringType
3120        case -1095407289: /*readsetId*/ return this.readsetId == null ? new Base[0] : new Base[] {this.readsetId}; // StringType
3121        default: return super.getProperty(hash, name, checkValid);
3122        }
3123
3124      }
3125
3126      @Override
3127      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3128        switch (hash) {
3129        case 3575610: // type
3130          value = new RepositoryTypeEnumFactory().fromType(castToCode(value));
3131          this.type = (Enumeration) value; // Enumeration<RepositoryType>
3132          return value;
3133        case 116079: // url
3134          this.url = castToUri(value); // UriType
3135          return value;
3136        case 3373707: // name
3137          this.name = castToString(value); // StringType
3138          return value;
3139        case -345342029: // datasetId
3140          this.datasetId = castToString(value); // StringType
3141          return value;
3142        case 1929752504: // variantsetId
3143          this.variantsetId = castToString(value); // StringType
3144          return value;
3145        case -1095407289: // readsetId
3146          this.readsetId = castToString(value); // StringType
3147          return value;
3148        default: return super.setProperty(hash, name, value);
3149        }
3150
3151      }
3152
3153      @Override
3154      public Base setProperty(String name, Base value) throws FHIRException {
3155        if (name.equals("type")) {
3156          value = new RepositoryTypeEnumFactory().fromType(castToCode(value));
3157          this.type = (Enumeration) value; // Enumeration<RepositoryType>
3158        } else if (name.equals("url")) {
3159          this.url = castToUri(value); // UriType
3160        } else if (name.equals("name")) {
3161          this.name = castToString(value); // StringType
3162        } else if (name.equals("datasetId")) {
3163          this.datasetId = castToString(value); // StringType
3164        } else if (name.equals("variantsetId")) {
3165          this.variantsetId = castToString(value); // StringType
3166        } else if (name.equals("readsetId")) {
3167          this.readsetId = castToString(value); // StringType
3168        } else
3169          return super.setProperty(name, value);
3170        return value;
3171      }
3172
3173      @Override
3174      public Base makeProperty(int hash, String name) throws FHIRException {
3175        switch (hash) {
3176        case 3575610:  return getTypeElement();
3177        case 116079:  return getUrlElement();
3178        case 3373707:  return getNameElement();
3179        case -345342029:  return getDatasetIdElement();
3180        case 1929752504:  return getVariantsetIdElement();
3181        case -1095407289:  return getReadsetIdElement();
3182        default: return super.makeProperty(hash, name);
3183        }
3184
3185      }
3186
3187      @Override
3188      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3189        switch (hash) {
3190        case 3575610: /*type*/ return new String[] {"code"};
3191        case 116079: /*url*/ return new String[] {"uri"};
3192        case 3373707: /*name*/ return new String[] {"string"};
3193        case -345342029: /*datasetId*/ return new String[] {"string"};
3194        case 1929752504: /*variantsetId*/ return new String[] {"string"};
3195        case -1095407289: /*readsetId*/ return new String[] {"string"};
3196        default: return super.getTypesForProperty(hash, name);
3197        }
3198
3199      }
3200
3201      @Override
3202      public Base addChild(String name) throws FHIRException {
3203        if (name.equals("type")) {
3204          throw new FHIRException("Cannot call addChild on a primitive type Sequence.type");
3205        }
3206        else if (name.equals("url")) {
3207          throw new FHIRException("Cannot call addChild on a primitive type Sequence.url");
3208        }
3209        else if (name.equals("name")) {
3210          throw new FHIRException("Cannot call addChild on a primitive type Sequence.name");
3211        }
3212        else if (name.equals("datasetId")) {
3213          throw new FHIRException("Cannot call addChild on a primitive type Sequence.datasetId");
3214        }
3215        else if (name.equals("variantsetId")) {
3216          throw new FHIRException("Cannot call addChild on a primitive type Sequence.variantsetId");
3217        }
3218        else if (name.equals("readsetId")) {
3219          throw new FHIRException("Cannot call addChild on a primitive type Sequence.readsetId");
3220        }
3221        else
3222          return super.addChild(name);
3223      }
3224
3225      public SequenceRepositoryComponent copy() {
3226        SequenceRepositoryComponent dst = new SequenceRepositoryComponent();
3227        copyValues(dst);
3228        dst.type = type == null ? null : type.copy();
3229        dst.url = url == null ? null : url.copy();
3230        dst.name = name == null ? null : name.copy();
3231        dst.datasetId = datasetId == null ? null : datasetId.copy();
3232        dst.variantsetId = variantsetId == null ? null : variantsetId.copy();
3233        dst.readsetId = readsetId == null ? null : readsetId.copy();
3234        return dst;
3235      }
3236
3237      @Override
3238      public boolean equalsDeep(Base other_) {
3239        if (!super.equalsDeep(other_))
3240          return false;
3241        if (!(other_ instanceof SequenceRepositoryComponent))
3242          return false;
3243        SequenceRepositoryComponent o = (SequenceRepositoryComponent) other_;
3244        return compareDeep(type, o.type, true) && compareDeep(url, o.url, true) && compareDeep(name, o.name, true)
3245           && compareDeep(datasetId, o.datasetId, true) && compareDeep(variantsetId, o.variantsetId, true)
3246           && compareDeep(readsetId, o.readsetId, true);
3247      }
3248
3249      @Override
3250      public boolean equalsShallow(Base other_) {
3251        if (!super.equalsShallow(other_))
3252          return false;
3253        if (!(other_ instanceof SequenceRepositoryComponent))
3254          return false;
3255        SequenceRepositoryComponent o = (SequenceRepositoryComponent) other_;
3256        return compareValues(type, o.type, true) && compareValues(url, o.url, true) && compareValues(name, o.name, true)
3257           && compareValues(datasetId, o.datasetId, true) && compareValues(variantsetId, o.variantsetId, true)
3258           && compareValues(readsetId, o.readsetId, true);
3259      }
3260
3261      public boolean isEmpty() {
3262        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, url, name, datasetId
3263          , variantsetId, readsetId);
3264      }
3265
3266  public String fhirType() {
3267    return "Sequence.repository";
3268
3269  }
3270
3271  }
3272
3273    /**
3274     * A unique identifier for this particular sequence instance. This is a FHIR-defined id.
3275     */
3276    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3277    @Description(shortDefinition="Unique ID for this particular sequence. This is a FHIR-defined id", formalDefinition="A unique identifier for this particular sequence instance. This is a FHIR-defined id." )
3278    protected List<Identifier> identifier;
3279
3280    /**
3281     * Amino Acid Sequence/ DNA Sequence / RNA Sequence.
3282     */
3283    @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=true)
3284    @Description(shortDefinition="aa | dna | rna", formalDefinition="Amino Acid Sequence/ DNA Sequence / RNA Sequence." )
3285    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/sequence-type")
3286    protected Enumeration<SequenceType> type;
3287
3288    /**
3289     * Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).
3290     */
3291    @Child(name = "coordinateSystem", type = {IntegerType.class}, order=2, min=1, max=1, modifier=false, summary=true)
3292    @Description(shortDefinition="Base number of coordinate system (0 for 0-based numbering or coordinates, inclusive start, exclusive end, 1 for 1-based numbering, inclusive start, inclusive end)", formalDefinition="Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end)." )
3293    protected IntegerType coordinateSystem;
3294
3295    /**
3296     * The patient whose sequencing results are described by this resource.
3297     */
3298    @Child(name = "patient", type = {Patient.class}, order=3, min=0, max=1, modifier=false, summary=true)
3299    @Description(shortDefinition="Who and/or what this is about", formalDefinition="The patient whose sequencing results are described by this resource." )
3300    protected Reference patient;
3301
3302    /**
3303     * The actual object that is the target of the reference (The patient whose sequencing results are described by this resource.)
3304     */
3305    protected Patient patientTarget;
3306
3307    /**
3308     * Specimen used for sequencing.
3309     */
3310    @Child(name = "specimen", type = {Specimen.class}, order=4, min=0, max=1, modifier=false, summary=true)
3311    @Description(shortDefinition="Specimen used for sequencing", formalDefinition="Specimen used for sequencing." )
3312    protected Reference specimen;
3313
3314    /**
3315     * The actual object that is the target of the reference (Specimen used for sequencing.)
3316     */
3317    protected Specimen specimenTarget;
3318
3319    /**
3320     * The method for sequencing, for example, chip information.
3321     */
3322    @Child(name = "device", type = {Device.class}, order=5, min=0, max=1, modifier=false, summary=true)
3323    @Description(shortDefinition="The method for sequencing", formalDefinition="The method for sequencing, for example, chip information." )
3324    protected Reference device;
3325
3326    /**
3327     * The actual object that is the target of the reference (The method for sequencing, for example, chip information.)
3328     */
3329    protected Device deviceTarget;
3330
3331    /**
3332     * The organization or lab that should be responsible for this result.
3333     */
3334    @Child(name = "performer", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true)
3335    @Description(shortDefinition="Who should be responsible for test result", formalDefinition="The organization or lab that should be responsible for this result." )
3336    protected Reference performer;
3337
3338    /**
3339     * The actual object that is the target of the reference (The organization or lab that should be responsible for this result.)
3340     */
3341    protected Organization performerTarget;
3342
3343    /**
3344     * The number of copies of the seqeunce of interest. (RNASeq).
3345     */
3346    @Child(name = "quantity", type = {Quantity.class}, order=7, min=0, max=1, modifier=false, summary=true)
3347    @Description(shortDefinition="The number of copies of the seqeunce of interest.  (RNASeq)", formalDefinition="The number of copies of the seqeunce of interest. (RNASeq)." )
3348    protected Quantity quantity;
3349
3350    /**
3351     * A sequence that is used as a reference to describe variants that are present in a sequence analyzed.
3352     */
3353    @Child(name = "referenceSeq", type = {}, order=8, min=0, max=1, modifier=false, summary=true)
3354    @Description(shortDefinition="A sequence used as reference", formalDefinition="A sequence that is used as a reference to describe variants that are present in a sequence analyzed." )
3355    protected SequenceReferenceSeqComponent referenceSeq;
3356
3357    /**
3358     * The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.)  It can represent some complex mutation or segment variation with the assist of CIGAR string.
3359     */
3360    @Child(name = "variant", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3361    @Description(shortDefinition="Variant in sequence", formalDefinition="The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.)  It can represent some complex mutation or segment variation with the assist of CIGAR string." )
3362    protected List<SequenceVariantComponent> variant;
3363
3364    /**
3365     * Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.
3366     */
3367    @Child(name = "observedSeq", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=true)
3368    @Description(shortDefinition="Sequence that was observed", formalDefinition="Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd." )
3369    protected StringType observedSeq;
3370
3371    /**
3372     * An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).
3373     */
3374    @Child(name = "quality", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3375    @Description(shortDefinition="An set of value as quality of sequence", formalDefinition="An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686))." )
3376    protected List<SequenceQualityComponent> quality;
3377
3378    /**
3379     * Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.
3380     */
3381    @Child(name = "readCoverage", type = {IntegerType.class}, order=12, min=0, max=1, modifier=false, summary=true)
3382    @Description(shortDefinition="Average number of reads representing a given nucleotide in the reconstructed sequence", formalDefinition="Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence." )
3383    protected IntegerType readCoverage;
3384
3385    /**
3386     * Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.
3387     */
3388    @Child(name = "repository", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3389    @Description(shortDefinition="External repository which contains detailed report related with observedSeq in this resource", formalDefinition="Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq." )
3390    protected List<SequenceRepositoryComponent> repository;
3391
3392    /**
3393     * Pointer to next atomic sequence which at most contains one variant.
3394     */
3395    @Child(name = "pointer", type = {Sequence.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3396    @Description(shortDefinition="Pointer to next atomic sequence", formalDefinition="Pointer to next atomic sequence which at most contains one variant." )
3397    protected List<Reference> pointer;
3398    /**
3399     * The actual objects that are the target of the reference (Pointer to next atomic sequence which at most contains one variant.)
3400     */
3401    protected List<Sequence> pointerTarget;
3402
3403
3404    private static final long serialVersionUID = -2101352712L;
3405
3406  /**
3407   * Constructor
3408   */
3409    public Sequence() {
3410      super();
3411    }
3412
3413  /**
3414   * Constructor
3415   */
3416    public Sequence(IntegerType coordinateSystem) {
3417      super();
3418      this.coordinateSystem = coordinateSystem;
3419    }
3420
3421    /**
3422     * @return {@link #identifier} (A unique identifier for this particular sequence instance. This is a FHIR-defined id.)
3423     */
3424    public List<Identifier> getIdentifier() { 
3425      if (this.identifier == null)
3426        this.identifier = new ArrayList<Identifier>();
3427      return this.identifier;
3428    }
3429
3430    /**
3431     * @return Returns a reference to <code>this</code> for easy method chaining
3432     */
3433    public Sequence setIdentifier(List<Identifier> theIdentifier) { 
3434      this.identifier = theIdentifier;
3435      return this;
3436    }
3437
3438    public boolean hasIdentifier() { 
3439      if (this.identifier == null)
3440        return false;
3441      for (Identifier item : this.identifier)
3442        if (!item.isEmpty())
3443          return true;
3444      return false;
3445    }
3446
3447    public Identifier addIdentifier() { //3
3448      Identifier t = new Identifier();
3449      if (this.identifier == null)
3450        this.identifier = new ArrayList<Identifier>();
3451      this.identifier.add(t);
3452      return t;
3453    }
3454
3455    public Sequence addIdentifier(Identifier t) { //3
3456      if (t == null)
3457        return this;
3458      if (this.identifier == null)
3459        this.identifier = new ArrayList<Identifier>();
3460      this.identifier.add(t);
3461      return this;
3462    }
3463
3464    /**
3465     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
3466     */
3467    public Identifier getIdentifierFirstRep() { 
3468      if (getIdentifier().isEmpty()) {
3469        addIdentifier();
3470      }
3471      return getIdentifier().get(0);
3472    }
3473
3474    /**
3475     * @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
3476     */
3477    public Enumeration<SequenceType> getTypeElement() { 
3478      if (this.type == null)
3479        if (Configuration.errorOnAutoCreate())
3480          throw new Error("Attempt to auto-create Sequence.type");
3481        else if (Configuration.doAutoCreate())
3482          this.type = new Enumeration<SequenceType>(new SequenceTypeEnumFactory()); // bb
3483      return this.type;
3484    }
3485
3486    public boolean hasTypeElement() { 
3487      return this.type != null && !this.type.isEmpty();
3488    }
3489
3490    public boolean hasType() { 
3491      return this.type != null && !this.type.isEmpty();
3492    }
3493
3494    /**
3495     * @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
3496     */
3497    public Sequence setTypeElement(Enumeration<SequenceType> value) { 
3498      this.type = value;
3499      return this;
3500    }
3501
3502    /**
3503     * @return Amino Acid Sequence/ DNA Sequence / RNA Sequence.
3504     */
3505    public SequenceType getType() { 
3506      return this.type == null ? null : this.type.getValue();
3507    }
3508
3509    /**
3510     * @param value Amino Acid Sequence/ DNA Sequence / RNA Sequence.
3511     */
3512    public Sequence setType(SequenceType value) { 
3513      if (value == null)
3514        this.type = null;
3515      else {
3516        if (this.type == null)
3517          this.type = new Enumeration<SequenceType>(new SequenceTypeEnumFactory());
3518        this.type.setValue(value);
3519      }
3520      return this;
3521    }
3522
3523    /**
3524     * @return {@link #coordinateSystem} (Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).). This is the underlying object with id, value and extensions. The accessor "getCoordinateSystem" gives direct access to the value
3525     */
3526    public IntegerType getCoordinateSystemElement() { 
3527      if (this.coordinateSystem == null)
3528        if (Configuration.errorOnAutoCreate())
3529          throw new Error("Attempt to auto-create Sequence.coordinateSystem");
3530        else if (Configuration.doAutoCreate())
3531          this.coordinateSystem = new IntegerType(); // bb
3532      return this.coordinateSystem;
3533    }
3534
3535    public boolean hasCoordinateSystemElement() { 
3536      return this.coordinateSystem != null && !this.coordinateSystem.isEmpty();
3537    }
3538
3539    public boolean hasCoordinateSystem() { 
3540      return this.coordinateSystem != null && !this.coordinateSystem.isEmpty();
3541    }
3542
3543    /**
3544     * @param value {@link #coordinateSystem} (Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).). This is the underlying object with id, value and extensions. The accessor "getCoordinateSystem" gives direct access to the value
3545     */
3546    public Sequence setCoordinateSystemElement(IntegerType value) { 
3547      this.coordinateSystem = value;
3548      return this;
3549    }
3550
3551    /**
3552     * @return Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).
3553     */
3554    public int getCoordinateSystem() { 
3555      return this.coordinateSystem == null || this.coordinateSystem.isEmpty() ? 0 : this.coordinateSystem.getValue();
3556    }
3557
3558    /**
3559     * @param value Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).
3560     */
3561    public Sequence setCoordinateSystem(int value) { 
3562        if (this.coordinateSystem == null)
3563          this.coordinateSystem = new IntegerType();
3564        this.coordinateSystem.setValue(value);
3565      return this;
3566    }
3567
3568    /**
3569     * @return {@link #patient} (The patient whose sequencing results are described by this resource.)
3570     */
3571    public Reference getPatient() { 
3572      if (this.patient == null)
3573        if (Configuration.errorOnAutoCreate())
3574          throw new Error("Attempt to auto-create Sequence.patient");
3575        else if (Configuration.doAutoCreate())
3576          this.patient = new Reference(); // cc
3577      return this.patient;
3578    }
3579
3580    public boolean hasPatient() { 
3581      return this.patient != null && !this.patient.isEmpty();
3582    }
3583
3584    /**
3585     * @param value {@link #patient} (The patient whose sequencing results are described by this resource.)
3586     */
3587    public Sequence setPatient(Reference value)  { 
3588      this.patient = value;
3589      return this;
3590    }
3591
3592    /**
3593     * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient whose sequencing results are described by this resource.)
3594     */
3595    public Patient getPatientTarget() { 
3596      if (this.patientTarget == null)
3597        if (Configuration.errorOnAutoCreate())
3598          throw new Error("Attempt to auto-create Sequence.patient");
3599        else if (Configuration.doAutoCreate())
3600          this.patientTarget = new Patient(); // aa
3601      return this.patientTarget;
3602    }
3603
3604    /**
3605     * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient whose sequencing results are described by this resource.)
3606     */
3607    public Sequence setPatientTarget(Patient value) { 
3608      this.patientTarget = value;
3609      return this;
3610    }
3611
3612    /**
3613     * @return {@link #specimen} (Specimen used for sequencing.)
3614     */
3615    public Reference getSpecimen() { 
3616      if (this.specimen == null)
3617        if (Configuration.errorOnAutoCreate())
3618          throw new Error("Attempt to auto-create Sequence.specimen");
3619        else if (Configuration.doAutoCreate())
3620          this.specimen = new Reference(); // cc
3621      return this.specimen;
3622    }
3623
3624    public boolean hasSpecimen() { 
3625      return this.specimen != null && !this.specimen.isEmpty();
3626    }
3627
3628    /**
3629     * @param value {@link #specimen} (Specimen used for sequencing.)
3630     */
3631    public Sequence setSpecimen(Reference value)  { 
3632      this.specimen = value;
3633      return this;
3634    }
3635
3636    /**
3637     * @return {@link #specimen} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Specimen used for sequencing.)
3638     */
3639    public Specimen getSpecimenTarget() { 
3640      if (this.specimenTarget == null)
3641        if (Configuration.errorOnAutoCreate())
3642          throw new Error("Attempt to auto-create Sequence.specimen");
3643        else if (Configuration.doAutoCreate())
3644          this.specimenTarget = new Specimen(); // aa
3645      return this.specimenTarget;
3646    }
3647
3648    /**
3649     * @param value {@link #specimen} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Specimen used for sequencing.)
3650     */
3651    public Sequence setSpecimenTarget(Specimen value) { 
3652      this.specimenTarget = value;
3653      return this;
3654    }
3655
3656    /**
3657     * @return {@link #device} (The method for sequencing, for example, chip information.)
3658     */
3659    public Reference getDevice() { 
3660      if (this.device == null)
3661        if (Configuration.errorOnAutoCreate())
3662          throw new Error("Attempt to auto-create Sequence.device");
3663        else if (Configuration.doAutoCreate())
3664          this.device = new Reference(); // cc
3665      return this.device;
3666    }
3667
3668    public boolean hasDevice() { 
3669      return this.device != null && !this.device.isEmpty();
3670    }
3671
3672    /**
3673     * @param value {@link #device} (The method for sequencing, for example, chip information.)
3674     */
3675    public Sequence setDevice(Reference value)  { 
3676      this.device = value;
3677      return this;
3678    }
3679
3680    /**
3681     * @return {@link #device} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The method for sequencing, for example, chip information.)
3682     */
3683    public Device getDeviceTarget() { 
3684      if (this.deviceTarget == null)
3685        if (Configuration.errorOnAutoCreate())
3686          throw new Error("Attempt to auto-create Sequence.device");
3687        else if (Configuration.doAutoCreate())
3688          this.deviceTarget = new Device(); // aa
3689      return this.deviceTarget;
3690    }
3691
3692    /**
3693     * @param value {@link #device} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The method for sequencing, for example, chip information.)
3694     */
3695    public Sequence setDeviceTarget(Device value) { 
3696      this.deviceTarget = value;
3697      return this;
3698    }
3699
3700    /**
3701     * @return {@link #performer} (The organization or lab that should be responsible for this result.)
3702     */
3703    public Reference getPerformer() { 
3704      if (this.performer == null)
3705        if (Configuration.errorOnAutoCreate())
3706          throw new Error("Attempt to auto-create Sequence.performer");
3707        else if (Configuration.doAutoCreate())
3708          this.performer = new Reference(); // cc
3709      return this.performer;
3710    }
3711
3712    public boolean hasPerformer() { 
3713      return this.performer != null && !this.performer.isEmpty();
3714    }
3715
3716    /**
3717     * @param value {@link #performer} (The organization or lab that should be responsible for this result.)
3718     */
3719    public Sequence setPerformer(Reference value)  { 
3720      this.performer = value;
3721      return this;
3722    }
3723
3724    /**
3725     * @return {@link #performer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization or lab that should be responsible for this result.)
3726     */
3727    public Organization getPerformerTarget() { 
3728      if (this.performerTarget == null)
3729        if (Configuration.errorOnAutoCreate())
3730          throw new Error("Attempt to auto-create Sequence.performer");
3731        else if (Configuration.doAutoCreate())
3732          this.performerTarget = new Organization(); // aa
3733      return this.performerTarget;
3734    }
3735
3736    /**
3737     * @param value {@link #performer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization or lab that should be responsible for this result.)
3738     */
3739    public Sequence setPerformerTarget(Organization value) { 
3740      this.performerTarget = value;
3741      return this;
3742    }
3743
3744    /**
3745     * @return {@link #quantity} (The number of copies of the seqeunce of interest. (RNASeq).)
3746     */
3747    public Quantity getQuantity() { 
3748      if (this.quantity == null)
3749        if (Configuration.errorOnAutoCreate())
3750          throw new Error("Attempt to auto-create Sequence.quantity");
3751        else if (Configuration.doAutoCreate())
3752          this.quantity = new Quantity(); // cc
3753      return this.quantity;
3754    }
3755
3756    public boolean hasQuantity() { 
3757      return this.quantity != null && !this.quantity.isEmpty();
3758    }
3759
3760    /**
3761     * @param value {@link #quantity} (The number of copies of the seqeunce of interest. (RNASeq).)
3762     */
3763    public Sequence setQuantity(Quantity value)  { 
3764      this.quantity = value;
3765      return this;
3766    }
3767
3768    /**
3769     * @return {@link #referenceSeq} (A sequence that is used as a reference to describe variants that are present in a sequence analyzed.)
3770     */
3771    public SequenceReferenceSeqComponent getReferenceSeq() { 
3772      if (this.referenceSeq == null)
3773        if (Configuration.errorOnAutoCreate())
3774          throw new Error("Attempt to auto-create Sequence.referenceSeq");
3775        else if (Configuration.doAutoCreate())
3776          this.referenceSeq = new SequenceReferenceSeqComponent(); // cc
3777      return this.referenceSeq;
3778    }
3779
3780    public boolean hasReferenceSeq() { 
3781      return this.referenceSeq != null && !this.referenceSeq.isEmpty();
3782    }
3783
3784    /**
3785     * @param value {@link #referenceSeq} (A sequence that is used as a reference to describe variants that are present in a sequence analyzed.)
3786     */
3787    public Sequence setReferenceSeq(SequenceReferenceSeqComponent value)  { 
3788      this.referenceSeq = value;
3789      return this;
3790    }
3791
3792    /**
3793     * @return {@link #variant} (The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.)  It can represent some complex mutation or segment variation with the assist of CIGAR string.)
3794     */
3795    public List<SequenceVariantComponent> getVariant() { 
3796      if (this.variant == null)
3797        this.variant = new ArrayList<SequenceVariantComponent>();
3798      return this.variant;
3799    }
3800
3801    /**
3802     * @return Returns a reference to <code>this</code> for easy method chaining
3803     */
3804    public Sequence setVariant(List<SequenceVariantComponent> theVariant) { 
3805      this.variant = theVariant;
3806      return this;
3807    }
3808
3809    public boolean hasVariant() { 
3810      if (this.variant == null)
3811        return false;
3812      for (SequenceVariantComponent item : this.variant)
3813        if (!item.isEmpty())
3814          return true;
3815      return false;
3816    }
3817
3818    public SequenceVariantComponent addVariant() { //3
3819      SequenceVariantComponent t = new SequenceVariantComponent();
3820      if (this.variant == null)
3821        this.variant = new ArrayList<SequenceVariantComponent>();
3822      this.variant.add(t);
3823      return t;
3824    }
3825
3826    public Sequence addVariant(SequenceVariantComponent t) { //3
3827      if (t == null)
3828        return this;
3829      if (this.variant == null)
3830        this.variant = new ArrayList<SequenceVariantComponent>();
3831      this.variant.add(t);
3832      return this;
3833    }
3834
3835    /**
3836     * @return The first repetition of repeating field {@link #variant}, creating it if it does not already exist
3837     */
3838    public SequenceVariantComponent getVariantFirstRep() { 
3839      if (getVariant().isEmpty()) {
3840        addVariant();
3841      }
3842      return getVariant().get(0);
3843    }
3844
3845    /**
3846     * @return {@link #observedSeq} (Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.). This is the underlying object with id, value and extensions. The accessor "getObservedSeq" gives direct access to the value
3847     */
3848    public StringType getObservedSeqElement() { 
3849      if (this.observedSeq == null)
3850        if (Configuration.errorOnAutoCreate())
3851          throw new Error("Attempt to auto-create Sequence.observedSeq");
3852        else if (Configuration.doAutoCreate())
3853          this.observedSeq = new StringType(); // bb
3854      return this.observedSeq;
3855    }
3856
3857    public boolean hasObservedSeqElement() { 
3858      return this.observedSeq != null && !this.observedSeq.isEmpty();
3859    }
3860
3861    public boolean hasObservedSeq() { 
3862      return this.observedSeq != null && !this.observedSeq.isEmpty();
3863    }
3864
3865    /**
3866     * @param value {@link #observedSeq} (Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.). This is the underlying object with id, value and extensions. The accessor "getObservedSeq" gives direct access to the value
3867     */
3868    public Sequence setObservedSeqElement(StringType value) { 
3869      this.observedSeq = value;
3870      return this;
3871    }
3872
3873    /**
3874     * @return Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.
3875     */
3876    public String getObservedSeq() { 
3877      return this.observedSeq == null ? null : this.observedSeq.getValue();
3878    }
3879
3880    /**
3881     * @param value Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.
3882     */
3883    public Sequence setObservedSeq(String value) { 
3884      if (Utilities.noString(value))
3885        this.observedSeq = null;
3886      else {
3887        if (this.observedSeq == null)
3888          this.observedSeq = new StringType();
3889        this.observedSeq.setValue(value);
3890      }
3891      return this;
3892    }
3893
3894    /**
3895     * @return {@link #quality} (An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).)
3896     */
3897    public List<SequenceQualityComponent> getQuality() { 
3898      if (this.quality == null)
3899        this.quality = new ArrayList<SequenceQualityComponent>();
3900      return this.quality;
3901    }
3902
3903    /**
3904     * @return Returns a reference to <code>this</code> for easy method chaining
3905     */
3906    public Sequence setQuality(List<SequenceQualityComponent> theQuality) { 
3907      this.quality = theQuality;
3908      return this;
3909    }
3910
3911    public boolean hasQuality() { 
3912      if (this.quality == null)
3913        return false;
3914      for (SequenceQualityComponent item : this.quality)
3915        if (!item.isEmpty())
3916          return true;
3917      return false;
3918    }
3919
3920    public SequenceQualityComponent addQuality() { //3
3921      SequenceQualityComponent t = new SequenceQualityComponent();
3922      if (this.quality == null)
3923        this.quality = new ArrayList<SequenceQualityComponent>();
3924      this.quality.add(t);
3925      return t;
3926    }
3927
3928    public Sequence addQuality(SequenceQualityComponent t) { //3
3929      if (t == null)
3930        return this;
3931      if (this.quality == null)
3932        this.quality = new ArrayList<SequenceQualityComponent>();
3933      this.quality.add(t);
3934      return this;
3935    }
3936
3937    /**
3938     * @return The first repetition of repeating field {@link #quality}, creating it if it does not already exist
3939     */
3940    public SequenceQualityComponent getQualityFirstRep() { 
3941      if (getQuality().isEmpty()) {
3942        addQuality();
3943      }
3944      return getQuality().get(0);
3945    }
3946
3947    /**
3948     * @return {@link #readCoverage} (Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.). This is the underlying object with id, value and extensions. The accessor "getReadCoverage" gives direct access to the value
3949     */
3950    public IntegerType getReadCoverageElement() { 
3951      if (this.readCoverage == null)
3952        if (Configuration.errorOnAutoCreate())
3953          throw new Error("Attempt to auto-create Sequence.readCoverage");
3954        else if (Configuration.doAutoCreate())
3955          this.readCoverage = new IntegerType(); // bb
3956      return this.readCoverage;
3957    }
3958
3959    public boolean hasReadCoverageElement() { 
3960      return this.readCoverage != null && !this.readCoverage.isEmpty();
3961    }
3962
3963    public boolean hasReadCoverage() { 
3964      return this.readCoverage != null && !this.readCoverage.isEmpty();
3965    }
3966
3967    /**
3968     * @param value {@link #readCoverage} (Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.). This is the underlying object with id, value and extensions. The accessor "getReadCoverage" gives direct access to the value
3969     */
3970    public Sequence setReadCoverageElement(IntegerType value) { 
3971      this.readCoverage = value;
3972      return this;
3973    }
3974
3975    /**
3976     * @return Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.
3977     */
3978    public int getReadCoverage() { 
3979      return this.readCoverage == null || this.readCoverage.isEmpty() ? 0 : this.readCoverage.getValue();
3980    }
3981
3982    /**
3983     * @param value Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.
3984     */
3985    public Sequence setReadCoverage(int value) { 
3986        if (this.readCoverage == null)
3987          this.readCoverage = new IntegerType();
3988        this.readCoverage.setValue(value);
3989      return this;
3990    }
3991
3992    /**
3993     * @return {@link #repository} (Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.)
3994     */
3995    public List<SequenceRepositoryComponent> getRepository() { 
3996      if (this.repository == null)
3997        this.repository = new ArrayList<SequenceRepositoryComponent>();
3998      return this.repository;
3999    }
4000
4001    /**
4002     * @return Returns a reference to <code>this</code> for easy method chaining
4003     */
4004    public Sequence setRepository(List<SequenceRepositoryComponent> theRepository) { 
4005      this.repository = theRepository;
4006      return this;
4007    }
4008
4009    public boolean hasRepository() { 
4010      if (this.repository == null)
4011        return false;
4012      for (SequenceRepositoryComponent item : this.repository)
4013        if (!item.isEmpty())
4014          return true;
4015      return false;
4016    }
4017
4018    public SequenceRepositoryComponent addRepository() { //3
4019      SequenceRepositoryComponent t = new SequenceRepositoryComponent();
4020      if (this.repository == null)
4021        this.repository = new ArrayList<SequenceRepositoryComponent>();
4022      this.repository.add(t);
4023      return t;
4024    }
4025
4026    public Sequence addRepository(SequenceRepositoryComponent t) { //3
4027      if (t == null)
4028        return this;
4029      if (this.repository == null)
4030        this.repository = new ArrayList<SequenceRepositoryComponent>();
4031      this.repository.add(t);
4032      return this;
4033    }
4034
4035    /**
4036     * @return The first repetition of repeating field {@link #repository}, creating it if it does not already exist
4037     */
4038    public SequenceRepositoryComponent getRepositoryFirstRep() { 
4039      if (getRepository().isEmpty()) {
4040        addRepository();
4041      }
4042      return getRepository().get(0);
4043    }
4044
4045    /**
4046     * @return {@link #pointer} (Pointer to next atomic sequence which at most contains one variant.)
4047     */
4048    public List<Reference> getPointer() { 
4049      if (this.pointer == null)
4050        this.pointer = new ArrayList<Reference>();
4051      return this.pointer;
4052    }
4053
4054    /**
4055     * @return Returns a reference to <code>this</code> for easy method chaining
4056     */
4057    public Sequence setPointer(List<Reference> thePointer) { 
4058      this.pointer = thePointer;
4059      return this;
4060    }
4061
4062    public boolean hasPointer() { 
4063      if (this.pointer == null)
4064        return false;
4065      for (Reference item : this.pointer)
4066        if (!item.isEmpty())
4067          return true;
4068      return false;
4069    }
4070
4071    public Reference addPointer() { //3
4072      Reference t = new Reference();
4073      if (this.pointer == null)
4074        this.pointer = new ArrayList<Reference>();
4075      this.pointer.add(t);
4076      return t;
4077    }
4078
4079    public Sequence addPointer(Reference t) { //3
4080      if (t == null)
4081        return this;
4082      if (this.pointer == null)
4083        this.pointer = new ArrayList<Reference>();
4084      this.pointer.add(t);
4085      return this;
4086    }
4087
4088    /**
4089     * @return The first repetition of repeating field {@link #pointer}, creating it if it does not already exist
4090     */
4091    public Reference getPointerFirstRep() { 
4092      if (getPointer().isEmpty()) {
4093        addPointer();
4094      }
4095      return getPointer().get(0);
4096    }
4097
4098    /**
4099     * @deprecated Use Reference#setResource(IBaseResource) instead
4100     */
4101    @Deprecated
4102    public List<Sequence> getPointerTarget() { 
4103      if (this.pointerTarget == null)
4104        this.pointerTarget = new ArrayList<Sequence>();
4105      return this.pointerTarget;
4106    }
4107
4108    /**
4109     * @deprecated Use Reference#setResource(IBaseResource) instead
4110     */
4111    @Deprecated
4112    public Sequence addPointerTarget() { 
4113      Sequence r = new Sequence();
4114      if (this.pointerTarget == null)
4115        this.pointerTarget = new ArrayList<Sequence>();
4116      this.pointerTarget.add(r);
4117      return r;
4118    }
4119
4120      protected void listChildren(List<Property> children) {
4121        super.listChildren(children);
4122        children.add(new Property("identifier", "Identifier", "A unique identifier for this particular sequence instance. This is a FHIR-defined id.", 0, java.lang.Integer.MAX_VALUE, identifier));
4123        children.add(new Property("type", "code", "Amino Acid Sequence/ DNA Sequence / RNA Sequence.", 0, 1, type));
4124        children.add(new Property("coordinateSystem", "integer", "Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).", 0, 1, coordinateSystem));
4125        children.add(new Property("patient", "Reference(Patient)", "The patient whose sequencing results are described by this resource.", 0, 1, patient));
4126        children.add(new Property("specimen", "Reference(Specimen)", "Specimen used for sequencing.", 0, 1, specimen));
4127        children.add(new Property("device", "Reference(Device)", "The method for sequencing, for example, chip information.", 0, 1, device));
4128        children.add(new Property("performer", "Reference(Organization)", "The organization or lab that should be responsible for this result.", 0, 1, performer));
4129        children.add(new Property("quantity", "Quantity", "The number of copies of the seqeunce of interest. (RNASeq).", 0, 1, quantity));
4130        children.add(new Property("referenceSeq", "", "A sequence that is used as a reference to describe variants that are present in a sequence analyzed.", 0, 1, referenceSeq));
4131        children.add(new Property("variant", "", "The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.)  It can represent some complex mutation or segment variation with the assist of CIGAR string.", 0, java.lang.Integer.MAX_VALUE, variant));
4132        children.add(new Property("observedSeq", "string", "Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.", 0, 1, observedSeq));
4133        children.add(new Property("quality", "", "An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).", 0, java.lang.Integer.MAX_VALUE, quality));
4134        children.add(new Property("readCoverage", "integer", "Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.", 0, 1, readCoverage));
4135        children.add(new Property("repository", "", "Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", 0, java.lang.Integer.MAX_VALUE, repository));
4136        children.add(new Property("pointer", "Reference(Sequence)", "Pointer to next atomic sequence which at most contains one variant.", 0, java.lang.Integer.MAX_VALUE, pointer));
4137      }
4138
4139      @Override
4140      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4141        switch (_hash) {
4142        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A unique identifier for this particular sequence instance. This is a FHIR-defined id.", 0, java.lang.Integer.MAX_VALUE, identifier);
4143        case 3575610: /*type*/  return new Property("type", "code", "Amino Acid Sequence/ DNA Sequence / RNA Sequence.", 0, 1, type);
4144        case 354212295: /*coordinateSystem*/  return new Property("coordinateSystem", "integer", "Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).", 0, 1, coordinateSystem);
4145        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "The patient whose sequencing results are described by this resource.", 0, 1, patient);
4146        case -2132868344: /*specimen*/  return new Property("specimen", "Reference(Specimen)", "Specimen used for sequencing.", 0, 1, specimen);
4147        case -1335157162: /*device*/  return new Property("device", "Reference(Device)", "The method for sequencing, for example, chip information.", 0, 1, device);
4148        case 481140686: /*performer*/  return new Property("performer", "Reference(Organization)", "The organization or lab that should be responsible for this result.", 0, 1, performer);
4149        case -1285004149: /*quantity*/  return new Property("quantity", "Quantity", "The number of copies of the seqeunce of interest. (RNASeq).", 0, 1, quantity);
4150        case -502547180: /*referenceSeq*/  return new Property("referenceSeq", "", "A sequence that is used as a reference to describe variants that are present in a sequence analyzed.", 0, 1, referenceSeq);
4151        case 236785797: /*variant*/  return new Property("variant", "", "The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.)  It can represent some complex mutation or segment variation with the assist of CIGAR string.", 0, java.lang.Integer.MAX_VALUE, variant);
4152        case 125541495: /*observedSeq*/  return new Property("observedSeq", "string", "Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.", 0, 1, observedSeq);
4153        case 651215103: /*quality*/  return new Property("quality", "", "An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).", 0, java.lang.Integer.MAX_VALUE, quality);
4154        case -1798816354: /*readCoverage*/  return new Property("readCoverage", "integer", "Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.", 0, 1, readCoverage);
4155        case 1950800714: /*repository*/  return new Property("repository", "", "Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", 0, java.lang.Integer.MAX_VALUE, repository);
4156        case -400605635: /*pointer*/  return new Property("pointer", "Reference(Sequence)", "Pointer to next atomic sequence which at most contains one variant.", 0, java.lang.Integer.MAX_VALUE, pointer);
4157        default: return super.getNamedProperty(_hash, _name, _checkValid);
4158        }
4159
4160      }
4161
4162      @Override
4163      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4164        switch (hash) {
4165        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
4166        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<SequenceType>
4167        case 354212295: /*coordinateSystem*/ return this.coordinateSystem == null ? new Base[0] : new Base[] {this.coordinateSystem}; // IntegerType
4168        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
4169        case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : new Base[] {this.specimen}; // Reference
4170        case -1335157162: /*device*/ return this.device == null ? new Base[0] : new Base[] {this.device}; // Reference
4171        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference
4172        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
4173        case -502547180: /*referenceSeq*/ return this.referenceSeq == null ? new Base[0] : new Base[] {this.referenceSeq}; // SequenceReferenceSeqComponent
4174        case 236785797: /*variant*/ return this.variant == null ? new Base[0] : this.variant.toArray(new Base[this.variant.size()]); // SequenceVariantComponent
4175        case 125541495: /*observedSeq*/ return this.observedSeq == null ? new Base[0] : new Base[] {this.observedSeq}; // StringType
4176        case 651215103: /*quality*/ return this.quality == null ? new Base[0] : this.quality.toArray(new Base[this.quality.size()]); // SequenceQualityComponent
4177        case -1798816354: /*readCoverage*/ return this.readCoverage == null ? new Base[0] : new Base[] {this.readCoverage}; // IntegerType
4178        case 1950800714: /*repository*/ return this.repository == null ? new Base[0] : this.repository.toArray(new Base[this.repository.size()]); // SequenceRepositoryComponent
4179        case -400605635: /*pointer*/ return this.pointer == null ? new Base[0] : this.pointer.toArray(new Base[this.pointer.size()]); // Reference
4180        default: return super.getProperty(hash, name, checkValid);
4181        }
4182
4183      }
4184
4185      @Override
4186      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4187        switch (hash) {
4188        case -1618432855: // identifier
4189          this.getIdentifier().add(castToIdentifier(value)); // Identifier
4190          return value;
4191        case 3575610: // type
4192          value = new SequenceTypeEnumFactory().fromType(castToCode(value));
4193          this.type = (Enumeration) value; // Enumeration<SequenceType>
4194          return value;
4195        case 354212295: // coordinateSystem
4196          this.coordinateSystem = castToInteger(value); // IntegerType
4197          return value;
4198        case -791418107: // patient
4199          this.patient = castToReference(value); // Reference
4200          return value;
4201        case -2132868344: // specimen
4202          this.specimen = castToReference(value); // Reference
4203          return value;
4204        case -1335157162: // device
4205          this.device = castToReference(value); // Reference
4206          return value;
4207        case 481140686: // performer
4208          this.performer = castToReference(value); // Reference
4209          return value;
4210        case -1285004149: // quantity
4211          this.quantity = castToQuantity(value); // Quantity
4212          return value;
4213        case -502547180: // referenceSeq
4214          this.referenceSeq = (SequenceReferenceSeqComponent) value; // SequenceReferenceSeqComponent
4215          return value;
4216        case 236785797: // variant
4217          this.getVariant().add((SequenceVariantComponent) value); // SequenceVariantComponent
4218          return value;
4219        case 125541495: // observedSeq
4220          this.observedSeq = castToString(value); // StringType
4221          return value;
4222        case 651215103: // quality
4223          this.getQuality().add((SequenceQualityComponent) value); // SequenceQualityComponent
4224          return value;
4225        case -1798816354: // readCoverage
4226          this.readCoverage = castToInteger(value); // IntegerType
4227          return value;
4228        case 1950800714: // repository
4229          this.getRepository().add((SequenceRepositoryComponent) value); // SequenceRepositoryComponent
4230          return value;
4231        case -400605635: // pointer
4232          this.getPointer().add(castToReference(value)); // Reference
4233          return value;
4234        default: return super.setProperty(hash, name, value);
4235        }
4236
4237      }
4238
4239      @Override
4240      public Base setProperty(String name, Base value) throws FHIRException {
4241        if (name.equals("identifier")) {
4242          this.getIdentifier().add(castToIdentifier(value));
4243        } else if (name.equals("type")) {
4244          value = new SequenceTypeEnumFactory().fromType(castToCode(value));
4245          this.type = (Enumeration) value; // Enumeration<SequenceType>
4246        } else if (name.equals("coordinateSystem")) {
4247          this.coordinateSystem = castToInteger(value); // IntegerType
4248        } else if (name.equals("patient")) {
4249          this.patient = castToReference(value); // Reference
4250        } else if (name.equals("specimen")) {
4251          this.specimen = castToReference(value); // Reference
4252        } else if (name.equals("device")) {
4253          this.device = castToReference(value); // Reference
4254        } else if (name.equals("performer")) {
4255          this.performer = castToReference(value); // Reference
4256        } else if (name.equals("quantity")) {
4257          this.quantity = castToQuantity(value); // Quantity
4258        } else if (name.equals("referenceSeq")) {
4259          this.referenceSeq = (SequenceReferenceSeqComponent) value; // SequenceReferenceSeqComponent
4260        } else if (name.equals("variant")) {
4261          this.getVariant().add((SequenceVariantComponent) value);
4262        } else if (name.equals("observedSeq")) {
4263          this.observedSeq = castToString(value); // StringType
4264        } else if (name.equals("quality")) {
4265          this.getQuality().add((SequenceQualityComponent) value);
4266        } else if (name.equals("readCoverage")) {
4267          this.readCoverage = castToInteger(value); // IntegerType
4268        } else if (name.equals("repository")) {
4269          this.getRepository().add((SequenceRepositoryComponent) value);
4270        } else if (name.equals("pointer")) {
4271          this.getPointer().add(castToReference(value));
4272        } else
4273          return super.setProperty(name, value);
4274        return value;
4275      }
4276
4277      @Override
4278      public Base makeProperty(int hash, String name) throws FHIRException {
4279        switch (hash) {
4280        case -1618432855:  return addIdentifier(); 
4281        case 3575610:  return getTypeElement();
4282        case 354212295:  return getCoordinateSystemElement();
4283        case -791418107:  return getPatient(); 
4284        case -2132868344:  return getSpecimen(); 
4285        case -1335157162:  return getDevice(); 
4286        case 481140686:  return getPerformer(); 
4287        case -1285004149:  return getQuantity(); 
4288        case -502547180:  return getReferenceSeq(); 
4289        case 236785797:  return addVariant(); 
4290        case 125541495:  return getObservedSeqElement();
4291        case 651215103:  return addQuality(); 
4292        case -1798816354:  return getReadCoverageElement();
4293        case 1950800714:  return addRepository(); 
4294        case -400605635:  return addPointer(); 
4295        default: return super.makeProperty(hash, name);
4296        }
4297
4298      }
4299
4300      @Override
4301      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4302        switch (hash) {
4303        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
4304        case 3575610: /*type*/ return new String[] {"code"};
4305        case 354212295: /*coordinateSystem*/ return new String[] {"integer"};
4306        case -791418107: /*patient*/ return new String[] {"Reference"};
4307        case -2132868344: /*specimen*/ return new String[] {"Reference"};
4308        case -1335157162: /*device*/ return new String[] {"Reference"};
4309        case 481140686: /*performer*/ return new String[] {"Reference"};
4310        case -1285004149: /*quantity*/ return new String[] {"Quantity"};
4311        case -502547180: /*referenceSeq*/ return new String[] {};
4312        case 236785797: /*variant*/ return new String[] {};
4313        case 125541495: /*observedSeq*/ return new String[] {"string"};
4314        case 651215103: /*quality*/ return new String[] {};
4315        case -1798816354: /*readCoverage*/ return new String[] {"integer"};
4316        case 1950800714: /*repository*/ return new String[] {};
4317        case -400605635: /*pointer*/ return new String[] {"Reference"};
4318        default: return super.getTypesForProperty(hash, name);
4319        }
4320
4321      }
4322
4323      @Override
4324      public Base addChild(String name) throws FHIRException {
4325        if (name.equals("identifier")) {
4326          return addIdentifier();
4327        }
4328        else if (name.equals("type")) {
4329          throw new FHIRException("Cannot call addChild on a primitive type Sequence.type");
4330        }
4331        else if (name.equals("coordinateSystem")) {
4332          throw new FHIRException("Cannot call addChild on a primitive type Sequence.coordinateSystem");
4333        }
4334        else if (name.equals("patient")) {
4335          this.patient = new Reference();
4336          return this.patient;
4337        }
4338        else if (name.equals("specimen")) {
4339          this.specimen = new Reference();
4340          return this.specimen;
4341        }
4342        else if (name.equals("device")) {
4343          this.device = new Reference();
4344          return this.device;
4345        }
4346        else if (name.equals("performer")) {
4347          this.performer = new Reference();
4348          return this.performer;
4349        }
4350        else if (name.equals("quantity")) {
4351          this.quantity = new Quantity();
4352          return this.quantity;
4353        }
4354        else if (name.equals("referenceSeq")) {
4355          this.referenceSeq = new SequenceReferenceSeqComponent();
4356          return this.referenceSeq;
4357        }
4358        else if (name.equals("variant")) {
4359          return addVariant();
4360        }
4361        else if (name.equals("observedSeq")) {
4362          throw new FHIRException("Cannot call addChild on a primitive type Sequence.observedSeq");
4363        }
4364        else if (name.equals("quality")) {
4365          return addQuality();
4366        }
4367        else if (name.equals("readCoverage")) {
4368          throw new FHIRException("Cannot call addChild on a primitive type Sequence.readCoverage");
4369        }
4370        else if (name.equals("repository")) {
4371          return addRepository();
4372        }
4373        else if (name.equals("pointer")) {
4374          return addPointer();
4375        }
4376        else
4377          return super.addChild(name);
4378      }
4379
4380  public String fhirType() {
4381    return "Sequence";
4382
4383  }
4384
4385      public Sequence copy() {
4386        Sequence dst = new Sequence();
4387        copyValues(dst);
4388        if (identifier != null) {
4389          dst.identifier = new ArrayList<Identifier>();
4390          for (Identifier i : identifier)
4391            dst.identifier.add(i.copy());
4392        };
4393        dst.type = type == null ? null : type.copy();
4394        dst.coordinateSystem = coordinateSystem == null ? null : coordinateSystem.copy();
4395        dst.patient = patient == null ? null : patient.copy();
4396        dst.specimen = specimen == null ? null : specimen.copy();
4397        dst.device = device == null ? null : device.copy();
4398        dst.performer = performer == null ? null : performer.copy();
4399        dst.quantity = quantity == null ? null : quantity.copy();
4400        dst.referenceSeq = referenceSeq == null ? null : referenceSeq.copy();
4401        if (variant != null) {
4402          dst.variant = new ArrayList<SequenceVariantComponent>();
4403          for (SequenceVariantComponent i : variant)
4404            dst.variant.add(i.copy());
4405        };
4406        dst.observedSeq = observedSeq == null ? null : observedSeq.copy();
4407        if (quality != null) {
4408          dst.quality = new ArrayList<SequenceQualityComponent>();
4409          for (SequenceQualityComponent i : quality)
4410            dst.quality.add(i.copy());
4411        };
4412        dst.readCoverage = readCoverage == null ? null : readCoverage.copy();
4413        if (repository != null) {
4414          dst.repository = new ArrayList<SequenceRepositoryComponent>();
4415          for (SequenceRepositoryComponent i : repository)
4416            dst.repository.add(i.copy());
4417        };
4418        if (pointer != null) {
4419          dst.pointer = new ArrayList<Reference>();
4420          for (Reference i : pointer)
4421            dst.pointer.add(i.copy());
4422        };
4423        return dst;
4424      }
4425
4426      protected Sequence typedCopy() {
4427        return copy();
4428      }
4429
4430      @Override
4431      public boolean equalsDeep(Base other_) {
4432        if (!super.equalsDeep(other_))
4433          return false;
4434        if (!(other_ instanceof Sequence))
4435          return false;
4436        Sequence o = (Sequence) other_;
4437        return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(coordinateSystem, o.coordinateSystem, true)
4438           && compareDeep(patient, o.patient, true) && compareDeep(specimen, o.specimen, true) && compareDeep(device, o.device, true)
4439           && compareDeep(performer, o.performer, true) && compareDeep(quantity, o.quantity, true) && compareDeep(referenceSeq, o.referenceSeq, true)
4440           && compareDeep(variant, o.variant, true) && compareDeep(observedSeq, o.observedSeq, true) && compareDeep(quality, o.quality, true)
4441           && compareDeep(readCoverage, o.readCoverage, true) && compareDeep(repository, o.repository, true)
4442           && compareDeep(pointer, o.pointer, true);
4443      }
4444
4445      @Override
4446      public boolean equalsShallow(Base other_) {
4447        if (!super.equalsShallow(other_))
4448          return false;
4449        if (!(other_ instanceof Sequence))
4450          return false;
4451        Sequence o = (Sequence) other_;
4452        return compareValues(type, o.type, true) && compareValues(coordinateSystem, o.coordinateSystem, true)
4453           && compareValues(observedSeq, o.observedSeq, true) && compareValues(readCoverage, o.readCoverage, true)
4454          ;
4455      }
4456
4457      public boolean isEmpty() {
4458        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, coordinateSystem
4459          , patient, specimen, device, performer, quantity, referenceSeq, variant, observedSeq
4460          , quality, readCoverage, repository, pointer);
4461      }
4462
4463  @Override
4464  public ResourceType getResourceType() {
4465    return ResourceType.Sequence;
4466   }
4467
4468 /**
4469   * Search parameter: <b>identifier</b>
4470   * <p>
4471   * Description: <b>The unique identity for a particular sequence</b><br>
4472   * Type: <b>token</b><br>
4473   * Path: <b>Sequence.identifier</b><br>
4474   * </p>
4475   */
4476  @SearchParamDefinition(name="identifier", path="Sequence.identifier", description="The unique identity for a particular sequence", type="token" )
4477  public static final String SP_IDENTIFIER = "identifier";
4478 /**
4479   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
4480   * <p>
4481   * Description: <b>The unique identity for a particular sequence</b><br>
4482   * Type: <b>token</b><br>
4483   * Path: <b>Sequence.identifier</b><br>
4484   * </p>
4485   */
4486  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
4487
4488 /**
4489   * Search parameter: <b>coordinate</b>
4490   * <p>
4491   * Description: <b>Search parameter for region of the reference DNA sequence string. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `coordinate=1$lt345$gt123`, this means it will search for the Sequence resource on chromosome 1 and with position >123 and <345, where in 1-based system resource, all strings within region 1:124-344 will be revealed, while in 0-based system resource, all strings within region 1:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.</b><br>
4492   * Type: <b>composite</b><br>
4493   * Path: <b></b><br>
4494   * </p>
4495   */
4496  @SearchParamDefinition(name="coordinate", path="Sequence.variant", description="Search parameter for region of the reference DNA sequence string. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `coordinate=1$lt345$gt123`, this means it will search for the Sequence resource on chromosome 1 and with position >123 and <345, where in 1-based system resource, all strings within region 1:124-344 will be revealed, while in 0-based system resource, all strings within region 1:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.", type="composite", compositeOf={"chromosome", "start"} )
4497  public static final String SP_COORDINATE = "coordinate";
4498 /**
4499   * <b>Fluent Client</b> search parameter constant for <b>coordinate</b>
4500   * <p>
4501   * Description: <b>Search parameter for region of the reference DNA sequence string. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `coordinate=1$lt345$gt123`, this means it will search for the Sequence resource on chromosome 1 and with position >123 and <345, where in 1-based system resource, all strings within region 1:124-344 will be revealed, while in 0-based system resource, all strings within region 1:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.</b><br>
4502   * Type: <b>composite</b><br>
4503   * Path: <b></b><br>
4504   * </p>
4505   */
4506  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.NumberClientParam> COORDINATE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.NumberClientParam>(SP_COORDINATE);
4507
4508 /**
4509   * Search parameter: <b>patient</b>
4510   * <p>
4511   * Description: <b>The subject that the observation is about</b><br>
4512   * Type: <b>reference</b><br>
4513   * Path: <b>Sequence.patient</b><br>
4514   * </p>
4515   */
4516  @SearchParamDefinition(name="patient", path="Sequence.patient", description="The subject that the observation is about", type="reference", target={Patient.class } )
4517  public static final String SP_PATIENT = "patient";
4518 /**
4519   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
4520   * <p>
4521   * Description: <b>The subject that the observation is about</b><br>
4522   * Type: <b>reference</b><br>
4523   * Path: <b>Sequence.patient</b><br>
4524   * </p>
4525   */
4526  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
4527
4528/**
4529   * Constant for fluent queries to be used to add include statements. Specifies
4530   * the path value of "<b>Sequence:patient</b>".
4531   */
4532  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Sequence:patient").toLocked();
4533
4534 /**
4535   * Search parameter: <b>chromosome</b>
4536   * <p>
4537   * Description: <b>Chromosome number of the reference sequence</b><br>
4538   * Type: <b>token</b><br>
4539   * Path: <b>Sequence.referenceSeq.chromosome</b><br>
4540   * </p>
4541   */
4542  @SearchParamDefinition(name="chromosome", path="Sequence.referenceSeq.chromosome", description="Chromosome number of the reference sequence", type="token" )
4543  public static final String SP_CHROMOSOME = "chromosome";
4544 /**
4545   * <b>Fluent Client</b> search parameter constant for <b>chromosome</b>
4546   * <p>
4547   * Description: <b>Chromosome number of the reference sequence</b><br>
4548   * Type: <b>token</b><br>
4549   * Path: <b>Sequence.referenceSeq.chromosome</b><br>
4550   * </p>
4551   */
4552  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CHROMOSOME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CHROMOSOME);
4553
4554 /**
4555   * Search parameter: <b>start</b>
4556   * <p>
4557   * Description: <b>Start position (0-based inclusive, 1-based inclusive, that means the nucleic acid or amino acid at this position will be included) of the reference sequence.</b><br>
4558   * Type: <b>number</b><br>
4559   * Path: <b>Sequence.referenceSeq.windowStart</b><br>
4560   * </p>
4561   */
4562  @SearchParamDefinition(name="start", path="Sequence.referenceSeq.windowStart", description="Start position (0-based inclusive, 1-based inclusive, that means the nucleic acid or amino acid at this position will be included) of the reference sequence.", type="number" )
4563  public static final String SP_START = "start";
4564 /**
4565   * <b>Fluent Client</b> search parameter constant for <b>start</b>
4566   * <p>
4567   * Description: <b>Start position (0-based inclusive, 1-based inclusive, that means the nucleic acid or amino acid at this position will be included) of the reference sequence.</b><br>
4568   * Type: <b>number</b><br>
4569   * Path: <b>Sequence.referenceSeq.windowStart</b><br>
4570   * </p>
4571   */
4572  public static final ca.uhn.fhir.rest.gclient.NumberClientParam START = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_START);
4573
4574 /**
4575   * Search parameter: <b>end</b>
4576   * <p>
4577   * Description: <b>End position (0-based exclusive, which menas the acid at this position will not be included, 1-based inclusive, which means the acid at this position will be included) of the reference sequence.</b><br>
4578   * Type: <b>number</b><br>
4579   * Path: <b>Sequence.referenceSeq.windowEnd</b><br>
4580   * </p>
4581   */
4582  @SearchParamDefinition(name="end", path="Sequence.referenceSeq.windowEnd", description="End position (0-based exclusive, which menas the acid at this position will not be included, 1-based inclusive, which means the acid at this position will be included) of the reference sequence.", type="number" )
4583  public static final String SP_END = "end";
4584 /**
4585   * <b>Fluent Client</b> search parameter constant for <b>end</b>
4586   * <p>
4587   * Description: <b>End position (0-based exclusive, which menas the acid at this position will not be included, 1-based inclusive, which means the acid at this position will be included) of the reference sequence.</b><br>
4588   * Type: <b>number</b><br>
4589   * Path: <b>Sequence.referenceSeq.windowEnd</b><br>
4590   * </p>
4591   */
4592  public static final ca.uhn.fhir.rest.gclient.NumberClientParam END = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_END);
4593
4594 /**
4595   * Search parameter: <b>type</b>
4596   * <p>
4597   * Description: <b>Amino Acid Sequence/ DNA Sequence / RNA Sequence</b><br>
4598   * Type: <b>token</b><br>
4599   * Path: <b>Sequence.type</b><br>
4600   * </p>
4601   */
4602  @SearchParamDefinition(name="type", path="Sequence.type", description="Amino Acid Sequence/ DNA Sequence / RNA Sequence", type="token" )
4603  public static final String SP_TYPE = "type";
4604 /**
4605   * <b>Fluent Client</b> search parameter constant for <b>type</b>
4606   * <p>
4607   * Description: <b>Amino Acid Sequence/ DNA Sequence / RNA Sequence</b><br>
4608   * Type: <b>token</b><br>
4609   * Path: <b>Sequence.type</b><br>
4610   * </p>
4611   */
4612  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
4613
4614
4615}