1 <?php
namespace HL7\FHIR\STU3\FHIRResource\FHIRMeasure
;
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/)
7 * Class creation date: February 10th, 2018
10 use HL7\FHIR\STU3\FHIRElement\FHIRBackboneElement
;
13 * The Measure resource provides the definition of a quality measure.
15 class FHIRMeasureSupplementalData
extends FHIRBackboneElement
implements \JsonSerializable
18 * An identifier for the supplemental data.
19 * @var \HL7\FHIR\STU3\FHIRElement\FHIRIdentifier
21 public $identifier = null;
24 * An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.
25 * @var \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept[]
30 * The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.
31 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
33 public $criteria = null;
36 * The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.
37 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
44 private $_fhirElementName = 'Measure.SupplementalData';
47 * An identifier for the supplemental data.
48 * @return \HL7\FHIR\STU3\FHIRElement\FHIRIdentifier
50 public function getIdentifier()
52 return $this->identifier
;
56 * An identifier for the supplemental data.
57 * @param \HL7\FHIR\STU3\FHIRElement\FHIRIdentifier $identifier
60 public function setIdentifier($identifier)
62 $this->identifier
= $identifier;
67 * An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.
68 * @return \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept[]
70 public function getUsage()
76 * An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.
77 * @param \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept $usage
80 public function addUsage($usage)
82 $this->usage
[] = $usage;
87 * The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.
88 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
90 public function getCriteria()
92 return $this->criteria
;
96 * The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.
97 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $criteria
100 public function setCriteria($criteria)
102 $this->criteria
= $criteria;
107 * The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.
108 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
110 public function getPath()
116 * The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.
117 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $path
120 public function setPath($path)
129 public function get_fhirElementName()
131 return $this->_fhirElementName
;
137 public function __construct($data = [])
139 if (is_array($data)) {
140 if (isset($data['identifier'])) {
141 $this->setIdentifier($data['identifier']);
143 if (isset($data['usage'])) {
144 if (is_array($data['usage'])) {
145 foreach ($data['usage'] as $d) {
149 throw new \
InvalidArgumentException('"usage" must be array of objects or null, '.gettype($data['usage']).' seen.');
152 if (isset($data['criteria'])) {
153 $this->setCriteria($data['criteria']);
155 if (isset($data['path'])) {
156 $this->setPath($data['path']);
158 } else if (null !== $data) {
159 throw new \
InvalidArgumentException('$data expected to be array of values, saw "'.gettype($data).'"');
161 parent
::__construct($data);
167 public function __toString()
169 return $this->get_fhirElementName();
175 public function jsonSerialize()
177 $json = parent
::jsonSerialize();
178 if (isset($this->identifier
)) {
179 $json['identifier'] = $this->identifier
;
181 if (0 < count($this->usage
)) {
183 foreach ($this->usage
as $usage) {
184 $json['usage'][] = $usage;
187 if (isset($this->criteria
)) {
188 $json['criteria'] = $this->criteria
;
190 if (isset($this->path
)) {
191 $json['path'] = $this->path
;
197 * @param boolean $returnSXE
198 * @param \SimpleXMLElement $sxe
199 * @return string|\SimpleXMLElement
201 public function xmlSerialize($returnSXE = false, $sxe = null)
204 $sxe = new \
SimpleXMLElement('<MeasureSupplementalData xmlns="http://hl7.org/fhir"></MeasureSupplementalData>');
206 parent
::xmlSerialize(true, $sxe);
207 if (isset($this->identifier
)) {
208 $this->identifier
->xmlSerialize(true, $sxe->addChild('identifier'));
210 if (0 < count($this->usage
)) {
211 foreach ($this->usage
as $usage) {
212 $usage->xmlSerialize(true, $sxe->addChild('usage'));
215 if (isset($this->criteria
)) {
216 $this->criteria
->xmlSerialize(true, $sxe->addChild('criteria'));
218 if (isset($this->path
)) {
219 $this->path
->xmlSerialize(true, $sxe->addChild('path'));
224 return $sxe->saveXML();