Phase 1 FHIR on PHP- Provider Client and implement classes. (#1422)
[openemr.git] / phpfhir / HL7 / FHIR / STU3 / src / FHIRResource / FHIRSequence / FHIRSequenceVariant.php
blob2bfed5d2d121045b150baf49ac59cedfe2a17b74
1 <?php namespace HL7\FHIR\STU3\FHIRResource\FHIRSequence;
3 /*!
4 * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using
5 * class definitions from HL7 FHIR (https://www.hl7.org/fhir/)
6 *
7 * Class creation date: February 10th, 2018
8 */
10 use HL7\FHIR\STU3\FHIRElement\FHIRBackboneElement;
12 /**
13 * Raw data describing a biological sequence.
15 class FHIRSequenceVariant extends FHIRBackboneElement implements \JsonSerializable
17 /**
18 * 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.
19 * @var \HL7\FHIR\STU3\FHIRElement\FHIRInteger
21 public $start = null;
23 /**
24 * End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
25 * @var \HL7\FHIR\STU3\FHIRElement\FHIRInteger
27 public $end = null;
29 /**
30 * 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.
31 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
33 public $observedAllele = null;
35 /**
36 * 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.
37 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
39 public $referenceAllele = null;
41 /**
42 * 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).
43 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
45 public $cigar = null;
47 /**
48 * A pointer to an Observation containing variant information.
49 * @var \HL7\FHIR\STU3\FHIRElement\FHIRReference
51 public $variantPointer = null;
53 /**
54 * @var string
56 private $_fhirElementName = 'Sequence.Variant';
58 /**
59 * 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.
60 * @return \HL7\FHIR\STU3\FHIRElement\FHIRInteger
62 public function getStart()
64 return $this->start;
67 /**
68 * 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.
69 * @param \HL7\FHIR\STU3\FHIRElement\FHIRInteger $start
70 * @return $this
72 public function setStart($start)
74 $this->start = $start;
75 return $this;
78 /**
79 * End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
80 * @return \HL7\FHIR\STU3\FHIRElement\FHIRInteger
82 public function getEnd()
84 return $this->end;
87 /**
88 * End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
89 * @param \HL7\FHIR\STU3\FHIRElement\FHIRInteger $end
90 * @return $this
92 public function setEnd($end)
94 $this->end = $end;
95 return $this;
98 /**
99 * 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.
100 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
102 public function getObservedAllele()
104 return $this->observedAllele;
108 * 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.
109 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $observedAllele
110 * @return $this
112 public function setObservedAllele($observedAllele)
114 $this->observedAllele = $observedAllele;
115 return $this;
119 * 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.
120 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
122 public function getReferenceAllele()
124 return $this->referenceAllele;
128 * 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.
129 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $referenceAllele
130 * @return $this
132 public function setReferenceAllele($referenceAllele)
134 $this->referenceAllele = $referenceAllele;
135 return $this;
139 * 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).
140 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
142 public function getCigar()
144 return $this->cigar;
148 * 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).
149 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $cigar
150 * @return $this
152 public function setCigar($cigar)
154 $this->cigar = $cigar;
155 return $this;
159 * A pointer to an Observation containing variant information.
160 * @return \HL7\FHIR\STU3\FHIRElement\FHIRReference
162 public function getVariantPointer()
164 return $this->variantPointer;
168 * A pointer to an Observation containing variant information.
169 * @param \HL7\FHIR\STU3\FHIRElement\FHIRReference $variantPointer
170 * @return $this
172 public function setVariantPointer($variantPointer)
174 $this->variantPointer = $variantPointer;
175 return $this;
179 * @return string
181 public function get_fhirElementName()
183 return $this->_fhirElementName;
187 * @param mixed $data
189 public function __construct($data = [])
191 if (is_array($data)) {
192 if (isset($data['start'])) {
193 $this->setStart($data['start']);
195 if (isset($data['end'])) {
196 $this->setEnd($data['end']);
198 if (isset($data['observedAllele'])) {
199 $this->setObservedAllele($data['observedAllele']);
201 if (isset($data['referenceAllele'])) {
202 $this->setReferenceAllele($data['referenceAllele']);
204 if (isset($data['cigar'])) {
205 $this->setCigar($data['cigar']);
207 if (isset($data['variantPointer'])) {
208 $this->setVariantPointer($data['variantPointer']);
210 } else if (null !== $data) {
211 throw new \InvalidArgumentException('$data expected to be array of values, saw "'.gettype($data).'"');
213 parent::__construct($data);
217 * @return string
219 public function __toString()
221 return $this->get_fhirElementName();
225 * @return array
227 public function jsonSerialize()
229 $json = parent::jsonSerialize();
230 if (isset($this->start)) {
231 $json['start'] = $this->start;
233 if (isset($this->end)) {
234 $json['end'] = $this->end;
236 if (isset($this->observedAllele)) {
237 $json['observedAllele'] = $this->observedAllele;
239 if (isset($this->referenceAllele)) {
240 $json['referenceAllele'] = $this->referenceAllele;
242 if (isset($this->cigar)) {
243 $json['cigar'] = $this->cigar;
245 if (isset($this->variantPointer)) {
246 $json['variantPointer'] = $this->variantPointer;
248 return $json;
252 * @param boolean $returnSXE
253 * @param \SimpleXMLElement $sxe
254 * @return string|\SimpleXMLElement
256 public function xmlSerialize($returnSXE = false, $sxe = null)
258 if (null === $sxe) {
259 $sxe = new \SimpleXMLElement('<SequenceVariant xmlns="http://hl7.org/fhir"></SequenceVariant>');
261 parent::xmlSerialize(true, $sxe);
262 if (isset($this->start)) {
263 $this->start->xmlSerialize(true, $sxe->addChild('start'));
265 if (isset($this->end)) {
266 $this->end->xmlSerialize(true, $sxe->addChild('end'));
268 if (isset($this->observedAllele)) {
269 $this->observedAllele->xmlSerialize(true, $sxe->addChild('observedAllele'));
271 if (isset($this->referenceAllele)) {
272 $this->referenceAllele->xmlSerialize(true, $sxe->addChild('referenceAllele'));
274 if (isset($this->cigar)) {
275 $this->cigar->xmlSerialize(true, $sxe->addChild('cigar'));
277 if (isset($this->variantPointer)) {
278 $this->variantPointer->xmlSerialize(true, $sxe->addChild('variantPointer'));
280 if ($returnSXE) {
281 return $sxe;
283 return $sxe->saveXML();