001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Thu, Dec 27, 2018 10:06-0500 for FHIR v4.0.0
033
034import java.util.*;
035
036import java.math.*;
037import org.hl7.fhir.utilities.Utilities;
038import ca.uhn.fhir.model.api.annotation.ResourceDef;
039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
040import ca.uhn.fhir.model.api.annotation.Child;
041import ca.uhn.fhir.model.api.annotation.ChildOrder;
042import ca.uhn.fhir.model.api.annotation.Description;
043import ca.uhn.fhir.model.api.annotation.Block;
044import org.hl7.fhir.instance.model.api.*;
045import org.hl7.fhir.exceptions.FHIRException;
046/**
047 * Raw data describing a biological sequence.
048 */
049@ResourceDef(name="MolecularSequence", profile="http://hl7.org/fhir/StructureDefinition/MolecularSequence")
050public class MolecularSequence extends DomainResource {
051
052    public enum SequenceType {
053        /**
054         * Amino acid sequence.
055         */
056        AA, 
057        /**
058         * DNA Sequence.
059         */
060        DNA, 
061        /**
062         * RNA Sequence.
063         */
064        RNA, 
065        /**
066         * added to help the parsers with the generic types
067         */
068        NULL;
069        public static SequenceType fromCode(String codeString) throws FHIRException {
070            if (codeString == null || "".equals(codeString))
071                return null;
072        if ("aa".equals(codeString))
073          return AA;
074        if ("dna".equals(codeString))
075          return DNA;
076        if ("rna".equals(codeString))
077          return RNA;
078        if (Configuration.isAcceptInvalidEnums())
079          return null;
080        else
081          throw new FHIRException("Unknown SequenceType code '"+codeString+"'");
082        }
083        public String toCode() {
084          switch (this) {
085            case AA: return "aa";
086            case DNA: return "dna";
087            case RNA: return "rna";
088            default: return "?";
089          }
090        }
091        public String getSystem() {
092          switch (this) {
093            case AA: return "http://hl7.org/fhir/sequence-type";
094            case DNA: return "http://hl7.org/fhir/sequence-type";
095            case RNA: return "http://hl7.org/fhir/sequence-type";
096            default: return "?";
097          }
098        }
099        public String getDefinition() {
100          switch (this) {
101            case AA: return "Amino acid sequence.";
102            case DNA: return "DNA Sequence.";
103            case RNA: return "RNA Sequence.";
104            default: return "?";
105          }
106        }
107        public String getDisplay() {
108          switch (this) {
109            case AA: return "AA Sequence";
110            case DNA: return "DNA Sequence";
111            case RNA: return "RNA Sequence";
112            default: return "?";
113          }
114        }
115    }
116
117  public static class SequenceTypeEnumFactory implements EnumFactory<SequenceType> {
118    public SequenceType fromCode(String codeString) throws IllegalArgumentException {
119      if (codeString == null || "".equals(codeString))
120            if (codeString == null || "".equals(codeString))
121                return null;
122        if ("aa".equals(codeString))
123          return SequenceType.AA;
124        if ("dna".equals(codeString))
125          return SequenceType.DNA;
126        if ("rna".equals(codeString))
127          return SequenceType.RNA;
128        throw new IllegalArgumentException("Unknown SequenceType code '"+codeString+"'");
129        }
130        public Enumeration<SequenceType> fromType(Base code) throws FHIRException {
131          if (code == null)
132            return null;
133          if (code.isEmpty())
134            return new Enumeration<SequenceType>(this);
135          String codeString = ((PrimitiveType) code).asStringValue();
136          if (codeString == null || "".equals(codeString))
137            return null;
138        if ("aa".equals(codeString))
139          return new Enumeration<SequenceType>(this, SequenceType.AA);
140        if ("dna".equals(codeString))
141          return new Enumeration<SequenceType>(this, SequenceType.DNA);
142        if ("rna".equals(codeString))
143          return new Enumeration<SequenceType>(this, SequenceType.RNA);
144        throw new FHIRException("Unknown SequenceType code '"+codeString+"'");
145        }
146    public String toCode(SequenceType code) {
147      if (code == SequenceType.AA)
148        return "aa";
149      if (code == SequenceType.DNA)
150        return "dna";
151      if (code == SequenceType.RNA)
152        return "rna";
153      return "?";
154      }
155    public String toSystem(SequenceType code) {
156      return code.getSystem();
157      }
158    }
159
160    public enum OrientationType {
161        /**
162         * Sense orientation of reference sequence.
163         */
164        SENSE, 
165        /**
166         * Antisense orientation of reference sequence.
167         */
168        ANTISENSE, 
169        /**
170         * added to help the parsers with the generic types
171         */
172        NULL;
173        public static OrientationType fromCode(String codeString) throws FHIRException {
174            if (codeString == null || "".equals(codeString))
175                return null;
176        if ("sense".equals(codeString))
177          return SENSE;
178        if ("antisense".equals(codeString))
179          return ANTISENSE;
180        if (Configuration.isAcceptInvalidEnums())
181          return null;
182        else
183          throw new FHIRException("Unknown OrientationType code '"+codeString+"'");
184        }
185        public String toCode() {
186          switch (this) {
187            case SENSE: return "sense";
188            case ANTISENSE: return "antisense";
189            default: return "?";
190          }
191        }
192        public String getSystem() {
193          switch (this) {
194            case SENSE: return "http://hl7.org/fhir/orientation-type";
195            case ANTISENSE: return "http://hl7.org/fhir/orientation-type";
196            default: return "?";
197          }
198        }
199        public String getDefinition() {
200          switch (this) {
201            case SENSE: return "Sense orientation of reference sequence.";
202            case ANTISENSE: return "Antisense orientation of reference sequence.";
203            default: return "?";
204          }
205        }
206        public String getDisplay() {
207          switch (this) {
208            case SENSE: return "Sense orientation of referenceSeq";
209            case ANTISENSE: return "Antisense orientation of referenceSeq";
210            default: return "?";
211          }
212        }
213    }
214
215  public static class OrientationTypeEnumFactory implements EnumFactory<OrientationType> {
216    public OrientationType fromCode(String codeString) throws IllegalArgumentException {
217      if (codeString == null || "".equals(codeString))
218            if (codeString == null || "".equals(codeString))
219                return null;
220        if ("sense".equals(codeString))
221          return OrientationType.SENSE;
222        if ("antisense".equals(codeString))
223          return OrientationType.ANTISENSE;
224        throw new IllegalArgumentException("Unknown OrientationType code '"+codeString+"'");
225        }
226        public Enumeration<OrientationType> fromType(Base code) throws FHIRException {
227          if (code == null)
228            return null;
229          if (code.isEmpty())
230            return new Enumeration<OrientationType>(this);
231          String codeString = ((PrimitiveType) code).asStringValue();
232          if (codeString == null || "".equals(codeString))
233            return null;
234        if ("sense".equals(codeString))
235          return new Enumeration<OrientationType>(this, OrientationType.SENSE);
236        if ("antisense".equals(codeString))
237          return new Enumeration<OrientationType>(this, OrientationType.ANTISENSE);
238        throw new FHIRException("Unknown OrientationType code '"+codeString+"'");
239        }
240    public String toCode(OrientationType code) {
241      if (code == OrientationType.SENSE)
242        return "sense";
243      if (code == OrientationType.ANTISENSE)
244        return "antisense";
245      return "?";
246      }
247    public String toSystem(OrientationType code) {
248      return code.getSystem();
249      }
250    }
251
252    public enum StrandType {
253        /**
254         * Watson strand of reference sequence.
255         */
256        WATSON, 
257        /**
258         * Crick strand of reference sequence.
259         */
260        CRICK, 
261        /**
262         * added to help the parsers with the generic types
263         */
264        NULL;
265        public static StrandType fromCode(String codeString) throws FHIRException {
266            if (codeString == null || "".equals(codeString))
267                return null;
268        if ("watson".equals(codeString))
269          return WATSON;
270        if ("crick".equals(codeString))
271          return CRICK;
272        if (Configuration.isAcceptInvalidEnums())
273          return null;
274        else
275          throw new FHIRException("Unknown StrandType code '"+codeString+"'");
276        }
277        public String toCode() {
278          switch (this) {
279            case WATSON: return "watson";
280            case CRICK: return "crick";
281            default: return "?";
282          }
283        }
284        public String getSystem() {
285          switch (this) {
286            case WATSON: return "http://hl7.org/fhir/strand-type";
287            case CRICK: return "http://hl7.org/fhir/strand-type";
288            default: return "?";
289          }
290        }
291        public String getDefinition() {
292          switch (this) {
293            case WATSON: return "Watson strand of reference sequence.";
294            case CRICK: return "Crick strand of reference sequence.";
295            default: return "?";
296          }
297        }
298        public String getDisplay() {
299          switch (this) {
300            case WATSON: return "Watson strand of referenceSeq";
301            case CRICK: return "Crick strand of referenceSeq";
302            default: return "?";
303          }
304        }
305    }
306
307  public static class StrandTypeEnumFactory implements EnumFactory<StrandType> {
308    public StrandType fromCode(String codeString) throws IllegalArgumentException {
309      if (codeString == null || "".equals(codeString))
310            if (codeString == null || "".equals(codeString))
311                return null;
312        if ("watson".equals(codeString))
313          return StrandType.WATSON;
314        if ("crick".equals(codeString))
315          return StrandType.CRICK;
316        throw new IllegalArgumentException("Unknown StrandType code '"+codeString+"'");
317        }
318        public Enumeration<StrandType> fromType(Base code) throws FHIRException {
319          if (code == null)
320            return null;
321          if (code.isEmpty())
322            return new Enumeration<StrandType>(this);
323          String codeString = ((PrimitiveType) code).asStringValue();
324          if (codeString == null || "".equals(codeString))
325            return null;
326        if ("watson".equals(codeString))
327          return new Enumeration<StrandType>(this, StrandType.WATSON);
328        if ("crick".equals(codeString))
329          return new Enumeration<StrandType>(this, StrandType.CRICK);
330        throw new FHIRException("Unknown StrandType code '"+codeString+"'");
331        }
332    public String toCode(StrandType code) {
333      if (code == StrandType.WATSON)
334        return "watson";
335      if (code == StrandType.CRICK)
336        return "crick";
337      return "?";
338      }
339    public String toSystem(StrandType code) {
340      return code.getSystem();
341      }
342    }
343
344    public enum QualityType {
345        /**
346         * INDEL Comparison.
347         */
348        INDEL, 
349        /**
350         * SNP Comparison.
351         */
352        SNP, 
353        /**
354         * UNKNOWN Comparison.
355         */
356        UNKNOWN, 
357        /**
358         * added to help the parsers with the generic types
359         */
360        NULL;
361        public static QualityType fromCode(String codeString) throws FHIRException {
362            if (codeString == null || "".equals(codeString))
363                return null;
364        if ("indel".equals(codeString))
365          return INDEL;
366        if ("snp".equals(codeString))
367          return SNP;
368        if ("unknown".equals(codeString))
369          return UNKNOWN;
370        if (Configuration.isAcceptInvalidEnums())
371          return null;
372        else
373          throw new FHIRException("Unknown QualityType code '"+codeString+"'");
374        }
375        public String toCode() {
376          switch (this) {
377            case INDEL: return "indel";
378            case SNP: return "snp";
379            case UNKNOWN: return "unknown";
380            default: return "?";
381          }
382        }
383        public String getSystem() {
384          switch (this) {
385            case INDEL: return "http://hl7.org/fhir/quality-type";
386            case SNP: return "http://hl7.org/fhir/quality-type";
387            case UNKNOWN: return "http://hl7.org/fhir/quality-type";
388            default: return "?";
389          }
390        }
391        public String getDefinition() {
392          switch (this) {
393            case INDEL: return "INDEL Comparison.";
394            case SNP: return "SNP Comparison.";
395            case UNKNOWN: return "UNKNOWN Comparison.";
396            default: return "?";
397          }
398        }
399        public String getDisplay() {
400          switch (this) {
401            case INDEL: return "INDEL Comparison";
402            case SNP: return "SNP Comparison";
403            case UNKNOWN: return "UNKNOWN Comparison";
404            default: return "?";
405          }
406        }
407    }
408
409  public static class QualityTypeEnumFactory implements EnumFactory<QualityType> {
410    public QualityType fromCode(String codeString) throws IllegalArgumentException {
411      if (codeString == null || "".equals(codeString))
412            if (codeString == null || "".equals(codeString))
413                return null;
414        if ("indel".equals(codeString))
415          return QualityType.INDEL;
416        if ("snp".equals(codeString))
417          return QualityType.SNP;
418        if ("unknown".equals(codeString))
419          return QualityType.UNKNOWN;
420        throw new IllegalArgumentException("Unknown QualityType code '"+codeString+"'");
421        }
422        public Enumeration<QualityType> fromType(Base code) throws FHIRException {
423          if (code == null)
424            return null;
425          if (code.isEmpty())
426            return new Enumeration<QualityType>(this);
427          String codeString = ((PrimitiveType) code).asStringValue();
428          if (codeString == null || "".equals(codeString))
429            return null;
430        if ("indel".equals(codeString))
431          return new Enumeration<QualityType>(this, QualityType.INDEL);
432        if ("snp".equals(codeString))
433          return new Enumeration<QualityType>(this, QualityType.SNP);
434        if ("unknown".equals(codeString))
435          return new Enumeration<QualityType>(this, QualityType.UNKNOWN);
436        throw new FHIRException("Unknown QualityType code '"+codeString+"'");
437        }
438    public String toCode(QualityType code) {
439      if (code == QualityType.INDEL)
440        return "indel";
441      if (code == QualityType.SNP)
442        return "snp";
443      if (code == QualityType.UNKNOWN)
444        return "unknown";
445      return "?";
446      }
447    public String toSystem(QualityType code) {
448      return code.getSystem();
449      }
450    }
451
452    public enum RepositoryType {
453        /**
454         * When URL is clicked, the resource can be seen directly (by webpage or by download link format).
455         */
456        DIRECTLINK, 
457        /**
458         * 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).
459         */
460        OPENAPI, 
461        /**
462         * When logged into the website, the resource can be seen.
463         */
464        LOGIN, 
465        /**
466         * When logged in and  follow the API in the website related with URL, the resource can be seen.
467         */
468        OAUTH, 
469        /**
470         * Some other complicated or particular way to get resource from URL.
471         */
472        OTHER, 
473        /**
474         * added to help the parsers with the generic types
475         */
476        NULL;
477        public static RepositoryType fromCode(String codeString) throws FHIRException {
478            if (codeString == null || "".equals(codeString))
479                return null;
480        if ("directlink".equals(codeString))
481          return DIRECTLINK;
482        if ("openapi".equals(codeString))
483          return OPENAPI;
484        if ("login".equals(codeString))
485          return LOGIN;
486        if ("oauth".equals(codeString))
487          return OAUTH;
488        if ("other".equals(codeString))
489          return OTHER;
490        if (Configuration.isAcceptInvalidEnums())
491          return null;
492        else
493          throw new FHIRException("Unknown RepositoryType code '"+codeString+"'");
494        }
495        public String toCode() {
496          switch (this) {
497            case DIRECTLINK: return "directlink";
498            case OPENAPI: return "openapi";
499            case LOGIN: return "login";
500            case OAUTH: return "oauth";
501            case OTHER: return "other";
502            default: return "?";
503          }
504        }
505        public String getSystem() {
506          switch (this) {
507            case DIRECTLINK: return "http://hl7.org/fhir/repository-type";
508            case OPENAPI: return "http://hl7.org/fhir/repository-type";
509            case LOGIN: return "http://hl7.org/fhir/repository-type";
510            case OAUTH: return "http://hl7.org/fhir/repository-type";
511            case OTHER: return "http://hl7.org/fhir/repository-type";
512            default: return "?";
513          }
514        }
515        public String getDefinition() {
516          switch (this) {
517            case DIRECTLINK: return "When URL is clicked, the resource can be seen directly (by webpage or by download link format).";
518            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).";
519            case LOGIN: return "When logged into the website, the resource can be seen.";
520            case OAUTH: return "When logged in and  follow the API in the website related with URL, the resource can be seen.";
521            case OTHER: return "Some other complicated or particular way to get resource from URL.";
522            default: return "?";
523          }
524        }
525        public String getDisplay() {
526          switch (this) {
527            case DIRECTLINK: return "Click and see";
528            case OPENAPI: return "The URL is the RESTful or other kind of API that can access to the result.";
529            case LOGIN: return "Result cannot be access unless an account is logged in";
530            case OAUTH: return "Result need to be fetched with API and need LOGIN( or cookies are required when visiting the link of resource)";
531            case OTHER: return "Some other complicated or particular way to get resource from URL.";
532            default: return "?";
533          }
534        }
535    }
536
537  public static class RepositoryTypeEnumFactory implements EnumFactory<RepositoryType> {
538    public RepositoryType fromCode(String codeString) throws IllegalArgumentException {
539      if (codeString == null || "".equals(codeString))
540            if (codeString == null || "".equals(codeString))
541                return null;
542        if ("directlink".equals(codeString))
543          return RepositoryType.DIRECTLINK;
544        if ("openapi".equals(codeString))
545          return RepositoryType.OPENAPI;
546        if ("login".equals(codeString))
547          return RepositoryType.LOGIN;
548        if ("oauth".equals(codeString))
549          return RepositoryType.OAUTH;
550        if ("other".equals(codeString))
551          return RepositoryType.OTHER;
552        throw new IllegalArgumentException("Unknown RepositoryType code '"+codeString+"'");
553        }
554        public Enumeration<RepositoryType> fromType(Base code) throws FHIRException {
555          if (code == null)
556            return null;
557          if (code.isEmpty())
558            return new Enumeration<RepositoryType>(this);
559          String codeString = ((PrimitiveType) code).asStringValue();
560          if (codeString == null || "".equals(codeString))
561            return null;
562        if ("directlink".equals(codeString))
563          return new Enumeration<RepositoryType>(this, RepositoryType.DIRECTLINK);
564        if ("openapi".equals(codeString))
565          return new Enumeration<RepositoryType>(this, RepositoryType.OPENAPI);
566        if ("login".equals(codeString))
567          return new Enumeration<RepositoryType>(this, RepositoryType.LOGIN);
568        if ("oauth".equals(codeString))
569          return new Enumeration<RepositoryType>(this, RepositoryType.OAUTH);
570        if ("other".equals(codeString))
571          return new Enumeration<RepositoryType>(this, RepositoryType.OTHER);
572        throw new FHIRException("Unknown RepositoryType code '"+codeString+"'");
573        }
574    public String toCode(RepositoryType code) {
575      if (code == RepositoryType.DIRECTLINK)
576        return "directlink";
577      if (code == RepositoryType.OPENAPI)
578        return "openapi";
579      if (code == RepositoryType.LOGIN)
580        return "login";
581      if (code == RepositoryType.OAUTH)
582        return "oauth";
583      if (code == RepositoryType.OTHER)
584        return "other";
585      return "?";
586      }
587    public String toSystem(RepositoryType code) {
588      return code.getSystem();
589      }
590    }
591
592    @Block()
593    public static class MolecularSequenceReferenceSeqComponent extends BackboneElement implements IBaseBackboneElement {
594        /**
595         * 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)).
596         */
597        @Child(name = "chromosome", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
598        @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))." )
599        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/chromosome-human")
600        protected CodeableConcept chromosome;
601
602        /**
603         * 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.
604         */
605        @Child(name = "genomeBuild", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
606        @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." )
607        protected StringType genomeBuild;
608
609        /**
610         * A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.
611         */
612        @Child(name = "orientation", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true)
613        @Description(shortDefinition="sense | antisense", formalDefinition="A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the \"sense\" strand, and the opposite complementary strand is the \"antisense\" strand." )
614        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/orientation-type")
615        protected Enumeration<OrientationType> orientation;
616
617        /**
618         * Reference identifier of reference sequence submitted to NCBI. It must match the type in the MolecularSequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.
619         */
620        @Child(name = "referenceSeqId", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true)
621        @Description(shortDefinition="Reference identifier", formalDefinition="Reference identifier of reference sequence submitted to NCBI. It must match the type in the MolecularSequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences." )
622        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/sequence-referenceSeq")
623        protected CodeableConcept referenceSeqId;
624
625        /**
626         * A pointer to another MolecularSequence entity as reference sequence.
627         */
628        @Child(name = "referenceSeqPointer", type = {MolecularSequence.class}, order=5, min=0, max=1, modifier=false, summary=true)
629        @Description(shortDefinition="A pointer to another MolecularSequence entity as reference sequence", formalDefinition="A pointer to another MolecularSequence entity as reference sequence." )
630        protected Reference referenceSeqPointer;
631
632        /**
633         * The actual object that is the target of the reference (A pointer to another MolecularSequence entity as reference sequence.)
634         */
635        protected MolecularSequence referenceSeqPointerTarget;
636
637        /**
638         * A string like "ACGT".
639         */
640        @Child(name = "referenceSeqString", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true)
641        @Description(shortDefinition="A string to represent reference sequence", formalDefinition="A string like \"ACGT\"." )
642        protected StringType referenceSeqString;
643
644        /**
645         * An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.
646         */
647        @Child(name = "strand", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=true)
648        @Description(shortDefinition="watson | crick", formalDefinition="An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm." )
649        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/strand-type")
650        protected Enumeration<StrandType> strand;
651
652        /**
653         * 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.
654         */
655        @Child(name = "windowStart", type = {IntegerType.class}, order=8, min=0, max=1, modifier=false, summary=true)
656        @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." )
657        protected IntegerType windowStart;
658
659        /**
660         * End position of the window on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
661         */
662        @Child(name = "windowEnd", type = {IntegerType.class}, order=9, min=0, max=1, modifier=false, summary=true)
663        @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 exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." )
664        protected IntegerType windowEnd;
665
666        private static final long serialVersionUID = 307364267L;
667
668    /**
669     * Constructor
670     */
671      public MolecularSequenceReferenceSeqComponent() {
672        super();
673      }
674
675        /**
676         * @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)).)
677         */
678        public CodeableConcept getChromosome() { 
679          if (this.chromosome == null)
680            if (Configuration.errorOnAutoCreate())
681              throw new Error("Attempt to auto-create MolecularSequenceReferenceSeqComponent.chromosome");
682            else if (Configuration.doAutoCreate())
683              this.chromosome = new CodeableConcept(); // cc
684          return this.chromosome;
685        }
686
687        public boolean hasChromosome() { 
688          return this.chromosome != null && !this.chromosome.isEmpty();
689        }
690
691        /**
692         * @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)).)
693         */
694        public MolecularSequenceReferenceSeqComponent setChromosome(CodeableConcept value) { 
695          this.chromosome = value;
696          return this;
697        }
698
699        /**
700         * @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
701         */
702        public StringType getGenomeBuildElement() { 
703          if (this.genomeBuild == null)
704            if (Configuration.errorOnAutoCreate())
705              throw new Error("Attempt to auto-create MolecularSequenceReferenceSeqComponent.genomeBuild");
706            else if (Configuration.doAutoCreate())
707              this.genomeBuild = new StringType(); // bb
708          return this.genomeBuild;
709        }
710
711        public boolean hasGenomeBuildElement() { 
712          return this.genomeBuild != null && !this.genomeBuild.isEmpty();
713        }
714
715        public boolean hasGenomeBuild() { 
716          return this.genomeBuild != null && !this.genomeBuild.isEmpty();
717        }
718
719        /**
720         * @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
721         */
722        public MolecularSequenceReferenceSeqComponent setGenomeBuildElement(StringType value) { 
723          this.genomeBuild = value;
724          return this;
725        }
726
727        /**
728         * @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.
729         */
730        public String getGenomeBuild() { 
731          return this.genomeBuild == null ? null : this.genomeBuild.getValue();
732        }
733
734        /**
735         * @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.
736         */
737        public MolecularSequenceReferenceSeqComponent setGenomeBuild(String value) { 
738          if (Utilities.noString(value))
739            this.genomeBuild = null;
740          else {
741            if (this.genomeBuild == null)
742              this.genomeBuild = new StringType();
743            this.genomeBuild.setValue(value);
744          }
745          return this;
746        }
747
748        /**
749         * @return {@link #orientation} (A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.). This is the underlying object with id, value and extensions. The accessor "getOrientation" gives direct access to the value
750         */
751        public Enumeration<OrientationType> getOrientationElement() { 
752          if (this.orientation == null)
753            if (Configuration.errorOnAutoCreate())
754              throw new Error("Attempt to auto-create MolecularSequenceReferenceSeqComponent.orientation");
755            else if (Configuration.doAutoCreate())
756              this.orientation = new Enumeration<OrientationType>(new OrientationTypeEnumFactory()); // bb
757          return this.orientation;
758        }
759
760        public boolean hasOrientationElement() { 
761          return this.orientation != null && !this.orientation.isEmpty();
762        }
763
764        public boolean hasOrientation() { 
765          return this.orientation != null && !this.orientation.isEmpty();
766        }
767
768        /**
769         * @param value {@link #orientation} (A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.). This is the underlying object with id, value and extensions. The accessor "getOrientation" gives direct access to the value
770         */
771        public MolecularSequenceReferenceSeqComponent setOrientationElement(Enumeration<OrientationType> value) { 
772          this.orientation = value;
773          return this;
774        }
775
776        /**
777         * @return A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.
778         */
779        public OrientationType getOrientation() { 
780          return this.orientation == null ? null : this.orientation.getValue();
781        }
782
783        /**
784         * @param value A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.
785         */
786        public MolecularSequenceReferenceSeqComponent setOrientation(OrientationType value) { 
787          if (value == null)
788            this.orientation = null;
789          else {
790            if (this.orientation == null)
791              this.orientation = new Enumeration<OrientationType>(new OrientationTypeEnumFactory());
792            this.orientation.setValue(value);
793          }
794          return this;
795        }
796
797        /**
798         * @return {@link #referenceSeqId} (Reference identifier of reference sequence submitted to NCBI. It must match the type in the MolecularSequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.)
799         */
800        public CodeableConcept getReferenceSeqId() { 
801          if (this.referenceSeqId == null)
802            if (Configuration.errorOnAutoCreate())
803              throw new Error("Attempt to auto-create MolecularSequenceReferenceSeqComponent.referenceSeqId");
804            else if (Configuration.doAutoCreate())
805              this.referenceSeqId = new CodeableConcept(); // cc
806          return this.referenceSeqId;
807        }
808
809        public boolean hasReferenceSeqId() { 
810          return this.referenceSeqId != null && !this.referenceSeqId.isEmpty();
811        }
812
813        /**
814         * @param value {@link #referenceSeqId} (Reference identifier of reference sequence submitted to NCBI. It must match the type in the MolecularSequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.)
815         */
816        public MolecularSequenceReferenceSeqComponent setReferenceSeqId(CodeableConcept value) { 
817          this.referenceSeqId = value;
818          return this;
819        }
820
821        /**
822         * @return {@link #referenceSeqPointer} (A pointer to another MolecularSequence entity as reference sequence.)
823         */
824        public Reference getReferenceSeqPointer() { 
825          if (this.referenceSeqPointer == null)
826            if (Configuration.errorOnAutoCreate())
827              throw new Error("Attempt to auto-create MolecularSequenceReferenceSeqComponent.referenceSeqPointer");
828            else if (Configuration.doAutoCreate())
829              this.referenceSeqPointer = new Reference(); // cc
830          return this.referenceSeqPointer;
831        }
832
833        public boolean hasReferenceSeqPointer() { 
834          return this.referenceSeqPointer != null && !this.referenceSeqPointer.isEmpty();
835        }
836
837        /**
838         * @param value {@link #referenceSeqPointer} (A pointer to another MolecularSequence entity as reference sequence.)
839         */
840        public MolecularSequenceReferenceSeqComponent setReferenceSeqPointer(Reference value) { 
841          this.referenceSeqPointer = value;
842          return this;
843        }
844
845        /**
846         * @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 MolecularSequence entity as reference sequence.)
847         */
848        public MolecularSequence getReferenceSeqPointerTarget() { 
849          if (this.referenceSeqPointerTarget == null)
850            if (Configuration.errorOnAutoCreate())
851              throw new Error("Attempt to auto-create MolecularSequenceReferenceSeqComponent.referenceSeqPointer");
852            else if (Configuration.doAutoCreate())
853              this.referenceSeqPointerTarget = new MolecularSequence(); // aa
854          return this.referenceSeqPointerTarget;
855        }
856
857        /**
858         * @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 MolecularSequence entity as reference sequence.)
859         */
860        public MolecularSequenceReferenceSeqComponent setReferenceSeqPointerTarget(MolecularSequence value) { 
861          this.referenceSeqPointerTarget = value;
862          return this;
863        }
864
865        /**
866         * @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
867         */
868        public StringType getReferenceSeqStringElement() { 
869          if (this.referenceSeqString == null)
870            if (Configuration.errorOnAutoCreate())
871              throw new Error("Attempt to auto-create MolecularSequenceReferenceSeqComponent.referenceSeqString");
872            else if (Configuration.doAutoCreate())
873              this.referenceSeqString = new StringType(); // bb
874          return this.referenceSeqString;
875        }
876
877        public boolean hasReferenceSeqStringElement() { 
878          return this.referenceSeqString != null && !this.referenceSeqString.isEmpty();
879        }
880
881        public boolean hasReferenceSeqString() { 
882          return this.referenceSeqString != null && !this.referenceSeqString.isEmpty();
883        }
884
885        /**
886         * @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
887         */
888        public MolecularSequenceReferenceSeqComponent setReferenceSeqStringElement(StringType value) { 
889          this.referenceSeqString = value;
890          return this;
891        }
892
893        /**
894         * @return A string like "ACGT".
895         */
896        public String getReferenceSeqString() { 
897          return this.referenceSeqString == null ? null : this.referenceSeqString.getValue();
898        }
899
900        /**
901         * @param value A string like "ACGT".
902         */
903        public MolecularSequenceReferenceSeqComponent setReferenceSeqString(String value) { 
904          if (Utilities.noString(value))
905            this.referenceSeqString = null;
906          else {
907            if (this.referenceSeqString == null)
908              this.referenceSeqString = new StringType();
909            this.referenceSeqString.setValue(value);
910          }
911          return this;
912        }
913
914        /**
915         * @return {@link #strand} (An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.). This is the underlying object with id, value and extensions. The accessor "getStrand" gives direct access to the value
916         */
917        public Enumeration<StrandType> getStrandElement() { 
918          if (this.strand == null)
919            if (Configuration.errorOnAutoCreate())
920              throw new Error("Attempt to auto-create MolecularSequenceReferenceSeqComponent.strand");
921            else if (Configuration.doAutoCreate())
922              this.strand = new Enumeration<StrandType>(new StrandTypeEnumFactory()); // bb
923          return this.strand;
924        }
925
926        public boolean hasStrandElement() { 
927          return this.strand != null && !this.strand.isEmpty();
928        }
929
930        public boolean hasStrand() { 
931          return this.strand != null && !this.strand.isEmpty();
932        }
933
934        /**
935         * @param value {@link #strand} (An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.). This is the underlying object with id, value and extensions. The accessor "getStrand" gives direct access to the value
936         */
937        public MolecularSequenceReferenceSeqComponent setStrandElement(Enumeration<StrandType> value) { 
938          this.strand = value;
939          return this;
940        }
941
942        /**
943         * @return An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.
944         */
945        public StrandType getStrand() { 
946          return this.strand == null ? null : this.strand.getValue();
947        }
948
949        /**
950         * @param value An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.
951         */
952        public MolecularSequenceReferenceSeqComponent setStrand(StrandType value) { 
953          if (value == null)
954            this.strand = null;
955          else {
956            if (this.strand == null)
957              this.strand = new Enumeration<StrandType>(new StrandTypeEnumFactory());
958            this.strand.setValue(value);
959          }
960          return this;
961        }
962
963        /**
964         * @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
965         */
966        public IntegerType getWindowStartElement() { 
967          if (this.windowStart == null)
968            if (Configuration.errorOnAutoCreate())
969              throw new Error("Attempt to auto-create MolecularSequenceReferenceSeqComponent.windowStart");
970            else if (Configuration.doAutoCreate())
971              this.windowStart = new IntegerType(); // bb
972          return this.windowStart;
973        }
974
975        public boolean hasWindowStartElement() { 
976          return this.windowStart != null && !this.windowStart.isEmpty();
977        }
978
979        public boolean hasWindowStart() { 
980          return this.windowStart != null && !this.windowStart.isEmpty();
981        }
982
983        /**
984         * @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
985         */
986        public MolecularSequenceReferenceSeqComponent setWindowStartElement(IntegerType value) { 
987          this.windowStart = value;
988          return this;
989        }
990
991        /**
992         * @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.
993         */
994        public int getWindowStart() { 
995          return this.windowStart == null || this.windowStart.isEmpty() ? 0 : this.windowStart.getValue();
996        }
997
998        /**
999         * @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.
1000         */
1001        public MolecularSequenceReferenceSeqComponent setWindowStart(int value) { 
1002            if (this.windowStart == null)
1003              this.windowStart = new IntegerType();
1004            this.windowStart.setValue(value);
1005          return this;
1006        }
1007
1008        /**
1009         * @return {@link #windowEnd} (End position of the window on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getWindowEnd" gives direct access to the value
1010         */
1011        public IntegerType getWindowEndElement() { 
1012          if (this.windowEnd == null)
1013            if (Configuration.errorOnAutoCreate())
1014              throw new Error("Attempt to auto-create MolecularSequenceReferenceSeqComponent.windowEnd");
1015            else if (Configuration.doAutoCreate())
1016              this.windowEnd = new IntegerType(); // bb
1017          return this.windowEnd;
1018        }
1019
1020        public boolean hasWindowEndElement() { 
1021          return this.windowEnd != null && !this.windowEnd.isEmpty();
1022        }
1023
1024        public boolean hasWindowEnd() { 
1025          return this.windowEnd != null && !this.windowEnd.isEmpty();
1026        }
1027
1028        /**
1029         * @param value {@link #windowEnd} (End position of the window on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getWindowEnd" gives direct access to the value
1030         */
1031        public MolecularSequenceReferenceSeqComponent setWindowEndElement(IntegerType value) { 
1032          this.windowEnd = value;
1033          return this;
1034        }
1035
1036        /**
1037         * @return End position of the window on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
1038         */
1039        public int getWindowEnd() { 
1040          return this.windowEnd == null || this.windowEnd.isEmpty() ? 0 : this.windowEnd.getValue();
1041        }
1042
1043        /**
1044         * @param value End position of the window on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
1045         */
1046        public MolecularSequenceReferenceSeqComponent setWindowEnd(int value) { 
1047            if (this.windowEnd == null)
1048              this.windowEnd = new IntegerType();
1049            this.windowEnd.setValue(value);
1050          return this;
1051        }
1052
1053        protected void listChildren(List<Property> children) {
1054          super.listChildren(children);
1055          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));
1056          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));
1057          children.add(new Property("orientation", "code", "A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the \"sense\" strand, and the opposite complementary strand is the \"antisense\" strand.", 0, 1, orientation));
1058          children.add(new Property("referenceSeqId", "CodeableConcept", "Reference identifier of reference sequence submitted to NCBI. It must match the type in the MolecularSequence.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));
1059          children.add(new Property("referenceSeqPointer", "Reference(MolecularSequence)", "A pointer to another MolecularSequence entity as reference sequence.", 0, 1, referenceSeqPointer));
1060          children.add(new Property("referenceSeqString", "string", "A string like \"ACGT\".", 0, 1, referenceSeqString));
1061          children.add(new Property("strand", "code", "An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.", 0, 1, strand));
1062          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));
1063          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 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));
1064        }
1065
1066        @Override
1067        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1068          switch (_hash) {
1069          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);
1070          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);
1071          case -1439500848: /*orientation*/  return new Property("orientation", "code", "A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the \"sense\" strand, and the opposite complementary strand is the \"antisense\" strand.", 0, 1, orientation);
1072          case -1911500465: /*referenceSeqId*/  return new Property("referenceSeqId", "CodeableConcept", "Reference identifier of reference sequence submitted to NCBI. It must match the type in the MolecularSequence.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);
1073          case 1923414665: /*referenceSeqPointer*/  return new Property("referenceSeqPointer", "Reference(MolecularSequence)", "A pointer to another MolecularSequence entity as reference sequence.", 0, 1, referenceSeqPointer);
1074          case -1648301499: /*referenceSeqString*/  return new Property("referenceSeqString", "string", "A string like \"ACGT\".", 0, 1, referenceSeqString);
1075          case -891993594: /*strand*/  return new Property("strand", "code", "An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.", 0, 1, strand);
1076          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);
1077          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 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);
1078          default: return super.getNamedProperty(_hash, _name, _checkValid);
1079          }
1080
1081        }
1082
1083      @Override
1084      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1085        switch (hash) {
1086        case -1499470472: /*chromosome*/ return this.chromosome == null ? new Base[0] : new Base[] {this.chromosome}; // CodeableConcept
1087        case 1061239735: /*genomeBuild*/ return this.genomeBuild == null ? new Base[0] : new Base[] {this.genomeBuild}; // StringType
1088        case -1439500848: /*orientation*/ return this.orientation == null ? new Base[0] : new Base[] {this.orientation}; // Enumeration<OrientationType>
1089        case -1911500465: /*referenceSeqId*/ return this.referenceSeqId == null ? new Base[0] : new Base[] {this.referenceSeqId}; // CodeableConcept
1090        case 1923414665: /*referenceSeqPointer*/ return this.referenceSeqPointer == null ? new Base[0] : new Base[] {this.referenceSeqPointer}; // Reference
1091        case -1648301499: /*referenceSeqString*/ return this.referenceSeqString == null ? new Base[0] : new Base[] {this.referenceSeqString}; // StringType
1092        case -891993594: /*strand*/ return this.strand == null ? new Base[0] : new Base[] {this.strand}; // Enumeration<StrandType>
1093        case 1903685202: /*windowStart*/ return this.windowStart == null ? new Base[0] : new Base[] {this.windowStart}; // IntegerType
1094        case -217026869: /*windowEnd*/ return this.windowEnd == null ? new Base[0] : new Base[] {this.windowEnd}; // IntegerType
1095        default: return super.getProperty(hash, name, checkValid);
1096        }
1097
1098      }
1099
1100      @Override
1101      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1102        switch (hash) {
1103        case -1499470472: // chromosome
1104          this.chromosome = castToCodeableConcept(value); // CodeableConcept
1105          return value;
1106        case 1061239735: // genomeBuild
1107          this.genomeBuild = castToString(value); // StringType
1108          return value;
1109        case -1439500848: // orientation
1110          value = new OrientationTypeEnumFactory().fromType(castToCode(value));
1111          this.orientation = (Enumeration) value; // Enumeration<OrientationType>
1112          return value;
1113        case -1911500465: // referenceSeqId
1114          this.referenceSeqId = castToCodeableConcept(value); // CodeableConcept
1115          return value;
1116        case 1923414665: // referenceSeqPointer
1117          this.referenceSeqPointer = castToReference(value); // Reference
1118          return value;
1119        case -1648301499: // referenceSeqString
1120          this.referenceSeqString = castToString(value); // StringType
1121          return value;
1122        case -891993594: // strand
1123          value = new StrandTypeEnumFactory().fromType(castToCode(value));
1124          this.strand = (Enumeration) value; // Enumeration<StrandType>
1125          return value;
1126        case 1903685202: // windowStart
1127          this.windowStart = castToInteger(value); // IntegerType
1128          return value;
1129        case -217026869: // windowEnd
1130          this.windowEnd = castToInteger(value); // IntegerType
1131          return value;
1132        default: return super.setProperty(hash, name, value);
1133        }
1134
1135      }
1136
1137      @Override
1138      public Base setProperty(String name, Base value) throws FHIRException {
1139        if (name.equals("chromosome")) {
1140          this.chromosome = castToCodeableConcept(value); // CodeableConcept
1141        } else if (name.equals("genomeBuild")) {
1142          this.genomeBuild = castToString(value); // StringType
1143        } else if (name.equals("orientation")) {
1144          value = new OrientationTypeEnumFactory().fromType(castToCode(value));
1145          this.orientation = (Enumeration) value; // Enumeration<OrientationType>
1146        } else if (name.equals("referenceSeqId")) {
1147          this.referenceSeqId = castToCodeableConcept(value); // CodeableConcept
1148        } else if (name.equals("referenceSeqPointer")) {
1149          this.referenceSeqPointer = castToReference(value); // Reference
1150        } else if (name.equals("referenceSeqString")) {
1151          this.referenceSeqString = castToString(value); // StringType
1152        } else if (name.equals("strand")) {
1153          value = new StrandTypeEnumFactory().fromType(castToCode(value));
1154          this.strand = (Enumeration) value; // Enumeration<StrandType>
1155        } else if (name.equals("windowStart")) {
1156          this.windowStart = castToInteger(value); // IntegerType
1157        } else if (name.equals("windowEnd")) {
1158          this.windowEnd = castToInteger(value); // IntegerType
1159        } else
1160          return super.setProperty(name, value);
1161        return value;
1162      }
1163
1164      @Override
1165      public Base makeProperty(int hash, String name) throws FHIRException {
1166        switch (hash) {
1167        case -1499470472:  return getChromosome(); 
1168        case 1061239735:  return getGenomeBuildElement();
1169        case -1439500848:  return getOrientationElement();
1170        case -1911500465:  return getReferenceSeqId(); 
1171        case 1923414665:  return getReferenceSeqPointer(); 
1172        case -1648301499:  return getReferenceSeqStringElement();
1173        case -891993594:  return getStrandElement();
1174        case 1903685202:  return getWindowStartElement();
1175        case -217026869:  return getWindowEndElement();
1176        default: return super.makeProperty(hash, name);
1177        }
1178
1179      }
1180
1181      @Override
1182      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1183        switch (hash) {
1184        case -1499470472: /*chromosome*/ return new String[] {"CodeableConcept"};
1185        case 1061239735: /*genomeBuild*/ return new String[] {"string"};
1186        case -1439500848: /*orientation*/ return new String[] {"code"};
1187        case -1911500465: /*referenceSeqId*/ return new String[] {"CodeableConcept"};
1188        case 1923414665: /*referenceSeqPointer*/ return new String[] {"Reference"};
1189        case -1648301499: /*referenceSeqString*/ return new String[] {"string"};
1190        case -891993594: /*strand*/ return new String[] {"code"};
1191        case 1903685202: /*windowStart*/ return new String[] {"integer"};
1192        case -217026869: /*windowEnd*/ return new String[] {"integer"};
1193        default: return super.getTypesForProperty(hash, name);
1194        }
1195
1196      }
1197
1198      @Override
1199      public Base addChild(String name) throws FHIRException {
1200        if (name.equals("chromosome")) {
1201          this.chromosome = new CodeableConcept();
1202          return this.chromosome;
1203        }
1204        else if (name.equals("genomeBuild")) {
1205          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.genomeBuild");
1206        }
1207        else if (name.equals("orientation")) {
1208          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.orientation");
1209        }
1210        else if (name.equals("referenceSeqId")) {
1211          this.referenceSeqId = new CodeableConcept();
1212          return this.referenceSeqId;
1213        }
1214        else if (name.equals("referenceSeqPointer")) {
1215          this.referenceSeqPointer = new Reference();
1216          return this.referenceSeqPointer;
1217        }
1218        else if (name.equals("referenceSeqString")) {
1219          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.referenceSeqString");
1220        }
1221        else if (name.equals("strand")) {
1222          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.strand");
1223        }
1224        else if (name.equals("windowStart")) {
1225          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.windowStart");
1226        }
1227        else if (name.equals("windowEnd")) {
1228          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.windowEnd");
1229        }
1230        else
1231          return super.addChild(name);
1232      }
1233
1234      public MolecularSequenceReferenceSeqComponent copy() {
1235        MolecularSequenceReferenceSeqComponent dst = new MolecularSequenceReferenceSeqComponent();
1236        copyValues(dst);
1237        dst.chromosome = chromosome == null ? null : chromosome.copy();
1238        dst.genomeBuild = genomeBuild == null ? null : genomeBuild.copy();
1239        dst.orientation = orientation == null ? null : orientation.copy();
1240        dst.referenceSeqId = referenceSeqId == null ? null : referenceSeqId.copy();
1241        dst.referenceSeqPointer = referenceSeqPointer == null ? null : referenceSeqPointer.copy();
1242        dst.referenceSeqString = referenceSeqString == null ? null : referenceSeqString.copy();
1243        dst.strand = strand == null ? null : strand.copy();
1244        dst.windowStart = windowStart == null ? null : windowStart.copy();
1245        dst.windowEnd = windowEnd == null ? null : windowEnd.copy();
1246        return dst;
1247      }
1248
1249      @Override
1250      public boolean equalsDeep(Base other_) {
1251        if (!super.equalsDeep(other_))
1252          return false;
1253        if (!(other_ instanceof MolecularSequenceReferenceSeqComponent))
1254          return false;
1255        MolecularSequenceReferenceSeqComponent o = (MolecularSequenceReferenceSeqComponent) other_;
1256        return compareDeep(chromosome, o.chromosome, true) && compareDeep(genomeBuild, o.genomeBuild, true)
1257           && compareDeep(orientation, o.orientation, true) && compareDeep(referenceSeqId, o.referenceSeqId, true)
1258           && compareDeep(referenceSeqPointer, o.referenceSeqPointer, true) && compareDeep(referenceSeqString, o.referenceSeqString, true)
1259           && compareDeep(strand, o.strand, true) && compareDeep(windowStart, o.windowStart, true) && compareDeep(windowEnd, o.windowEnd, true)
1260          ;
1261      }
1262
1263      @Override
1264      public boolean equalsShallow(Base other_) {
1265        if (!super.equalsShallow(other_))
1266          return false;
1267        if (!(other_ instanceof MolecularSequenceReferenceSeqComponent))
1268          return false;
1269        MolecularSequenceReferenceSeqComponent o = (MolecularSequenceReferenceSeqComponent) other_;
1270        return compareValues(genomeBuild, o.genomeBuild, true) && compareValues(orientation, o.orientation, true)
1271           && compareValues(referenceSeqString, o.referenceSeqString, true) && compareValues(strand, o.strand, true)
1272           && compareValues(windowStart, o.windowStart, true) && compareValues(windowEnd, o.windowEnd, true);
1273      }
1274
1275      public boolean isEmpty() {
1276        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(chromosome, genomeBuild, orientation
1277          , referenceSeqId, referenceSeqPointer, referenceSeqString, strand, windowStart, windowEnd
1278          );
1279      }
1280
1281  public String fhirType() {
1282    return "MolecularSequence.referenceSeq";
1283
1284  }
1285
1286  }
1287
1288    @Block()
1289    public static class MolecularSequenceVariantComponent extends BackboneElement implements IBaseBackboneElement {
1290        /**
1291         * 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.
1292         */
1293        @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true)
1294        @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." )
1295        protected IntegerType start;
1296
1297        /**
1298         * End position of the variant on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
1299         */
1300        @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1301        @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 exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." )
1302        protected IntegerType end;
1303
1304        /**
1305         * 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.
1306         */
1307        @Child(name = "observedAllele", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1308        @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." )
1309        protected StringType observedAllele;
1310
1311        /**
1312         * 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.
1313         */
1314        @Child(name = "referenceAllele", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
1315        @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." )
1316        protected StringType referenceAllele;
1317
1318        /**
1319         * 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).
1320         */
1321        @Child(name = "cigar", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1322        @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)." )
1323        protected StringType cigar;
1324
1325        /**
1326         * A pointer to an Observation containing variant information.
1327         */
1328        @Child(name = "variantPointer", type = {Observation.class}, order=6, min=0, max=1, modifier=false, summary=true)
1329        @Description(shortDefinition="Pointer to observed variant information", formalDefinition="A pointer to an Observation containing variant information." )
1330        protected Reference variantPointer;
1331
1332        /**
1333         * The actual object that is the target of the reference (A pointer to an Observation containing variant information.)
1334         */
1335        protected Observation variantPointerTarget;
1336
1337        private static final long serialVersionUID = 105611837L;
1338
1339    /**
1340     * Constructor
1341     */
1342      public MolecularSequenceVariantComponent() {
1343        super();
1344      }
1345
1346        /**
1347         * @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
1348         */
1349        public IntegerType getStartElement() { 
1350          if (this.start == null)
1351            if (Configuration.errorOnAutoCreate())
1352              throw new Error("Attempt to auto-create MolecularSequenceVariantComponent.start");
1353            else if (Configuration.doAutoCreate())
1354              this.start = new IntegerType(); // bb
1355          return this.start;
1356        }
1357
1358        public boolean hasStartElement() { 
1359          return this.start != null && !this.start.isEmpty();
1360        }
1361
1362        public boolean hasStart() { 
1363          return this.start != null && !this.start.isEmpty();
1364        }
1365
1366        /**
1367         * @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
1368         */
1369        public MolecularSequenceVariantComponent setStartElement(IntegerType value) { 
1370          this.start = value;
1371          return this;
1372        }
1373
1374        /**
1375         * @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.
1376         */
1377        public int getStart() { 
1378          return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue();
1379        }
1380
1381        /**
1382         * @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.
1383         */
1384        public MolecularSequenceVariantComponent setStart(int value) { 
1385            if (this.start == null)
1386              this.start = new IntegerType();
1387            this.start.setValue(value);
1388          return this;
1389        }
1390
1391        /**
1392         * @return {@link #end} (End position of the variant on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
1393         */
1394        public IntegerType getEndElement() { 
1395          if (this.end == null)
1396            if (Configuration.errorOnAutoCreate())
1397              throw new Error("Attempt to auto-create MolecularSequenceVariantComponent.end");
1398            else if (Configuration.doAutoCreate())
1399              this.end = new IntegerType(); // bb
1400          return this.end;
1401        }
1402
1403        public boolean hasEndElement() { 
1404          return this.end != null && !this.end.isEmpty();
1405        }
1406
1407        public boolean hasEnd() { 
1408          return this.end != null && !this.end.isEmpty();
1409        }
1410
1411        /**
1412         * @param value {@link #end} (End position of the variant on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
1413         */
1414        public MolecularSequenceVariantComponent setEndElement(IntegerType value) { 
1415          this.end = value;
1416          return this;
1417        }
1418
1419        /**
1420         * @return End position of the variant on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
1421         */
1422        public int getEnd() { 
1423          return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue();
1424        }
1425
1426        /**
1427         * @param value End position of the variant on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
1428         */
1429        public MolecularSequenceVariantComponent setEnd(int value) { 
1430            if (this.end == null)
1431              this.end = new IntegerType();
1432            this.end.setValue(value);
1433          return this;
1434        }
1435
1436        /**
1437         * @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
1438         */
1439        public StringType getObservedAlleleElement() { 
1440          if (this.observedAllele == null)
1441            if (Configuration.errorOnAutoCreate())
1442              throw new Error("Attempt to auto-create MolecularSequenceVariantComponent.observedAllele");
1443            else if (Configuration.doAutoCreate())
1444              this.observedAllele = new StringType(); // bb
1445          return this.observedAllele;
1446        }
1447
1448        public boolean hasObservedAlleleElement() { 
1449          return this.observedAllele != null && !this.observedAllele.isEmpty();
1450        }
1451
1452        public boolean hasObservedAllele() { 
1453          return this.observedAllele != null && !this.observedAllele.isEmpty();
1454        }
1455
1456        /**
1457         * @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
1458         */
1459        public MolecularSequenceVariantComponent setObservedAlleleElement(StringType value) { 
1460          this.observedAllele = value;
1461          return this;
1462        }
1463
1464        /**
1465         * @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.
1466         */
1467        public String getObservedAllele() { 
1468          return this.observedAllele == null ? null : this.observedAllele.getValue();
1469        }
1470
1471        /**
1472         * @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.
1473         */
1474        public MolecularSequenceVariantComponent setObservedAllele(String value) { 
1475          if (Utilities.noString(value))
1476            this.observedAllele = null;
1477          else {
1478            if (this.observedAllele == null)
1479              this.observedAllele = new StringType();
1480            this.observedAllele.setValue(value);
1481          }
1482          return this;
1483        }
1484
1485        /**
1486         * @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
1487         */
1488        public StringType getReferenceAlleleElement() { 
1489          if (this.referenceAllele == null)
1490            if (Configuration.errorOnAutoCreate())
1491              throw new Error("Attempt to auto-create MolecularSequenceVariantComponent.referenceAllele");
1492            else if (Configuration.doAutoCreate())
1493              this.referenceAllele = new StringType(); // bb
1494          return this.referenceAllele;
1495        }
1496
1497        public boolean hasReferenceAlleleElement() { 
1498          return this.referenceAllele != null && !this.referenceAllele.isEmpty();
1499        }
1500
1501        public boolean hasReferenceAllele() { 
1502          return this.referenceAllele != null && !this.referenceAllele.isEmpty();
1503        }
1504
1505        /**
1506         * @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
1507         */
1508        public MolecularSequenceVariantComponent setReferenceAlleleElement(StringType value) { 
1509          this.referenceAllele = value;
1510          return this;
1511        }
1512
1513        /**
1514         * @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.
1515         */
1516        public String getReferenceAllele() { 
1517          return this.referenceAllele == null ? null : this.referenceAllele.getValue();
1518        }
1519
1520        /**
1521         * @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.
1522         */
1523        public MolecularSequenceVariantComponent setReferenceAllele(String value) { 
1524          if (Utilities.noString(value))
1525            this.referenceAllele = null;
1526          else {
1527            if (this.referenceAllele == null)
1528              this.referenceAllele = new StringType();
1529            this.referenceAllele.setValue(value);
1530          }
1531          return this;
1532        }
1533
1534        /**
1535         * @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
1536         */
1537        public StringType getCigarElement() { 
1538          if (this.cigar == null)
1539            if (Configuration.errorOnAutoCreate())
1540              throw new Error("Attempt to auto-create MolecularSequenceVariantComponent.cigar");
1541            else if (Configuration.doAutoCreate())
1542              this.cigar = new StringType(); // bb
1543          return this.cigar;
1544        }
1545
1546        public boolean hasCigarElement() { 
1547          return this.cigar != null && !this.cigar.isEmpty();
1548        }
1549
1550        public boolean hasCigar() { 
1551          return this.cigar != null && !this.cigar.isEmpty();
1552        }
1553
1554        /**
1555         * @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
1556         */
1557        public MolecularSequenceVariantComponent setCigarElement(StringType value) { 
1558          this.cigar = value;
1559          return this;
1560        }
1561
1562        /**
1563         * @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).
1564         */
1565        public String getCigar() { 
1566          return this.cigar == null ? null : this.cigar.getValue();
1567        }
1568
1569        /**
1570         * @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).
1571         */
1572        public MolecularSequenceVariantComponent setCigar(String value) { 
1573          if (Utilities.noString(value))
1574            this.cigar = null;
1575          else {
1576            if (this.cigar == null)
1577              this.cigar = new StringType();
1578            this.cigar.setValue(value);
1579          }
1580          return this;
1581        }
1582
1583        /**
1584         * @return {@link #variantPointer} (A pointer to an Observation containing variant information.)
1585         */
1586        public Reference getVariantPointer() { 
1587          if (this.variantPointer == null)
1588            if (Configuration.errorOnAutoCreate())
1589              throw new Error("Attempt to auto-create MolecularSequenceVariantComponent.variantPointer");
1590            else if (Configuration.doAutoCreate())
1591              this.variantPointer = new Reference(); // cc
1592          return this.variantPointer;
1593        }
1594
1595        public boolean hasVariantPointer() { 
1596          return this.variantPointer != null && !this.variantPointer.isEmpty();
1597        }
1598
1599        /**
1600         * @param value {@link #variantPointer} (A pointer to an Observation containing variant information.)
1601         */
1602        public MolecularSequenceVariantComponent setVariantPointer(Reference value) { 
1603          this.variantPointer = value;
1604          return this;
1605        }
1606
1607        /**
1608         * @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.)
1609         */
1610        public Observation getVariantPointerTarget() { 
1611          if (this.variantPointerTarget == null)
1612            if (Configuration.errorOnAutoCreate())
1613              throw new Error("Attempt to auto-create MolecularSequenceVariantComponent.variantPointer");
1614            else if (Configuration.doAutoCreate())
1615              this.variantPointerTarget = new Observation(); // aa
1616          return this.variantPointerTarget;
1617        }
1618
1619        /**
1620         * @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.)
1621         */
1622        public MolecularSequenceVariantComponent setVariantPointerTarget(Observation value) { 
1623          this.variantPointerTarget = value;
1624          return this;
1625        }
1626
1627        protected void listChildren(List<Property> children) {
1628          super.listChildren(children);
1629          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));
1630          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 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));
1631          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));
1632          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));
1633          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));
1634          children.add(new Property("variantPointer", "Reference(Observation)", "A pointer to an Observation containing variant information.", 0, 1, variantPointer));
1635        }
1636
1637        @Override
1638        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1639          switch (_hash) {
1640          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);
1641          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 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);
1642          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);
1643          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);
1644          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);
1645          case -1654319624: /*variantPointer*/  return new Property("variantPointer", "Reference(Observation)", "A pointer to an Observation containing variant information.", 0, 1, variantPointer);
1646          default: return super.getNamedProperty(_hash, _name, _checkValid);
1647          }
1648
1649        }
1650
1651      @Override
1652      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1653        switch (hash) {
1654        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType
1655        case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType
1656        case -1418745787: /*observedAllele*/ return this.observedAllele == null ? new Base[0] : new Base[] {this.observedAllele}; // StringType
1657        case 364045960: /*referenceAllele*/ return this.referenceAllele == null ? new Base[0] : new Base[] {this.referenceAllele}; // StringType
1658        case 94658738: /*cigar*/ return this.cigar == null ? new Base[0] : new Base[] {this.cigar}; // StringType
1659        case -1654319624: /*variantPointer*/ return this.variantPointer == null ? new Base[0] : new Base[] {this.variantPointer}; // Reference
1660        default: return super.getProperty(hash, name, checkValid);
1661        }
1662
1663      }
1664
1665      @Override
1666      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1667        switch (hash) {
1668        case 109757538: // start
1669          this.start = castToInteger(value); // IntegerType
1670          return value;
1671        case 100571: // end
1672          this.end = castToInteger(value); // IntegerType
1673          return value;
1674        case -1418745787: // observedAllele
1675          this.observedAllele = castToString(value); // StringType
1676          return value;
1677        case 364045960: // referenceAllele
1678          this.referenceAllele = castToString(value); // StringType
1679          return value;
1680        case 94658738: // cigar
1681          this.cigar = castToString(value); // StringType
1682          return value;
1683        case -1654319624: // variantPointer
1684          this.variantPointer = castToReference(value); // Reference
1685          return value;
1686        default: return super.setProperty(hash, name, value);
1687        }
1688
1689      }
1690
1691      @Override
1692      public Base setProperty(String name, Base value) throws FHIRException {
1693        if (name.equals("start")) {
1694          this.start = castToInteger(value); // IntegerType
1695        } else if (name.equals("end")) {
1696          this.end = castToInteger(value); // IntegerType
1697        } else if (name.equals("observedAllele")) {
1698          this.observedAllele = castToString(value); // StringType
1699        } else if (name.equals("referenceAllele")) {
1700          this.referenceAllele = castToString(value); // StringType
1701        } else if (name.equals("cigar")) {
1702          this.cigar = castToString(value); // StringType
1703        } else if (name.equals("variantPointer")) {
1704          this.variantPointer = castToReference(value); // Reference
1705        } else
1706          return super.setProperty(name, value);
1707        return value;
1708      }
1709
1710      @Override
1711      public Base makeProperty(int hash, String name) throws FHIRException {
1712        switch (hash) {
1713        case 109757538:  return getStartElement();
1714        case 100571:  return getEndElement();
1715        case -1418745787:  return getObservedAlleleElement();
1716        case 364045960:  return getReferenceAlleleElement();
1717        case 94658738:  return getCigarElement();
1718        case -1654319624:  return getVariantPointer(); 
1719        default: return super.makeProperty(hash, name);
1720        }
1721
1722      }
1723
1724      @Override
1725      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1726        switch (hash) {
1727        case 109757538: /*start*/ return new String[] {"integer"};
1728        case 100571: /*end*/ return new String[] {"integer"};
1729        case -1418745787: /*observedAllele*/ return new String[] {"string"};
1730        case 364045960: /*referenceAllele*/ return new String[] {"string"};
1731        case 94658738: /*cigar*/ return new String[] {"string"};
1732        case -1654319624: /*variantPointer*/ return new String[] {"Reference"};
1733        default: return super.getTypesForProperty(hash, name);
1734        }
1735
1736      }
1737
1738      @Override
1739      public Base addChild(String name) throws FHIRException {
1740        if (name.equals("start")) {
1741          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.start");
1742        }
1743        else if (name.equals("end")) {
1744          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.end");
1745        }
1746        else if (name.equals("observedAllele")) {
1747          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.observedAllele");
1748        }
1749        else if (name.equals("referenceAllele")) {
1750          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.referenceAllele");
1751        }
1752        else if (name.equals("cigar")) {
1753          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.cigar");
1754        }
1755        else if (name.equals("variantPointer")) {
1756          this.variantPointer = new Reference();
1757          return this.variantPointer;
1758        }
1759        else
1760          return super.addChild(name);
1761      }
1762
1763      public MolecularSequenceVariantComponent copy() {
1764        MolecularSequenceVariantComponent dst = new MolecularSequenceVariantComponent();
1765        copyValues(dst);
1766        dst.start = start == null ? null : start.copy();
1767        dst.end = end == null ? null : end.copy();
1768        dst.observedAllele = observedAllele == null ? null : observedAllele.copy();
1769        dst.referenceAllele = referenceAllele == null ? null : referenceAllele.copy();
1770        dst.cigar = cigar == null ? null : cigar.copy();
1771        dst.variantPointer = variantPointer == null ? null : variantPointer.copy();
1772        return dst;
1773      }
1774
1775      @Override
1776      public boolean equalsDeep(Base other_) {
1777        if (!super.equalsDeep(other_))
1778          return false;
1779        if (!(other_ instanceof MolecularSequenceVariantComponent))
1780          return false;
1781        MolecularSequenceVariantComponent o = (MolecularSequenceVariantComponent) other_;
1782        return compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(observedAllele, o.observedAllele, true)
1783           && compareDeep(referenceAllele, o.referenceAllele, true) && compareDeep(cigar, o.cigar, true) && compareDeep(variantPointer, o.variantPointer, true)
1784          ;
1785      }
1786
1787      @Override
1788      public boolean equalsShallow(Base other_) {
1789        if (!super.equalsShallow(other_))
1790          return false;
1791        if (!(other_ instanceof MolecularSequenceVariantComponent))
1792          return false;
1793        MolecularSequenceVariantComponent o = (MolecularSequenceVariantComponent) other_;
1794        return compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(observedAllele, o.observedAllele, true)
1795           && compareValues(referenceAllele, o.referenceAllele, true) && compareValues(cigar, o.cigar, true);
1796      }
1797
1798      public boolean isEmpty() {
1799        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(start, end, observedAllele
1800          , referenceAllele, cigar, variantPointer);
1801      }
1802
1803  public String fhirType() {
1804    return "MolecularSequence.variant";
1805
1806  }
1807
1808  }
1809
1810    @Block()
1811    public static class MolecularSequenceQualityComponent extends BackboneElement implements IBaseBackboneElement {
1812        /**
1813         * INDEL / SNP / Undefined variant.
1814         */
1815        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1816        @Description(shortDefinition="indel | snp | unknown", formalDefinition="INDEL / SNP / Undefined variant." )
1817        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/quality-type")
1818        protected Enumeration<QualityType> type;
1819
1820        /**
1821         * Gold standard sequence used for comparing against.
1822         */
1823        @Child(name = "standardSequence", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
1824        @Description(shortDefinition="Standard sequence for comparison", formalDefinition="Gold standard sequence used for comparing against." )
1825        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/sequence-quality-standardSequence")
1826        protected CodeableConcept standardSequence;
1827
1828        /**
1829         * Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
1830         */
1831        @Child(name = "start", type = {IntegerType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1832        @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." )
1833        protected IntegerType start;
1834
1835        /**
1836         * End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
1837         */
1838        @Child(name = "end", type = {IntegerType.class}, order=4, min=0, max=1, modifier=false, summary=true)
1839        @Description(shortDefinition="End position of the sequence", formalDefinition="End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." )
1840        protected IntegerType end;
1841
1842        /**
1843         * The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).
1844         */
1845        @Child(name = "score", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=true)
1846        @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))." )
1847        protected Quantity score;
1848
1849        /**
1850         * Which method is used to get sequence quality.
1851         */
1852        @Child(name = "method", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true)
1853        @Description(shortDefinition="Method to get quality", formalDefinition="Which method is used to get sequence quality." )
1854        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/sequence-quality-method")
1855        protected CodeableConcept method;
1856
1857        /**
1858         * 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.
1859         */
1860        @Child(name = "truthTP", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true)
1861        @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." )
1862        protected DecimalType truthTP;
1863
1864        /**
1865         * 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.
1866         */
1867        @Child(name = "queryTP", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=true)
1868        @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." )
1869        protected DecimalType queryTP;
1870
1871        /**
1872         * 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.
1873         */
1874        @Child(name = "truthFN", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=true)
1875        @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." )
1876        protected DecimalType truthFN;
1877
1878        /**
1879         * 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.
1880         */
1881        @Child(name = "queryFP", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=true)
1882        @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." )
1883        protected DecimalType queryFP;
1884
1885        /**
1886         * 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).
1887         */
1888        @Child(name = "gtFP", type = {DecimalType.class}, order=11, min=0, max=1, modifier=false, summary=true)
1889        @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)." )
1890        protected DecimalType gtFP;
1891
1892        /**
1893         * QUERY.TP / (QUERY.TP + QUERY.FP).
1894         */
1895        @Child(name = "precision", type = {DecimalType.class}, order=12, min=0, max=1, modifier=false, summary=true)
1896        @Description(shortDefinition="Precision of comparison", formalDefinition="QUERY.TP / (QUERY.TP + QUERY.FP)." )
1897        protected DecimalType precision;
1898
1899        /**
1900         * TRUTH.TP / (TRUTH.TP + TRUTH.FN).
1901         */
1902        @Child(name = "recall", type = {DecimalType.class}, order=13, min=0, max=1, modifier=false, summary=true)
1903        @Description(shortDefinition="Recall of comparison", formalDefinition="TRUTH.TP / (TRUTH.TP + TRUTH.FN)." )
1904        protected DecimalType recall;
1905
1906        /**
1907         * Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).
1908         */
1909        @Child(name = "fScore", type = {DecimalType.class}, order=14, min=0, max=1, modifier=false, summary=true)
1910        @Description(shortDefinition="F-score", formalDefinition="Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall)." )
1911        protected DecimalType fScore;
1912
1913        /**
1914         * Receiver Operator Characteristic (ROC) Curve  to give sensitivity/specificity tradeoff.
1915         */
1916        @Child(name = "roc", type = {}, order=15, min=0, max=1, modifier=false, summary=true)
1917        @Description(shortDefinition="Receiver Operator Characteristic (ROC) Curve", formalDefinition="Receiver Operator Characteristic (ROC) Curve  to give sensitivity/specificity tradeoff." )
1918        protected MolecularSequenceQualityRocComponent roc;
1919
1920        private static final long serialVersionUID = -811933526L;
1921
1922    /**
1923     * Constructor
1924     */
1925      public MolecularSequenceQualityComponent() {
1926        super();
1927      }
1928
1929    /**
1930     * Constructor
1931     */
1932      public MolecularSequenceQualityComponent(Enumeration<QualityType> type) {
1933        super();
1934        this.type = type;
1935      }
1936
1937        /**
1938         * @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
1939         */
1940        public Enumeration<QualityType> getTypeElement() { 
1941          if (this.type == null)
1942            if (Configuration.errorOnAutoCreate())
1943              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.type");
1944            else if (Configuration.doAutoCreate())
1945              this.type = new Enumeration<QualityType>(new QualityTypeEnumFactory()); // bb
1946          return this.type;
1947        }
1948
1949        public boolean hasTypeElement() { 
1950          return this.type != null && !this.type.isEmpty();
1951        }
1952
1953        public boolean hasType() { 
1954          return this.type != null && !this.type.isEmpty();
1955        }
1956
1957        /**
1958         * @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
1959         */
1960        public MolecularSequenceQualityComponent setTypeElement(Enumeration<QualityType> value) { 
1961          this.type = value;
1962          return this;
1963        }
1964
1965        /**
1966         * @return INDEL / SNP / Undefined variant.
1967         */
1968        public QualityType getType() { 
1969          return this.type == null ? null : this.type.getValue();
1970        }
1971
1972        /**
1973         * @param value INDEL / SNP / Undefined variant.
1974         */
1975        public MolecularSequenceQualityComponent setType(QualityType value) { 
1976            if (this.type == null)
1977              this.type = new Enumeration<QualityType>(new QualityTypeEnumFactory());
1978            this.type.setValue(value);
1979          return this;
1980        }
1981
1982        /**
1983         * @return {@link #standardSequence} (Gold standard sequence used for comparing against.)
1984         */
1985        public CodeableConcept getStandardSequence() { 
1986          if (this.standardSequence == null)
1987            if (Configuration.errorOnAutoCreate())
1988              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.standardSequence");
1989            else if (Configuration.doAutoCreate())
1990              this.standardSequence = new CodeableConcept(); // cc
1991          return this.standardSequence;
1992        }
1993
1994        public boolean hasStandardSequence() { 
1995          return this.standardSequence != null && !this.standardSequence.isEmpty();
1996        }
1997
1998        /**
1999         * @param value {@link #standardSequence} (Gold standard sequence used for comparing against.)
2000         */
2001        public MolecularSequenceQualityComponent setStandardSequence(CodeableConcept value) { 
2002          this.standardSequence = value;
2003          return this;
2004        }
2005
2006        /**
2007         * @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
2008         */
2009        public IntegerType getStartElement() { 
2010          if (this.start == null)
2011            if (Configuration.errorOnAutoCreate())
2012              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.start");
2013            else if (Configuration.doAutoCreate())
2014              this.start = new IntegerType(); // bb
2015          return this.start;
2016        }
2017
2018        public boolean hasStartElement() { 
2019          return this.start != null && !this.start.isEmpty();
2020        }
2021
2022        public boolean hasStart() { 
2023          return this.start != null && !this.start.isEmpty();
2024        }
2025
2026        /**
2027         * @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
2028         */
2029        public MolecularSequenceQualityComponent setStartElement(IntegerType value) { 
2030          this.start = value;
2031          return this;
2032        }
2033
2034        /**
2035         * @return Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
2036         */
2037        public int getStart() { 
2038          return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue();
2039        }
2040
2041        /**
2042         * @param value Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
2043         */
2044        public MolecularSequenceQualityComponent setStart(int value) { 
2045            if (this.start == null)
2046              this.start = new IntegerType();
2047            this.start.setValue(value);
2048          return this;
2049        }
2050
2051        /**
2052         * @return {@link #end} (End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
2053         */
2054        public IntegerType getEndElement() { 
2055          if (this.end == null)
2056            if (Configuration.errorOnAutoCreate())
2057              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.end");
2058            else if (Configuration.doAutoCreate())
2059              this.end = new IntegerType(); // bb
2060          return this.end;
2061        }
2062
2063        public boolean hasEndElement() { 
2064          return this.end != null && !this.end.isEmpty();
2065        }
2066
2067        public boolean hasEnd() { 
2068          return this.end != null && !this.end.isEmpty();
2069        }
2070
2071        /**
2072         * @param value {@link #end} (End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
2073         */
2074        public MolecularSequenceQualityComponent setEndElement(IntegerType value) { 
2075          this.end = value;
2076          return this;
2077        }
2078
2079        /**
2080         * @return End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
2081         */
2082        public int getEnd() { 
2083          return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue();
2084        }
2085
2086        /**
2087         * @param value End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
2088         */
2089        public MolecularSequenceQualityComponent setEnd(int value) { 
2090            if (this.end == null)
2091              this.end = new IntegerType();
2092            this.end.setValue(value);
2093          return this;
2094        }
2095
2096        /**
2097         * @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)).)
2098         */
2099        public Quantity getScore() { 
2100          if (this.score == null)
2101            if (Configuration.errorOnAutoCreate())
2102              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.score");
2103            else if (Configuration.doAutoCreate())
2104              this.score = new Quantity(); // cc
2105          return this.score;
2106        }
2107
2108        public boolean hasScore() { 
2109          return this.score != null && !this.score.isEmpty();
2110        }
2111
2112        /**
2113         * @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)).)
2114         */
2115        public MolecularSequenceQualityComponent setScore(Quantity value) { 
2116          this.score = value;
2117          return this;
2118        }
2119
2120        /**
2121         * @return {@link #method} (Which method is used to get sequence quality.)
2122         */
2123        public CodeableConcept getMethod() { 
2124          if (this.method == null)
2125            if (Configuration.errorOnAutoCreate())
2126              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.method");
2127            else if (Configuration.doAutoCreate())
2128              this.method = new CodeableConcept(); // cc
2129          return this.method;
2130        }
2131
2132        public boolean hasMethod() { 
2133          return this.method != null && !this.method.isEmpty();
2134        }
2135
2136        /**
2137         * @param value {@link #method} (Which method is used to get sequence quality.)
2138         */
2139        public MolecularSequenceQualityComponent setMethod(CodeableConcept value) { 
2140          this.method = value;
2141          return this;
2142        }
2143
2144        /**
2145         * @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
2146         */
2147        public DecimalType getTruthTPElement() { 
2148          if (this.truthTP == null)
2149            if (Configuration.errorOnAutoCreate())
2150              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.truthTP");
2151            else if (Configuration.doAutoCreate())
2152              this.truthTP = new DecimalType(); // bb
2153          return this.truthTP;
2154        }
2155
2156        public boolean hasTruthTPElement() { 
2157          return this.truthTP != null && !this.truthTP.isEmpty();
2158        }
2159
2160        public boolean hasTruthTP() { 
2161          return this.truthTP != null && !this.truthTP.isEmpty();
2162        }
2163
2164        /**
2165         * @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
2166         */
2167        public MolecularSequenceQualityComponent setTruthTPElement(DecimalType value) { 
2168          this.truthTP = value;
2169          return this;
2170        }
2171
2172        /**
2173         * @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.
2174         */
2175        public BigDecimal getTruthTP() { 
2176          return this.truthTP == null ? null : this.truthTP.getValue();
2177        }
2178
2179        /**
2180         * @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.
2181         */
2182        public MolecularSequenceQualityComponent setTruthTP(BigDecimal value) { 
2183          if (value == null)
2184            this.truthTP = null;
2185          else {
2186            if (this.truthTP == null)
2187              this.truthTP = new DecimalType();
2188            this.truthTP.setValue(value);
2189          }
2190          return this;
2191        }
2192
2193        /**
2194         * @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.
2195         */
2196        public MolecularSequenceQualityComponent setTruthTP(long value) { 
2197              this.truthTP = new DecimalType();
2198            this.truthTP.setValue(value);
2199          return this;
2200        }
2201
2202        /**
2203         * @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.
2204         */
2205        public MolecularSequenceQualityComponent setTruthTP(double value) { 
2206              this.truthTP = new DecimalType();
2207            this.truthTP.setValue(value);
2208          return this;
2209        }
2210
2211        /**
2212         * @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
2213         */
2214        public DecimalType getQueryTPElement() { 
2215          if (this.queryTP == null)
2216            if (Configuration.errorOnAutoCreate())
2217              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.queryTP");
2218            else if (Configuration.doAutoCreate())
2219              this.queryTP = new DecimalType(); // bb
2220          return this.queryTP;
2221        }
2222
2223        public boolean hasQueryTPElement() { 
2224          return this.queryTP != null && !this.queryTP.isEmpty();
2225        }
2226
2227        public boolean hasQueryTP() { 
2228          return this.queryTP != null && !this.queryTP.isEmpty();
2229        }
2230
2231        /**
2232         * @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
2233         */
2234        public MolecularSequenceQualityComponent setQueryTPElement(DecimalType value) { 
2235          this.queryTP = value;
2236          return this;
2237        }
2238
2239        /**
2240         * @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.
2241         */
2242        public BigDecimal getQueryTP() { 
2243          return this.queryTP == null ? null : this.queryTP.getValue();
2244        }
2245
2246        /**
2247         * @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.
2248         */
2249        public MolecularSequenceQualityComponent setQueryTP(BigDecimal value) { 
2250          if (value == null)
2251            this.queryTP = null;
2252          else {
2253            if (this.queryTP == null)
2254              this.queryTP = new DecimalType();
2255            this.queryTP.setValue(value);
2256          }
2257          return this;
2258        }
2259
2260        /**
2261         * @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.
2262         */
2263        public MolecularSequenceQualityComponent setQueryTP(long value) { 
2264              this.queryTP = new DecimalType();
2265            this.queryTP.setValue(value);
2266          return this;
2267        }
2268
2269        /**
2270         * @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.
2271         */
2272        public MolecularSequenceQualityComponent setQueryTP(double value) { 
2273              this.queryTP = new DecimalType();
2274            this.queryTP.setValue(value);
2275          return this;
2276        }
2277
2278        /**
2279         * @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
2280         */
2281        public DecimalType getTruthFNElement() { 
2282          if (this.truthFN == null)
2283            if (Configuration.errorOnAutoCreate())
2284              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.truthFN");
2285            else if (Configuration.doAutoCreate())
2286              this.truthFN = new DecimalType(); // bb
2287          return this.truthFN;
2288        }
2289
2290        public boolean hasTruthFNElement() { 
2291          return this.truthFN != null && !this.truthFN.isEmpty();
2292        }
2293
2294        public boolean hasTruthFN() { 
2295          return this.truthFN != null && !this.truthFN.isEmpty();
2296        }
2297
2298        /**
2299         * @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
2300         */
2301        public MolecularSequenceQualityComponent setTruthFNElement(DecimalType value) { 
2302          this.truthFN = value;
2303          return this;
2304        }
2305
2306        /**
2307         * @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.
2308         */
2309        public BigDecimal getTruthFN() { 
2310          return this.truthFN == null ? null : this.truthFN.getValue();
2311        }
2312
2313        /**
2314         * @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.
2315         */
2316        public MolecularSequenceQualityComponent setTruthFN(BigDecimal value) { 
2317          if (value == null)
2318            this.truthFN = null;
2319          else {
2320            if (this.truthFN == null)
2321              this.truthFN = new DecimalType();
2322            this.truthFN.setValue(value);
2323          }
2324          return this;
2325        }
2326
2327        /**
2328         * @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.
2329         */
2330        public MolecularSequenceQualityComponent setTruthFN(long value) { 
2331              this.truthFN = new DecimalType();
2332            this.truthFN.setValue(value);
2333          return this;
2334        }
2335
2336        /**
2337         * @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.
2338         */
2339        public MolecularSequenceQualityComponent setTruthFN(double value) { 
2340              this.truthFN = new DecimalType();
2341            this.truthFN.setValue(value);
2342          return this;
2343        }
2344
2345        /**
2346         * @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
2347         */
2348        public DecimalType getQueryFPElement() { 
2349          if (this.queryFP == null)
2350            if (Configuration.errorOnAutoCreate())
2351              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.queryFP");
2352            else if (Configuration.doAutoCreate())
2353              this.queryFP = new DecimalType(); // bb
2354          return this.queryFP;
2355        }
2356
2357        public boolean hasQueryFPElement() { 
2358          return this.queryFP != null && !this.queryFP.isEmpty();
2359        }
2360
2361        public boolean hasQueryFP() { 
2362          return this.queryFP != null && !this.queryFP.isEmpty();
2363        }
2364
2365        /**
2366         * @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
2367         */
2368        public MolecularSequenceQualityComponent setQueryFPElement(DecimalType value) { 
2369          this.queryFP = value;
2370          return this;
2371        }
2372
2373        /**
2374         * @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.
2375         */
2376        public BigDecimal getQueryFP() { 
2377          return this.queryFP == null ? null : this.queryFP.getValue();
2378        }
2379
2380        /**
2381         * @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.
2382         */
2383        public MolecularSequenceQualityComponent setQueryFP(BigDecimal value) { 
2384          if (value == null)
2385            this.queryFP = null;
2386          else {
2387            if (this.queryFP == null)
2388              this.queryFP = new DecimalType();
2389            this.queryFP.setValue(value);
2390          }
2391          return this;
2392        }
2393
2394        /**
2395         * @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.
2396         */
2397        public MolecularSequenceQualityComponent setQueryFP(long value) { 
2398              this.queryFP = new DecimalType();
2399            this.queryFP.setValue(value);
2400          return this;
2401        }
2402
2403        /**
2404         * @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.
2405         */
2406        public MolecularSequenceQualityComponent setQueryFP(double value) { 
2407              this.queryFP = new DecimalType();
2408            this.queryFP.setValue(value);
2409          return this;
2410        }
2411
2412        /**
2413         * @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
2414         */
2415        public DecimalType getGtFPElement() { 
2416          if (this.gtFP == null)
2417            if (Configuration.errorOnAutoCreate())
2418              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.gtFP");
2419            else if (Configuration.doAutoCreate())
2420              this.gtFP = new DecimalType(); // bb
2421          return this.gtFP;
2422        }
2423
2424        public boolean hasGtFPElement() { 
2425          return this.gtFP != null && !this.gtFP.isEmpty();
2426        }
2427
2428        public boolean hasGtFP() { 
2429          return this.gtFP != null && !this.gtFP.isEmpty();
2430        }
2431
2432        /**
2433         * @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
2434         */
2435        public MolecularSequenceQualityComponent setGtFPElement(DecimalType value) { 
2436          this.gtFP = value;
2437          return this;
2438        }
2439
2440        /**
2441         * @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).
2442         */
2443        public BigDecimal getGtFP() { 
2444          return this.gtFP == null ? null : this.gtFP.getValue();
2445        }
2446
2447        /**
2448         * @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).
2449         */
2450        public MolecularSequenceQualityComponent setGtFP(BigDecimal value) { 
2451          if (value == null)
2452            this.gtFP = null;
2453          else {
2454            if (this.gtFP == null)
2455              this.gtFP = new DecimalType();
2456            this.gtFP.setValue(value);
2457          }
2458          return this;
2459        }
2460
2461        /**
2462         * @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).
2463         */
2464        public MolecularSequenceQualityComponent setGtFP(long value) { 
2465              this.gtFP = new DecimalType();
2466            this.gtFP.setValue(value);
2467          return this;
2468        }
2469
2470        /**
2471         * @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).
2472         */
2473        public MolecularSequenceQualityComponent setGtFP(double value) { 
2474              this.gtFP = new DecimalType();
2475            this.gtFP.setValue(value);
2476          return this;
2477        }
2478
2479        /**
2480         * @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
2481         */
2482        public DecimalType getPrecisionElement() { 
2483          if (this.precision == null)
2484            if (Configuration.errorOnAutoCreate())
2485              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.precision");
2486            else if (Configuration.doAutoCreate())
2487              this.precision = new DecimalType(); // bb
2488          return this.precision;
2489        }
2490
2491        public boolean hasPrecisionElement() { 
2492          return this.precision != null && !this.precision.isEmpty();
2493        }
2494
2495        public boolean hasPrecision() { 
2496          return this.precision != null && !this.precision.isEmpty();
2497        }
2498
2499        /**
2500         * @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
2501         */
2502        public MolecularSequenceQualityComponent setPrecisionElement(DecimalType value) { 
2503          this.precision = value;
2504          return this;
2505        }
2506
2507        /**
2508         * @return QUERY.TP / (QUERY.TP + QUERY.FP).
2509         */
2510        public BigDecimal getPrecision() { 
2511          return this.precision == null ? null : this.precision.getValue();
2512        }
2513
2514        /**
2515         * @param value QUERY.TP / (QUERY.TP + QUERY.FP).
2516         */
2517        public MolecularSequenceQualityComponent setPrecision(BigDecimal value) { 
2518          if (value == null)
2519            this.precision = null;
2520          else {
2521            if (this.precision == null)
2522              this.precision = new DecimalType();
2523            this.precision.setValue(value);
2524          }
2525          return this;
2526        }
2527
2528        /**
2529         * @param value QUERY.TP / (QUERY.TP + QUERY.FP).
2530         */
2531        public MolecularSequenceQualityComponent setPrecision(long value) { 
2532              this.precision = new DecimalType();
2533            this.precision.setValue(value);
2534          return this;
2535        }
2536
2537        /**
2538         * @param value QUERY.TP / (QUERY.TP + QUERY.FP).
2539         */
2540        public MolecularSequenceQualityComponent setPrecision(double value) { 
2541              this.precision = new DecimalType();
2542            this.precision.setValue(value);
2543          return this;
2544        }
2545
2546        /**
2547         * @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
2548         */
2549        public DecimalType getRecallElement() { 
2550          if (this.recall == null)
2551            if (Configuration.errorOnAutoCreate())
2552              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.recall");
2553            else if (Configuration.doAutoCreate())
2554              this.recall = new DecimalType(); // bb
2555          return this.recall;
2556        }
2557
2558        public boolean hasRecallElement() { 
2559          return this.recall != null && !this.recall.isEmpty();
2560        }
2561
2562        public boolean hasRecall() { 
2563          return this.recall != null && !this.recall.isEmpty();
2564        }
2565
2566        /**
2567         * @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
2568         */
2569        public MolecularSequenceQualityComponent setRecallElement(DecimalType value) { 
2570          this.recall = value;
2571          return this;
2572        }
2573
2574        /**
2575         * @return TRUTH.TP / (TRUTH.TP + TRUTH.FN).
2576         */
2577        public BigDecimal getRecall() { 
2578          return this.recall == null ? null : this.recall.getValue();
2579        }
2580
2581        /**
2582         * @param value TRUTH.TP / (TRUTH.TP + TRUTH.FN).
2583         */
2584        public MolecularSequenceQualityComponent setRecall(BigDecimal value) { 
2585          if (value == null)
2586            this.recall = null;
2587          else {
2588            if (this.recall == null)
2589              this.recall = new DecimalType();
2590            this.recall.setValue(value);
2591          }
2592          return this;
2593        }
2594
2595        /**
2596         * @param value TRUTH.TP / (TRUTH.TP + TRUTH.FN).
2597         */
2598        public MolecularSequenceQualityComponent setRecall(long value) { 
2599              this.recall = new DecimalType();
2600            this.recall.setValue(value);
2601          return this;
2602        }
2603
2604        /**
2605         * @param value TRUTH.TP / (TRUTH.TP + TRUTH.FN).
2606         */
2607        public MolecularSequenceQualityComponent setRecall(double value) { 
2608              this.recall = new DecimalType();
2609            this.recall.setValue(value);
2610          return this;
2611        }
2612
2613        /**
2614         * @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
2615         */
2616        public DecimalType getFScoreElement() { 
2617          if (this.fScore == null)
2618            if (Configuration.errorOnAutoCreate())
2619              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.fScore");
2620            else if (Configuration.doAutoCreate())
2621              this.fScore = new DecimalType(); // bb
2622          return this.fScore;
2623        }
2624
2625        public boolean hasFScoreElement() { 
2626          return this.fScore != null && !this.fScore.isEmpty();
2627        }
2628
2629        public boolean hasFScore() { 
2630          return this.fScore != null && !this.fScore.isEmpty();
2631        }
2632
2633        /**
2634         * @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
2635         */
2636        public MolecularSequenceQualityComponent setFScoreElement(DecimalType value) { 
2637          this.fScore = value;
2638          return this;
2639        }
2640
2641        /**
2642         * @return Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).
2643         */
2644        public BigDecimal getFScore() { 
2645          return this.fScore == null ? null : this.fScore.getValue();
2646        }
2647
2648        /**
2649         * @param value Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).
2650         */
2651        public MolecularSequenceQualityComponent setFScore(BigDecimal value) { 
2652          if (value == null)
2653            this.fScore = null;
2654          else {
2655            if (this.fScore == null)
2656              this.fScore = new DecimalType();
2657            this.fScore.setValue(value);
2658          }
2659          return this;
2660        }
2661
2662        /**
2663         * @param value Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).
2664         */
2665        public MolecularSequenceQualityComponent setFScore(long value) { 
2666              this.fScore = new DecimalType();
2667            this.fScore.setValue(value);
2668          return this;
2669        }
2670
2671        /**
2672         * @param value Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).
2673         */
2674        public MolecularSequenceQualityComponent setFScore(double value) { 
2675              this.fScore = new DecimalType();
2676            this.fScore.setValue(value);
2677          return this;
2678        }
2679
2680        /**
2681         * @return {@link #roc} (Receiver Operator Characteristic (ROC) Curve  to give sensitivity/specificity tradeoff.)
2682         */
2683        public MolecularSequenceQualityRocComponent getRoc() { 
2684          if (this.roc == null)
2685            if (Configuration.errorOnAutoCreate())
2686              throw new Error("Attempt to auto-create MolecularSequenceQualityComponent.roc");
2687            else if (Configuration.doAutoCreate())
2688              this.roc = new MolecularSequenceQualityRocComponent(); // cc
2689          return this.roc;
2690        }
2691
2692        public boolean hasRoc() { 
2693          return this.roc != null && !this.roc.isEmpty();
2694        }
2695
2696        /**
2697         * @param value {@link #roc} (Receiver Operator Characteristic (ROC) Curve  to give sensitivity/specificity tradeoff.)
2698         */
2699        public MolecularSequenceQualityComponent setRoc(MolecularSequenceQualityRocComponent value) { 
2700          this.roc = value;
2701          return this;
2702        }
2703
2704        protected void listChildren(List<Property> children) {
2705          super.listChildren(children);
2706          children.add(new Property("type", "code", "INDEL / SNP / Undefined variant.", 0, 1, type));
2707          children.add(new Property("standardSequence", "CodeableConcept", "Gold standard sequence used for comparing against.", 0, 1, standardSequence));
2708          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));
2709          children.add(new Property("end", "integer", "End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", 0, 1, end));
2710          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));
2711          children.add(new Property("method", "CodeableConcept", "Which method is used to get sequence quality.", 0, 1, method));
2712          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));
2713          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));
2714          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));
2715          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));
2716          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));
2717          children.add(new Property("precision", "decimal", "QUERY.TP / (QUERY.TP + QUERY.FP).", 0, 1, precision));
2718          children.add(new Property("recall", "decimal", "TRUTH.TP / (TRUTH.TP + TRUTH.FN).", 0, 1, recall));
2719          children.add(new Property("fScore", "decimal", "Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).", 0, 1, fScore));
2720          children.add(new Property("roc", "", "Receiver Operator Characteristic (ROC) Curve  to give sensitivity/specificity tradeoff.", 0, 1, roc));
2721        }
2722
2723        @Override
2724        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2725          switch (_hash) {
2726          case 3575610: /*type*/  return new Property("type", "code", "INDEL / SNP / Undefined variant.", 0, 1, type);
2727          case -1861227106: /*standardSequence*/  return new Property("standardSequence", "CodeableConcept", "Gold standard sequence used for comparing against.", 0, 1, standardSequence);
2728          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);
2729          case 100571: /*end*/  return new Property("end", "integer", "End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", 0, 1, end);
2730          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);
2731          case -1077554975: /*method*/  return new Property("method", "CodeableConcept", "Which method is used to get sequence quality.", 0, 1, method);
2732          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);
2733          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);
2734          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);
2735          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);
2736          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);
2737          case -1376177026: /*precision*/  return new Property("precision", "decimal", "QUERY.TP / (QUERY.TP + QUERY.FP).", 0, 1, precision);
2738          case -934922479: /*recall*/  return new Property("recall", "decimal", "TRUTH.TP / (TRUTH.TP + TRUTH.FN).", 0, 1, recall);
2739          case -1295082036: /*fScore*/  return new Property("fScore", "decimal", "Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).", 0, 1, fScore);
2740          case 113094: /*roc*/  return new Property("roc", "", "Receiver Operator Characteristic (ROC) Curve  to give sensitivity/specificity tradeoff.", 0, 1, roc);
2741          default: return super.getNamedProperty(_hash, _name, _checkValid);
2742          }
2743
2744        }
2745
2746      @Override
2747      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2748        switch (hash) {
2749        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<QualityType>
2750        case -1861227106: /*standardSequence*/ return this.standardSequence == null ? new Base[0] : new Base[] {this.standardSequence}; // CodeableConcept
2751        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType
2752        case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType
2753        case 109264530: /*score*/ return this.score == null ? new Base[0] : new Base[] {this.score}; // Quantity
2754        case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept
2755        case -1048421849: /*truthTP*/ return this.truthTP == null ? new Base[0] : new Base[] {this.truthTP}; // DecimalType
2756        case 655102276: /*queryTP*/ return this.queryTP == null ? new Base[0] : new Base[] {this.queryTP}; // DecimalType
2757        case -1048422285: /*truthFN*/ return this.truthFN == null ? new Base[0] : new Base[] {this.truthFN}; // DecimalType
2758        case 655101842: /*queryFP*/ return this.queryFP == null ? new Base[0] : new Base[] {this.queryFP}; // DecimalType
2759        case 3182199: /*gtFP*/ return this.gtFP == null ? new Base[0] : new Base[] {this.gtFP}; // DecimalType
2760        case -1376177026: /*precision*/ return this.precision == null ? new Base[0] : new Base[] {this.precision}; // DecimalType
2761        case -934922479: /*recall*/ return this.recall == null ? new Base[0] : new Base[] {this.recall}; // DecimalType
2762        case -1295082036: /*fScore*/ return this.fScore == null ? new Base[0] : new Base[] {this.fScore}; // DecimalType
2763        case 113094: /*roc*/ return this.roc == null ? new Base[0] : new Base[] {this.roc}; // MolecularSequenceQualityRocComponent
2764        default: return super.getProperty(hash, name, checkValid);
2765        }
2766
2767      }
2768
2769      @Override
2770      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2771        switch (hash) {
2772        case 3575610: // type
2773          value = new QualityTypeEnumFactory().fromType(castToCode(value));
2774          this.type = (Enumeration) value; // Enumeration<QualityType>
2775          return value;
2776        case -1861227106: // standardSequence
2777          this.standardSequence = castToCodeableConcept(value); // CodeableConcept
2778          return value;
2779        case 109757538: // start
2780          this.start = castToInteger(value); // IntegerType
2781          return value;
2782        case 100571: // end
2783          this.end = castToInteger(value); // IntegerType
2784          return value;
2785        case 109264530: // score
2786          this.score = castToQuantity(value); // Quantity
2787          return value;
2788        case -1077554975: // method
2789          this.method = castToCodeableConcept(value); // CodeableConcept
2790          return value;
2791        case -1048421849: // truthTP
2792          this.truthTP = castToDecimal(value); // DecimalType
2793          return value;
2794        case 655102276: // queryTP
2795          this.queryTP = castToDecimal(value); // DecimalType
2796          return value;
2797        case -1048422285: // truthFN
2798          this.truthFN = castToDecimal(value); // DecimalType
2799          return value;
2800        case 655101842: // queryFP
2801          this.queryFP = castToDecimal(value); // DecimalType
2802          return value;
2803        case 3182199: // gtFP
2804          this.gtFP = castToDecimal(value); // DecimalType
2805          return value;
2806        case -1376177026: // precision
2807          this.precision = castToDecimal(value); // DecimalType
2808          return value;
2809        case -934922479: // recall
2810          this.recall = castToDecimal(value); // DecimalType
2811          return value;
2812        case -1295082036: // fScore
2813          this.fScore = castToDecimal(value); // DecimalType
2814          return value;
2815        case 113094: // roc
2816          this.roc = (MolecularSequenceQualityRocComponent) value; // MolecularSequenceQualityRocComponent
2817          return value;
2818        default: return super.setProperty(hash, name, value);
2819        }
2820
2821      }
2822
2823      @Override
2824      public Base setProperty(String name, Base value) throws FHIRException {
2825        if (name.equals("type")) {
2826          value = new QualityTypeEnumFactory().fromType(castToCode(value));
2827          this.type = (Enumeration) value; // Enumeration<QualityType>
2828        } else if (name.equals("standardSequence")) {
2829          this.standardSequence = castToCodeableConcept(value); // CodeableConcept
2830        } else if (name.equals("start")) {
2831          this.start = castToInteger(value); // IntegerType
2832        } else if (name.equals("end")) {
2833          this.end = castToInteger(value); // IntegerType
2834        } else if (name.equals("score")) {
2835          this.score = castToQuantity(value); // Quantity
2836        } else if (name.equals("method")) {
2837          this.method = castToCodeableConcept(value); // CodeableConcept
2838        } else if (name.equals("truthTP")) {
2839          this.truthTP = castToDecimal(value); // DecimalType
2840        } else if (name.equals("queryTP")) {
2841          this.queryTP = castToDecimal(value); // DecimalType
2842        } else if (name.equals("truthFN")) {
2843          this.truthFN = castToDecimal(value); // DecimalType
2844        } else if (name.equals("queryFP")) {
2845          this.queryFP = castToDecimal(value); // DecimalType
2846        } else if (name.equals("gtFP")) {
2847          this.gtFP = castToDecimal(value); // DecimalType
2848        } else if (name.equals("precision")) {
2849          this.precision = castToDecimal(value); // DecimalType
2850        } else if (name.equals("recall")) {
2851          this.recall = castToDecimal(value); // DecimalType
2852        } else if (name.equals("fScore")) {
2853          this.fScore = castToDecimal(value); // DecimalType
2854        } else if (name.equals("roc")) {
2855          this.roc = (MolecularSequenceQualityRocComponent) value; // MolecularSequenceQualityRocComponent
2856        } else
2857          return super.setProperty(name, value);
2858        return value;
2859      }
2860
2861      @Override
2862      public Base makeProperty(int hash, String name) throws FHIRException {
2863        switch (hash) {
2864        case 3575610:  return getTypeElement();
2865        case -1861227106:  return getStandardSequence(); 
2866        case 109757538:  return getStartElement();
2867        case 100571:  return getEndElement();
2868        case 109264530:  return getScore(); 
2869        case -1077554975:  return getMethod(); 
2870        case -1048421849:  return getTruthTPElement();
2871        case 655102276:  return getQueryTPElement();
2872        case -1048422285:  return getTruthFNElement();
2873        case 655101842:  return getQueryFPElement();
2874        case 3182199:  return getGtFPElement();
2875        case -1376177026:  return getPrecisionElement();
2876        case -934922479:  return getRecallElement();
2877        case -1295082036:  return getFScoreElement();
2878        case 113094:  return getRoc(); 
2879        default: return super.makeProperty(hash, name);
2880        }
2881
2882      }
2883
2884      @Override
2885      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2886        switch (hash) {
2887        case 3575610: /*type*/ return new String[] {"code"};
2888        case -1861227106: /*standardSequence*/ return new String[] {"CodeableConcept"};
2889        case 109757538: /*start*/ return new String[] {"integer"};
2890        case 100571: /*end*/ return new String[] {"integer"};
2891        case 109264530: /*score*/ return new String[] {"Quantity"};
2892        case -1077554975: /*method*/ return new String[] {"CodeableConcept"};
2893        case -1048421849: /*truthTP*/ return new String[] {"decimal"};
2894        case 655102276: /*queryTP*/ return new String[] {"decimal"};
2895        case -1048422285: /*truthFN*/ return new String[] {"decimal"};
2896        case 655101842: /*queryFP*/ return new String[] {"decimal"};
2897        case 3182199: /*gtFP*/ return new String[] {"decimal"};
2898        case -1376177026: /*precision*/ return new String[] {"decimal"};
2899        case -934922479: /*recall*/ return new String[] {"decimal"};
2900        case -1295082036: /*fScore*/ return new String[] {"decimal"};
2901        case 113094: /*roc*/ return new String[] {};
2902        default: return super.getTypesForProperty(hash, name);
2903        }
2904
2905      }
2906
2907      @Override
2908      public Base addChild(String name) throws FHIRException {
2909        if (name.equals("type")) {
2910          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.type");
2911        }
2912        else if (name.equals("standardSequence")) {
2913          this.standardSequence = new CodeableConcept();
2914          return this.standardSequence;
2915        }
2916        else if (name.equals("start")) {
2917          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.start");
2918        }
2919        else if (name.equals("end")) {
2920          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.end");
2921        }
2922        else if (name.equals("score")) {
2923          this.score = new Quantity();
2924          return this.score;
2925        }
2926        else if (name.equals("method")) {
2927          this.method = new CodeableConcept();
2928          return this.method;
2929        }
2930        else if (name.equals("truthTP")) {
2931          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.truthTP");
2932        }
2933        else if (name.equals("queryTP")) {
2934          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.queryTP");
2935        }
2936        else if (name.equals("truthFN")) {
2937          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.truthFN");
2938        }
2939        else if (name.equals("queryFP")) {
2940          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.queryFP");
2941        }
2942        else if (name.equals("gtFP")) {
2943          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.gtFP");
2944        }
2945        else if (name.equals("precision")) {
2946          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.precision");
2947        }
2948        else if (name.equals("recall")) {
2949          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.recall");
2950        }
2951        else if (name.equals("fScore")) {
2952          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.fScore");
2953        }
2954        else if (name.equals("roc")) {
2955          this.roc = new MolecularSequenceQualityRocComponent();
2956          return this.roc;
2957        }
2958        else
2959          return super.addChild(name);
2960      }
2961
2962      public MolecularSequenceQualityComponent copy() {
2963        MolecularSequenceQualityComponent dst = new MolecularSequenceQualityComponent();
2964        copyValues(dst);
2965        dst.type = type == null ? null : type.copy();
2966        dst.standardSequence = standardSequence == null ? null : standardSequence.copy();
2967        dst.start = start == null ? null : start.copy();
2968        dst.end = end == null ? null : end.copy();
2969        dst.score = score == null ? null : score.copy();
2970        dst.method = method == null ? null : method.copy();
2971        dst.truthTP = truthTP == null ? null : truthTP.copy();
2972        dst.queryTP = queryTP == null ? null : queryTP.copy();
2973        dst.truthFN = truthFN == null ? null : truthFN.copy();
2974        dst.queryFP = queryFP == null ? null : queryFP.copy();
2975        dst.gtFP = gtFP == null ? null : gtFP.copy();
2976        dst.precision = precision == null ? null : precision.copy();
2977        dst.recall = recall == null ? null : recall.copy();
2978        dst.fScore = fScore == null ? null : fScore.copy();
2979        dst.roc = roc == null ? null : roc.copy();
2980        return dst;
2981      }
2982
2983      @Override
2984      public boolean equalsDeep(Base other_) {
2985        if (!super.equalsDeep(other_))
2986          return false;
2987        if (!(other_ instanceof MolecularSequenceQualityComponent))
2988          return false;
2989        MolecularSequenceQualityComponent o = (MolecularSequenceQualityComponent) other_;
2990        return compareDeep(type, o.type, true) && compareDeep(standardSequence, o.standardSequence, true)
2991           && compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(score, o.score, true)
2992           && compareDeep(method, o.method, true) && compareDeep(truthTP, o.truthTP, true) && compareDeep(queryTP, o.queryTP, true)
2993           && compareDeep(truthFN, o.truthFN, true) && compareDeep(queryFP, o.queryFP, true) && compareDeep(gtFP, o.gtFP, true)
2994           && compareDeep(precision, o.precision, true) && compareDeep(recall, o.recall, true) && compareDeep(fScore, o.fScore, true)
2995           && compareDeep(roc, o.roc, true);
2996      }
2997
2998      @Override
2999      public boolean equalsShallow(Base other_) {
3000        if (!super.equalsShallow(other_))
3001          return false;
3002        if (!(other_ instanceof MolecularSequenceQualityComponent))
3003          return false;
3004        MolecularSequenceQualityComponent o = (MolecularSequenceQualityComponent) other_;
3005        return compareValues(type, o.type, true) && compareValues(start, o.start, true) && compareValues(end, o.end, true)
3006           && compareValues(truthTP, o.truthTP, true) && compareValues(queryTP, o.queryTP, true) && compareValues(truthFN, o.truthFN, true)
3007           && compareValues(queryFP, o.queryFP, true) && compareValues(gtFP, o.gtFP, true) && compareValues(precision, o.precision, true)
3008           && compareValues(recall, o.recall, true) && compareValues(fScore, o.fScore, true);
3009      }
3010
3011      public boolean isEmpty() {
3012        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, standardSequence, start
3013          , end, score, method, truthTP, queryTP, truthFN, queryFP, gtFP, precision
3014          , recall, fScore, roc);
3015      }
3016
3017  public String fhirType() {
3018    return "MolecularSequence.quality";
3019
3020  }
3021
3022  }
3023
3024    @Block()
3025    public static class MolecularSequenceQualityRocComponent extends BackboneElement implements IBaseBackboneElement {
3026        /**
3027         * Invidual data point representing the GQ (genotype quality) score threshold.
3028         */
3029        @Child(name = "score", type = {IntegerType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3030        @Description(shortDefinition="Genotype quality score", formalDefinition="Invidual data point representing the GQ (genotype quality) score threshold." )
3031        protected List<IntegerType> score;
3032
3033        /**
3034         * The number of true positives if the GQ score threshold was set to "score" field value.
3035         */
3036        @Child(name = "numTP", type = {IntegerType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3037        @Description(shortDefinition="Roc score true positive numbers", formalDefinition="The number of true positives if the GQ score threshold was set to \"score\" field value." )
3038        protected List<IntegerType> numTP;
3039
3040        /**
3041         * The number of false positives if the GQ score threshold was set to "score" field value.
3042         */
3043        @Child(name = "numFP", type = {IntegerType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3044        @Description(shortDefinition="Roc score false positive numbers", formalDefinition="The number of false positives if the GQ score threshold was set to \"score\" field value." )
3045        protected List<IntegerType> numFP;
3046
3047        /**
3048         * The number of false negatives if the GQ score threshold was set to "score" field value.
3049         */
3050        @Child(name = "numFN", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3051        @Description(shortDefinition="Roc score false negative numbers", formalDefinition="The number of false negatives if the GQ score threshold was set to \"score\" field value." )
3052        protected List<IntegerType> numFN;
3053
3054        /**
3055         * Calculated precision if the GQ score threshold was set to "score" field value.
3056         */
3057        @Child(name = "precision", type = {DecimalType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3058        @Description(shortDefinition="Precision of the GQ score", formalDefinition="Calculated precision if the GQ score threshold was set to \"score\" field value." )
3059        protected List<DecimalType> precision;
3060
3061        /**
3062         * Calculated sensitivity if the GQ score threshold was set to "score" field value.
3063         */
3064        @Child(name = "sensitivity", type = {DecimalType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3065        @Description(shortDefinition="Sensitivity of the GQ score", formalDefinition="Calculated sensitivity if the GQ score threshold was set to \"score\" field value." )
3066        protected List<DecimalType> sensitivity;
3067
3068        /**
3069         * Calculated fScore if the GQ score threshold was set to "score" field value.
3070         */
3071        @Child(name = "fMeasure", type = {DecimalType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3072        @Description(shortDefinition="FScore of the GQ score", formalDefinition="Calculated fScore if the GQ score threshold was set to \"score\" field value." )
3073        protected List<DecimalType> fMeasure;
3074
3075        private static final long serialVersionUID = 1923392132L;
3076
3077    /**
3078     * Constructor
3079     */
3080      public MolecularSequenceQualityRocComponent() {
3081        super();
3082      }
3083
3084        /**
3085         * @return {@link #score} (Invidual data point representing the GQ (genotype quality) score threshold.)
3086         */
3087        public List<IntegerType> getScore() { 
3088          if (this.score == null)
3089            this.score = new ArrayList<IntegerType>();
3090          return this.score;
3091        }
3092
3093        /**
3094         * @return Returns a reference to <code>this</code> for easy method chaining
3095         */
3096        public MolecularSequenceQualityRocComponent setScore(List<IntegerType> theScore) { 
3097          this.score = theScore;
3098          return this;
3099        }
3100
3101        public boolean hasScore() { 
3102          if (this.score == null)
3103            return false;
3104          for (IntegerType item : this.score)
3105            if (!item.isEmpty())
3106              return true;
3107          return false;
3108        }
3109
3110        /**
3111         * @return {@link #score} (Invidual data point representing the GQ (genotype quality) score threshold.)
3112         */
3113        public IntegerType addScoreElement() {//2 
3114          IntegerType t = new IntegerType();
3115          if (this.score == null)
3116            this.score = new ArrayList<IntegerType>();
3117          this.score.add(t);
3118          return t;
3119        }
3120
3121        /**
3122         * @param value {@link #score} (Invidual data point representing the GQ (genotype quality) score threshold.)
3123         */
3124        public MolecularSequenceQualityRocComponent addScore(int value) { //1
3125          IntegerType t = new IntegerType();
3126          t.setValue(value);
3127          if (this.score == null)
3128            this.score = new ArrayList<IntegerType>();
3129          this.score.add(t);
3130          return this;
3131        }
3132
3133        /**
3134         * @param value {@link #score} (Invidual data point representing the GQ (genotype quality) score threshold.)
3135         */
3136        public boolean hasScore(int value) { 
3137          if (this.score == null)
3138            return false;
3139          for (IntegerType v : this.score)
3140            if (v.getValue().equals(value)) // integer
3141              return true;
3142          return false;
3143        }
3144
3145        /**
3146         * @return {@link #numTP} (The number of true positives if the GQ score threshold was set to "score" field value.)
3147         */
3148        public List<IntegerType> getNumTP() { 
3149          if (this.numTP == null)
3150            this.numTP = new ArrayList<IntegerType>();
3151          return this.numTP;
3152        }
3153
3154        /**
3155         * @return Returns a reference to <code>this</code> for easy method chaining
3156         */
3157        public MolecularSequenceQualityRocComponent setNumTP(List<IntegerType> theNumTP) { 
3158          this.numTP = theNumTP;
3159          return this;
3160        }
3161
3162        public boolean hasNumTP() { 
3163          if (this.numTP == null)
3164            return false;
3165          for (IntegerType item : this.numTP)
3166            if (!item.isEmpty())
3167              return true;
3168          return false;
3169        }
3170
3171        /**
3172         * @return {@link #numTP} (The number of true positives if the GQ score threshold was set to "score" field value.)
3173         */
3174        public IntegerType addNumTPElement() {//2 
3175          IntegerType t = new IntegerType();
3176          if (this.numTP == null)
3177            this.numTP = new ArrayList<IntegerType>();
3178          this.numTP.add(t);
3179          return t;
3180        }
3181
3182        /**
3183         * @param value {@link #numTP} (The number of true positives if the GQ score threshold was set to "score" field value.)
3184         */
3185        public MolecularSequenceQualityRocComponent addNumTP(int value) { //1
3186          IntegerType t = new IntegerType();
3187          t.setValue(value);
3188          if (this.numTP == null)
3189            this.numTP = new ArrayList<IntegerType>();
3190          this.numTP.add(t);
3191          return this;
3192        }
3193
3194        /**
3195         * @param value {@link #numTP} (The number of true positives if the GQ score threshold was set to "score" field value.)
3196         */
3197        public boolean hasNumTP(int value) { 
3198          if (this.numTP == null)
3199            return false;
3200          for (IntegerType v : this.numTP)
3201            if (v.getValue().equals(value)) // integer
3202              return true;
3203          return false;
3204        }
3205
3206        /**
3207         * @return {@link #numFP} (The number of false positives if the GQ score threshold was set to "score" field value.)
3208         */
3209        public List<IntegerType> getNumFP() { 
3210          if (this.numFP == null)
3211            this.numFP = new ArrayList<IntegerType>();
3212          return this.numFP;
3213        }
3214
3215        /**
3216         * @return Returns a reference to <code>this</code> for easy method chaining
3217         */
3218        public MolecularSequenceQualityRocComponent setNumFP(List<IntegerType> theNumFP) { 
3219          this.numFP = theNumFP;
3220          return this;
3221        }
3222
3223        public boolean hasNumFP() { 
3224          if (this.numFP == null)
3225            return false;
3226          for (IntegerType item : this.numFP)
3227            if (!item.isEmpty())
3228              return true;
3229          return false;
3230        }
3231
3232        /**
3233         * @return {@link #numFP} (The number of false positives if the GQ score threshold was set to "score" field value.)
3234         */
3235        public IntegerType addNumFPElement() {//2 
3236          IntegerType t = new IntegerType();
3237          if (this.numFP == null)
3238            this.numFP = new ArrayList<IntegerType>();
3239          this.numFP.add(t);
3240          return t;
3241        }
3242
3243        /**
3244         * @param value {@link #numFP} (The number of false positives if the GQ score threshold was set to "score" field value.)
3245         */
3246        public MolecularSequenceQualityRocComponent addNumFP(int value) { //1
3247          IntegerType t = new IntegerType();
3248          t.setValue(value);
3249          if (this.numFP == null)
3250            this.numFP = new ArrayList<IntegerType>();
3251          this.numFP.add(t);
3252          return this;
3253        }
3254
3255        /**
3256         * @param value {@link #numFP} (The number of false positives if the GQ score threshold was set to "score" field value.)
3257         */
3258        public boolean hasNumFP(int value) { 
3259          if (this.numFP == null)
3260            return false;
3261          for (IntegerType v : this.numFP)
3262            if (v.getValue().equals(value)) // integer
3263              return true;
3264          return false;
3265        }
3266
3267        /**
3268         * @return {@link #numFN} (The number of false negatives if the GQ score threshold was set to "score" field value.)
3269         */
3270        public List<IntegerType> getNumFN() { 
3271          if (this.numFN == null)
3272            this.numFN = new ArrayList<IntegerType>();
3273          return this.numFN;
3274        }
3275
3276        /**
3277         * @return Returns a reference to <code>this</code> for easy method chaining
3278         */
3279        public MolecularSequenceQualityRocComponent setNumFN(List<IntegerType> theNumFN) { 
3280          this.numFN = theNumFN;
3281          return this;
3282        }
3283
3284        public boolean hasNumFN() { 
3285          if (this.numFN == null)
3286            return false;
3287          for (IntegerType item : this.numFN)
3288            if (!item.isEmpty())
3289              return true;
3290          return false;
3291        }
3292
3293        /**
3294         * @return {@link #numFN} (The number of false negatives if the GQ score threshold was set to "score" field value.)
3295         */
3296        public IntegerType addNumFNElement() {//2 
3297          IntegerType t = new IntegerType();
3298          if (this.numFN == null)
3299            this.numFN = new ArrayList<IntegerType>();
3300          this.numFN.add(t);
3301          return t;
3302        }
3303
3304        /**
3305         * @param value {@link #numFN} (The number of false negatives if the GQ score threshold was set to "score" field value.)
3306         */
3307        public MolecularSequenceQualityRocComponent addNumFN(int value) { //1
3308          IntegerType t = new IntegerType();
3309          t.setValue(value);
3310          if (this.numFN == null)
3311            this.numFN = new ArrayList<IntegerType>();
3312          this.numFN.add(t);
3313          return this;
3314        }
3315
3316        /**
3317         * @param value {@link #numFN} (The number of false negatives if the GQ score threshold was set to "score" field value.)
3318         */
3319        public boolean hasNumFN(int value) { 
3320          if (this.numFN == null)
3321            return false;
3322          for (IntegerType v : this.numFN)
3323            if (v.getValue().equals(value)) // integer
3324              return true;
3325          return false;
3326        }
3327
3328        /**
3329         * @return {@link #precision} (Calculated precision if the GQ score threshold was set to "score" field value.)
3330         */
3331        public List<DecimalType> getPrecision() { 
3332          if (this.precision == null)
3333            this.precision = new ArrayList<DecimalType>();
3334          return this.precision;
3335        }
3336
3337        /**
3338         * @return Returns a reference to <code>this</code> for easy method chaining
3339         */
3340        public MolecularSequenceQualityRocComponent setPrecision(List<DecimalType> thePrecision) { 
3341          this.precision = thePrecision;
3342          return this;
3343        }
3344
3345        public boolean hasPrecision() { 
3346          if (this.precision == null)
3347            return false;
3348          for (DecimalType item : this.precision)
3349            if (!item.isEmpty())
3350              return true;
3351          return false;
3352        }
3353
3354        /**
3355         * @return {@link #precision} (Calculated precision if the GQ score threshold was set to "score" field value.)
3356         */
3357        public DecimalType addPrecisionElement() {//2 
3358          DecimalType t = new DecimalType();
3359          if (this.precision == null)
3360            this.precision = new ArrayList<DecimalType>();
3361          this.precision.add(t);
3362          return t;
3363        }
3364
3365        /**
3366         * @param value {@link #precision} (Calculated precision if the GQ score threshold was set to "score" field value.)
3367         */
3368        public MolecularSequenceQualityRocComponent addPrecision(BigDecimal value) { //1
3369          DecimalType t = new DecimalType();
3370          t.setValue(value);
3371          if (this.precision == null)
3372            this.precision = new ArrayList<DecimalType>();
3373          this.precision.add(t);
3374          return this;
3375        }
3376
3377        /**
3378         * @param value {@link #precision} (Calculated precision if the GQ score threshold was set to "score" field value.)
3379         */
3380        public boolean hasPrecision(BigDecimal value) { 
3381          if (this.precision == null)
3382            return false;
3383          for (DecimalType v : this.precision)
3384            if (v.getValue().equals(value)) // decimal
3385              return true;
3386          return false;
3387        }
3388
3389        /**
3390         * @return {@link #sensitivity} (Calculated sensitivity if the GQ score threshold was set to "score" field value.)
3391         */
3392        public List<DecimalType> getSensitivity() { 
3393          if (this.sensitivity == null)
3394            this.sensitivity = new ArrayList<DecimalType>();
3395          return this.sensitivity;
3396        }
3397
3398        /**
3399         * @return Returns a reference to <code>this</code> for easy method chaining
3400         */
3401        public MolecularSequenceQualityRocComponent setSensitivity(List<DecimalType> theSensitivity) { 
3402          this.sensitivity = theSensitivity;
3403          return this;
3404        }
3405
3406        public boolean hasSensitivity() { 
3407          if (this.sensitivity == null)
3408            return false;
3409          for (DecimalType item : this.sensitivity)
3410            if (!item.isEmpty())
3411              return true;
3412          return false;
3413        }
3414
3415        /**
3416         * @return {@link #sensitivity} (Calculated sensitivity if the GQ score threshold was set to "score" field value.)
3417         */
3418        public DecimalType addSensitivityElement() {//2 
3419          DecimalType t = new DecimalType();
3420          if (this.sensitivity == null)
3421            this.sensitivity = new ArrayList<DecimalType>();
3422          this.sensitivity.add(t);
3423          return t;
3424        }
3425
3426        /**
3427         * @param value {@link #sensitivity} (Calculated sensitivity if the GQ score threshold was set to "score" field value.)
3428         */
3429        public MolecularSequenceQualityRocComponent addSensitivity(BigDecimal value) { //1
3430          DecimalType t = new DecimalType();
3431          t.setValue(value);
3432          if (this.sensitivity == null)
3433            this.sensitivity = new ArrayList<DecimalType>();
3434          this.sensitivity.add(t);
3435          return this;
3436        }
3437
3438        /**
3439         * @param value {@link #sensitivity} (Calculated sensitivity if the GQ score threshold was set to "score" field value.)
3440         */
3441        public boolean hasSensitivity(BigDecimal value) { 
3442          if (this.sensitivity == null)
3443            return false;
3444          for (DecimalType v : this.sensitivity)
3445            if (v.getValue().equals(value)) // decimal
3446              return true;
3447          return false;
3448        }
3449
3450        /**
3451         * @return {@link #fMeasure} (Calculated fScore if the GQ score threshold was set to "score" field value.)
3452         */
3453        public List<DecimalType> getFMeasure() { 
3454          if (this.fMeasure == null)
3455            this.fMeasure = new ArrayList<DecimalType>();
3456          return this.fMeasure;
3457        }
3458
3459        /**
3460         * @return Returns a reference to <code>this</code> for easy method chaining
3461         */
3462        public MolecularSequenceQualityRocComponent setFMeasure(List<DecimalType> theFMeasure) { 
3463          this.fMeasure = theFMeasure;
3464          return this;
3465        }
3466
3467        public boolean hasFMeasure() { 
3468          if (this.fMeasure == null)
3469            return false;
3470          for (DecimalType item : this.fMeasure)
3471            if (!item.isEmpty())
3472              return true;
3473          return false;
3474        }
3475
3476        /**
3477         * @return {@link #fMeasure} (Calculated fScore if the GQ score threshold was set to "score" field value.)
3478         */
3479        public DecimalType addFMeasureElement() {//2 
3480          DecimalType t = new DecimalType();
3481          if (this.fMeasure == null)
3482            this.fMeasure = new ArrayList<DecimalType>();
3483          this.fMeasure.add(t);
3484          return t;
3485        }
3486
3487        /**
3488         * @param value {@link #fMeasure} (Calculated fScore if the GQ score threshold was set to "score" field value.)
3489         */
3490        public MolecularSequenceQualityRocComponent addFMeasure(BigDecimal value) { //1
3491          DecimalType t = new DecimalType();
3492          t.setValue(value);
3493          if (this.fMeasure == null)
3494            this.fMeasure = new ArrayList<DecimalType>();
3495          this.fMeasure.add(t);
3496          return this;
3497        }
3498
3499        /**
3500         * @param value {@link #fMeasure} (Calculated fScore if the GQ score threshold was set to "score" field value.)
3501         */
3502        public boolean hasFMeasure(BigDecimal value) { 
3503          if (this.fMeasure == null)
3504            return false;
3505          for (DecimalType v : this.fMeasure)
3506            if (v.getValue().equals(value)) // decimal
3507              return true;
3508          return false;
3509        }
3510
3511        protected void listChildren(List<Property> children) {
3512          super.listChildren(children);
3513          children.add(new Property("score", "integer", "Invidual data point representing the GQ (genotype quality) score threshold.", 0, java.lang.Integer.MAX_VALUE, score));
3514          children.add(new Property("numTP", "integer", "The number of true positives if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, numTP));
3515          children.add(new Property("numFP", "integer", "The number of false positives if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, numFP));
3516          children.add(new Property("numFN", "integer", "The number of false negatives if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, numFN));
3517          children.add(new Property("precision", "decimal", "Calculated precision if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, precision));
3518          children.add(new Property("sensitivity", "decimal", "Calculated sensitivity if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, sensitivity));
3519          children.add(new Property("fMeasure", "decimal", "Calculated fScore if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, fMeasure));
3520        }
3521
3522        @Override
3523        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3524          switch (_hash) {
3525          case 109264530: /*score*/  return new Property("score", "integer", "Invidual data point representing the GQ (genotype quality) score threshold.", 0, java.lang.Integer.MAX_VALUE, score);
3526          case 105180290: /*numTP*/  return new Property("numTP", "integer", "The number of true positives if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, numTP);
3527          case 105179856: /*numFP*/  return new Property("numFP", "integer", "The number of false positives if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, numFP);
3528          case 105179854: /*numFN*/  return new Property("numFN", "integer", "The number of false negatives if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, numFN);
3529          case -1376177026: /*precision*/  return new Property("precision", "decimal", "Calculated precision if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, precision);
3530          case 564403871: /*sensitivity*/  return new Property("sensitivity", "decimal", "Calculated sensitivity if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, sensitivity);
3531          case -18997736: /*fMeasure*/  return new Property("fMeasure", "decimal", "Calculated fScore if the GQ score threshold was set to \"score\" field value.", 0, java.lang.Integer.MAX_VALUE, fMeasure);
3532          default: return super.getNamedProperty(_hash, _name, _checkValid);
3533          }
3534
3535        }
3536
3537      @Override
3538      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3539        switch (hash) {
3540        case 109264530: /*score*/ return this.score == null ? new Base[0] : this.score.toArray(new Base[this.score.size()]); // IntegerType
3541        case 105180290: /*numTP*/ return this.numTP == null ? new Base[0] : this.numTP.toArray(new Base[this.numTP.size()]); // IntegerType
3542        case 105179856: /*numFP*/ return this.numFP == null ? new Base[0] : this.numFP.toArray(new Base[this.numFP.size()]); // IntegerType
3543        case 105179854: /*numFN*/ return this.numFN == null ? new Base[0] : this.numFN.toArray(new Base[this.numFN.size()]); // IntegerType
3544        case -1376177026: /*precision*/ return this.precision == null ? new Base[0] : this.precision.toArray(new Base[this.precision.size()]); // DecimalType
3545        case 564403871: /*sensitivity*/ return this.sensitivity == null ? new Base[0] : this.sensitivity.toArray(new Base[this.sensitivity.size()]); // DecimalType
3546        case -18997736: /*fMeasure*/ return this.fMeasure == null ? new Base[0] : this.fMeasure.toArray(new Base[this.fMeasure.size()]); // DecimalType
3547        default: return super.getProperty(hash, name, checkValid);
3548        }
3549
3550      }
3551
3552      @Override
3553      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3554        switch (hash) {
3555        case 109264530: // score
3556          this.getScore().add(castToInteger(value)); // IntegerType
3557          return value;
3558        case 105180290: // numTP
3559          this.getNumTP().add(castToInteger(value)); // IntegerType
3560          return value;
3561        case 105179856: // numFP
3562          this.getNumFP().add(castToInteger(value)); // IntegerType
3563          return value;
3564        case 105179854: // numFN
3565          this.getNumFN().add(castToInteger(value)); // IntegerType
3566          return value;
3567        case -1376177026: // precision
3568          this.getPrecision().add(castToDecimal(value)); // DecimalType
3569          return value;
3570        case 564403871: // sensitivity
3571          this.getSensitivity().add(castToDecimal(value)); // DecimalType
3572          return value;
3573        case -18997736: // fMeasure
3574          this.getFMeasure().add(castToDecimal(value)); // DecimalType
3575          return value;
3576        default: return super.setProperty(hash, name, value);
3577        }
3578
3579      }
3580
3581      @Override
3582      public Base setProperty(String name, Base value) throws FHIRException {
3583        if (name.equals("score")) {
3584          this.getScore().add(castToInteger(value));
3585        } else if (name.equals("numTP")) {
3586          this.getNumTP().add(castToInteger(value));
3587        } else if (name.equals("numFP")) {
3588          this.getNumFP().add(castToInteger(value));
3589        } else if (name.equals("numFN")) {
3590          this.getNumFN().add(castToInteger(value));
3591        } else if (name.equals("precision")) {
3592          this.getPrecision().add(castToDecimal(value));
3593        } else if (name.equals("sensitivity")) {
3594          this.getSensitivity().add(castToDecimal(value));
3595        } else if (name.equals("fMeasure")) {
3596          this.getFMeasure().add(castToDecimal(value));
3597        } else
3598          return super.setProperty(name, value);
3599        return value;
3600      }
3601
3602      @Override
3603      public Base makeProperty(int hash, String name) throws FHIRException {
3604        switch (hash) {
3605        case 109264530:  return addScoreElement();
3606        case 105180290:  return addNumTPElement();
3607        case 105179856:  return addNumFPElement();
3608        case 105179854:  return addNumFNElement();
3609        case -1376177026:  return addPrecisionElement();
3610        case 564403871:  return addSensitivityElement();
3611        case -18997736:  return addFMeasureElement();
3612        default: return super.makeProperty(hash, name);
3613        }
3614
3615      }
3616
3617      @Override
3618      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3619        switch (hash) {
3620        case 109264530: /*score*/ return new String[] {"integer"};
3621        case 105180290: /*numTP*/ return new String[] {"integer"};
3622        case 105179856: /*numFP*/ return new String[] {"integer"};
3623        case 105179854: /*numFN*/ return new String[] {"integer"};
3624        case -1376177026: /*precision*/ return new String[] {"decimal"};
3625        case 564403871: /*sensitivity*/ return new String[] {"decimal"};
3626        case -18997736: /*fMeasure*/ return new String[] {"decimal"};
3627        default: return super.getTypesForProperty(hash, name);
3628        }
3629
3630      }
3631
3632      @Override
3633      public Base addChild(String name) throws FHIRException {
3634        if (name.equals("score")) {
3635          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.score");
3636        }
3637        else if (name.equals("numTP")) {
3638          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.numTP");
3639        }
3640        else if (name.equals("numFP")) {
3641          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.numFP");
3642        }
3643        else if (name.equals("numFN")) {
3644          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.numFN");
3645        }
3646        else if (name.equals("precision")) {
3647          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.precision");
3648        }
3649        else if (name.equals("sensitivity")) {
3650          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.sensitivity");
3651        }
3652        else if (name.equals("fMeasure")) {
3653          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.fMeasure");
3654        }
3655        else
3656          return super.addChild(name);
3657      }
3658
3659      public MolecularSequenceQualityRocComponent copy() {
3660        MolecularSequenceQualityRocComponent dst = new MolecularSequenceQualityRocComponent();
3661        copyValues(dst);
3662        if (score != null) {
3663          dst.score = new ArrayList<IntegerType>();
3664          for (IntegerType i : score)
3665            dst.score.add(i.copy());
3666        };
3667        if (numTP != null) {
3668          dst.numTP = new ArrayList<IntegerType>();
3669          for (IntegerType i : numTP)
3670            dst.numTP.add(i.copy());
3671        };
3672        if (numFP != null) {
3673          dst.numFP = new ArrayList<IntegerType>();
3674          for (IntegerType i : numFP)
3675            dst.numFP.add(i.copy());
3676        };
3677        if (numFN != null) {
3678          dst.numFN = new ArrayList<IntegerType>();
3679          for (IntegerType i : numFN)
3680            dst.numFN.add(i.copy());
3681        };
3682        if (precision != null) {
3683          dst.precision = new ArrayList<DecimalType>();
3684          for (DecimalType i : precision)
3685            dst.precision.add(i.copy());
3686        };
3687        if (sensitivity != null) {
3688          dst.sensitivity = new ArrayList<DecimalType>();
3689          for (DecimalType i : sensitivity)
3690            dst.sensitivity.add(i.copy());
3691        };
3692        if (fMeasure != null) {
3693          dst.fMeasure = new ArrayList<DecimalType>();
3694          for (DecimalType i : fMeasure)
3695            dst.fMeasure.add(i.copy());
3696        };
3697        return dst;
3698      }
3699
3700      @Override
3701      public boolean equalsDeep(Base other_) {
3702        if (!super.equalsDeep(other_))
3703          return false;
3704        if (!(other_ instanceof MolecularSequenceQualityRocComponent))
3705          return false;
3706        MolecularSequenceQualityRocComponent o = (MolecularSequenceQualityRocComponent) other_;
3707        return compareDeep(score, o.score, true) && compareDeep(numTP, o.numTP, true) && compareDeep(numFP, o.numFP, true)
3708           && compareDeep(numFN, o.numFN, true) && compareDeep(precision, o.precision, true) && compareDeep(sensitivity, o.sensitivity, true)
3709           && compareDeep(fMeasure, o.fMeasure, true);
3710      }
3711
3712      @Override
3713      public boolean equalsShallow(Base other_) {
3714        if (!super.equalsShallow(other_))
3715          return false;
3716        if (!(other_ instanceof MolecularSequenceQualityRocComponent))
3717          return false;
3718        MolecularSequenceQualityRocComponent o = (MolecularSequenceQualityRocComponent) other_;
3719        return compareValues(score, o.score, true) && compareValues(numTP, o.numTP, true) && compareValues(numFP, o.numFP, true)
3720           && compareValues(numFN, o.numFN, true) && compareValues(precision, o.precision, true) && compareValues(sensitivity, o.sensitivity, true)
3721           && compareValues(fMeasure, o.fMeasure, true);
3722      }
3723
3724      public boolean isEmpty() {
3725        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(score, numTP, numFP, numFN
3726          , precision, sensitivity, fMeasure);
3727      }
3728
3729  public String fhirType() {
3730    return "MolecularSequence.quality.roc";
3731
3732  }
3733
3734  }
3735
3736    @Block()
3737    public static class MolecularSequenceRepositoryComponent extends BackboneElement implements IBaseBackboneElement {
3738        /**
3739         * Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.
3740         */
3741        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
3742        @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." )
3743        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/repository-type")
3744        protected Enumeration<RepositoryType> type;
3745
3746        /**
3747         * URI of an external repository which contains further details about the genetics data.
3748         */
3749        @Child(name = "url", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true)
3750        @Description(shortDefinition="URI of the repository", formalDefinition="URI of an external repository which contains further details about the genetics data." )
3751        protected UriType url;
3752
3753        /**
3754         * URI of an external repository which contains further details about the genetics data.
3755         */
3756        @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
3757        @Description(shortDefinition="Repository's name", formalDefinition="URI of an external repository which contains further details about the genetics data." )
3758        protected StringType name;
3759
3760        /**
3761         * 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.
3762         */
3763        @Child(name = "datasetId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
3764        @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." )
3765        protected StringType datasetId;
3766
3767        /**
3768         * 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.
3769         */
3770        @Child(name = "variantsetId", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
3771        @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." )
3772        protected StringType variantsetId;
3773
3774        /**
3775         * Id of the read in this external repository.
3776         */
3777        @Child(name = "readsetId", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true)
3778        @Description(shortDefinition="Id of the read", formalDefinition="Id of the read in this external repository." )
3779        protected StringType readsetId;
3780
3781        private static final long serialVersionUID = -899243265L;
3782
3783    /**
3784     * Constructor
3785     */
3786      public MolecularSequenceRepositoryComponent() {
3787        super();
3788      }
3789
3790    /**
3791     * Constructor
3792     */
3793      public MolecularSequenceRepositoryComponent(Enumeration<RepositoryType> type) {
3794        super();
3795        this.type = type;
3796      }
3797
3798        /**
3799         * @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
3800         */
3801        public Enumeration<RepositoryType> getTypeElement() { 
3802          if (this.type == null)
3803            if (Configuration.errorOnAutoCreate())
3804              throw new Error("Attempt to auto-create MolecularSequenceRepositoryComponent.type");
3805            else if (Configuration.doAutoCreate())
3806              this.type = new Enumeration<RepositoryType>(new RepositoryTypeEnumFactory()); // bb
3807          return this.type;
3808        }
3809
3810        public boolean hasTypeElement() { 
3811          return this.type != null && !this.type.isEmpty();
3812        }
3813
3814        public boolean hasType() { 
3815          return this.type != null && !this.type.isEmpty();
3816        }
3817
3818        /**
3819         * @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
3820         */
3821        public MolecularSequenceRepositoryComponent setTypeElement(Enumeration<RepositoryType> value) { 
3822          this.type = value;
3823          return this;
3824        }
3825
3826        /**
3827         * @return Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.
3828         */
3829        public RepositoryType getType() { 
3830          return this.type == null ? null : this.type.getValue();
3831        }
3832
3833        /**
3834         * @param value Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.
3835         */
3836        public MolecularSequenceRepositoryComponent setType(RepositoryType value) { 
3837            if (this.type == null)
3838              this.type = new Enumeration<RepositoryType>(new RepositoryTypeEnumFactory());
3839            this.type.setValue(value);
3840          return this;
3841        }
3842
3843        /**
3844         * @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
3845         */
3846        public UriType getUrlElement() { 
3847          if (this.url == null)
3848            if (Configuration.errorOnAutoCreate())
3849              throw new Error("Attempt to auto-create MolecularSequenceRepositoryComponent.url");
3850            else if (Configuration.doAutoCreate())
3851              this.url = new UriType(); // bb
3852          return this.url;
3853        }
3854
3855        public boolean hasUrlElement() { 
3856          return this.url != null && !this.url.isEmpty();
3857        }
3858
3859        public boolean hasUrl() { 
3860          return this.url != null && !this.url.isEmpty();
3861        }
3862
3863        /**
3864         * @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
3865         */
3866        public MolecularSequenceRepositoryComponent setUrlElement(UriType value) { 
3867          this.url = value;
3868          return this;
3869        }
3870
3871        /**
3872         * @return URI of an external repository which contains further details about the genetics data.
3873         */
3874        public String getUrl() { 
3875          return this.url == null ? null : this.url.getValue();
3876        }
3877
3878        /**
3879         * @param value URI of an external repository which contains further details about the genetics data.
3880         */
3881        public MolecularSequenceRepositoryComponent setUrl(String value) { 
3882          if (Utilities.noString(value))
3883            this.url = null;
3884          else {
3885            if (this.url == null)
3886              this.url = new UriType();
3887            this.url.setValue(value);
3888          }
3889          return this;
3890        }
3891
3892        /**
3893         * @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
3894         */
3895        public StringType getNameElement() { 
3896          if (this.name == null)
3897            if (Configuration.errorOnAutoCreate())
3898              throw new Error("Attempt to auto-create MolecularSequenceRepositoryComponent.name");
3899            else if (Configuration.doAutoCreate())
3900              this.name = new StringType(); // bb
3901          return this.name;
3902        }
3903
3904        public boolean hasNameElement() { 
3905          return this.name != null && !this.name.isEmpty();
3906        }
3907
3908        public boolean hasName() { 
3909          return this.name != null && !this.name.isEmpty();
3910        }
3911
3912        /**
3913         * @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
3914         */
3915        public MolecularSequenceRepositoryComponent setNameElement(StringType value) { 
3916          this.name = value;
3917          return this;
3918        }
3919
3920        /**
3921         * @return URI of an external repository which contains further details about the genetics data.
3922         */
3923        public String getName() { 
3924          return this.name == null ? null : this.name.getValue();
3925        }
3926
3927        /**
3928         * @param value URI of an external repository which contains further details about the genetics data.
3929         */
3930        public MolecularSequenceRepositoryComponent setName(String value) { 
3931          if (Utilities.noString(value))
3932            this.name = null;
3933          else {
3934            if (this.name == null)
3935              this.name = new StringType();
3936            this.name.setValue(value);
3937          }
3938          return this;
3939        }
3940
3941        /**
3942         * @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
3943         */
3944        public StringType getDatasetIdElement() { 
3945          if (this.datasetId == null)
3946            if (Configuration.errorOnAutoCreate())
3947              throw new Error("Attempt to auto-create MolecularSequenceRepositoryComponent.datasetId");
3948            else if (Configuration.doAutoCreate())
3949              this.datasetId = new StringType(); // bb
3950          return this.datasetId;
3951        }
3952
3953        public boolean hasDatasetIdElement() { 
3954          return this.datasetId != null && !this.datasetId.isEmpty();
3955        }
3956
3957        public boolean hasDatasetId() { 
3958          return this.datasetId != null && !this.datasetId.isEmpty();
3959        }
3960
3961        /**
3962         * @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
3963         */
3964        public MolecularSequenceRepositoryComponent setDatasetIdElement(StringType value) { 
3965          this.datasetId = value;
3966          return this;
3967        }
3968
3969        /**
3970         * @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.
3971         */
3972        public String getDatasetId() { 
3973          return this.datasetId == null ? null : this.datasetId.getValue();
3974        }
3975
3976        /**
3977         * @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.
3978         */
3979        public MolecularSequenceRepositoryComponent setDatasetId(String value) { 
3980          if (Utilities.noString(value))
3981            this.datasetId = null;
3982          else {
3983            if (this.datasetId == null)
3984              this.datasetId = new StringType();
3985            this.datasetId.setValue(value);
3986          }
3987          return this;
3988        }
3989
3990        /**
3991         * @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
3992         */
3993        public StringType getVariantsetIdElement() { 
3994          if (this.variantsetId == null)
3995            if (Configuration.errorOnAutoCreate())
3996              throw new Error("Attempt to auto-create MolecularSequenceRepositoryComponent.variantsetId");
3997            else if (Configuration.doAutoCreate())
3998              this.variantsetId = new StringType(); // bb
3999          return this.variantsetId;
4000        }
4001
4002        public boolean hasVariantsetIdElement() { 
4003          return this.variantsetId != null && !this.variantsetId.isEmpty();
4004        }
4005
4006        public boolean hasVariantsetId() { 
4007          return this.variantsetId != null && !this.variantsetId.isEmpty();
4008        }
4009
4010        /**
4011         * @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
4012         */
4013        public MolecularSequenceRepositoryComponent setVariantsetIdElement(StringType value) { 
4014          this.variantsetId = value;
4015          return this;
4016        }
4017
4018        /**
4019         * @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.
4020         */
4021        public String getVariantsetId() { 
4022          return this.variantsetId == null ? null : this.variantsetId.getValue();
4023        }
4024
4025        /**
4026         * @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.
4027         */
4028        public MolecularSequenceRepositoryComponent setVariantsetId(String value) { 
4029          if (Utilities.noString(value))
4030            this.variantsetId = null;
4031          else {
4032            if (this.variantsetId == null)
4033              this.variantsetId = new StringType();
4034            this.variantsetId.setValue(value);
4035          }
4036          return this;
4037        }
4038
4039        /**
4040         * @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
4041         */
4042        public StringType getReadsetIdElement() { 
4043          if (this.readsetId == null)
4044            if (Configuration.errorOnAutoCreate())
4045              throw new Error("Attempt to auto-create MolecularSequenceRepositoryComponent.readsetId");
4046            else if (Configuration.doAutoCreate())
4047              this.readsetId = new StringType(); // bb
4048          return this.readsetId;
4049        }
4050
4051        public boolean hasReadsetIdElement() { 
4052          return this.readsetId != null && !this.readsetId.isEmpty();
4053        }
4054
4055        public boolean hasReadsetId() { 
4056          return this.readsetId != null && !this.readsetId.isEmpty();
4057        }
4058
4059        /**
4060         * @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
4061         */
4062        public MolecularSequenceRepositoryComponent setReadsetIdElement(StringType value) { 
4063          this.readsetId = value;
4064          return this;
4065        }
4066
4067        /**
4068         * @return Id of the read in this external repository.
4069         */
4070        public String getReadsetId() { 
4071          return this.readsetId == null ? null : this.readsetId.getValue();
4072        }
4073
4074        /**
4075         * @param value Id of the read in this external repository.
4076         */
4077        public MolecularSequenceRepositoryComponent setReadsetId(String value) { 
4078          if (Utilities.noString(value))
4079            this.readsetId = null;
4080          else {
4081            if (this.readsetId == null)
4082              this.readsetId = new StringType();
4083            this.readsetId.setValue(value);
4084          }
4085          return this;
4086        }
4087
4088        protected void listChildren(List<Property> children) {
4089          super.listChildren(children);
4090          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));
4091          children.add(new Property("url", "uri", "URI of an external repository which contains further details about the genetics data.", 0, 1, url));
4092          children.add(new Property("name", "string", "URI of an external repository which contains further details about the genetics data.", 0, 1, name));
4093          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));
4094          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));
4095          children.add(new Property("readsetId", "string", "Id of the read in this external repository.", 0, 1, readsetId));
4096        }
4097
4098        @Override
4099        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4100          switch (_hash) {
4101          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);
4102          case 116079: /*url*/  return new Property("url", "uri", "URI of an external repository which contains further details about the genetics data.", 0, 1, url);
4103          case 3373707: /*name*/  return new Property("name", "string", "URI of an external repository which contains further details about the genetics data.", 0, 1, name);
4104          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);
4105          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);
4106          case -1095407289: /*readsetId*/  return new Property("readsetId", "string", "Id of the read in this external repository.", 0, 1, readsetId);
4107          default: return super.getNamedProperty(_hash, _name, _checkValid);
4108          }
4109
4110        }
4111
4112      @Override
4113      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4114        switch (hash) {
4115        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<RepositoryType>
4116        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
4117        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
4118        case -345342029: /*datasetId*/ return this.datasetId == null ? new Base[0] : new Base[] {this.datasetId}; // StringType
4119        case 1929752504: /*variantsetId*/ return this.variantsetId == null ? new Base[0] : new Base[] {this.variantsetId}; // StringType
4120        case -1095407289: /*readsetId*/ return this.readsetId == null ? new Base[0] : new Base[] {this.readsetId}; // StringType
4121        default: return super.getProperty(hash, name, checkValid);
4122        }
4123
4124      }
4125
4126      @Override
4127      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4128        switch (hash) {
4129        case 3575610: // type
4130          value = new RepositoryTypeEnumFactory().fromType(castToCode(value));
4131          this.type = (Enumeration) value; // Enumeration<RepositoryType>
4132          return value;
4133        case 116079: // url
4134          this.url = castToUri(value); // UriType
4135          return value;
4136        case 3373707: // name
4137          this.name = castToString(value); // StringType
4138          return value;
4139        case -345342029: // datasetId
4140          this.datasetId = castToString(value); // StringType
4141          return value;
4142        case 1929752504: // variantsetId
4143          this.variantsetId = castToString(value); // StringType
4144          return value;
4145        case -1095407289: // readsetId
4146          this.readsetId = castToString(value); // StringType
4147          return value;
4148        default: return super.setProperty(hash, name, value);
4149        }
4150
4151      }
4152
4153      @Override
4154      public Base setProperty(String name, Base value) throws FHIRException {
4155        if (name.equals("type")) {
4156          value = new RepositoryTypeEnumFactory().fromType(castToCode(value));
4157          this.type = (Enumeration) value; // Enumeration<RepositoryType>
4158        } else if (name.equals("url")) {
4159          this.url = castToUri(value); // UriType
4160        } else if (name.equals("name")) {
4161          this.name = castToString(value); // StringType
4162        } else if (name.equals("datasetId")) {
4163          this.datasetId = castToString(value); // StringType
4164        } else if (name.equals("variantsetId")) {
4165          this.variantsetId = castToString(value); // StringType
4166        } else if (name.equals("readsetId")) {
4167          this.readsetId = castToString(value); // StringType
4168        } else
4169          return super.setProperty(name, value);
4170        return value;
4171      }
4172
4173      @Override
4174      public Base makeProperty(int hash, String name) throws FHIRException {
4175        switch (hash) {
4176        case 3575610:  return getTypeElement();
4177        case 116079:  return getUrlElement();
4178        case 3373707:  return getNameElement();
4179        case -345342029:  return getDatasetIdElement();
4180        case 1929752504:  return getVariantsetIdElement();
4181        case -1095407289:  return getReadsetIdElement();
4182        default: return super.makeProperty(hash, name);
4183        }
4184
4185      }
4186
4187      @Override
4188      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4189        switch (hash) {
4190        case 3575610: /*type*/ return new String[] {"code"};
4191        case 116079: /*url*/ return new String[] {"uri"};
4192        case 3373707: /*name*/ return new String[] {"string"};
4193        case -345342029: /*datasetId*/ return new String[] {"string"};
4194        case 1929752504: /*variantsetId*/ return new String[] {"string"};
4195        case -1095407289: /*readsetId*/ return new String[] {"string"};
4196        default: return super.getTypesForProperty(hash, name);
4197        }
4198
4199      }
4200
4201      @Override
4202      public Base addChild(String name) throws FHIRException {
4203        if (name.equals("type")) {
4204          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.type");
4205        }
4206        else if (name.equals("url")) {
4207          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.url");
4208        }
4209        else if (name.equals("name")) {
4210          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.name");
4211        }
4212        else if (name.equals("datasetId")) {
4213          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.datasetId");
4214        }
4215        else if (name.equals("variantsetId")) {
4216          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.variantsetId");
4217        }
4218        else if (name.equals("readsetId")) {
4219          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.readsetId");
4220        }
4221        else
4222          return super.addChild(name);
4223      }
4224
4225      public MolecularSequenceRepositoryComponent copy() {
4226        MolecularSequenceRepositoryComponent dst = new MolecularSequenceRepositoryComponent();
4227        copyValues(dst);
4228        dst.type = type == null ? null : type.copy();
4229        dst.url = url == null ? null : url.copy();
4230        dst.name = name == null ? null : name.copy();
4231        dst.datasetId = datasetId == null ? null : datasetId.copy();
4232        dst.variantsetId = variantsetId == null ? null : variantsetId.copy();
4233        dst.readsetId = readsetId == null ? null : readsetId.copy();
4234        return dst;
4235      }
4236
4237      @Override
4238      public boolean equalsDeep(Base other_) {
4239        if (!super.equalsDeep(other_))
4240          return false;
4241        if (!(other_ instanceof MolecularSequenceRepositoryComponent))
4242          return false;
4243        MolecularSequenceRepositoryComponent o = (MolecularSequenceRepositoryComponent) other_;
4244        return compareDeep(type, o.type, true) && compareDeep(url, o.url, true) && compareDeep(name, o.name, true)
4245           && compareDeep(datasetId, o.datasetId, true) && compareDeep(variantsetId, o.variantsetId, true)
4246           && compareDeep(readsetId, o.readsetId, true);
4247      }
4248
4249      @Override
4250      public boolean equalsShallow(Base other_) {
4251        if (!super.equalsShallow(other_))
4252          return false;
4253        if (!(other_ instanceof MolecularSequenceRepositoryComponent))
4254          return false;
4255        MolecularSequenceRepositoryComponent o = (MolecularSequenceRepositoryComponent) other_;
4256        return compareValues(type, o.type, true) && compareValues(url, o.url, true) && compareValues(name, o.name, true)
4257           && compareValues(datasetId, o.datasetId, true) && compareValues(variantsetId, o.variantsetId, true)
4258           && compareValues(readsetId, o.readsetId, true);
4259      }
4260
4261      public boolean isEmpty() {
4262        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, url, name, datasetId
4263          , variantsetId, readsetId);
4264      }
4265
4266  public String fhirType() {
4267    return "MolecularSequence.repository";
4268
4269  }
4270
4271  }
4272
4273    @Block()
4274    public static class MolecularSequenceStructureVariantComponent extends BackboneElement implements IBaseBackboneElement {
4275        /**
4276         * Information about chromosome structure variation DNA change type.
4277         */
4278        @Child(name = "variantType", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
4279        @Description(shortDefinition="Structural variant change type", formalDefinition="Information about chromosome structure variation DNA change type." )
4280        protected CodeableConcept variantType;
4281
4282        /**
4283         * Used to indicate if the outer and inner start-end values have the same meaning.
4284         */
4285        @Child(name = "exact", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=true)
4286        @Description(shortDefinition="Does the structural variant have base pair resolution breakpoints?", formalDefinition="Used to indicate if the outer and inner start-end values have the same meaning." )
4287        protected BooleanType exact;
4288
4289        /**
4290         * Length of the variant chromosome.
4291         */
4292        @Child(name = "length", type = {IntegerType.class}, order=3, min=0, max=1, modifier=false, summary=true)
4293        @Description(shortDefinition="Structural variant length", formalDefinition="Length of the variant chromosome." )
4294        protected IntegerType length;
4295
4296        /**
4297         * Structural variant outer.
4298         */
4299        @Child(name = "outer", type = {}, order=4, min=0, max=1, modifier=false, summary=true)
4300        @Description(shortDefinition="Structural variant outer", formalDefinition="Structural variant outer." )
4301        protected MolecularSequenceStructureVariantOuterComponent outer;
4302
4303        /**
4304         * Structural variant inner.
4305         */
4306        @Child(name = "inner", type = {}, order=5, min=0, max=1, modifier=false, summary=true)
4307        @Description(shortDefinition="Structural variant inner", formalDefinition="Structural variant inner." )
4308        protected MolecularSequenceStructureVariantInnerComponent inner;
4309
4310        private static final long serialVersionUID = -1943515207L;
4311
4312    /**
4313     * Constructor
4314     */
4315      public MolecularSequenceStructureVariantComponent() {
4316        super();
4317      }
4318
4319        /**
4320         * @return {@link #variantType} (Information about chromosome structure variation DNA change type.)
4321         */
4322        public CodeableConcept getVariantType() { 
4323          if (this.variantType == null)
4324            if (Configuration.errorOnAutoCreate())
4325              throw new Error("Attempt to auto-create MolecularSequenceStructureVariantComponent.variantType");
4326            else if (Configuration.doAutoCreate())
4327              this.variantType = new CodeableConcept(); // cc
4328          return this.variantType;
4329        }
4330
4331        public boolean hasVariantType() { 
4332          return this.variantType != null && !this.variantType.isEmpty();
4333        }
4334
4335        /**
4336         * @param value {@link #variantType} (Information about chromosome structure variation DNA change type.)
4337         */
4338        public MolecularSequenceStructureVariantComponent setVariantType(CodeableConcept value) { 
4339          this.variantType = value;
4340          return this;
4341        }
4342
4343        /**
4344         * @return {@link #exact} (Used to indicate if the outer and inner start-end values have the same meaning.). This is the underlying object with id, value and extensions. The accessor "getExact" gives direct access to the value
4345         */
4346        public BooleanType getExactElement() { 
4347          if (this.exact == null)
4348            if (Configuration.errorOnAutoCreate())
4349              throw new Error("Attempt to auto-create MolecularSequenceStructureVariantComponent.exact");
4350            else if (Configuration.doAutoCreate())
4351              this.exact = new BooleanType(); // bb
4352          return this.exact;
4353        }
4354
4355        public boolean hasExactElement() { 
4356          return this.exact != null && !this.exact.isEmpty();
4357        }
4358
4359        public boolean hasExact() { 
4360          return this.exact != null && !this.exact.isEmpty();
4361        }
4362
4363        /**
4364         * @param value {@link #exact} (Used to indicate if the outer and inner start-end values have the same meaning.). This is the underlying object with id, value and extensions. The accessor "getExact" gives direct access to the value
4365         */
4366        public MolecularSequenceStructureVariantComponent setExactElement(BooleanType value) { 
4367          this.exact = value;
4368          return this;
4369        }
4370
4371        /**
4372         * @return Used to indicate if the outer and inner start-end values have the same meaning.
4373         */
4374        public boolean getExact() { 
4375          return this.exact == null || this.exact.isEmpty() ? false : this.exact.getValue();
4376        }
4377
4378        /**
4379         * @param value Used to indicate if the outer and inner start-end values have the same meaning.
4380         */
4381        public MolecularSequenceStructureVariantComponent setExact(boolean value) { 
4382            if (this.exact == null)
4383              this.exact = new BooleanType();
4384            this.exact.setValue(value);
4385          return this;
4386        }
4387
4388        /**
4389         * @return {@link #length} (Length of the variant chromosome.). This is the underlying object with id, value and extensions. The accessor "getLength" gives direct access to the value
4390         */
4391        public IntegerType getLengthElement() { 
4392          if (this.length == null)
4393            if (Configuration.errorOnAutoCreate())
4394              throw new Error("Attempt to auto-create MolecularSequenceStructureVariantComponent.length");
4395            else if (Configuration.doAutoCreate())
4396              this.length = new IntegerType(); // bb
4397          return this.length;
4398        }
4399
4400        public boolean hasLengthElement() { 
4401          return this.length != null && !this.length.isEmpty();
4402        }
4403
4404        public boolean hasLength() { 
4405          return this.length != null && !this.length.isEmpty();
4406        }
4407
4408        /**
4409         * @param value {@link #length} (Length of the variant chromosome.). This is the underlying object with id, value and extensions. The accessor "getLength" gives direct access to the value
4410         */
4411        public MolecularSequenceStructureVariantComponent setLengthElement(IntegerType value) { 
4412          this.length = value;
4413          return this;
4414        }
4415
4416        /**
4417         * @return Length of the variant chromosome.
4418         */
4419        public int getLength() { 
4420          return this.length == null || this.length.isEmpty() ? 0 : this.length.getValue();
4421        }
4422
4423        /**
4424         * @param value Length of the variant chromosome.
4425         */
4426        public MolecularSequenceStructureVariantComponent setLength(int value) { 
4427            if (this.length == null)
4428              this.length = new IntegerType();
4429            this.length.setValue(value);
4430          return this;
4431        }
4432
4433        /**
4434         * @return {@link #outer} (Structural variant outer.)
4435         */
4436        public MolecularSequenceStructureVariantOuterComponent getOuter() { 
4437          if (this.outer == null)
4438            if (Configuration.errorOnAutoCreate())
4439              throw new Error("Attempt to auto-create MolecularSequenceStructureVariantComponent.outer");
4440            else if (Configuration.doAutoCreate())
4441              this.outer = new MolecularSequenceStructureVariantOuterComponent(); // cc
4442          return this.outer;
4443        }
4444
4445        public boolean hasOuter() { 
4446          return this.outer != null && !this.outer.isEmpty();
4447        }
4448
4449        /**
4450         * @param value {@link #outer} (Structural variant outer.)
4451         */
4452        public MolecularSequenceStructureVariantComponent setOuter(MolecularSequenceStructureVariantOuterComponent value) { 
4453          this.outer = value;
4454          return this;
4455        }
4456
4457        /**
4458         * @return {@link #inner} (Structural variant inner.)
4459         */
4460        public MolecularSequenceStructureVariantInnerComponent getInner() { 
4461          if (this.inner == null)
4462            if (Configuration.errorOnAutoCreate())
4463              throw new Error("Attempt to auto-create MolecularSequenceStructureVariantComponent.inner");
4464            else if (Configuration.doAutoCreate())
4465              this.inner = new MolecularSequenceStructureVariantInnerComponent(); // cc
4466          return this.inner;
4467        }
4468
4469        public boolean hasInner() { 
4470          return this.inner != null && !this.inner.isEmpty();
4471        }
4472
4473        /**
4474         * @param value {@link #inner} (Structural variant inner.)
4475         */
4476        public MolecularSequenceStructureVariantComponent setInner(MolecularSequenceStructureVariantInnerComponent value) { 
4477          this.inner = value;
4478          return this;
4479        }
4480
4481        protected void listChildren(List<Property> children) {
4482          super.listChildren(children);
4483          children.add(new Property("variantType", "CodeableConcept", "Information about chromosome structure variation DNA change type.", 0, 1, variantType));
4484          children.add(new Property("exact", "boolean", "Used to indicate if the outer and inner start-end values have the same meaning.", 0, 1, exact));
4485          children.add(new Property("length", "integer", "Length of the variant chromosome.", 0, 1, length));
4486          children.add(new Property("outer", "", "Structural variant outer.", 0, 1, outer));
4487          children.add(new Property("inner", "", "Structural variant inner.", 0, 1, inner));
4488        }
4489
4490        @Override
4491        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4492          switch (_hash) {
4493          case -1601222305: /*variantType*/  return new Property("variantType", "CodeableConcept", "Information about chromosome structure variation DNA change type.", 0, 1, variantType);
4494          case 96946943: /*exact*/  return new Property("exact", "boolean", "Used to indicate if the outer and inner start-end values have the same meaning.", 0, 1, exact);
4495          case -1106363674: /*length*/  return new Property("length", "integer", "Length of the variant chromosome.", 0, 1, length);
4496          case 106111099: /*outer*/  return new Property("outer", "", "Structural variant outer.", 0, 1, outer);
4497          case 100355670: /*inner*/  return new Property("inner", "", "Structural variant inner.", 0, 1, inner);
4498          default: return super.getNamedProperty(_hash, _name, _checkValid);
4499          }
4500
4501        }
4502
4503      @Override
4504      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4505        switch (hash) {
4506        case -1601222305: /*variantType*/ return this.variantType == null ? new Base[0] : new Base[] {this.variantType}; // CodeableConcept
4507        case 96946943: /*exact*/ return this.exact == null ? new Base[0] : new Base[] {this.exact}; // BooleanType
4508        case -1106363674: /*length*/ return this.length == null ? new Base[0] : new Base[] {this.length}; // IntegerType
4509        case 106111099: /*outer*/ return this.outer == null ? new Base[0] : new Base[] {this.outer}; // MolecularSequenceStructureVariantOuterComponent
4510        case 100355670: /*inner*/ return this.inner == null ? new Base[0] : new Base[] {this.inner}; // MolecularSequenceStructureVariantInnerComponent
4511        default: return super.getProperty(hash, name, checkValid);
4512        }
4513
4514      }
4515
4516      @Override
4517      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4518        switch (hash) {
4519        case -1601222305: // variantType
4520          this.variantType = castToCodeableConcept(value); // CodeableConcept
4521          return value;
4522        case 96946943: // exact
4523          this.exact = castToBoolean(value); // BooleanType
4524          return value;
4525        case -1106363674: // length
4526          this.length = castToInteger(value); // IntegerType
4527          return value;
4528        case 106111099: // outer
4529          this.outer = (MolecularSequenceStructureVariantOuterComponent) value; // MolecularSequenceStructureVariantOuterComponent
4530          return value;
4531        case 100355670: // inner
4532          this.inner = (MolecularSequenceStructureVariantInnerComponent) value; // MolecularSequenceStructureVariantInnerComponent
4533          return value;
4534        default: return super.setProperty(hash, name, value);
4535        }
4536
4537      }
4538
4539      @Override
4540      public Base setProperty(String name, Base value) throws FHIRException {
4541        if (name.equals("variantType")) {
4542          this.variantType = castToCodeableConcept(value); // CodeableConcept
4543        } else if (name.equals("exact")) {
4544          this.exact = castToBoolean(value); // BooleanType
4545        } else if (name.equals("length")) {
4546          this.length = castToInteger(value); // IntegerType
4547        } else if (name.equals("outer")) {
4548          this.outer = (MolecularSequenceStructureVariantOuterComponent) value; // MolecularSequenceStructureVariantOuterComponent
4549        } else if (name.equals("inner")) {
4550          this.inner = (MolecularSequenceStructureVariantInnerComponent) value; // MolecularSequenceStructureVariantInnerComponent
4551        } else
4552          return super.setProperty(name, value);
4553        return value;
4554      }
4555
4556      @Override
4557      public Base makeProperty(int hash, String name) throws FHIRException {
4558        switch (hash) {
4559        case -1601222305:  return getVariantType(); 
4560        case 96946943:  return getExactElement();
4561        case -1106363674:  return getLengthElement();
4562        case 106111099:  return getOuter(); 
4563        case 100355670:  return getInner(); 
4564        default: return super.makeProperty(hash, name);
4565        }
4566
4567      }
4568
4569      @Override
4570      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4571        switch (hash) {
4572        case -1601222305: /*variantType*/ return new String[] {"CodeableConcept"};
4573        case 96946943: /*exact*/ return new String[] {"boolean"};
4574        case -1106363674: /*length*/ return new String[] {"integer"};
4575        case 106111099: /*outer*/ return new String[] {};
4576        case 100355670: /*inner*/ return new String[] {};
4577        default: return super.getTypesForProperty(hash, name);
4578        }
4579
4580      }
4581
4582      @Override
4583      public Base addChild(String name) throws FHIRException {
4584        if (name.equals("variantType")) {
4585          this.variantType = new CodeableConcept();
4586          return this.variantType;
4587        }
4588        else if (name.equals("exact")) {
4589          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.exact");
4590        }
4591        else if (name.equals("length")) {
4592          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.length");
4593        }
4594        else if (name.equals("outer")) {
4595          this.outer = new MolecularSequenceStructureVariantOuterComponent();
4596          return this.outer;
4597        }
4598        else if (name.equals("inner")) {
4599          this.inner = new MolecularSequenceStructureVariantInnerComponent();
4600          return this.inner;
4601        }
4602        else
4603          return super.addChild(name);
4604      }
4605
4606      public MolecularSequenceStructureVariantComponent copy() {
4607        MolecularSequenceStructureVariantComponent dst = new MolecularSequenceStructureVariantComponent();
4608        copyValues(dst);
4609        dst.variantType = variantType == null ? null : variantType.copy();
4610        dst.exact = exact == null ? null : exact.copy();
4611        dst.length = length == null ? null : length.copy();
4612        dst.outer = outer == null ? null : outer.copy();
4613        dst.inner = inner == null ? null : inner.copy();
4614        return dst;
4615      }
4616
4617      @Override
4618      public boolean equalsDeep(Base other_) {
4619        if (!super.equalsDeep(other_))
4620          return false;
4621        if (!(other_ instanceof MolecularSequenceStructureVariantComponent))
4622          return false;
4623        MolecularSequenceStructureVariantComponent o = (MolecularSequenceStructureVariantComponent) other_;
4624        return compareDeep(variantType, o.variantType, true) && compareDeep(exact, o.exact, true) && compareDeep(length, o.length, true)
4625           && compareDeep(outer, o.outer, true) && compareDeep(inner, o.inner, true);
4626      }
4627
4628      @Override
4629      public boolean equalsShallow(Base other_) {
4630        if (!super.equalsShallow(other_))
4631          return false;
4632        if (!(other_ instanceof MolecularSequenceStructureVariantComponent))
4633          return false;
4634        MolecularSequenceStructureVariantComponent o = (MolecularSequenceStructureVariantComponent) other_;
4635        return compareValues(exact, o.exact, true) && compareValues(length, o.length, true);
4636      }
4637
4638      public boolean isEmpty() {
4639        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(variantType, exact, length
4640          , outer, inner);
4641      }
4642
4643  public String fhirType() {
4644    return "MolecularSequence.structureVariant";
4645
4646  }
4647
4648  }
4649
4650    @Block()
4651    public static class MolecularSequenceStructureVariantOuterComponent extends BackboneElement implements IBaseBackboneElement {
4652        /**
4653         * Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
4654         */
4655        @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true)
4656        @Description(shortDefinition="Structural variant outer start", formalDefinition="Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive." )
4657        protected IntegerType start;
4658
4659        /**
4660         * Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
4661         */
4662        @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true)
4663        @Description(shortDefinition="Structural variant outer end", formalDefinition="Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." )
4664        protected IntegerType end;
4665
4666        private static final long serialVersionUID = -1798864889L;
4667
4668    /**
4669     * Constructor
4670     */
4671      public MolecularSequenceStructureVariantOuterComponent() {
4672        super();
4673      }
4674
4675        /**
4676         * @return {@link #start} (Structural variant outer start. 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
4677         */
4678        public IntegerType getStartElement() { 
4679          if (this.start == null)
4680            if (Configuration.errorOnAutoCreate())
4681              throw new Error("Attempt to auto-create MolecularSequenceStructureVariantOuterComponent.start");
4682            else if (Configuration.doAutoCreate())
4683              this.start = new IntegerType(); // bb
4684          return this.start;
4685        }
4686
4687        public boolean hasStartElement() { 
4688          return this.start != null && !this.start.isEmpty();
4689        }
4690
4691        public boolean hasStart() { 
4692          return this.start != null && !this.start.isEmpty();
4693        }
4694
4695        /**
4696         * @param value {@link #start} (Structural variant outer start. 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
4697         */
4698        public MolecularSequenceStructureVariantOuterComponent setStartElement(IntegerType value) { 
4699          this.start = value;
4700          return this;
4701        }
4702
4703        /**
4704         * @return Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
4705         */
4706        public int getStart() { 
4707          return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue();
4708        }
4709
4710        /**
4711         * @param value Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
4712         */
4713        public MolecularSequenceStructureVariantOuterComponent setStart(int value) { 
4714            if (this.start == null)
4715              this.start = new IntegerType();
4716            this.start.setValue(value);
4717          return this;
4718        }
4719
4720        /**
4721         * @return {@link #end} (Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
4722         */
4723        public IntegerType getEndElement() { 
4724          if (this.end == null)
4725            if (Configuration.errorOnAutoCreate())
4726              throw new Error("Attempt to auto-create MolecularSequenceStructureVariantOuterComponent.end");
4727            else if (Configuration.doAutoCreate())
4728              this.end = new IntegerType(); // bb
4729          return this.end;
4730        }
4731
4732        public boolean hasEndElement() { 
4733          return this.end != null && !this.end.isEmpty();
4734        }
4735
4736        public boolean hasEnd() { 
4737          return this.end != null && !this.end.isEmpty();
4738        }
4739
4740        /**
4741         * @param value {@link #end} (Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
4742         */
4743        public MolecularSequenceStructureVariantOuterComponent setEndElement(IntegerType value) { 
4744          this.end = value;
4745          return this;
4746        }
4747
4748        /**
4749         * @return Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
4750         */
4751        public int getEnd() { 
4752          return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue();
4753        }
4754
4755        /**
4756         * @param value Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
4757         */
4758        public MolecularSequenceStructureVariantOuterComponent setEnd(int value) { 
4759            if (this.end == null)
4760              this.end = new IntegerType();
4761            this.end.setValue(value);
4762          return this;
4763        }
4764
4765        protected void listChildren(List<Property> children) {
4766          super.listChildren(children);
4767          children.add(new Property("start", "integer", "Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start));
4768          children.add(new Property("end", "integer", "Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", 0, 1, end));
4769        }
4770
4771        @Override
4772        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4773          switch (_hash) {
4774          case 109757538: /*start*/  return new Property("start", "integer", "Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start);
4775          case 100571: /*end*/  return new Property("end", "integer", "Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", 0, 1, end);
4776          default: return super.getNamedProperty(_hash, _name, _checkValid);
4777          }
4778
4779        }
4780
4781      @Override
4782      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4783        switch (hash) {
4784        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType
4785        case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType
4786        default: return super.getProperty(hash, name, checkValid);
4787        }
4788
4789      }
4790
4791      @Override
4792      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4793        switch (hash) {
4794        case 109757538: // start
4795          this.start = castToInteger(value); // IntegerType
4796          return value;
4797        case 100571: // end
4798          this.end = castToInteger(value); // IntegerType
4799          return value;
4800        default: return super.setProperty(hash, name, value);
4801        }
4802
4803      }
4804
4805      @Override
4806      public Base setProperty(String name, Base value) throws FHIRException {
4807        if (name.equals("start")) {
4808          this.start = castToInteger(value); // IntegerType
4809        } else if (name.equals("end")) {
4810          this.end = castToInteger(value); // IntegerType
4811        } else
4812          return super.setProperty(name, value);
4813        return value;
4814      }
4815
4816      @Override
4817      public Base makeProperty(int hash, String name) throws FHIRException {
4818        switch (hash) {
4819        case 109757538:  return getStartElement();
4820        case 100571:  return getEndElement();
4821        default: return super.makeProperty(hash, name);
4822        }
4823
4824      }
4825
4826      @Override
4827      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4828        switch (hash) {
4829        case 109757538: /*start*/ return new String[] {"integer"};
4830        case 100571: /*end*/ return new String[] {"integer"};
4831        default: return super.getTypesForProperty(hash, name);
4832        }
4833
4834      }
4835
4836      @Override
4837      public Base addChild(String name) throws FHIRException {
4838        if (name.equals("start")) {
4839          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.start");
4840        }
4841        else if (name.equals("end")) {
4842          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.end");
4843        }
4844        else
4845          return super.addChild(name);
4846      }
4847
4848      public MolecularSequenceStructureVariantOuterComponent copy() {
4849        MolecularSequenceStructureVariantOuterComponent dst = new MolecularSequenceStructureVariantOuterComponent();
4850        copyValues(dst);
4851        dst.start = start == null ? null : start.copy();
4852        dst.end = end == null ? null : end.copy();
4853        return dst;
4854      }
4855
4856      @Override
4857      public boolean equalsDeep(Base other_) {
4858        if (!super.equalsDeep(other_))
4859          return false;
4860        if (!(other_ instanceof MolecularSequenceStructureVariantOuterComponent))
4861          return false;
4862        MolecularSequenceStructureVariantOuterComponent o = (MolecularSequenceStructureVariantOuterComponent) other_;
4863        return compareDeep(start, o.start, true) && compareDeep(end, o.end, true);
4864      }
4865
4866      @Override
4867      public boolean equalsShallow(Base other_) {
4868        if (!super.equalsShallow(other_))
4869          return false;
4870        if (!(other_ instanceof MolecularSequenceStructureVariantOuterComponent))
4871          return false;
4872        MolecularSequenceStructureVariantOuterComponent o = (MolecularSequenceStructureVariantOuterComponent) other_;
4873        return compareValues(start, o.start, true) && compareValues(end, o.end, true);
4874      }
4875
4876      public boolean isEmpty() {
4877        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(start, end);
4878      }
4879
4880  public String fhirType() {
4881    return "MolecularSequence.structureVariant.outer";
4882
4883  }
4884
4885  }
4886
4887    @Block()
4888    public static class MolecularSequenceStructureVariantInnerComponent extends BackboneElement implements IBaseBackboneElement {
4889        /**
4890         * Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
4891         */
4892        @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true)
4893        @Description(shortDefinition="Structural variant inner start", formalDefinition="Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive." )
4894        protected IntegerType start;
4895
4896        /**
4897         * Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
4898         */
4899        @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true)
4900        @Description(shortDefinition="Structural variant inner end", formalDefinition="Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." )
4901        protected IntegerType end;
4902
4903        private static final long serialVersionUID = -1798864889L;
4904
4905    /**
4906     * Constructor
4907     */
4908      public MolecularSequenceStructureVariantInnerComponent() {
4909        super();
4910      }
4911
4912        /**
4913         * @return {@link #start} (Structural variant inner start. 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
4914         */
4915        public IntegerType getStartElement() { 
4916          if (this.start == null)
4917            if (Configuration.errorOnAutoCreate())
4918              throw new Error("Attempt to auto-create MolecularSequenceStructureVariantInnerComponent.start");
4919            else if (Configuration.doAutoCreate())
4920              this.start = new IntegerType(); // bb
4921          return this.start;
4922        }
4923
4924        public boolean hasStartElement() { 
4925          return this.start != null && !this.start.isEmpty();
4926        }
4927
4928        public boolean hasStart() { 
4929          return this.start != null && !this.start.isEmpty();
4930        }
4931
4932        /**
4933         * @param value {@link #start} (Structural variant inner start. 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
4934         */
4935        public MolecularSequenceStructureVariantInnerComponent setStartElement(IntegerType value) { 
4936          this.start = value;
4937          return this;
4938        }
4939
4940        /**
4941         * @return Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
4942         */
4943        public int getStart() { 
4944          return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue();
4945        }
4946
4947        /**
4948         * @param value Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.
4949         */
4950        public MolecularSequenceStructureVariantInnerComponent setStart(int value) { 
4951            if (this.start == null)
4952              this.start = new IntegerType();
4953            this.start.setValue(value);
4954          return this;
4955        }
4956
4957        /**
4958         * @return {@link #end} (Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
4959         */
4960        public IntegerType getEndElement() { 
4961          if (this.end == null)
4962            if (Configuration.errorOnAutoCreate())
4963              throw new Error("Attempt to auto-create MolecularSequenceStructureVariantInnerComponent.end");
4964            else if (Configuration.doAutoCreate())
4965              this.end = new IntegerType(); // bb
4966          return this.end;
4967        }
4968
4969        public boolean hasEndElement() { 
4970          return this.end != null && !this.end.isEmpty();
4971        }
4972
4973        public boolean hasEnd() { 
4974          return this.end != null && !this.end.isEmpty();
4975        }
4976
4977        /**
4978         * @param value {@link #end} (Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
4979         */
4980        public MolecularSequenceStructureVariantInnerComponent setEndElement(IntegerType value) { 
4981          this.end = value;
4982          return this;
4983        }
4984
4985        /**
4986         * @return Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
4987         */
4988        public int getEnd() { 
4989          return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue();
4990        }
4991
4992        /**
4993         * @param value Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
4994         */
4995        public MolecularSequenceStructureVariantInnerComponent setEnd(int value) { 
4996            if (this.end == null)
4997              this.end = new IntegerType();
4998            this.end.setValue(value);
4999          return this;
5000        }
5001
5002        protected void listChildren(List<Property> children) {
5003          super.listChildren(children);
5004          children.add(new Property("start", "integer", "Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start));
5005          children.add(new Property("end", "integer", "Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", 0, 1, end));
5006        }
5007
5008        @Override
5009        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5010          switch (_hash) {
5011          case 109757538: /*start*/  return new Property("start", "integer", "Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.", 0, 1, start);
5012          case 100571: /*end*/  return new Property("end", "integer", "Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.", 0, 1, end);
5013          default: return super.getNamedProperty(_hash, _name, _checkValid);
5014          }
5015
5016        }
5017
5018      @Override
5019      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5020        switch (hash) {
5021        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType
5022        case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType
5023        default: return super.getProperty(hash, name, checkValid);
5024        }
5025
5026      }
5027
5028      @Override
5029      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5030        switch (hash) {
5031        case 109757538: // start
5032          this.start = castToInteger(value); // IntegerType
5033          return value;
5034        case 100571: // end
5035          this.end = castToInteger(value); // IntegerType
5036          return value;
5037        default: return super.setProperty(hash, name, value);
5038        }
5039
5040      }
5041
5042      @Override
5043      public Base setProperty(String name, Base value) throws FHIRException {
5044        if (name.equals("start")) {
5045          this.start = castToInteger(value); // IntegerType
5046        } else if (name.equals("end")) {
5047          this.end = castToInteger(value); // IntegerType
5048        } else
5049          return super.setProperty(name, value);
5050        return value;
5051      }
5052
5053      @Override
5054      public Base makeProperty(int hash, String name) throws FHIRException {
5055        switch (hash) {
5056        case 109757538:  return getStartElement();
5057        case 100571:  return getEndElement();
5058        default: return super.makeProperty(hash, name);
5059        }
5060
5061      }
5062
5063      @Override
5064      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5065        switch (hash) {
5066        case 109757538: /*start*/ return new String[] {"integer"};
5067        case 100571: /*end*/ return new String[] {"integer"};
5068        default: return super.getTypesForProperty(hash, name);
5069        }
5070
5071      }
5072
5073      @Override
5074      public Base addChild(String name) throws FHIRException {
5075        if (name.equals("start")) {
5076          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.start");
5077        }
5078        else if (name.equals("end")) {
5079          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.end");
5080        }
5081        else
5082          return super.addChild(name);
5083      }
5084
5085      public MolecularSequenceStructureVariantInnerComponent copy() {
5086        MolecularSequenceStructureVariantInnerComponent dst = new MolecularSequenceStructureVariantInnerComponent();
5087        copyValues(dst);
5088        dst.start = start == null ? null : start.copy();
5089        dst.end = end == null ? null : end.copy();
5090        return dst;
5091      }
5092
5093      @Override
5094      public boolean equalsDeep(Base other_) {
5095        if (!super.equalsDeep(other_))
5096          return false;
5097        if (!(other_ instanceof MolecularSequenceStructureVariantInnerComponent))
5098          return false;
5099        MolecularSequenceStructureVariantInnerComponent o = (MolecularSequenceStructureVariantInnerComponent) other_;
5100        return compareDeep(start, o.start, true) && compareDeep(end, o.end, true);
5101      }
5102
5103      @Override
5104      public boolean equalsShallow(Base other_) {
5105        if (!super.equalsShallow(other_))
5106          return false;
5107        if (!(other_ instanceof MolecularSequenceStructureVariantInnerComponent))
5108          return false;
5109        MolecularSequenceStructureVariantInnerComponent o = (MolecularSequenceStructureVariantInnerComponent) other_;
5110        return compareValues(start, o.start, true) && compareValues(end, o.end, true);
5111      }
5112
5113      public boolean isEmpty() {
5114        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(start, end);
5115      }
5116
5117  public String fhirType() {
5118    return "MolecularSequence.structureVariant.inner";
5119
5120  }
5121
5122  }
5123
5124    /**
5125     * A unique identifier for this particular sequence instance. This is a FHIR-defined id.
5126     */
5127    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5128    @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." )
5129    protected List<Identifier> identifier;
5130
5131    /**
5132     * Amino Acid Sequence/ DNA Sequence / RNA Sequence.
5133     */
5134    @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=true)
5135    @Description(shortDefinition="aa | dna | rna", formalDefinition="Amino Acid Sequence/ DNA Sequence / RNA Sequence." )
5136    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/sequence-type")
5137    protected Enumeration<SequenceType> type;
5138
5139    /**
5140     * 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).
5141     */
5142    @Child(name = "coordinateSystem", type = {IntegerType.class}, order=2, min=1, max=1, modifier=false, summary=true)
5143    @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)." )
5144    protected IntegerType coordinateSystem;
5145
5146    /**
5147     * The patient whose sequencing results are described by this resource.
5148     */
5149    @Child(name = "patient", type = {Patient.class}, order=3, min=0, max=1, modifier=false, summary=true)
5150    @Description(shortDefinition="Who and/or what this is about", formalDefinition="The patient whose sequencing results are described by this resource." )
5151    protected Reference patient;
5152
5153    /**
5154     * The actual object that is the target of the reference (The patient whose sequencing results are described by this resource.)
5155     */
5156    protected Patient patientTarget;
5157
5158    /**
5159     * Specimen used for sequencing.
5160     */
5161    @Child(name = "specimen", type = {Specimen.class}, order=4, min=0, max=1, modifier=false, summary=true)
5162    @Description(shortDefinition="Specimen used for sequencing", formalDefinition="Specimen used for sequencing." )
5163    protected Reference specimen;
5164
5165    /**
5166     * The actual object that is the target of the reference (Specimen used for sequencing.)
5167     */
5168    protected Specimen specimenTarget;
5169
5170    /**
5171     * The method for sequencing, for example, chip information.
5172     */
5173    @Child(name = "device", type = {Device.class}, order=5, min=0, max=1, modifier=false, summary=true)
5174    @Description(shortDefinition="The method for sequencing", formalDefinition="The method for sequencing, for example, chip information." )
5175    protected Reference device;
5176
5177    /**
5178     * The actual object that is the target of the reference (The method for sequencing, for example, chip information.)
5179     */
5180    protected Device deviceTarget;
5181
5182    /**
5183     * The organization or lab that should be responsible for this result.
5184     */
5185    @Child(name = "performer", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true)
5186    @Description(shortDefinition="Who should be responsible for test result", formalDefinition="The organization or lab that should be responsible for this result." )
5187    protected Reference performer;
5188
5189    /**
5190     * The actual object that is the target of the reference (The organization or lab that should be responsible for this result.)
5191     */
5192    protected Organization performerTarget;
5193
5194    /**
5195     * The number of copies of the sequence of interest. (RNASeq).
5196     */
5197    @Child(name = "quantity", type = {Quantity.class}, order=7, min=0, max=1, modifier=false, summary=true)
5198    @Description(shortDefinition="The number of copies of the sequence of interest.  (RNASeq)", formalDefinition="The number of copies of the sequence of interest. (RNASeq)." )
5199    protected Quantity quantity;
5200
5201    /**
5202     * A sequence that is used as a reference to describe variants that are present in a sequence analyzed.
5203     */
5204    @Child(name = "referenceSeq", type = {}, order=8, min=0, max=1, modifier=false, summary=true)
5205    @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." )
5206    protected MolecularSequenceReferenceSeqComponent referenceSeq;
5207
5208    /**
5209     * 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.
5210     */
5211    @Child(name = "variant", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5212    @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." )
5213    protected List<MolecularSequenceVariantComponent> variant;
5214
5215    /**
5216     * Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall start from referenceSeq.windowStart and end by referenceSeq.windowEnd.
5217     */
5218    @Child(name = "observedSeq", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=true)
5219    @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 start from referenceSeq.windowStart and end by referenceSeq.windowEnd." )
5220    protected StringType observedSeq;
5221
5222    /**
5223     * 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)).
5224     */
5225    @Child(name = "quality", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5226    @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))." )
5227    protected List<MolecularSequenceQualityComponent> quality;
5228
5229    /**
5230     * Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.
5231     */
5232    @Child(name = "readCoverage", type = {IntegerType.class}, order=12, min=0, max=1, modifier=false, summary=true)
5233    @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." )
5234    protected IntegerType readCoverage;
5235
5236    /**
5237     * Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.
5238     */
5239    @Child(name = "repository", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5240    @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." )
5241    protected List<MolecularSequenceRepositoryComponent> repository;
5242
5243    /**
5244     * Pointer to next atomic sequence which at most contains one variant.
5245     */
5246    @Child(name = "pointer", type = {MolecularSequence.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5247    @Description(shortDefinition="Pointer to next atomic sequence", formalDefinition="Pointer to next atomic sequence which at most contains one variant." )
5248    protected List<Reference> pointer;
5249    /**
5250     * The actual objects that are the target of the reference (Pointer to next atomic sequence which at most contains one variant.)
5251     */
5252    protected List<MolecularSequence> pointerTarget;
5253
5254
5255    /**
5256     * Information about chromosome structure variation.
5257     */
5258    @Child(name = "structureVariant", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5259    @Description(shortDefinition="Structural variant", formalDefinition="Information about chromosome structure variation." )
5260    protected List<MolecularSequenceStructureVariantComponent> structureVariant;
5261
5262    private static final long serialVersionUID = -1541133500L;
5263
5264  /**
5265   * Constructor
5266   */
5267    public MolecularSequence() {
5268      super();
5269    }
5270
5271  /**
5272   * Constructor
5273   */
5274    public MolecularSequence(IntegerType coordinateSystem) {
5275      super();
5276      this.coordinateSystem = coordinateSystem;
5277    }
5278
5279    /**
5280     * @return {@link #identifier} (A unique identifier for this particular sequence instance. This is a FHIR-defined id.)
5281     */
5282    public List<Identifier> getIdentifier() { 
5283      if (this.identifier == null)
5284        this.identifier = new ArrayList<Identifier>();
5285      return this.identifier;
5286    }
5287
5288    /**
5289     * @return Returns a reference to <code>this</code> for easy method chaining
5290     */
5291    public MolecularSequence setIdentifier(List<Identifier> theIdentifier) { 
5292      this.identifier = theIdentifier;
5293      return this;
5294    }
5295
5296    public boolean hasIdentifier() { 
5297      if (this.identifier == null)
5298        return false;
5299      for (Identifier item : this.identifier)
5300        if (!item.isEmpty())
5301          return true;
5302      return false;
5303    }
5304
5305    public Identifier addIdentifier() { //3
5306      Identifier t = new Identifier();
5307      if (this.identifier == null)
5308        this.identifier = new ArrayList<Identifier>();
5309      this.identifier.add(t);
5310      return t;
5311    }
5312
5313    public MolecularSequence addIdentifier(Identifier t) { //3
5314      if (t == null)
5315        return this;
5316      if (this.identifier == null)
5317        this.identifier = new ArrayList<Identifier>();
5318      this.identifier.add(t);
5319      return this;
5320    }
5321
5322    /**
5323     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
5324     */
5325    public Identifier getIdentifierFirstRep() { 
5326      if (getIdentifier().isEmpty()) {
5327        addIdentifier();
5328      }
5329      return getIdentifier().get(0);
5330    }
5331
5332    /**
5333     * @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
5334     */
5335    public Enumeration<SequenceType> getTypeElement() { 
5336      if (this.type == null)
5337        if (Configuration.errorOnAutoCreate())
5338          throw new Error("Attempt to auto-create MolecularSequence.type");
5339        else if (Configuration.doAutoCreate())
5340          this.type = new Enumeration<SequenceType>(new SequenceTypeEnumFactory()); // bb
5341      return this.type;
5342    }
5343
5344    public boolean hasTypeElement() { 
5345      return this.type != null && !this.type.isEmpty();
5346    }
5347
5348    public boolean hasType() { 
5349      return this.type != null && !this.type.isEmpty();
5350    }
5351
5352    /**
5353     * @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
5354     */
5355    public MolecularSequence setTypeElement(Enumeration<SequenceType> value) { 
5356      this.type = value;
5357      return this;
5358    }
5359
5360    /**
5361     * @return Amino Acid Sequence/ DNA Sequence / RNA Sequence.
5362     */
5363    public SequenceType getType() { 
5364      return this.type == null ? null : this.type.getValue();
5365    }
5366
5367    /**
5368     * @param value Amino Acid Sequence/ DNA Sequence / RNA Sequence.
5369     */
5370    public MolecularSequence setType(SequenceType value) { 
5371      if (value == null)
5372        this.type = null;
5373      else {
5374        if (this.type == null)
5375          this.type = new Enumeration<SequenceType>(new SequenceTypeEnumFactory());
5376        this.type.setValue(value);
5377      }
5378      return this;
5379    }
5380
5381    /**
5382     * @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
5383     */
5384    public IntegerType getCoordinateSystemElement() { 
5385      if (this.coordinateSystem == null)
5386        if (Configuration.errorOnAutoCreate())
5387          throw new Error("Attempt to auto-create MolecularSequence.coordinateSystem");
5388        else if (Configuration.doAutoCreate())
5389          this.coordinateSystem = new IntegerType(); // bb
5390      return this.coordinateSystem;
5391    }
5392
5393    public boolean hasCoordinateSystemElement() { 
5394      return this.coordinateSystem != null && !this.coordinateSystem.isEmpty();
5395    }
5396
5397    public boolean hasCoordinateSystem() { 
5398      return this.coordinateSystem != null && !this.coordinateSystem.isEmpty();
5399    }
5400
5401    /**
5402     * @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
5403     */
5404    public MolecularSequence setCoordinateSystemElement(IntegerType value) { 
5405      this.coordinateSystem = value;
5406      return this;
5407    }
5408
5409    /**
5410     * @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).
5411     */
5412    public int getCoordinateSystem() { 
5413      return this.coordinateSystem == null || this.coordinateSystem.isEmpty() ? 0 : this.coordinateSystem.getValue();
5414    }
5415
5416    /**
5417     * @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).
5418     */
5419    public MolecularSequence setCoordinateSystem(int value) { 
5420        if (this.coordinateSystem == null)
5421          this.coordinateSystem = new IntegerType();
5422        this.coordinateSystem.setValue(value);
5423      return this;
5424    }
5425
5426    /**
5427     * @return {@link #patient} (The patient whose sequencing results are described by this resource.)
5428     */
5429    public Reference getPatient() { 
5430      if (this.patient == null)
5431        if (Configuration.errorOnAutoCreate())
5432          throw new Error("Attempt to auto-create MolecularSequence.patient");
5433        else if (Configuration.doAutoCreate())
5434          this.patient = new Reference(); // cc
5435      return this.patient;
5436    }
5437
5438    public boolean hasPatient() { 
5439      return this.patient != null && !this.patient.isEmpty();
5440    }
5441
5442    /**
5443     * @param value {@link #patient} (The patient whose sequencing results are described by this resource.)
5444     */
5445    public MolecularSequence setPatient(Reference value) { 
5446      this.patient = value;
5447      return this;
5448    }
5449
5450    /**
5451     * @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.)
5452     */
5453    public Patient getPatientTarget() { 
5454      if (this.patientTarget == null)
5455        if (Configuration.errorOnAutoCreate())
5456          throw new Error("Attempt to auto-create MolecularSequence.patient");
5457        else if (Configuration.doAutoCreate())
5458          this.patientTarget = new Patient(); // aa
5459      return this.patientTarget;
5460    }
5461
5462    /**
5463     * @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.)
5464     */
5465    public MolecularSequence setPatientTarget(Patient value) { 
5466      this.patientTarget = value;
5467      return this;
5468    }
5469
5470    /**
5471     * @return {@link #specimen} (Specimen used for sequencing.)
5472     */
5473    public Reference getSpecimen() { 
5474      if (this.specimen == null)
5475        if (Configuration.errorOnAutoCreate())
5476          throw new Error("Attempt to auto-create MolecularSequence.specimen");
5477        else if (Configuration.doAutoCreate())
5478          this.specimen = new Reference(); // cc
5479      return this.specimen;
5480    }
5481
5482    public boolean hasSpecimen() { 
5483      return this.specimen != null && !this.specimen.isEmpty();
5484    }
5485
5486    /**
5487     * @param value {@link #specimen} (Specimen used for sequencing.)
5488     */
5489    public MolecularSequence setSpecimen(Reference value) { 
5490      this.specimen = value;
5491      return this;
5492    }
5493
5494    /**
5495     * @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.)
5496     */
5497    public Specimen getSpecimenTarget() { 
5498      if (this.specimenTarget == null)
5499        if (Configuration.errorOnAutoCreate())
5500          throw new Error("Attempt to auto-create MolecularSequence.specimen");
5501        else if (Configuration.doAutoCreate())
5502          this.specimenTarget = new Specimen(); // aa
5503      return this.specimenTarget;
5504    }
5505
5506    /**
5507     * @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.)
5508     */
5509    public MolecularSequence setSpecimenTarget(Specimen value) { 
5510      this.specimenTarget = value;
5511      return this;
5512    }
5513
5514    /**
5515     * @return {@link #device} (The method for sequencing, for example, chip information.)
5516     */
5517    public Reference getDevice() { 
5518      if (this.device == null)
5519        if (Configuration.errorOnAutoCreate())
5520          throw new Error("Attempt to auto-create MolecularSequence.device");
5521        else if (Configuration.doAutoCreate())
5522          this.device = new Reference(); // cc
5523      return this.device;
5524    }
5525
5526    public boolean hasDevice() { 
5527      return this.device != null && !this.device.isEmpty();
5528    }
5529
5530    /**
5531     * @param value {@link #device} (The method for sequencing, for example, chip information.)
5532     */
5533    public MolecularSequence setDevice(Reference value) { 
5534      this.device = value;
5535      return this;
5536    }
5537
5538    /**
5539     * @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.)
5540     */
5541    public Device getDeviceTarget() { 
5542      if (this.deviceTarget == null)
5543        if (Configuration.errorOnAutoCreate())
5544          throw new Error("Attempt to auto-create MolecularSequence.device");
5545        else if (Configuration.doAutoCreate())
5546          this.deviceTarget = new Device(); // aa
5547      return this.deviceTarget;
5548    }
5549
5550    /**
5551     * @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.)
5552     */
5553    public MolecularSequence setDeviceTarget(Device value) { 
5554      this.deviceTarget = value;
5555      return this;
5556    }
5557
5558    /**
5559     * @return {@link #performer} (The organization or lab that should be responsible for this result.)
5560     */
5561    public Reference getPerformer() { 
5562      if (this.performer == null)
5563        if (Configuration.errorOnAutoCreate())
5564          throw new Error("Attempt to auto-create MolecularSequence.performer");
5565        else if (Configuration.doAutoCreate())
5566          this.performer = new Reference(); // cc
5567      return this.performer;
5568    }
5569
5570    public boolean hasPerformer() { 
5571      return this.performer != null && !this.performer.isEmpty();
5572    }
5573
5574    /**
5575     * @param value {@link #performer} (The organization or lab that should be responsible for this result.)
5576     */
5577    public MolecularSequence setPerformer(Reference value) { 
5578      this.performer = value;
5579      return this;
5580    }
5581
5582    /**
5583     * @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.)
5584     */
5585    public Organization getPerformerTarget() { 
5586      if (this.performerTarget == null)
5587        if (Configuration.errorOnAutoCreate())
5588          throw new Error("Attempt to auto-create MolecularSequence.performer");
5589        else if (Configuration.doAutoCreate())
5590          this.performerTarget = new Organization(); // aa
5591      return this.performerTarget;
5592    }
5593
5594    /**
5595     * @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.)
5596     */
5597    public MolecularSequence setPerformerTarget(Organization value) { 
5598      this.performerTarget = value;
5599      return this;
5600    }
5601
5602    /**
5603     * @return {@link #quantity} (The number of copies of the sequence of interest. (RNASeq).)
5604     */
5605    public Quantity getQuantity() { 
5606      if (this.quantity == null)
5607        if (Configuration.errorOnAutoCreate())
5608          throw new Error("Attempt to auto-create MolecularSequence.quantity");
5609        else if (Configuration.doAutoCreate())
5610          this.quantity = new Quantity(); // cc
5611      return this.quantity;
5612    }
5613
5614    public boolean hasQuantity() { 
5615      return this.quantity != null && !this.quantity.isEmpty();
5616    }
5617
5618    /**
5619     * @param value {@link #quantity} (The number of copies of the sequence of interest. (RNASeq).)
5620     */
5621    public MolecularSequence setQuantity(Quantity value) { 
5622      this.quantity = value;
5623      return this;
5624    }
5625
5626    /**
5627     * @return {@link #referenceSeq} (A sequence that is used as a reference to describe variants that are present in a sequence analyzed.)
5628     */
5629    public MolecularSequenceReferenceSeqComponent getReferenceSeq() { 
5630      if (this.referenceSeq == null)
5631        if (Configuration.errorOnAutoCreate())
5632          throw new Error("Attempt to auto-create MolecularSequence.referenceSeq");
5633        else if (Configuration.doAutoCreate())
5634          this.referenceSeq = new MolecularSequenceReferenceSeqComponent(); // cc
5635      return this.referenceSeq;
5636    }
5637
5638    public boolean hasReferenceSeq() { 
5639      return this.referenceSeq != null && !this.referenceSeq.isEmpty();
5640    }
5641
5642    /**
5643     * @param value {@link #referenceSeq} (A sequence that is used as a reference to describe variants that are present in a sequence analyzed.)
5644     */
5645    public MolecularSequence setReferenceSeq(MolecularSequenceReferenceSeqComponent value) { 
5646      this.referenceSeq = value;
5647      return this;
5648    }
5649
5650    /**
5651     * @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.)
5652     */
5653    public List<MolecularSequenceVariantComponent> getVariant() { 
5654      if (this.variant == null)
5655        this.variant = new ArrayList<MolecularSequenceVariantComponent>();
5656      return this.variant;
5657    }
5658
5659    /**
5660     * @return Returns a reference to <code>this</code> for easy method chaining
5661     */
5662    public MolecularSequence setVariant(List<MolecularSequenceVariantComponent> theVariant) { 
5663      this.variant = theVariant;
5664      return this;
5665    }
5666
5667    public boolean hasVariant() { 
5668      if (this.variant == null)
5669        return false;
5670      for (MolecularSequenceVariantComponent item : this.variant)
5671        if (!item.isEmpty())
5672          return true;
5673      return false;
5674    }
5675
5676    public MolecularSequenceVariantComponent addVariant() { //3
5677      MolecularSequenceVariantComponent t = new MolecularSequenceVariantComponent();
5678      if (this.variant == null)
5679        this.variant = new ArrayList<MolecularSequenceVariantComponent>();
5680      this.variant.add(t);
5681      return t;
5682    }
5683
5684    public MolecularSequence addVariant(MolecularSequenceVariantComponent t) { //3
5685      if (t == null)
5686        return this;
5687      if (this.variant == null)
5688        this.variant = new ArrayList<MolecularSequenceVariantComponent>();
5689      this.variant.add(t);
5690      return this;
5691    }
5692
5693    /**
5694     * @return The first repetition of repeating field {@link #variant}, creating it if it does not already exist
5695     */
5696    public MolecularSequenceVariantComponent getVariantFirstRep() { 
5697      if (getVariant().isEmpty()) {
5698        addVariant();
5699      }
5700      return getVariant().get(0);
5701    }
5702
5703    /**
5704     * @return {@link #observedSeq} (Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall start 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
5705     */
5706    public StringType getObservedSeqElement() { 
5707      if (this.observedSeq == null)
5708        if (Configuration.errorOnAutoCreate())
5709          throw new Error("Attempt to auto-create MolecularSequence.observedSeq");
5710        else if (Configuration.doAutoCreate())
5711          this.observedSeq = new StringType(); // bb
5712      return this.observedSeq;
5713    }
5714
5715    public boolean hasObservedSeqElement() { 
5716      return this.observedSeq != null && !this.observedSeq.isEmpty();
5717    }
5718
5719    public boolean hasObservedSeq() { 
5720      return this.observedSeq != null && !this.observedSeq.isEmpty();
5721    }
5722
5723    /**
5724     * @param value {@link #observedSeq} (Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall start 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
5725     */
5726    public MolecularSequence setObservedSeqElement(StringType value) { 
5727      this.observedSeq = value;
5728      return this;
5729    }
5730
5731    /**
5732     * @return Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall start from referenceSeq.windowStart and end by referenceSeq.windowEnd.
5733     */
5734    public String getObservedSeq() { 
5735      return this.observedSeq == null ? null : this.observedSeq.getValue();
5736    }
5737
5738    /**
5739     * @param value Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall start from referenceSeq.windowStart and end by referenceSeq.windowEnd.
5740     */
5741    public MolecularSequence setObservedSeq(String value) { 
5742      if (Utilities.noString(value))
5743        this.observedSeq = null;
5744      else {
5745        if (this.observedSeq == null)
5746          this.observedSeq = new StringType();
5747        this.observedSeq.setValue(value);
5748      }
5749      return this;
5750    }
5751
5752    /**
5753     * @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)).)
5754     */
5755    public List<MolecularSequenceQualityComponent> getQuality() { 
5756      if (this.quality == null)
5757        this.quality = new ArrayList<MolecularSequenceQualityComponent>();
5758      return this.quality;
5759    }
5760
5761    /**
5762     * @return Returns a reference to <code>this</code> for easy method chaining
5763     */
5764    public MolecularSequence setQuality(List<MolecularSequenceQualityComponent> theQuality) { 
5765      this.quality = theQuality;
5766      return this;
5767    }
5768
5769    public boolean hasQuality() { 
5770      if (this.quality == null)
5771        return false;
5772      for (MolecularSequenceQualityComponent item : this.quality)
5773        if (!item.isEmpty())
5774          return true;
5775      return false;
5776    }
5777
5778    public MolecularSequenceQualityComponent addQuality() { //3
5779      MolecularSequenceQualityComponent t = new MolecularSequenceQualityComponent();
5780      if (this.quality == null)
5781        this.quality = new ArrayList<MolecularSequenceQualityComponent>();
5782      this.quality.add(t);
5783      return t;
5784    }
5785
5786    public MolecularSequence addQuality(MolecularSequenceQualityComponent t) { //3
5787      if (t == null)
5788        return this;
5789      if (this.quality == null)
5790        this.quality = new ArrayList<MolecularSequenceQualityComponent>();
5791      this.quality.add(t);
5792      return this;
5793    }
5794
5795    /**
5796     * @return The first repetition of repeating field {@link #quality}, creating it if it does not already exist
5797     */
5798    public MolecularSequenceQualityComponent getQualityFirstRep() { 
5799      if (getQuality().isEmpty()) {
5800        addQuality();
5801      }
5802      return getQuality().get(0);
5803    }
5804
5805    /**
5806     * @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
5807     */
5808    public IntegerType getReadCoverageElement() { 
5809      if (this.readCoverage == null)
5810        if (Configuration.errorOnAutoCreate())
5811          throw new Error("Attempt to auto-create MolecularSequence.readCoverage");
5812        else if (Configuration.doAutoCreate())
5813          this.readCoverage = new IntegerType(); // bb
5814      return this.readCoverage;
5815    }
5816
5817    public boolean hasReadCoverageElement() { 
5818      return this.readCoverage != null && !this.readCoverage.isEmpty();
5819    }
5820
5821    public boolean hasReadCoverage() { 
5822      return this.readCoverage != null && !this.readCoverage.isEmpty();
5823    }
5824
5825    /**
5826     * @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
5827     */
5828    public MolecularSequence setReadCoverageElement(IntegerType value) { 
5829      this.readCoverage = value;
5830      return this;
5831    }
5832
5833    /**
5834     * @return Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.
5835     */
5836    public int getReadCoverage() { 
5837      return this.readCoverage == null || this.readCoverage.isEmpty() ? 0 : this.readCoverage.getValue();
5838    }
5839
5840    /**
5841     * @param value Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.
5842     */
5843    public MolecularSequence setReadCoverage(int value) { 
5844        if (this.readCoverage == null)
5845          this.readCoverage = new IntegerType();
5846        this.readCoverage.setValue(value);
5847      return this;
5848    }
5849
5850    /**
5851     * @return {@link #repository} (Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.)
5852     */
5853    public List<MolecularSequenceRepositoryComponent> getRepository() { 
5854      if (this.repository == null)
5855        this.repository = new ArrayList<MolecularSequenceRepositoryComponent>();
5856      return this.repository;
5857    }
5858
5859    /**
5860     * @return Returns a reference to <code>this</code> for easy method chaining
5861     */
5862    public MolecularSequence setRepository(List<MolecularSequenceRepositoryComponent> theRepository) { 
5863      this.repository = theRepository;
5864      return this;
5865    }
5866
5867    public boolean hasRepository() { 
5868      if (this.repository == null)
5869        return false;
5870      for (MolecularSequenceRepositoryComponent item : this.repository)
5871        if (!item.isEmpty())
5872          return true;
5873      return false;
5874    }
5875
5876    public MolecularSequenceRepositoryComponent addRepository() { //3
5877      MolecularSequenceRepositoryComponent t = new MolecularSequenceRepositoryComponent();
5878      if (this.repository == null)
5879        this.repository = new ArrayList<MolecularSequenceRepositoryComponent>();
5880      this.repository.add(t);
5881      return t;
5882    }
5883
5884    public MolecularSequence addRepository(MolecularSequenceRepositoryComponent t) { //3
5885      if (t == null)
5886        return this;
5887      if (this.repository == null)
5888        this.repository = new ArrayList<MolecularSequenceRepositoryComponent>();
5889      this.repository.add(t);
5890      return this;
5891    }
5892
5893    /**
5894     * @return The first repetition of repeating field {@link #repository}, creating it if it does not already exist
5895     */
5896    public MolecularSequenceRepositoryComponent getRepositoryFirstRep() { 
5897      if (getRepository().isEmpty()) {
5898        addRepository();
5899      }
5900      return getRepository().get(0);
5901    }
5902
5903    /**
5904     * @return {@link #pointer} (Pointer to next atomic sequence which at most contains one variant.)
5905     */
5906    public List<Reference> getPointer() { 
5907      if (this.pointer == null)
5908        this.pointer = new ArrayList<Reference>();
5909      return this.pointer;
5910    }
5911
5912    /**
5913     * @return Returns a reference to <code>this</code> for easy method chaining
5914     */
5915    public MolecularSequence setPointer(List<Reference> thePointer) { 
5916      this.pointer = thePointer;
5917      return this;
5918    }
5919
5920    public boolean hasPointer() { 
5921      if (this.pointer == null)
5922        return false;
5923      for (Reference item : this.pointer)
5924        if (!item.isEmpty())
5925          return true;
5926      return false;
5927    }
5928
5929    public Reference addPointer() { //3
5930      Reference t = new Reference();
5931      if (this.pointer == null)
5932        this.pointer = new ArrayList<Reference>();
5933      this.pointer.add(t);
5934      return t;
5935    }
5936
5937    public MolecularSequence addPointer(Reference t) { //3
5938      if (t == null)
5939        return this;
5940      if (this.pointer == null)
5941        this.pointer = new ArrayList<Reference>();
5942      this.pointer.add(t);
5943      return this;
5944    }
5945
5946    /**
5947     * @return The first repetition of repeating field {@link #pointer}, creating it if it does not already exist
5948     */
5949    public Reference getPointerFirstRep() { 
5950      if (getPointer().isEmpty()) {
5951        addPointer();
5952      }
5953      return getPointer().get(0);
5954    }
5955
5956    /**
5957     * @deprecated Use Reference#setResource(IBaseResource) instead
5958     */
5959    @Deprecated
5960    public List<MolecularSequence> getPointerTarget() { 
5961      if (this.pointerTarget == null)
5962        this.pointerTarget = new ArrayList<MolecularSequence>();
5963      return this.pointerTarget;
5964    }
5965
5966    /**
5967     * @deprecated Use Reference#setResource(IBaseResource) instead
5968     */
5969    @Deprecated
5970    public MolecularSequence addPointerTarget() { 
5971      MolecularSequence r = new MolecularSequence();
5972      if (this.pointerTarget == null)
5973        this.pointerTarget = new ArrayList<MolecularSequence>();
5974      this.pointerTarget.add(r);
5975      return r;
5976    }
5977
5978    /**
5979     * @return {@link #structureVariant} (Information about chromosome structure variation.)
5980     */
5981    public List<MolecularSequenceStructureVariantComponent> getStructureVariant() { 
5982      if (this.structureVariant == null)
5983        this.structureVariant = new ArrayList<MolecularSequenceStructureVariantComponent>();
5984      return this.structureVariant;
5985    }
5986
5987    /**
5988     * @return Returns a reference to <code>this</code> for easy method chaining
5989     */
5990    public MolecularSequence setStructureVariant(List<MolecularSequenceStructureVariantComponent> theStructureVariant) { 
5991      this.structureVariant = theStructureVariant;
5992      return this;
5993    }
5994
5995    public boolean hasStructureVariant() { 
5996      if (this.structureVariant == null)
5997        return false;
5998      for (MolecularSequenceStructureVariantComponent item : this.structureVariant)
5999        if (!item.isEmpty())
6000          return true;
6001      return false;
6002    }
6003
6004    public MolecularSequenceStructureVariantComponent addStructureVariant() { //3
6005      MolecularSequenceStructureVariantComponent t = new MolecularSequenceStructureVariantComponent();
6006      if (this.structureVariant == null)
6007        this.structureVariant = new ArrayList<MolecularSequenceStructureVariantComponent>();
6008      this.structureVariant.add(t);
6009      return t;
6010    }
6011
6012    public MolecularSequence addStructureVariant(MolecularSequenceStructureVariantComponent t) { //3
6013      if (t == null)
6014        return this;
6015      if (this.structureVariant == null)
6016        this.structureVariant = new ArrayList<MolecularSequenceStructureVariantComponent>();
6017      this.structureVariant.add(t);
6018      return this;
6019    }
6020
6021    /**
6022     * @return The first repetition of repeating field {@link #structureVariant}, creating it if it does not already exist
6023     */
6024    public MolecularSequenceStructureVariantComponent getStructureVariantFirstRep() { 
6025      if (getStructureVariant().isEmpty()) {
6026        addStructureVariant();
6027      }
6028      return getStructureVariant().get(0);
6029    }
6030
6031      protected void listChildren(List<Property> children) {
6032        super.listChildren(children);
6033        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));
6034        children.add(new Property("type", "code", "Amino Acid Sequence/ DNA Sequence / RNA Sequence.", 0, 1, type));
6035        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));
6036        children.add(new Property("patient", "Reference(Patient)", "The patient whose sequencing results are described by this resource.", 0, 1, patient));
6037        children.add(new Property("specimen", "Reference(Specimen)", "Specimen used for sequencing.", 0, 1, specimen));
6038        children.add(new Property("device", "Reference(Device)", "The method for sequencing, for example, chip information.", 0, 1, device));
6039        children.add(new Property("performer", "Reference(Organization)", "The organization or lab that should be responsible for this result.", 0, 1, performer));
6040        children.add(new Property("quantity", "Quantity", "The number of copies of the sequence of interest. (RNASeq).", 0, 1, quantity));
6041        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));
6042        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));
6043        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 start from referenceSeq.windowStart and end by referenceSeq.windowEnd.", 0, 1, observedSeq));
6044        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));
6045        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));
6046        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));
6047        children.add(new Property("pointer", "Reference(MolecularSequence)", "Pointer to next atomic sequence which at most contains one variant.", 0, java.lang.Integer.MAX_VALUE, pointer));
6048        children.add(new Property("structureVariant", "", "Information about chromosome structure variation.", 0, java.lang.Integer.MAX_VALUE, structureVariant));
6049      }
6050
6051      @Override
6052      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6053        switch (_hash) {
6054        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);
6055        case 3575610: /*type*/  return new Property("type", "code", "Amino Acid Sequence/ DNA Sequence / RNA Sequence.", 0, 1, type);
6056        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);
6057        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "The patient whose sequencing results are described by this resource.", 0, 1, patient);
6058        case -2132868344: /*specimen*/  return new Property("specimen", "Reference(Specimen)", "Specimen used for sequencing.", 0, 1, specimen);
6059        case -1335157162: /*device*/  return new Property("device", "Reference(Device)", "The method for sequencing, for example, chip information.", 0, 1, device);
6060        case 481140686: /*performer*/  return new Property("performer", "Reference(Organization)", "The organization or lab that should be responsible for this result.", 0, 1, performer);
6061        case -1285004149: /*quantity*/  return new Property("quantity", "Quantity", "The number of copies of the sequence of interest. (RNASeq).", 0, 1, quantity);
6062        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);
6063        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);
6064        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 start from referenceSeq.windowStart and end by referenceSeq.windowEnd.", 0, 1, observedSeq);
6065        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);
6066        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);
6067        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);
6068        case -400605635: /*pointer*/  return new Property("pointer", "Reference(MolecularSequence)", "Pointer to next atomic sequence which at most contains one variant.", 0, java.lang.Integer.MAX_VALUE, pointer);
6069        case 757269394: /*structureVariant*/  return new Property("structureVariant", "", "Information about chromosome structure variation.", 0, java.lang.Integer.MAX_VALUE, structureVariant);
6070        default: return super.getNamedProperty(_hash, _name, _checkValid);
6071        }
6072
6073      }
6074
6075      @Override
6076      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6077        switch (hash) {
6078        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
6079        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<SequenceType>
6080        case 354212295: /*coordinateSystem*/ return this.coordinateSystem == null ? new Base[0] : new Base[] {this.coordinateSystem}; // IntegerType
6081        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
6082        case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : new Base[] {this.specimen}; // Reference
6083        case -1335157162: /*device*/ return this.device == null ? new Base[0] : new Base[] {this.device}; // Reference
6084        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference
6085        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
6086        case -502547180: /*referenceSeq*/ return this.referenceSeq == null ? new Base[0] : new Base[] {this.referenceSeq}; // MolecularSequenceReferenceSeqComponent
6087        case 236785797: /*variant*/ return this.variant == null ? new Base[0] : this.variant.toArray(new Base[this.variant.size()]); // MolecularSequenceVariantComponent
6088        case 125541495: /*observedSeq*/ return this.observedSeq == null ? new Base[0] : new Base[] {this.observedSeq}; // StringType
6089        case 651215103: /*quality*/ return this.quality == null ? new Base[0] : this.quality.toArray(new Base[this.quality.size()]); // MolecularSequenceQualityComponent
6090        case -1798816354: /*readCoverage*/ return this.readCoverage == null ? new Base[0] : new Base[] {this.readCoverage}; // IntegerType
6091        case 1950800714: /*repository*/ return this.repository == null ? new Base[0] : this.repository.toArray(new Base[this.repository.size()]); // MolecularSequenceRepositoryComponent
6092        case -400605635: /*pointer*/ return this.pointer == null ? new Base[0] : this.pointer.toArray(new Base[this.pointer.size()]); // Reference
6093        case 757269394: /*structureVariant*/ return this.structureVariant == null ? new Base[0] : this.structureVariant.toArray(new Base[this.structureVariant.size()]); // MolecularSequenceStructureVariantComponent
6094        default: return super.getProperty(hash, name, checkValid);
6095        }
6096
6097      }
6098
6099      @Override
6100      public Base setProperty(int hash, String name, Base value) throws FHIRException {
6101        switch (hash) {
6102        case -1618432855: // identifier
6103          this.getIdentifier().add(castToIdentifier(value)); // Identifier
6104          return value;
6105        case 3575610: // type
6106          value = new SequenceTypeEnumFactory().fromType(castToCode(value));
6107          this.type = (Enumeration) value; // Enumeration<SequenceType>
6108          return value;
6109        case 354212295: // coordinateSystem
6110          this.coordinateSystem = castToInteger(value); // IntegerType
6111          return value;
6112        case -791418107: // patient
6113          this.patient = castToReference(value); // Reference
6114          return value;
6115        case -2132868344: // specimen
6116          this.specimen = castToReference(value); // Reference
6117          return value;
6118        case -1335157162: // device
6119          this.device = castToReference(value); // Reference
6120          return value;
6121        case 481140686: // performer
6122          this.performer = castToReference(value); // Reference
6123          return value;
6124        case -1285004149: // quantity
6125          this.quantity = castToQuantity(value); // Quantity
6126          return value;
6127        case -502547180: // referenceSeq
6128          this.referenceSeq = (MolecularSequenceReferenceSeqComponent) value; // MolecularSequenceReferenceSeqComponent
6129          return value;
6130        case 236785797: // variant
6131          this.getVariant().add((MolecularSequenceVariantComponent) value); // MolecularSequenceVariantComponent
6132          return value;
6133        case 125541495: // observedSeq
6134          this.observedSeq = castToString(value); // StringType
6135          return value;
6136        case 651215103: // quality
6137          this.getQuality().add((MolecularSequenceQualityComponent) value); // MolecularSequenceQualityComponent
6138          return value;
6139        case -1798816354: // readCoverage
6140          this.readCoverage = castToInteger(value); // IntegerType
6141          return value;
6142        case 1950800714: // repository
6143          this.getRepository().add((MolecularSequenceRepositoryComponent) value); // MolecularSequenceRepositoryComponent
6144          return value;
6145        case -400605635: // pointer
6146          this.getPointer().add(castToReference(value)); // Reference
6147          return value;
6148        case 757269394: // structureVariant
6149          this.getStructureVariant().add((MolecularSequenceStructureVariantComponent) value); // MolecularSequenceStructureVariantComponent
6150          return value;
6151        default: return super.setProperty(hash, name, value);
6152        }
6153
6154      }
6155
6156      @Override
6157      public Base setProperty(String name, Base value) throws FHIRException {
6158        if (name.equals("identifier")) {
6159          this.getIdentifier().add(castToIdentifier(value));
6160        } else if (name.equals("type")) {
6161          value = new SequenceTypeEnumFactory().fromType(castToCode(value));
6162          this.type = (Enumeration) value; // Enumeration<SequenceType>
6163        } else if (name.equals("coordinateSystem")) {
6164          this.coordinateSystem = castToInteger(value); // IntegerType
6165        } else if (name.equals("patient")) {
6166          this.patient = castToReference(value); // Reference
6167        } else if (name.equals("specimen")) {
6168          this.specimen = castToReference(value); // Reference
6169        } else if (name.equals("device")) {
6170          this.device = castToReference(value); // Reference
6171        } else if (name.equals("performer")) {
6172          this.performer = castToReference(value); // Reference
6173        } else if (name.equals("quantity")) {
6174          this.quantity = castToQuantity(value); // Quantity
6175        } else if (name.equals("referenceSeq")) {
6176          this.referenceSeq = (MolecularSequenceReferenceSeqComponent) value; // MolecularSequenceReferenceSeqComponent
6177        } else if (name.equals("variant")) {
6178          this.getVariant().add((MolecularSequenceVariantComponent) value);
6179        } else if (name.equals("observedSeq")) {
6180          this.observedSeq = castToString(value); // StringType
6181        } else if (name.equals("quality")) {
6182          this.getQuality().add((MolecularSequenceQualityComponent) value);
6183        } else if (name.equals("readCoverage")) {
6184          this.readCoverage = castToInteger(value); // IntegerType
6185        } else if (name.equals("repository")) {
6186          this.getRepository().add((MolecularSequenceRepositoryComponent) value);
6187        } else if (name.equals("pointer")) {
6188          this.getPointer().add(castToReference(value));
6189        } else if (name.equals("structureVariant")) {
6190          this.getStructureVariant().add((MolecularSequenceStructureVariantComponent) value);
6191        } else
6192          return super.setProperty(name, value);
6193        return value;
6194      }
6195
6196      @Override
6197      public Base makeProperty(int hash, String name) throws FHIRException {
6198        switch (hash) {
6199        case -1618432855:  return addIdentifier(); 
6200        case 3575610:  return getTypeElement();
6201        case 354212295:  return getCoordinateSystemElement();
6202        case -791418107:  return getPatient(); 
6203        case -2132868344:  return getSpecimen(); 
6204        case -1335157162:  return getDevice(); 
6205        case 481140686:  return getPerformer(); 
6206        case -1285004149:  return getQuantity(); 
6207        case -502547180:  return getReferenceSeq(); 
6208        case 236785797:  return addVariant(); 
6209        case 125541495:  return getObservedSeqElement();
6210        case 651215103:  return addQuality(); 
6211        case -1798816354:  return getReadCoverageElement();
6212        case 1950800714:  return addRepository(); 
6213        case -400605635:  return addPointer(); 
6214        case 757269394:  return addStructureVariant(); 
6215        default: return super.makeProperty(hash, name);
6216        }
6217
6218      }
6219
6220      @Override
6221      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6222        switch (hash) {
6223        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
6224        case 3575610: /*type*/ return new String[] {"code"};
6225        case 354212295: /*coordinateSystem*/ return new String[] {"integer"};
6226        case -791418107: /*patient*/ return new String[] {"Reference"};
6227        case -2132868344: /*specimen*/ return new String[] {"Reference"};
6228        case -1335157162: /*device*/ return new String[] {"Reference"};
6229        case 481140686: /*performer*/ return new String[] {"Reference"};
6230        case -1285004149: /*quantity*/ return new String[] {"Quantity"};
6231        case -502547180: /*referenceSeq*/ return new String[] {};
6232        case 236785797: /*variant*/ return new String[] {};
6233        case 125541495: /*observedSeq*/ return new String[] {"string"};
6234        case 651215103: /*quality*/ return new String[] {};
6235        case -1798816354: /*readCoverage*/ return new String[] {"integer"};
6236        case 1950800714: /*repository*/ return new String[] {};
6237        case -400605635: /*pointer*/ return new String[] {"Reference"};
6238        case 757269394: /*structureVariant*/ return new String[] {};
6239        default: return super.getTypesForProperty(hash, name);
6240        }
6241
6242      }
6243
6244      @Override
6245      public Base addChild(String name) throws FHIRException {
6246        if (name.equals("identifier")) {
6247          return addIdentifier();
6248        }
6249        else if (name.equals("type")) {
6250          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.type");
6251        }
6252        else if (name.equals("coordinateSystem")) {
6253          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.coordinateSystem");
6254        }
6255        else if (name.equals("patient")) {
6256          this.patient = new Reference();
6257          return this.patient;
6258        }
6259        else if (name.equals("specimen")) {
6260          this.specimen = new Reference();
6261          return this.specimen;
6262        }
6263        else if (name.equals("device")) {
6264          this.device = new Reference();
6265          return this.device;
6266        }
6267        else if (name.equals("performer")) {
6268          this.performer = new Reference();
6269          return this.performer;
6270        }
6271        else if (name.equals("quantity")) {
6272          this.quantity = new Quantity();
6273          return this.quantity;
6274        }
6275        else if (name.equals("referenceSeq")) {
6276          this.referenceSeq = new MolecularSequenceReferenceSeqComponent();
6277          return this.referenceSeq;
6278        }
6279        else if (name.equals("variant")) {
6280          return addVariant();
6281        }
6282        else if (name.equals("observedSeq")) {
6283          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.observedSeq");
6284        }
6285        else if (name.equals("quality")) {
6286          return addQuality();
6287        }
6288        else if (name.equals("readCoverage")) {
6289          throw new FHIRException("Cannot call addChild on a primitive type MolecularSequence.readCoverage");
6290        }
6291        else if (name.equals("repository")) {
6292          return addRepository();
6293        }
6294        else if (name.equals("pointer")) {
6295          return addPointer();
6296        }
6297        else if (name.equals("structureVariant")) {
6298          return addStructureVariant();
6299        }
6300        else
6301          return super.addChild(name);
6302      }
6303
6304  public String fhirType() {
6305    return "MolecularSequence";
6306
6307  }
6308
6309      public MolecularSequence copy() {
6310        MolecularSequence dst = new MolecularSequence();
6311        copyValues(dst);
6312        if (identifier != null) {
6313          dst.identifier = new ArrayList<Identifier>();
6314          for (Identifier i : identifier)
6315            dst.identifier.add(i.copy());
6316        };
6317        dst.type = type == null ? null : type.copy();
6318        dst.coordinateSystem = coordinateSystem == null ? null : coordinateSystem.copy();
6319        dst.patient = patient == null ? null : patient.copy();
6320        dst.specimen = specimen == null ? null : specimen.copy();
6321        dst.device = device == null ? null : device.copy();
6322        dst.performer = performer == null ? null : performer.copy();
6323        dst.quantity = quantity == null ? null : quantity.copy();
6324        dst.referenceSeq = referenceSeq == null ? null : referenceSeq.copy();
6325        if (variant != null) {
6326          dst.variant = new ArrayList<MolecularSequenceVariantComponent>();
6327          for (MolecularSequenceVariantComponent i : variant)
6328            dst.variant.add(i.copy());
6329        };
6330        dst.observedSeq = observedSeq == null ? null : observedSeq.copy();
6331        if (quality != null) {
6332          dst.quality = new ArrayList<MolecularSequenceQualityComponent>();
6333          for (MolecularSequenceQualityComponent i : quality)
6334            dst.quality.add(i.copy());
6335        };
6336        dst.readCoverage = readCoverage == null ? null : readCoverage.copy();
6337        if (repository != null) {
6338          dst.repository = new ArrayList<MolecularSequenceRepositoryComponent>();
6339          for (MolecularSequenceRepositoryComponent i : repository)
6340            dst.repository.add(i.copy());
6341        };
6342        if (pointer != null) {
6343          dst.pointer = new ArrayList<Reference>();
6344          for (Reference i : pointer)
6345            dst.pointer.add(i.copy());
6346        };
6347        if (structureVariant != null) {
6348          dst.structureVariant = new ArrayList<MolecularSequenceStructureVariantComponent>();
6349          for (MolecularSequenceStructureVariantComponent i : structureVariant)
6350            dst.structureVariant.add(i.copy());
6351        };
6352        return dst;
6353      }
6354
6355      protected MolecularSequence typedCopy() {
6356        return copy();
6357      }
6358
6359      @Override
6360      public boolean equalsDeep(Base other_) {
6361        if (!super.equalsDeep(other_))
6362          return false;
6363        if (!(other_ instanceof MolecularSequence))
6364          return false;
6365        MolecularSequence o = (MolecularSequence) other_;
6366        return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(coordinateSystem, o.coordinateSystem, true)
6367           && compareDeep(patient, o.patient, true) && compareDeep(specimen, o.specimen, true) && compareDeep(device, o.device, true)
6368           && compareDeep(performer, o.performer, true) && compareDeep(quantity, o.quantity, true) && compareDeep(referenceSeq, o.referenceSeq, true)
6369           && compareDeep(variant, o.variant, true) && compareDeep(observedSeq, o.observedSeq, true) && compareDeep(quality, o.quality, true)
6370           && compareDeep(readCoverage, o.readCoverage, true) && compareDeep(repository, o.repository, true)
6371           && compareDeep(pointer, o.pointer, true) && compareDeep(structureVariant, o.structureVariant, true)
6372          ;
6373      }
6374
6375      @Override
6376      public boolean equalsShallow(Base other_) {
6377        if (!super.equalsShallow(other_))
6378          return false;
6379        if (!(other_ instanceof MolecularSequence))
6380          return false;
6381        MolecularSequence o = (MolecularSequence) other_;
6382        return compareValues(type, o.type, true) && compareValues(coordinateSystem, o.coordinateSystem, true)
6383           && compareValues(observedSeq, o.observedSeq, true) && compareValues(readCoverage, o.readCoverage, true)
6384          ;
6385      }
6386
6387      public boolean isEmpty() {
6388        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, coordinateSystem
6389          , patient, specimen, device, performer, quantity, referenceSeq, variant, observedSeq
6390          , quality, readCoverage, repository, pointer, structureVariant);
6391      }
6392
6393  @Override
6394  public ResourceType getResourceType() {
6395    return ResourceType.MolecularSequence;
6396   }
6397
6398 /**
6399   * Search parameter: <b>identifier</b>
6400   * <p>
6401   * Description: <b>The unique identity for a particular sequence</b><br>
6402   * Type: <b>token</b><br>
6403   * Path: <b>MolecularSequence.identifier</b><br>
6404   * </p>
6405   */
6406  @SearchParamDefinition(name="identifier", path="MolecularSequence.identifier", description="The unique identity for a particular sequence", type="token" )
6407  public static final String SP_IDENTIFIER = "identifier";
6408 /**
6409   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
6410   * <p>
6411   * Description: <b>The unique identity for a particular sequence</b><br>
6412   * Type: <b>token</b><br>
6413   * Path: <b>MolecularSequence.identifier</b><br>
6414   * </p>
6415   */
6416  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
6417
6418 /**
6419   * Search parameter: <b>referenceseqid-variant-coordinate</b>
6420   * <p>
6421   * Description: <b>Search parameter by reference sequence and variant coordinate. 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 `referenceSeqId-variant-coordinate=NC_000001.11$lt345$gt123`, this means it will search for the MolecularSequence resource with variants on NC_000001.11 and with position >123 and <345, where in 1-based system resource, all strings within region NC_000001.11:124-344 will be revealed, while in 0-based system resource, all strings within region NC_000001.11:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.</b><br>
6422   * Type: <b>composite</b><br>
6423   * Path: <b></b><br>
6424   * </p>
6425   */
6426  @SearchParamDefinition(name="referenceseqid-variant-coordinate", path="MolecularSequence.variant", description="Search parameter by reference sequence and variant coordinate. 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 `referenceSeqId-variant-coordinate=NC_000001.11$lt345$gt123`, this means it will search for the MolecularSequence resource with variants on NC_000001.11 and with position >123 and <345, where in 1-based system resource, all strings within region NC_000001.11:124-344 will be revealed, while in 0-based system resource, all strings within region NC_000001.11:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.", type="composite", compositeOf={"referenceseqid", "variant-start"} )
6427  public static final String SP_REFERENCESEQID_VARIANT_COORDINATE = "referenceseqid-variant-coordinate";
6428 /**
6429   * <b>Fluent Client</b> search parameter constant for <b>referenceseqid-variant-coordinate</b>
6430   * <p>
6431   * Description: <b>Search parameter by reference sequence and variant coordinate. 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 `referenceSeqId-variant-coordinate=NC_000001.11$lt345$gt123`, this means it will search for the MolecularSequence resource with variants on NC_000001.11 and with position >123 and <345, where in 1-based system resource, all strings within region NC_000001.11:124-344 will be revealed, while in 0-based system resource, all strings within region NC_000001.11:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.</b><br>
6432   * Type: <b>composite</b><br>
6433   * Path: <b></b><br>
6434   * </p>
6435   */
6436  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.NumberClientParam> REFERENCESEQID_VARIANT_COORDINATE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.NumberClientParam>(SP_REFERENCESEQID_VARIANT_COORDINATE);
6437
6438 /**
6439   * Search parameter: <b>chromosome</b>
6440   * <p>
6441   * Description: <b>Chromosome number of the reference sequence</b><br>
6442   * Type: <b>token</b><br>
6443   * Path: <b>MolecularSequence.referenceSeq.chromosome</b><br>
6444   * </p>
6445   */
6446  @SearchParamDefinition(name="chromosome", path="MolecularSequence.referenceSeq.chromosome", description="Chromosome number of the reference sequence", type="token" )
6447  public static final String SP_CHROMOSOME = "chromosome";
6448 /**
6449   * <b>Fluent Client</b> search parameter constant for <b>chromosome</b>
6450   * <p>
6451   * Description: <b>Chromosome number of the reference sequence</b><br>
6452   * Type: <b>token</b><br>
6453   * Path: <b>MolecularSequence.referenceSeq.chromosome</b><br>
6454   * </p>
6455   */
6456  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CHROMOSOME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CHROMOSOME);
6457
6458 /**
6459   * Search parameter: <b>window-end</b>
6460   * <p>
6461   * 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>
6462   * Type: <b>number</b><br>
6463   * Path: <b>MolecularSequence.referenceSeq.windowEnd</b><br>
6464   * </p>
6465   */
6466  @SearchParamDefinition(name="window-end", path="MolecularSequence.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" )
6467  public static final String SP_WINDOW_END = "window-end";
6468 /**
6469   * <b>Fluent Client</b> search parameter constant for <b>window-end</b>
6470   * <p>
6471   * 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>
6472   * Type: <b>number</b><br>
6473   * Path: <b>MolecularSequence.referenceSeq.windowEnd</b><br>
6474   * </p>
6475   */
6476  public static final ca.uhn.fhir.rest.gclient.NumberClientParam WINDOW_END = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_WINDOW_END);
6477
6478 /**
6479   * Search parameter: <b>type</b>
6480   * <p>
6481   * Description: <b>Amino Acid Sequence/ DNA Sequence / RNA Sequence</b><br>
6482   * Type: <b>token</b><br>
6483   * Path: <b>MolecularSequence.type</b><br>
6484   * </p>
6485   */
6486  @SearchParamDefinition(name="type", path="MolecularSequence.type", description="Amino Acid Sequence/ DNA Sequence / RNA Sequence", type="token" )
6487  public static final String SP_TYPE = "type";
6488 /**
6489   * <b>Fluent Client</b> search parameter constant for <b>type</b>
6490   * <p>
6491   * Description: <b>Amino Acid Sequence/ DNA Sequence / RNA Sequence</b><br>
6492   * Type: <b>token</b><br>
6493   * Path: <b>MolecularSequence.type</b><br>
6494   * </p>
6495   */
6496  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
6497
6498 /**
6499   * Search parameter: <b>window-start</b>
6500   * <p>
6501   * 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>
6502   * Type: <b>number</b><br>
6503   * Path: <b>MolecularSequence.referenceSeq.windowStart</b><br>
6504   * </p>
6505   */
6506  @SearchParamDefinition(name="window-start", path="MolecularSequence.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" )
6507  public static final String SP_WINDOW_START = "window-start";
6508 /**
6509   * <b>Fluent Client</b> search parameter constant for <b>window-start</b>
6510   * <p>
6511   * 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>
6512   * Type: <b>number</b><br>
6513   * Path: <b>MolecularSequence.referenceSeq.windowStart</b><br>
6514   * </p>
6515   */
6516  public static final ca.uhn.fhir.rest.gclient.NumberClientParam WINDOW_START = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_WINDOW_START);
6517
6518 /**
6519   * Search parameter: <b>variant-end</b>
6520   * <p>
6521   * 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 variant.</b><br>
6522   * Type: <b>number</b><br>
6523   * Path: <b>MolecularSequence.variant.end</b><br>
6524   * </p>
6525   */
6526  @SearchParamDefinition(name="variant-end", path="MolecularSequence.variant.end", 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 variant.", type="number" )
6527  public static final String SP_VARIANT_END = "variant-end";
6528 /**
6529   * <b>Fluent Client</b> search parameter constant for <b>variant-end</b>
6530   * <p>
6531   * 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 variant.</b><br>
6532   * Type: <b>number</b><br>
6533   * Path: <b>MolecularSequence.variant.end</b><br>
6534   * </p>
6535   */
6536  public static final ca.uhn.fhir.rest.gclient.NumberClientParam VARIANT_END = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_VARIANT_END);
6537
6538 /**
6539   * Search parameter: <b>chromosome-variant-coordinate</b>
6540   * <p>
6541   * Description: <b>Search parameter by chromosome and variant coordinate. 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 `chromosome-variant-coordinate=1$lt345$gt123`, this means it will search for the MolecularSequence resource with variants 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>
6542   * Type: <b>composite</b><br>
6543   * Path: <b></b><br>
6544   * </p>
6545   */
6546  @SearchParamDefinition(name="chromosome-variant-coordinate", path="MolecularSequence.variant", description="Search parameter by chromosome and variant coordinate. 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 `chromosome-variant-coordinate=1$lt345$gt123`, this means it will search for the MolecularSequence resource with variants 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", "variant-start"} )
6547  public static final String SP_CHROMOSOME_VARIANT_COORDINATE = "chromosome-variant-coordinate";
6548 /**
6549   * <b>Fluent Client</b> search parameter constant for <b>chromosome-variant-coordinate</b>
6550   * <p>
6551   * Description: <b>Search parameter by chromosome and variant coordinate. 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 `chromosome-variant-coordinate=1$lt345$gt123`, this means it will search for the MolecularSequence resource with variants 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>
6552   * Type: <b>composite</b><br>
6553   * Path: <b></b><br>
6554   * </p>
6555   */
6556  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.NumberClientParam> CHROMOSOME_VARIANT_COORDINATE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.NumberClientParam>(SP_CHROMOSOME_VARIANT_COORDINATE);
6557
6558 /**
6559   * Search parameter: <b>patient</b>
6560   * <p>
6561   * Description: <b>The subject that the observation is about</b><br>
6562   * Type: <b>reference</b><br>
6563   * Path: <b>MolecularSequence.patient</b><br>
6564   * </p>
6565   */
6566  @SearchParamDefinition(name="patient", path="MolecularSequence.patient", description="The subject that the observation is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } )
6567  public static final String SP_PATIENT = "patient";
6568 /**
6569   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
6570   * <p>
6571   * Description: <b>The subject that the observation is about</b><br>
6572   * Type: <b>reference</b><br>
6573   * Path: <b>MolecularSequence.patient</b><br>
6574   * </p>
6575   */
6576  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
6577
6578/**
6579   * Constant for fluent queries to be used to add include statements. Specifies
6580   * the path value of "<b>MolecularSequence:patient</b>".
6581   */
6582  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("MolecularSequence:patient").toLocked();
6583
6584 /**
6585   * Search parameter: <b>variant-start</b>
6586   * <p>
6587   * 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 variant.</b><br>
6588   * Type: <b>number</b><br>
6589   * Path: <b>MolecularSequence.variant.start</b><br>
6590   * </p>
6591   */
6592  @SearchParamDefinition(name="variant-start", path="MolecularSequence.variant.start", 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 variant.", type="number" )
6593  public static final String SP_VARIANT_START = "variant-start";
6594 /**
6595   * <b>Fluent Client</b> search parameter constant for <b>variant-start</b>
6596   * <p>
6597   * 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 variant.</b><br>
6598   * Type: <b>number</b><br>
6599   * Path: <b>MolecularSequence.variant.start</b><br>
6600   * </p>
6601   */
6602  public static final ca.uhn.fhir.rest.gclient.NumberClientParam VARIANT_START = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_VARIANT_START);
6603
6604 /**
6605   * Search parameter: <b>chromosome-window-coordinate</b>
6606   * <p>
6607   * Description: <b>Search parameter by chromosome and window. 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 `chromosome-window-coordinate=1$lt345$gt123`, this means it will search for the MolecularSequence resource with a window 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>
6608   * Type: <b>composite</b><br>
6609   * Path: <b></b><br>
6610   * </p>
6611   */
6612  @SearchParamDefinition(name="chromosome-window-coordinate", path="MolecularSequence.referenceSeq", description="Search parameter by chromosome and window. 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 `chromosome-window-coordinate=1$lt345$gt123`, this means it will search for the MolecularSequence resource with a window 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", "window-start"} )
6613  public static final String SP_CHROMOSOME_WINDOW_COORDINATE = "chromosome-window-coordinate";
6614 /**
6615   * <b>Fluent Client</b> search parameter constant for <b>chromosome-window-coordinate</b>
6616   * <p>
6617   * Description: <b>Search parameter by chromosome and window. 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 `chromosome-window-coordinate=1$lt345$gt123`, this means it will search for the MolecularSequence resource with a window 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>
6618   * Type: <b>composite</b><br>
6619   * Path: <b></b><br>
6620   * </p>
6621   */
6622  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.NumberClientParam> CHROMOSOME_WINDOW_COORDINATE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.NumberClientParam>(SP_CHROMOSOME_WINDOW_COORDINATE);
6623
6624 /**
6625   * Search parameter: <b>referenceseqid-window-coordinate</b>
6626   * <p>
6627   * Description: <b>Search parameter by reference sequence and window. 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 `referenceSeqId-window-coordinate=NC_000001.11$lt345$gt123`, this means it will search for the MolecularSequence resource with a window on NC_000001.11 and with position >123 and <345, where in 1-based system resource, all strings within region NC_000001.11:124-344 will be revealed, while in 0-based system resource, all strings within region NC_000001.11:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.</b><br>
6628   * Type: <b>composite</b><br>
6629   * Path: <b></b><br>
6630   * </p>
6631   */
6632  @SearchParamDefinition(name="referenceseqid-window-coordinate", path="MolecularSequence.referenceSeq", description="Search parameter by reference sequence and window. 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 `referenceSeqId-window-coordinate=NC_000001.11$lt345$gt123`, this means it will search for the MolecularSequence resource with a window on NC_000001.11 and with position >123 and <345, where in 1-based system resource, all strings within region NC_000001.11:124-344 will be revealed, while in 0-based system resource, all strings within region NC_000001.11:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.", type="composite", compositeOf={"referenceseqid", "window-start"} )
6633  public static final String SP_REFERENCESEQID_WINDOW_COORDINATE = "referenceseqid-window-coordinate";
6634 /**
6635   * <b>Fluent Client</b> search parameter constant for <b>referenceseqid-window-coordinate</b>
6636   * <p>
6637   * Description: <b>Search parameter by reference sequence and window. 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 `referenceSeqId-window-coordinate=NC_000001.11$lt345$gt123`, this means it will search for the MolecularSequence resource with a window on NC_000001.11 and with position >123 and <345, where in 1-based system resource, all strings within region NC_000001.11:124-344 will be revealed, while in 0-based system resource, all strings within region NC_000001.11:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.</b><br>
6638   * Type: <b>composite</b><br>
6639   * Path: <b></b><br>
6640   * </p>
6641   */
6642  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.NumberClientParam> REFERENCESEQID_WINDOW_COORDINATE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.NumberClientParam>(SP_REFERENCESEQID_WINDOW_COORDINATE);
6643
6644 /**
6645   * Search parameter: <b>referenceseqid</b>
6646   * <p>
6647   * Description: <b>Reference Sequence of the sequence</b><br>
6648   * Type: <b>token</b><br>
6649   * Path: <b>MolecularSequence.referenceSeq.referenceSeqId</b><br>
6650   * </p>
6651   */
6652  @SearchParamDefinition(name="referenceseqid", path="MolecularSequence.referenceSeq.referenceSeqId", description="Reference Sequence of the sequence", type="token" )
6653  public static final String SP_REFERENCESEQID = "referenceseqid";
6654 /**
6655   * <b>Fluent Client</b> search parameter constant for <b>referenceseqid</b>
6656   * <p>
6657   * Description: <b>Reference Sequence of the sequence</b><br>
6658   * Type: <b>token</b><br>
6659   * Path: <b>MolecularSequence.referenceSeq.referenceSeqId</b><br>
6660   * </p>
6661   */
6662  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REFERENCESEQID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REFERENCESEQID);
6663
6664
6665}
6666