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